Scripts/IcecrownCitadel: Adding IsAlive check to avoid possible crash in Event (#24514)

This commit is contained in:
NoName
2020-04-29 22:14:27 +03:00
committed by GitHub
parent 411033ddf8
commit 22aaf32a79

View File

@@ -402,11 +402,14 @@ struct boss_sister_svalna : public BossAI
DoCastSelf(SPELL_CARESS_OF_DEATH, CastSpellExtraArgs(TRIGGERED_FULL_MASK).AddSpellMod(SPELLVALUE_MAX_TARGETS, 1));
break;
case ACTION_START_GAUNTLET:
me->setActive(true);
me->SetFarVisible(true);
_isEventInProgress = true;
me->SetImmuneToAll(true);
events.ScheduleEvent(EVENT_SVALNA_START, 25s);
if (me->IsAlive())
{
me->setActive(true);
me->SetFarVisible(true);
_isEventInProgress = true;
me->SetImmuneToAll(true);
events.ScheduleEvent(EVENT_SVALNA_START, 25s);
}
break;
case ACTION_RESURRECT_CAPTAINS:
events.ScheduleEvent(EVENT_SVALNA_RESURRECT, 7s);