Scripts/Events: Globally fix all ExecuteEvent loops to check UNIT_STATE_CASTING after each iteration, instead of just checking it once initially.

Fixes and closes #17892.
This commit is contained in:
treeston
2016-09-03 17:21:22 +02:00
parent a4623efaa6
commit ac62d7156f
159 changed files with 644 additions and 3 deletions
@@ -550,7 +550,11 @@ void BossAI::UpdateAI(uint32 diff)
return;
while (uint32 eventId = events.ExecuteEvent())
{
ExecuteEvent(eventId);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
}
DoMeleeAttackIfReady();
}
@@ -631,7 +635,11 @@ void WorldBossAI::UpdateAI(uint32 diff)
return;
while (uint32 eventId = events.ExecuteEvent())
{
ExecuteEvent(eventId);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
}
DoMeleeAttackIfReady();
}