Core/Scripts: Fixed some delayed enrage

This commit is contained in:
Aokromes
2018-02-16 03:26:36 +01:00
parent 12b9563b4e
commit 4721d9814b
10 changed files with 24 additions and 21 deletions

View File

@@ -106,11 +106,11 @@ public:
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)

View File

@@ -182,11 +182,11 @@ class boss_baltharus_the_warborn : public CreatureScript
if (!events.IsInPhase(PHASE_INTRO))
me->SetHealth(instance->GetData(DATA_BALTHARUS_SHARED_HEALTH));
events.Update(diff);
if (!events.IsInPhase(PHASE_INTRO) && me->HasUnitState(UNIT_STATE_CASTING))
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)

View File

@@ -123,11 +123,11 @@ class boss_general_zarithrian : public CreatureScript
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)

View File

@@ -311,11 +311,14 @@ class boss_halion : public CreatureScript
if (events.IsInPhase(PHASE_TWO))
return;
if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_CASTING))
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)

View File

@@ -79,11 +79,11 @@ public:
if (!UpdateVictim())
return;
_events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
_events.Update(diff);
while (uint32 eventId = _events.ExecuteEvent())
{
switch (eventId)

View File

@@ -180,11 +180,11 @@ public:
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)

View File

@@ -206,11 +206,11 @@ public:
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)

View File

@@ -262,11 +262,11 @@ public:
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)

View File

@@ -172,11 +172,11 @@ public:
if (!events.IsInPhase(PHASE_INTRO) && !UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)

View File

@@ -218,11 +218,14 @@ class boss_magtheridon : public CreatureScript
void UpdateAI(uint32 diff) override
{
if (me->HasUnitState(UNIT_STATE_CASTING))
if (!events.IsInPhase(PHASE_BANISH) && !UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
@@ -291,9 +294,6 @@ class boss_magtheridon : public CreatureScript
return;
}
if (!UpdateVictim())
return;
DoMeleeAttackIfReady();
}