fix(Scripts/Karazhan): Restore Netherspite DestroyPortals() function (#17392)
This commit is contained in:
@@ -101,12 +101,7 @@ struct boss_netherspite : public BossAI
|
|||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
berserk = false;
|
berserk = false;
|
||||||
HandleDoors(true);
|
HandleDoors(true);
|
||||||
|
DestroyPortals();
|
||||||
for (int i = 0; i < 3; ++i)
|
|
||||||
{
|
|
||||||
PortalGUID[i].Clear();
|
|
||||||
BeamTarget[i].Clear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummonPortals()
|
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()
|
void SwitchToBanishPhase()
|
||||||
{
|
{
|
||||||
Talk(EMOTE_PHASE_BANISH);
|
Talk(EMOTE_PHASE_BANISH);
|
||||||
@@ -234,16 +247,7 @@ struct boss_netherspite : public BossAI
|
|||||||
DoCastSelf(SPELL_BANISH_VISUAL, true);
|
DoCastSelf(SPELL_BANISH_VISUAL, true);
|
||||||
DoCastSelf(SPELL_BANISH_ROOT, true);
|
DoCastSelf(SPELL_BANISH_ROOT, true);
|
||||||
|
|
||||||
for (uint32 id : PortalID)
|
DestroyPortals();
|
||||||
{
|
|
||||||
summons.DespawnEntry(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < 3; ++i)
|
|
||||||
{
|
|
||||||
PortalGUID[i].Clear();
|
|
||||||
BeamTarget[i].Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
scheduler.Schedule(30s, [this](TaskContext)
|
scheduler.Schedule(30s, [this](TaskContext)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user