Core/Misc: Rename UNIT_STAT_* enums to UNIT_STATE_*

This commit is contained in:
Shocker committed 2012-02-03 19:02:17 +02:00
1 parent e602619912
commit 08be716ef8
148 files changed
+483 -483

No files matched your search

@@ -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;
@@ -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())
@@ -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())
@@ -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())