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

@@ -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);
@@ -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);
@@ -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())
+1 -1
View File
@@ -632,7 +632,7 @@ public:
if (!UpdateVictim())
return;
if (me->HasUnitState(UNIT_STAT_CASTING))
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
if (ChainLightningTimer <= diff)
+1 -1
View File
@@ -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);