fix(Scripts/HallsOfReflection): Improve Halls of Reflection Events (Horde) (#16165)

* fix(DB/Creature): Grunda Bronzewing is now mounted

Grunda Bronzewing is now mounted

* Update Fix-Grunda Bronzewing in Honor Hold is not riding on a golden gryphon.sql

Grunda Bronzewing is now mounted

* Rename Fix-Grunda Bronzewing in Honor Hold is not riding on a golden gryphon.sql to Fix-Grunda.sql

Grunda Bronzewing is now mounted

* Delete Fix-Grunda.sql

* Create Fix-NPCs_Halls_Off_Reflection.sql

* Fix-events_Halls_of_Reflection(HORDE)

* Rename Fix-NPCs_Halls_Off_Reflection.sql to Fix-NPCs_Halls_of_Reflection.sql

* Rename halls_of_reflection.cpp to fix halls_of_reflection.cpp

* Rename halls_of_reflection.h to fix halls_of_reflection.h

* Rename instance_halls_of_reflection.cpp to fix instance_halls_of_reflection.cpp

* Update fix halls_of_reflection.h

* Update and rename fix halls_of_reflection.cpp to halls_of_reflection.cpp

* Update and rename fix instance_halls_of_reflection.cpp to instance_halls_of_reflection.cpp

* Update instance_halls_of_reflection.cpp

* Update instance_halls_of_reflection.cpp

* Update instance_halls_of_reflection.cpp

* Update and rename fix halls_of_reflection.h to halls_of_reflection.h

* Update instance_halls_of_reflection.cpp

* Update halls_of_reflection.h

* Update Fix-NPCs_Halls_of_Reflection.sql

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update instance_halls_of_reflection.cpp

* Update halls_of_reflection.h

* Update instance_halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update Fix-NPCs_Halls_of_Reflection.sql

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update and rename Fix-NPCs_Halls_of_Reflection.sql to Fix_NPCs_Halls_of_Reflection.sql

* Update halls_of_reflection.cpp

* Update halls_of_reflection.cpp

* Update Fix_NPCs_Halls_of_Reflection.sql

* Update Fix_NPCs_Halls_of_Reflection.sql

* Update Fix_NPCs_Halls_of_Reflection.sql

* Update Fix_NPCs_Halls_of_Reflection.sql

* Update Fix_NPCs_Halls_of_Reflection.sql

* Update Fix_NPCs_Halls_of_Reflection.sql

* Update Fix_NPCs_Halls_of_Reflection.sql

* Update src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp

* Update src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp

* Update src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp

* Apply suggestions from code review

* Update src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp

* Update src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp

---------
This commit is contained in:
pedrohfm9
2023-05-13 15:25:53 -03:00
committed by GitHub
parent ca1c6328e5
commit 3c401ad4ad
4 changed files with 692 additions and 398 deletions

View File

@@ -50,6 +50,7 @@ enum Data
ACTION_STOP_LK_FIGHT,
ACTION_DELETE_ICE_WALL,
DATA_WAVE_NUMBER,
DATA_LK_BATTLE,// in progress
};
enum Creatures
@@ -84,6 +85,7 @@ enum Creatures
NPC_SKY_REAVER_KORM_BLACKSKAR = 30824,
NPC_ALTAR_BUNNY = 37704,
NPC_QUEL_DELAR = 37158,
};
enum GameObjects
@@ -263,8 +265,14 @@ enum hMisc
SPELL_HOR_START_QUEST_ALLY = 71351,
SPELL_HOR_START_QUEST_HORDE = 71542,
SPELL_SHADOWMOURNE_VISUAL = 72523,
SPELL_ARCANE_CAST_VISUAL = 65633,
SPELL_UTHER_DESPAWN = 70693, //Sniffed
SPELL_WELL_OF_SOULS_VISUAL = 72630,
SPELL_SUMMON_SOULS = 72711, //Sniffed Sylvanas
//Battle of LK
SPELL_BLIDING_RETREAT = 70199, //Sniffed LK
SPELL_SOUL_REAPER = 69410, //Sniffed LK
SPELL_EVASION = 70190, //Sniffed Sylvanas
// Frostsworn General
EVENT_ACTIVATE_REFLECTIONS = 1,
@@ -310,18 +318,24 @@ const uint32 allowedCompositions[8][5] =
{NPC_WAVE_MERCENARY, NPC_WAVE_MAGE, NPC_WAVE_PRIEST, NPC_WAVE_FOOTMAN, NPC_WAVE_FOOTMAN}
};
const Position CenterPos = {5309.459473f, 2006.478516f, 711.595459f, 0.0f};
const Position SpawnPos = {5262.540527f, 1949.693726f, 707.695007f, 0.808736f}; // Jaina/Sylvanas Beginning Position
const Position LoralenFollowPos = {5283.234863f, 1990.946777f, 707.695679f, 0.929097f};
const Position MoveThronePos = {5306.952148f, 1998.499023f, 709.341431f, 1.277278f}; // Jaina/Sylvanas walks to throne
const Position UtherSpawnPos = {5308.310059f, 2003.857178f, 709.341431f, 4.650315f};
const Position CenterPos = {5309.459473f, 2006.478516f, 711.595459f, 0.0f};
const Position SpawnPos = {5263.22412f, 1950.95544f, 707.695862f, 0.808736f}; // Jaina/Sylvanas Beginning Position
const Position LoralenMidleFollowPos = {5274.25634f, 1976.04760f, 707.694763f, 0.929097f}; // Sniffed
const Position LoralenFollowPos = {5283.29296f, 1992.43078f, 707.694763f, 0.549238f}; // Sniffed
const Position LoralenFollowLk1 = {5292.94921f, 2008.25451f, 707.695801f, 1.047967f}; // Sniffed
const Position LoralenFollowLk2 = {5298.94335f, 2016.37097f, 707.695801f, 0.694538f}; // Sniffed
const Position LoralenFollowLk3 = {5336.94044f, 2040.21814f, 707.695801f, 0.439284f}; // Sniffed
const Position LoralenFollowLkFinal = {5361.96777f, 2065.68310f, 707.693848f, 0.831989f}; // Sniffed
const Position LoralenDeadPos = {5369.71289f, 2083.6330f, 707.695129f, 0.188739f}; // Sniffed
const Position MoveThronePos = {5306.98535f, 1998.10302f, 709.341187f, 1.277278f}; // Jaina/Sylvanas walks to throne
const Position UtherSpawnPos = {5308.310059f, 2003.857178f, 709.341431f, 4.650315f}; // Uther starting position
const Position LichKingSpawnPos = {5362.917480f, 2062.307129f, 707.695374f, 3.945812f};
const Position LichKingMoveThronePos = {5312.080566f, 2009.172119f, 709.341431f, 3.973301f}; // Lich King walks to throne
const Position LichKingMoveAwayPos = {5400.069824f, 2102.7131689f, 707.69525f, 0.843803f}; // Lich King walks away
const Position LichKingMoveMidlelThronePos = {5333.48437f, 2032.02648f, 707.695679f, 3.973301f}; // Lich King moves and hits Uther [sniff]
const Position LichKingMoveThronePos = {5312.79638f, 2010.07141f, 709.3942183f, 3.973301f}; // Lich King walks to throne [sniff]
const Position LichKingMoveAwayPos = {5400.069824f, 2102.7131689f, 707.69525f, 0.843803f}; // Lich King walks away [sniff]
const Position FalricMovePos = {5284.161133f, 2030.691650f, 709.319336f, 5.489386f};
const Position MarwynMovePos = {5335.330078f, 1982.376221f, 709.319580f, 2.339942f};
const Position SylvanasFightPos = {5557.508301f, 2263.920654f, 733.011230f, 3.624075f};
const Position LeaderEscapePos = {5577.654785f, 2235.347412f, 733.011230f, 2.359576f};
const Position LeaderEscapePos = {5576.80566f, 2235.55004f, 733.012268f, 2.782125f}; //Sniff
const Position ShipMasterSummonPos = {5262.773926f, 1669.980103f, 715.000000f, 0.000000f};
const Position WalkCaveInPos = {5267.594238f, 1678.750000f, 784.302856f, 1.041739f};
const Position AllyPortalPos = {5205.015625f, 1605.680298f, 806.444458f, 0.884375f};

View File

@@ -230,6 +230,7 @@ public:
{
case NPC_SYLVANAS_PART1:
creature->SetVisible(false);
creature->SetSpeed(MOVE_RUN, 1.1);
NPC_LeaderIntroGUID = creature->GetGUID();
if (TeamIdInInstance == TEAM_ALLIANCE)
creature->UpdateEntry(NPC_JAINA_PART1);
@@ -296,12 +297,8 @@ public:
creature->SetVisible(false);
if (!(EncounterMask & (1 << DATA_LK_INTRO)))
{
creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK2HTIGHT);
if (TeamIdInInstance != TEAM_ALLIANCE)
{
creature->StopMoving();
creature->SetFacingTo(creature->GetAngle(&SylvanasFightPos));
}
creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK2HTIGHT); //the fight cannot be in the form of an emote, it is causing bugs
creature->CastSpell(creature, SPELL_SOUL_REAPER, true);
}
else if (!(EncounterMask & (1 << DATA_LICH_KING)))
creature->AddAura(TeamIdInInstance == TEAM_ALLIANCE ? SPELL_JAINA_ICE_PRISON : SPELL_SYLVANAS_DARK_BINDING, creature);
@@ -316,22 +313,20 @@ public:
if (!creature->IsAlive())
creature->Respawn();
NPC_LeaderGUID = creature->GetGUID();
creature->SetWalk(false);
creature->SetSheath(SHEATH_STATE_MELEE);
if (TeamIdInInstance == TEAM_ALLIANCE)
creature->UpdateEntry(NPC_JAINA_PART2);
creature->SetWalk(false);
creature->SetHealth(creature->GetMaxHealth() / 20);
if (!(EncounterMask & (1 << DATA_FROSTSWORN_GENERAL)))
creature->SetVisible(false);
if (!(EncounterMask & (1 << DATA_LK_INTRO)))
{
creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, TeamIdInInstance == TEAM_ALLIANCE ? EMOTE_ONESHOT_ATTACK2HTIGHT : EMOTE_ONESHOT_ATTACK1H);
creature->SetSheath(SHEATH_STATE_MELEE);
creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, TeamIdInInstance == TEAM_ALLIANCE ? EMOTE_ONESHOT_ATTACK2HTIGHT : EMOTE_ONESHOT_ATTACK1H); //the fight cannot be in the form of an emote, it is causing bugs.
creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
creature->CastSpell(creature, TeamIdInInstance == TEAM_ALLIANCE ? SPELL_JAINA_ICE_BARRIER : SPELL_SYLVANAS_CLOAK_OF_DARKNESS, true);
if (TeamIdInInstance != TEAM_ALLIANCE)
{
creature->UpdatePosition(SylvanasFightPos, true);
creature->StopMovingOnCurrentPos();
}
}
else if (!(EncounterMask & (1 << DATA_LICH_KING)))
{
@@ -346,6 +341,7 @@ public:
creature->UpdatePosition(PathWaypoints[PATH_WP_COUNT - 1], true);
creature->StopMovingOnCurrentPos();
}
creature->SetSheath(SHEATH_STATE_MELEE);
creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
break;
case NPC_ICE_WALL_TARGET:
@@ -444,8 +440,13 @@ public:
if (Creature* c = instance->GetCreature(NPC_FrostswornGeneralGUID))
{
c->SetVisible(true);
c->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
c->SetReactState(REACT_AGGRESSIVE);
}
if (Creature* c = instance->GetCreature(NPC_FrostswornGeneralGUID))
{
c->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
}
WaveNumber = 0;
DoUpdateWorldState(WORLD_STATE_HOR_COUNTER, 0);
@@ -712,7 +713,6 @@ public:
case GO_FRONT_DOOR:
return GO_FrontDoorGUID;
}
return ObjectGuid::Empty;
}
@@ -772,7 +772,6 @@ public:
++ur;
}
}
if (bFinished5Waves)
{
for (; WaveNumber < 4; ++WaveNumber)
@@ -860,9 +859,7 @@ public:
num_to_activate = 3;
else if (WaveNumber <= 4)
num_to_activate = 4;
reqKillCount += num_to_activate;
for (uint8 i = 0; i < num_to_activate; ++i)
{
uint32 entry = chosenComposition[WaveNumber - (WaveNumber > 5 ? 2 : 1)][i];
@@ -910,7 +907,6 @@ public:
c->StopMovingOnCurrentPos();
}
memset(&TrashActive, 0, sizeof(TrashActive));
if (Creature* falric = instance->GetCreature(NPC_FalricGUID))
falric->AI()->EnterEvadeMode();
if (Creature* marwyn = instance->GetCreature(NPC_MarwynGUID))
@@ -1014,7 +1010,6 @@ public:
if (Aura* a = pMarwyn->AddAura(SPELL_SHADOWMOURNE_VISUAL, pMarwyn))
a->SetDuration(8000);
}
pMarwyn->AI()->Talk(EMOTE_MARWYN_INTRO_SPIRIT);
}
++ResumeFirstEventStep;
@@ -1035,7 +1030,6 @@ public:
}
}
}
SetData(ACTION_SHOW_TRASH, 1);
ResumeFirstEventStep = 0;
ResumeFirstEventTimer = 0;
@@ -1057,7 +1051,6 @@ public:
else
ResumeFirstEventTimer -= diff;
}
if (outroStep)
{
if (outroTimer <= diff)
@@ -1153,7 +1146,6 @@ public:
if (StairsPos[index][i].GetPositionX())
if (GameObject* go = leader->SummonGameObject(TeamIdInInstance == TEAM_ALLIANCE ? GO_STAIRS_ALLIANCE : GO_STAIRS_HORDE, StairsPos[index][i].GetPositionX(), StairsPos[index][i].GetPositionY(), StairsPos[index][i].GetPositionZ(), StairsPos[index][i].GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 86400, false))
go->SetGameObjectFlag(GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
//Position pos = TeamIdInInstance == TEAM_ALLIANCE ? AllyPortalPos : HordePortalPos;
//leader->SummonGameObject(GO_PORTAL_TO_DALARAN, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 86400);
//pos = TeamIdInInstance == TEAM_ALLIANCE ? AllyChestPos : HordeChestPos;
@@ -1169,6 +1161,7 @@ public:
{
c->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
c->GetMotionMaster()->MovePoint(0, WalkCaveInPos);
c->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP); // need gossip ID 10931
}
++outroStep;
outroTimer = 6000;