Core/Misc: Rename UNIT_STAT_* enums to UNIT_STATE_*
This commit is contained in:
1 parent
e602619912
commit
08be716ef8
148 files changed
+483
-483
No files matched your search
@@ -76,7 +76,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -351,7 +351,7 @@ public:
|
||||
|
||||
//Teleport self to a hiding spot (this causes errors in the Trinity log but no real issues)
|
||||
DoTeleportTo(HIDE_X, HIDE_Y, HIDE_Z);
|
||||
me->AddUnitState(UNIT_STAT_FLEEING);
|
||||
me->AddUnitState(UNIT_STATE_FLEEING);
|
||||
|
||||
//Spawn nef and have him attack a random target
|
||||
Creature* Nefarian = me->SummonCreature(CREATURE_NEFARIAN, NEF_X, NEF_Y, NEF_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
|
||||
|
||||
@@ -393,7 +393,7 @@ public:
|
||||
EnfeebleResetTimer = 0;
|
||||
} else EnfeebleResetTimer -= diff;
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_STUNNED)) // While shifting to phase 2 malchezaar stuns himself
|
||||
if (me->HasUnitState(UNIT_STATE_STUNNED)) // While shifting to phase 2 malchezaar stuns himself
|
||||
return;
|
||||
|
||||
if (me->GetUInt64Value(UNIT_FIELD_TARGET) != me->getVictim()->GetGUID())
|
||||
|
||||
@@ -80,7 +80,7 @@ class boss_baron_geddon : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -71,7 +71,7 @@ class boss_garr : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -68,7 +68,7 @@ class boss_gehennas : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -91,7 +91,7 @@ class boss_golemagg : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -68,7 +68,7 @@ class boss_lucifron : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -80,7 +80,7 @@ class boss_magmadar : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -116,7 +116,7 @@ class boss_majordomo : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (HealthBelowPct(50))
|
||||
|
||||
@@ -73,7 +73,7 @@ class boss_shazzrah : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -84,7 +84,7 @@ class boss_sulfuron : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -169,7 +169,7 @@ class mob_flamewaker_priest : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -425,7 +425,7 @@ public:
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
|
||||
ScriptedAI::InitializeAI();
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
summoned->CastSpell(summoned, SPELL_DARKFIEND_VISUAL, false);
|
||||
break;
|
||||
case CREATURE_DARKNESS:
|
||||
summoned->AddUnitState(UNIT_STAT_STUNNED);
|
||||
summoned->AddUnitState(UNIT_STATE_STUNNED);
|
||||
float x, y, z, o;
|
||||
summoned->GetHomePosition(x, y, z, o);
|
||||
me->SummonCreature(CREATURE_DARK_FIENDS, x, y, z, o, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
@@ -399,7 +399,7 @@ public:
|
||||
InAction = false;
|
||||
SummonSentinel = false;
|
||||
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
@@ -472,7 +472,7 @@ public:
|
||||
WaitTimer = 2000;
|
||||
InAction = false;
|
||||
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* Spell)
|
||||
@@ -491,7 +491,7 @@ public:
|
||||
{
|
||||
if (!InAction)
|
||||
{
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STATE_STUNNED);
|
||||
DoCastAOE(SPELL_DARKFIEND_SKIN, false);
|
||||
AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true));
|
||||
InAction = true;
|
||||
@@ -599,7 +599,7 @@ public:
|
||||
SpellTimer = 5000;
|
||||
Phase = 0;
|
||||
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
DoCastAOE(SPELL_BLACKHOLE_SPAWN, true);
|
||||
}
|
||||
|
||||
@@ -611,7 +611,7 @@ public:
|
||||
switch (NeedForAHack)
|
||||
{
|
||||
case 0:
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STATE_STUNNED);
|
||||
DoCastAOE(SPELL_BLACKHOLE_GROW, false);
|
||||
if (Victim)
|
||||
AttackStart(Victim);
|
||||
|
||||
@@ -173,7 +173,7 @@ class boss_venoxis : public CreatureScript
|
||||
events.Update(diff);
|
||||
|
||||
// return back to main code if we're still casting
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -75,7 +75,7 @@ class boss_kurinnaxx : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -127,7 +127,7 @@ class boss_moam : public CreatureScript
|
||||
}
|
||||
|
||||
// Messing up mana-drain channel
|
||||
//if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
//if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
// return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -93,7 +93,7 @@ class boss_rajaxx : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -90,7 +90,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
AfterTeleportTimer = 0;
|
||||
Abuse_Bug_Timer = urand(10000, 17000);
|
||||
BugsTimer = 2000;
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STATE_STUNNED);
|
||||
DontYellWhenDead = false;
|
||||
EnrageTimer = 15*60000;
|
||||
}
|
||||
@@ -234,7 +234,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
DoStopAttack();
|
||||
DoResetThreat();
|
||||
DoCast(me, SPELL_TWIN_TELEPORT_VISUAL);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
AfterTeleport = true;
|
||||
AfterTeleportTimer = 2000;
|
||||
tspellcasted = false;
|
||||
@@ -246,9 +246,9 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
{
|
||||
if (!tspellcasted)
|
||||
{
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STATE_STUNNED);
|
||||
DoCast(me, SPELL_TWIN_TELEPORT);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
}
|
||||
|
||||
tspellcasted = true;
|
||||
@@ -256,7 +256,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
if (AfterTeleportTimer <= diff)
|
||||
{
|
||||
AfterTeleport = false;
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STATE_STUNNED);
|
||||
if (Unit* nearu = me->SelectNearestTarget(100))
|
||||
{
|
||||
//DoYell(nearu->GetName(), LANG_UNIVERSAL, 0);
|
||||
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
DoCast(me, INSANITY_VISUAL, true);
|
||||
// Unattackable
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(true, UNIT_STAT_STUNNED);
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
}
|
||||
// phase mask
|
||||
target->CastSpell(target, SPELL_INSANITY_TARGET+insanityHandled, true);
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
// Cleanup
|
||||
Summons.DespawnAll();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(false, UNIT_STAT_STUNNED);
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
|
||||
insanityHandled = 0;
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(false, UNIT_STAT_STUNNED);
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
me->RemoveAurasDueToSpell(INSANITY_VISUAL);
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
if (((UndergroundPhase == 0 && HealthBelowPct(75))
|
||||
|| (UndergroundPhase == 1 && HealthBelowPct(50))
|
||||
|| (UndergroundPhase == 2 && HealthBelowPct(25)))
|
||||
&& !me->HasUnitState(UNIT_STAT_CASTING))
|
||||
&& !me->HasUnitState(UNIT_STATE_CASTING))
|
||||
{
|
||||
GuardianSummoned = false;
|
||||
VenomancerSummoned = false;
|
||||
|
||||
+2
-2
@@ -174,7 +174,7 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING) && !(events.GetPhaseMask() & PHASE_INTRO_MASK))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING) && !(events.GetPhaseMask() & PHASE_INTRO_MASK))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -268,7 +268,7 @@ class npc_baltharus_the_warborn_clone : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
|
||||
+2
-2
@@ -148,7 +148,7 @@ class boss_general_zarithrian : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -257,7 +257,7 @@ class npc_onyx_flamecaller : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
|
||||
@@ -137,7 +137,7 @@ class boss_saviana_ragefire : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
+6
-6
@@ -111,7 +111,7 @@ public:
|
||||
{
|
||||
RemoveSummons();
|
||||
me->SetDisplayId(me->GetNativeDisplayId());
|
||||
me->ClearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED);
|
||||
|
||||
bEventInProgress = false;
|
||||
bEvent = false;
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
uiPhase++;
|
||||
uiResurrectTimer = 4000;
|
||||
bEventInProgress = false;
|
||||
me->ClearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED);
|
||||
} else uiResurrectTimer -= uiDiff;
|
||||
}
|
||||
|
||||
@@ -211,14 +211,14 @@ public:
|
||||
if (!bSummonArmy)
|
||||
{
|
||||
bSummonArmy = true;
|
||||
me->AddUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED);
|
||||
DoCast(me, SPELL_ARMY_DEAD);
|
||||
}
|
||||
if (!bDeathArmyDone)
|
||||
{
|
||||
if (uiDeathArmyCheckTimer <= uiDiff)
|
||||
{
|
||||
me->ClearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED);
|
||||
uiDeathArmyCheckTimer = 0;
|
||||
bDeathArmyDone = true;
|
||||
} else uiDeathArmyCheckTimer -= uiDiff;
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (!me->HasUnitState(UNIT_STAT_ROOT) && !me->HealthBelowPct(1))
|
||||
if (!me->HasUnitState(UNIT_STATE_ROOT) && !me->HealthBelowPct(1))
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
{
|
||||
uiDamage = 0;
|
||||
me->SetHealth(0);
|
||||
me->AddUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED);
|
||||
RemoveSummons();
|
||||
switch (uiPhase)
|
||||
{
|
||||
|
||||
@@ -142,7 +142,7 @@ class boss_bronjahm : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -260,7 +260,7 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -441,7 +441,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -497,7 +497,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -555,7 +555,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -612,7 +612,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -672,7 +672,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -738,7 +738,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -811,7 +811,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -878,7 +878,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
|
||||
@@ -659,7 +659,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -742,7 +742,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -842,7 +842,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -912,7 +912,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -978,7 +978,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -190,7 +190,7 @@ class boss_garfrost : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -215,7 +215,7 @@ class boss_ick : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -72,7 +72,7 @@ class mob_ymirjar_flamebearer : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -187,7 +187,7 @@ class mob_wrathbone_laborer : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
|
||||
@@ -212,7 +212,7 @@ class boss_drakkari_colossus : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -289,7 +289,7 @@ class boss_drakkari_elemental : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -335,7 +335,7 @@ class boss_drakkari_elemental : public CreatureScript
|
||||
damage = 0;
|
||||
|
||||
// to prevent spell spaming
|
||||
if (me->HasUnitState(UNIT_STAT_CHARGING))
|
||||
if (me->HasUnitState(UNIT_STATE_CHARGING))
|
||||
return;
|
||||
|
||||
// not sure about this, the idea of this code is to prevent bug the elemental
|
||||
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
DoScriptText(SAY_TRANSFORM_1, me);
|
||||
uiTransformationTimer = 5*IN_MILLISECONDS;
|
||||
bStartOfTransformation = true;
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->ClearUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
else
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
if (bStartOfTransformation)
|
||||
{
|
||||
bStartOfTransformation = false;
|
||||
me->AddUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
DoScriptText(SAY_TRANSFORM_2, me);
|
||||
uiTransformationTimer = 9*IN_MILLISECONDS;
|
||||
bStartOfTransformation = true;
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->ClearUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
else
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
if (bStartOfTransformation)
|
||||
{
|
||||
bStartOfTransformation = false;
|
||||
me->AddUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ class boss_blood_council_controller : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -535,7 +535,7 @@ class boss_prince_keleseth_icc : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -753,7 +753,7 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -990,7 +990,7 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -1179,7 +1179,7 @@ class npc_ball_of_flame : public CreatureScript
|
||||
if (Player* target = ObjectAccessor::GetPlayer(*me, _chaseGUID))
|
||||
{
|
||||
// need to clear states now because this call is before AuraEffect is fully removed
|
||||
me->ClearUnitState(UNIT_STAT_CASTING | UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING | UNIT_STATE_STUNNED);
|
||||
if (target && me->Attack(target, true))
|
||||
me->GetMotionMaster()->MoveChase(target, 1.0f);
|
||||
}
|
||||
@@ -1316,7 +1316,7 @@ class npc_dark_nucleus : public CreatureScript
|
||||
}
|
||||
|
||||
DoCast(who, SPELL_SHADOW_RESONANCE_RESIST);
|
||||
me->ClearUnitState(UNIT_STAT_CASTING);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
@@ -1350,7 +1350,7 @@ class npc_dark_nucleus : public CreatureScript
|
||||
!victim->HasAura(SPELL_SHADOW_RESONANCE_RESIST, me->GetGUID()))
|
||||
{
|
||||
DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST);
|
||||
me->ClearUnitState(UNIT_STAT_CASTING);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1369,7 +1369,7 @@ class npc_dark_nucleus : public CreatureScript
|
||||
_lockedTarget = true;
|
||||
AttackStart(victim);
|
||||
DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST);
|
||||
me->ClearUnitState(UNIT_STAT_CASTING);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -403,7 +403,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -169,7 +169,7 @@ class boss_festergut : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -305,7 +305,7 @@ class npc_stinky_icc : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
|
||||
@@ -410,7 +410,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING) && !(events.GetPhaseMask() & PHASE_INTRO_MASK))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING) && !(events.GetPhaseMask() & PHASE_INTRO_MASK))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -665,7 +665,7 @@ class npc_cult_fanatic : public CreatureScript
|
||||
|
||||
Events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = Events.ExecuteEvent())
|
||||
@@ -743,7 +743,7 @@ class npc_cult_adherent : public CreatureScript
|
||||
|
||||
Events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = Events.ExecuteEvent())
|
||||
@@ -888,7 +888,7 @@ class npc_darnavan : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (_canShatter && me->getVictim() && me->getVictim()->IsImmunedToDamage(SPELL_SCHOOL_MASK_NORMAL))
|
||||
|
||||
@@ -154,7 +154,7 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -519,7 +519,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -796,7 +796,7 @@ class spell_putricide_ooze_channel : public SpellScriptLoader
|
||||
|
||||
void StartAttack()
|
||||
{
|
||||
GetCaster()->ClearUnitState(UNIT_STAT_CASTING);
|
||||
GetCaster()->ClearUnitState(UNIT_STATE_CASTING);
|
||||
GetCaster()->ToCreature()->AI()->AttackStart(GetHitUnit());
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ class boss_rotface : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -384,7 +384,7 @@ class npc_precious_icc : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
|
||||
@@ -379,7 +379,7 @@ class boss_sindragosa : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -663,7 +663,7 @@ class npc_spinestalker : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -783,7 +783,7 @@ class npc_rimefang : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -911,7 +911,7 @@ class npc_sindragosa_trash : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
|
||||
@@ -701,7 +701,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
summon->CastSpell(summon, SPELL_ICE_SPHERE, false);
|
||||
summon->CastSpell(summon, SPELL_ICE_BURST_TARGET_SEARCH, false);
|
||||
summon->CastSpell(target, SPELL_ICE_PULSE, false);
|
||||
summon->ClearUnitState(UNIT_STAT_CASTING);
|
||||
summon->ClearUnitState(UNIT_STATE_CASTING);
|
||||
summon->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f);
|
||||
}
|
||||
else
|
||||
@@ -861,7 +861,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
events.Update(diff);
|
||||
|
||||
// during Remorseless Winter phases The Lich King is channeling a spell, but we must continue casting other spells
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING) && !(events.GetPhaseMask() & PHASE_MASK_NO_CAST_CHECK))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING) && !(events.GetPhaseMask() & PHASE_MASK_NO_CAST_CHECK))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -966,14 +966,14 @@ class boss_the_lich_king : public CreatureScript
|
||||
break;
|
||||
case EVENT_QUAKE:
|
||||
events.SetPhase(PHASE_TWO);
|
||||
me->ClearUnitState(UNIT_STAT_CASTING); // clear state to ensure check in DoCastAOE passes
|
||||
me->ClearUnitState(UNIT_STATE_CASTING); // clear state to ensure check in DoCastAOE passes
|
||||
DoCastAOE(SPELL_QUAKE);
|
||||
SendMusicToPlayers(MUSIC_SPECIAL);
|
||||
Talk(SAY_LK_QUAKE);
|
||||
break;
|
||||
case EVENT_QUAKE_2:
|
||||
events.SetPhase(PHASE_THREE);
|
||||
me->ClearUnitState(UNIT_STAT_CASTING); // clear state to ensure check in DoCastAOE passes
|
||||
me->ClearUnitState(UNIT_STATE_CASTING); // clear state to ensure check in DoCastAOE passes
|
||||
DoCastAOE(SPELL_QUAKE);
|
||||
SendMusicToPlayers(MUSIC_SPECIAL);
|
||||
Talk(SAY_LK_QUAKE);
|
||||
@@ -1059,7 +1059,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
break;
|
||||
case EVENT_OUTRO_RAISE_DEAD:
|
||||
DoCastAOE(SPELL_RAISE_DEAD);
|
||||
me->ClearUnitState(UNIT_STAT_CASTING);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING);
|
||||
SendMusicToPlayers(MUSIC_FINAL);
|
||||
break;
|
||||
case EVENT_OUTRO_TALK_5:
|
||||
@@ -1071,7 +1071,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
Talk(SAY_LK_OUTRO_6);
|
||||
if (Creature* tirion = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_HIGHLORD_TIRION_FORDRING)))
|
||||
tirion->SetFacingToObject(me);
|
||||
me->ClearUnitState(UNIT_STAT_CASTING);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING);
|
||||
DoCastAOE(SPELL_SUMMON_BROKEN_FROSTMOURNE_3);
|
||||
SetEquipmentSlots(false, EQUIP_UNEQUIP);
|
||||
break;
|
||||
@@ -1255,7 +1255,7 @@ class npc_tirion_fordring_tft : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -1349,7 +1349,7 @@ class npc_shambling_horror_icc : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -1429,7 +1429,7 @@ class npc_raging_spirit : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -1498,7 +1498,7 @@ class npc_valkyr_shadowguard : public CreatureScript
|
||||
_events.Reset();
|
||||
DoCastAOE(SPELL_EJECT_ALL_PASSENGERS);
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
me->ClearUnitState(UNIT_STAT_EVADE);
|
||||
me->ClearUnitState(UNIT_STATE_EVADE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1564,7 +1564,7 @@ class npc_valkyr_shadowguard : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
|
||||
@@ -426,7 +426,7 @@ class boss_valithria_dreamwalker : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -626,7 +626,7 @@ class npc_the_lich_king_controller : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -741,7 +741,7 @@ class npc_risen_archmage : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -807,7 +807,7 @@ class npc_blazing_skeleton : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -873,7 +873,7 @@ class npc_suppresser : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
// this code will never be reached while channeling
|
||||
@@ -967,7 +967,7 @@ class npc_gluttonous_abomination : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
|
||||
@@ -611,7 +611,7 @@ class npc_rotting_frost_giant : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -874,7 +874,7 @@ class boss_sister_svalna : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -1130,7 +1130,7 @@ class npc_crok_scourgebane : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
@@ -1353,7 +1353,7 @@ class npc_captain_arnath : public CreatureScript
|
||||
|
||||
Events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = Events.ExecuteEvent())
|
||||
@@ -1434,7 +1434,7 @@ class npc_captain_brandon : public CreatureScript
|
||||
|
||||
Events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = Events.ExecuteEvent())
|
||||
@@ -1502,7 +1502,7 @@ class npc_captain_grondel : public CreatureScript
|
||||
|
||||
Events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = Events.ExecuteEvent())
|
||||
@@ -1567,7 +1567,7 @@ class npc_captain_rupert : public CreatureScript
|
||||
|
||||
Events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = Events.ExecuteEvent())
|
||||
|
||||
@@ -137,7 +137,7 @@ class boss_faerlina : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -342,7 +342,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -400,7 +400,7 @@ class boss_gothik : public CreatureScript
|
||||
instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -486,7 +486,7 @@ public:
|
||||
else uiGuardiansOfIcecrownTimer -= diff;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (uint32 eventId = events.GetEvent())
|
||||
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -523,7 +523,7 @@ public:
|
||||
return;
|
||||
|
||||
// We can't cast if we are casting already.
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -283,7 +283,7 @@ class boss_steelbreaker : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -404,7 +404,7 @@ class boss_runemaster_molgeim : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -649,7 +649,7 @@ class boss_stormcaller_brundir : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -217,7 +217,7 @@ class boss_auriaya : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -348,7 +348,7 @@ class npc_sanctum_sentry : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -418,7 +418,7 @@ class npc_feral_defender : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -384,7 +384,7 @@ class boss_flame_leviathan : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -425,7 +425,7 @@ class boss_flame_leviathan : public CreatureScript
|
||||
break;
|
||||
case EVENT_REPAIR:
|
||||
me->MonsterTextEmote(EMOTE_REPAIR, 0, true);
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
me->ClearUnitState(UNIT_STATE_STUNNED | UNIT_STATE_ROOT);
|
||||
events.ScheduleEvent(EVENT_SHUTDOWN, 150*IN_MILLISECONDS);
|
||||
events.CancelEvent(EVENT_REPAIR);
|
||||
break;
|
||||
@@ -1576,7 +1576,7 @@ class spell_systems_shutdown : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
//! This could probably in the SPELL_EFFECT_SEND_EVENT handler too:
|
||||
owner->AddUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
owner->AddUnitState(UNIT_STATE_STUNNED | UNIT_STATE_ROOT);
|
||||
owner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
||||
owner->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED);
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ class boss_freya : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -739,7 +739,7 @@ class boss_elder_brightleaf : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -872,7 +872,7 @@ class boss_elder_stonebark : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -985,7 +985,7 @@ class boss_elder_ironbranch : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -138,7 +138,7 @@ class boss_general_vezax : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -336,7 +336,7 @@ class boss_saronite_animus : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -370,7 +370,7 @@ class boss_hodir : public CreatureScript
|
||||
me->StopMoving();
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetControlled(true, UNIT_STAT_STUNNED);
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
me->CombatStop(true);
|
||||
|
||||
me->setFaction(35);
|
||||
@@ -387,7 +387,7 @@ class boss_hodir : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -612,12 +612,12 @@ class npc_hodir_priest : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim() || me->HasUnitState(UNIT_STAT_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
|
||||
if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (HealthBelowPct(30))
|
||||
@@ -688,12 +688,12 @@ class npc_hodir_shaman : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim() || me->HasUnitState(UNIT_STAT_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
|
||||
if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -750,12 +750,12 @@ class npc_hodir_druid : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim() || me->HasUnitState(UNIT_STAT_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
|
||||
if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -825,12 +825,12 @@ class npc_hodir_mage : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim() || me->HasUnitState(UNIT_STAT_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
|
||||
if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_STUNNED) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -202,7 +202,7 @@ class boss_ignis : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -224,7 +224,7 @@ class boss_kologarn : public CreatureScript
|
||||
summon->CastSpell(summon, SPELL_FOCUSED_EYEBEAM_VISUAL, true);
|
||||
summon->SetReactState(REACT_PASSIVE);
|
||||
// One of the above spells is a channeled spell, we need to clear this unit state for MoveChase to work
|
||||
summon->ClearUnitState(UNIT_STAT_CASTING);
|
||||
summon->ClearUnitState(UNIT_STATE_CASTING);
|
||||
|
||||
// Victim gets 67351
|
||||
if (eyebeamTarget)
|
||||
@@ -244,7 +244,7 @@ class boss_kologarn : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -263,7 +263,7 @@ class boss_xt002 : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -535,7 +535,7 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (paralyzeTimer <= diff)
|
||||
@@ -663,7 +663,7 @@ class npc_scourge_hulk : public CreatureScript
|
||||
if (mightyBlow <= diff)
|
||||
{
|
||||
if (Unit* victim = me->getVictim())
|
||||
if (!victim->HasUnitState(UNIT_STAT_STUNNED)) // Prevent knocking back a ritual player
|
||||
if (!victim->HasUnitState(UNIT_STATE_STUNNED)) // Prevent knocking back a ritual player
|
||||
DoCast(victim, SPELL_MIGHTY_BLOW);
|
||||
mightyBlow = urand(12000, 17000);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class boss_archavon : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -161,7 +161,7 @@ class mob_archavon_warder : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -120,7 +120,7 @@ class boss_emalon : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -221,7 +221,7 @@ class mob_tempest_minion : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (Aura const* overchargedAura = me->GetAura(SPELL_OVERCHARGED))
|
||||
|
||||
@@ -79,7 +79,7 @@ class boss_koralon : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -80,7 +80,7 @@ class boss_toravon : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -148,7 +148,7 @@ class mob_frost_warder : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (events.ExecuteEvent() == EVENT_FROST_BLAST)
|
||||
|
||||
@@ -1328,7 +1328,7 @@ public:
|
||||
if (uiType != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
me->CastSpell(me, SPELL_STUN, true);
|
||||
if (me->isSummon())
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
|
||||
@@ -1445,7 +1445,7 @@ public:
|
||||
DoScriptText(SAY_LERYSSA_1, pLeryssa);
|
||||
pArlos->Kill(pArlos, false);
|
||||
pLeryssa->RemoveAura(SPELL_STUN);
|
||||
pLeryssa->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
pLeryssa->ClearUnitState(UNIT_STATE_STUNNED);
|
||||
pLeryssa->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
pLeryssa->GetMotionMaster()->MovePoint(0, 3722.114502f, 3564.201660f, 477.441437f);
|
||||
|
||||
@@ -1495,7 +1495,7 @@ public:
|
||||
if (Creature* pTalbot = me->FindNearestCreature(NPC_PRINCE_VALANAR, 50.0f, true))
|
||||
CAST_AI(npc_counselor_talbot::npc_counselor_talbotAI, pTalbot->GetAI())->bCheck = true;
|
||||
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
me->CastSpell(me, SPELL_STUN, true);
|
||||
|
||||
if (me->isSummon())
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ public:
|
||||
summoned->CastSpell(summoned, SPELL_FOCUS_FIRE_VISUAL, false);
|
||||
summoned->setFaction(me->getFaction());
|
||||
summoned->SetLevel(me->getLevel());
|
||||
summoned->AddUnitState(UNIT_STAT_ROOT);
|
||||
summoned->AddUnitState(UNIT_STATE_ROOT);
|
||||
|
||||
if (Unit* pFocusedTarget = Unit::GetUnit(*me, FocusedTargetGUID))
|
||||
summoned->AI()->AttackStart(pFocusedTarget);
|
||||
|
||||
+2
-2
@@ -337,7 +337,7 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
VazrudenGUID = 0;
|
||||
}
|
||||
summoned = false;
|
||||
me->ClearUnitState(UNIT_STAT_ROOT);
|
||||
me->ClearUnitState(UNIT_STATE_ROOT);
|
||||
me->SetVisible(true);
|
||||
}
|
||||
}
|
||||
@@ -352,7 +352,7 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
NazanGUID = Nazan->GetGUID();
|
||||
summoned = true;
|
||||
me->SetVisible(false);
|
||||
me->AddUnitState(UNIT_STAT_ROOT);
|
||||
me->AddUnitState(UNIT_STATE_ROOT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ class boss_magtheridon : public CreatureScript
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
DoCast(me, SPELL_SHADOW_CAGE_C, true);
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ class boss_magtheridon : public CreatureScript
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!me->HasUnitState(UNIT_STAT_STUNNED))
|
||||
if (!me->HasUnitState(UNIT_STATE_STUNNED))
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ class boss_magtheridon : public CreatureScript
|
||||
if (BlastNova_Timer <= diff)
|
||||
{
|
||||
// to avoid earthquake interruption
|
||||
if (!me->HasUnitState(UNIT_STAT_STUNNED))
|
||||
if (!me->HasUnitState(UNIT_STATE_STUNNED))
|
||||
{
|
||||
DoScriptText(EMOTE_BLASTNOVA, me);
|
||||
DoCast(me, SPELL_BLASTNOVA);
|
||||
@@ -431,7 +431,7 @@ class boss_magtheridon : public CreatureScript
|
||||
|
||||
if (!Phase3 && HealthBelowPct(30)
|
||||
&& !me->IsNonMeleeSpellCasted(false) // blast nova
|
||||
&& !me->HasUnitState(UNIT_STAT_STUNNED)) // shadow cage and earthquake
|
||||
&& !me->HasUnitState(UNIT_STATE_STUNNED)) // shadow cage and earthquake
|
||||
{
|
||||
Phase3 = true;
|
||||
DoScriptText(SAY_CHAMBER_DESTROY, me);
|
||||
|
||||
+1
-1
@@ -223,7 +223,7 @@ class instance_magtheridons_lair : public InstanceMapScript
|
||||
Creature* Magtheridon = instance->GetCreature(MagtheridonGUID);
|
||||
if (Magtheridon && Magtheridon->isAlive())
|
||||
{
|
||||
Magtheridon->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
Magtheridon->ClearUnitState(UNIT_STATE_STUNNED);
|
||||
Magtheridon->AI()->AttackStart(Magtheridon->SelectNearestTarget(999));
|
||||
}
|
||||
CageTimer = 0;
|
||||
|
||||
@@ -397,7 +397,7 @@ class boss_kaelthas : public CreatureScript
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!me->HasUnitState(UNIT_STAT_STUNNED) && me->canCreatureAttack(who))
|
||||
if (!me->HasUnitState(UNIT_STATE_STUNNED) && me->canCreatureAttack(who))
|
||||
{
|
||||
if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
|
||||
return;
|
||||
|
||||
@@ -110,7 +110,7 @@ class boss_doomlord_kazzak : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
|
||||
@@ -103,7 +103,7 @@ class boss_doomwalker : public CreatureScript
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
|
||||
@@ -632,7 +632,7 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (ChainLightningTimer <= diff)
|
||||
|
||||
@@ -796,7 +796,7 @@ public:
|
||||
Materialize = true;
|
||||
}
|
||||
|
||||
if (me->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || me->HasUnitState(UNIT_STAT_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it
|
||||
if (me->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || me->HasUnitState(UNIT_STATE_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it
|
||||
DoCast(me, SPELL_PHASE_SLIP);
|
||||
|
||||
if (!UpdateVictim())
|
||||
|
||||
@@ -1195,7 +1195,7 @@ public:
|
||||
AggroTargetGUID = 0;
|
||||
Timers = false;
|
||||
|
||||
me->AddUnitState(UNIT_STAT_ROOT);
|
||||
me->AddUnitState(UNIT_STATE_ROOT);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetTarget(0);
|
||||
}
|
||||
@@ -1239,7 +1239,7 @@ public:
|
||||
if (Player* AggroTarget = (Unit::GetPlayer(*me, AggroTargetGUID)))
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->ClearUnitState(UNIT_STAT_ROOT);
|
||||
me->ClearUnitState(UNIT_STATE_ROOT);
|
||||
|
||||
float x, y, z;
|
||||
AggroTarget->GetPosition(x, y, z);
|
||||
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
target->AddUnitState(UNIT_STAT_ROOT);
|
||||
target->AddUnitState(UNIT_STATE_ROOT);
|
||||
}
|
||||
|
||||
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
@@ -144,7 +144,7 @@ struct emerald_dragonAI : public WorldBossAI
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -1910,7 +1910,7 @@ public:
|
||||
Unit* owner = me->GetCharmerOrOwner();
|
||||
|
||||
me->CombatStop(true);
|
||||
if (owner && !me->HasUnitState(UNIT_STAT_FOLLOW))
|
||||
if (owner && !me->HasUnitState(UNIT_STATE_FOLLOW))
|
||||
{
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE);
|
||||
@@ -2069,7 +2069,7 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->SetControlled(true, UNIT_STAT_STUNNED);//disable rotate
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);//disable rotate
|
||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);//imune to knock aways like blast wave
|
||||
|
||||
ResetTimer = 5000;
|
||||
@@ -2101,8 +2101,8 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!me->HasUnitState(UNIT_STAT_STUNNED))
|
||||
me->SetControlled(true, UNIT_STAT_STUNNED);//disable rotate
|
||||
if (!me->HasUnitState(UNIT_STATE_STUNNED))
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);//disable rotate
|
||||
|
||||
if (Entry != NPC_ADVANCED_TARGET_DUMMY && Entry != NPC_TARGET_DUMMY)
|
||||
{
|
||||
@@ -2203,7 +2203,7 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (FireShield_Timer <= diff)
|
||||
|
||||
Reference in new issue
Block a user