mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 15:46:24 +00:00
fix(Core/Grids): Grid improvements (#20955)
This commit is contained in:
@@ -63,7 +63,6 @@ public:
|
||||
{
|
||||
if (GetBossState(DATA_HALION_INTRO_DONE) != DONE && GetBossState(DATA_GENERAL_ZARITHRIAN) == DONE)
|
||||
{
|
||||
instance->LoadGrid(3156.0f, 537.0f);
|
||||
if (Creature* halionController = instance->GetCreature(HalionControllerGUID))
|
||||
halionController->AI()->DoAction(ACTION_INTRO_HALION);
|
||||
}
|
||||
|
||||
@@ -325,7 +325,6 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
instance->LoadGrid(PathWaypoints[PATH_WP_COUNT - 1].GetPositionX(), PathWaypoints[PATH_WP_COUNT - 1].GetPositionY());
|
||||
creature->UpdatePosition(PathWaypoints[PATH_WP_COUNT - 1], true);
|
||||
creature->StopMovingOnCurrentPos();
|
||||
}
|
||||
@@ -515,7 +514,6 @@ public:
|
||||
{
|
||||
break;
|
||||
}
|
||||
instance->LoadGrid(LeaderEscapePos.GetPositionX(), LeaderEscapePos.GetPositionY());
|
||||
if (Creature* c = instance->GetCreature(NPC_LeaderGUID))
|
||||
{
|
||||
if (!c->IsAlive())
|
||||
@@ -567,7 +565,6 @@ public:
|
||||
case DATA_LICH_KING:
|
||||
if (data == DONE)
|
||||
{
|
||||
instance->LoadGrid(PathWaypoints[0].GetPositionX(), PathWaypoints[0].GetPositionY());
|
||||
EncounterMask |= (1 << DATA_LICH_KING);
|
||||
if (Creature* c = instance->GetCreature(NPC_LeaderGUID))
|
||||
c->setActive(false);
|
||||
|
||||
@@ -78,7 +78,6 @@ public:
|
||||
{
|
||||
InstanceScript::OnPlayerEnter(player);
|
||||
|
||||
instance->LoadGrid(LeaderIntroPos.GetPositionX(), LeaderIntroPos.GetPositionY());
|
||||
if (Creature* c = instance->GetCreature(GetGuidData(DATA_LEADER_FIRST_GUID)))
|
||||
c->AI()->SetData(DATA_START_INTRO, 0);
|
||||
}
|
||||
|
||||
@@ -1537,7 +1537,6 @@ public:
|
||||
|
||||
if (!instance->GetData(DATA_SINDRAGOSA_FROSTWYRMS) && instance->GetBossState(DATA_SINDRAGOSA) != IN_PROGRESS)
|
||||
{
|
||||
player->GetMap()->LoadGrid(SindragosaSpawnPos.GetPositionX(), SindragosaSpawnPos.GetPositionY());
|
||||
if (Creature* sindragosa = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_SINDRAGOSA)))
|
||||
sindragosa->AI()->DoAction(ACTION_START_FROSTWYRM);
|
||||
}
|
||||
|
||||
@@ -747,8 +747,6 @@ public:
|
||||
me->setActive(true);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToAll(true);
|
||||
// Load Grid with Sister Svalna
|
||||
me->GetMap()->LoadGrid(4356.71f, 2484.33f);
|
||||
if (Creature* svalna = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_SISTER_SVALNA)))
|
||||
svalna->AI()->DoAction(ACTION_START_GAUNTLET);
|
||||
for (uint32 i = 0; i < 4; ++i)
|
||||
|
||||
@@ -651,7 +651,6 @@ public:
|
||||
FrostwyrmGUIDs.erase(creature->GetSpawnId());
|
||||
if (FrostwyrmGUIDs.empty())
|
||||
{
|
||||
instance->LoadGrid(SindragosaSpawnPos.GetPositionX(), SindragosaSpawnPos.GetPositionY());
|
||||
if (Creature* boss = instance->SummonCreature(NPC_SINDRAGOSA, SindragosaSpawnPos))
|
||||
boss->AI()->DoAction(ACTION_START_FROSTWYRM);
|
||||
}
|
||||
@@ -1190,7 +1189,6 @@ public:
|
||||
if (GameObject* pillars = instance->GetGameObject(PillarsUnchainedGUID))
|
||||
pillars->SetRespawnTime(7 * DAY);
|
||||
|
||||
instance->LoadGrid(JainaSpawnPos.GetPositionX(), JainaSpawnPos.GetPositionY());
|
||||
instance->SummonCreature(NPC_LADY_JAINA_PROUDMOORE_QUEST, JainaSpawnPos);
|
||||
instance->SummonCreature(NPC_MURADIN_BRONZEBEARD_QUEST, MuradinSpawnPos);
|
||||
instance->SummonCreature(NPC_UTHER_THE_LIGHTBRINGER_QUEST, UtherSpawnPos);
|
||||
|
||||
@@ -821,8 +821,6 @@ public:
|
||||
if (state == DONE)
|
||||
{
|
||||
_speakTimer = 1;
|
||||
// Load KT's grid so he can talk
|
||||
instance->LoadGrid(3763.43f, -5115.87f);
|
||||
}
|
||||
else if (state == NOT_STARTED)
|
||||
{
|
||||
@@ -1061,8 +1059,6 @@ public:
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_KELTHUZAD_WING_TAUNT:
|
||||
// Loads Kel'Thuzad's grid. We need this as he must be active in order for his texts to work.
|
||||
instance->LoadGrid(3749.67f, -5114.06f);
|
||||
if (Creature* kelthuzad = instance->GetCreature(_kelthuzadGUID))
|
||||
{
|
||||
kelthuzad->AI()->Talk(_currentWingTaunt);
|
||||
|
||||
@@ -178,7 +178,6 @@ public:
|
||||
void OnPlayerEnter(Player* player) override
|
||||
{
|
||||
// mimiron tram:
|
||||
instance->LoadGrid(2307.0f, 284.632f);
|
||||
if (GameObject* MimironTram = instance->GetGameObject(m_mimironTramGUID))
|
||||
{
|
||||
player->UpdateVisibilityOf(MimironTram);
|
||||
@@ -537,10 +536,7 @@ public:
|
||||
break;
|
||||
case GO_KEEPERS_GATE:
|
||||
if (GetData(TYPE_MIMIRON) == DONE && GetData(TYPE_FREYA) == DONE && GetData(TYPE_HODIR) == DONE && GetData(TYPE_THORIM) == DONE)
|
||||
{
|
||||
instance->LoadGrid(1903.0f, 248.0f);
|
||||
gameObject->RemoveGameObjectFlag(GO_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
m_keepersgateGUID = gameObject->GetGUID();
|
||||
break;
|
||||
@@ -752,8 +748,6 @@ public:
|
||||
case EVENT_TOWER_OF_FROST_DESTROYED:
|
||||
case EVENT_TOWER_OF_FLAMES_DESTROYED:
|
||||
{
|
||||
instance->LoadGrid(364.0f, -16.0f); //make sure leviathan is loaded
|
||||
instance->LoadGrid(364.0f, 32.0f); //make sure Mimiron's and Thorim's Targetting Crystal are loaded
|
||||
m_leviathanTowers[type - EVENT_TOWER_OF_LIFE_DESTROYED] = data;
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user