Scripts/Ulduar: Attempt to fix Yogg-Saron not evading on wipe (#24055)

(cherry picked from commit 039534d1db)
This commit is contained in:
Giacomo Pozzoni
2020-01-14 19:57:16 +01:00
committed by Shauren
parent cd72ecce78
commit ce25c212e0

View File

@@ -540,6 +540,9 @@ class boss_voice_of_yogg_saron : public CreatureScript
if (!UpdateVictim())
return;
if (!me->GetCombatManager().HasPvECombatWithPlayers())
EnterEvadeMode(EVADE_REASON_NO_HOSTILES);
events.Update(diff);
// don't summon tentacles when illusion is shattered, delay them
if (_illusionShattered)
@@ -768,6 +771,14 @@ class boss_sara : public CreatureScript
_events.ScheduleEvent(EVENT_SARAS_ANGER, urand(15000, 25000), 0, PHASE_ONE);
}
void JustEnteredCombat(Unit* who) override
{
if (IsEngaged())
return;
EngagementStart(who);
}
void Reset() override
{
me->RemoveAllAuras();
@@ -1606,8 +1617,13 @@ class npc_yogg_saron_keeper : public CreatureScript
}
}
void JustEngagedWith(Unit* /*who*/) override
void JustEnteredCombat(Unit* who) override
{
if (IsEngaged())
return;
EngagementStart(who);
switch (me->GetEntry())
{
case NPC_FREYA_YS: