mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Scripts/Karazhan): Restore Netherspite DestroyPortals() function (#17392)
This commit is contained in:
@@ -101,12 +101,7 @@ struct boss_netherspite : public BossAI
|
||||
BossAI::Reset();
|
||||
berserk = false;
|
||||
HandleDoors(true);
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
PortalGUID[i].Clear();
|
||||
BeamTarget[i].Clear();
|
||||
}
|
||||
DestroyPortals();
|
||||
}
|
||||
|
||||
void SummonPortals()
|
||||
@@ -225,6 +220,24 @@ struct boss_netherspite : public BossAI
|
||||
});
|
||||
}
|
||||
|
||||
void DestroyPortals()
|
||||
{
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
if (Creature* portal = ObjectAccessor::GetCreature(*me, PortalGUID[i]))
|
||||
{
|
||||
portal->DisappearAndDie();
|
||||
}
|
||||
if (Creature* portal = ObjectAccessor::GetCreature(*me, BeamerGUID[i]))
|
||||
{
|
||||
portal->DisappearAndDie();
|
||||
}
|
||||
|
||||
PortalGUID[i].Clear();
|
||||
BeamTarget[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
void SwitchToBanishPhase()
|
||||
{
|
||||
Talk(EMOTE_PHASE_BANISH);
|
||||
@@ -234,16 +247,7 @@ struct boss_netherspite : public BossAI
|
||||
DoCastSelf(SPELL_BANISH_VISUAL, true);
|
||||
DoCastSelf(SPELL_BANISH_ROOT, true);
|
||||
|
||||
for (uint32 id : PortalID)
|
||||
{
|
||||
summons.DespawnEntry(id);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
PortalGUID[i].Clear();
|
||||
BeamTarget[i].Clear();
|
||||
}
|
||||
DestroyPortals();
|
||||
|
||||
scheduler.Schedule(30s, [this](TaskContext)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user