mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Core/Misc: Rename UNIT_STAT_* enums to UNIT_STATE_*
This commit is contained in:
@@ -1447,7 +1447,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, const uint32 effectMask, bool
|
||||
return SPELL_MISS_EVADE;
|
||||
|
||||
// assisting case, healing and resurrection
|
||||
if (unit->HasUnitState(UNIT_STAT_ATTACK_PLAYER))
|
||||
if (unit->HasUnitState(UNIT_STATE_ATTACK_PLAYER))
|
||||
{
|
||||
m_caster->SetContestedPvP();
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -3214,8 +3214,8 @@ void Spell::cast(bool skipCheck)
|
||||
m_spellState = SPELL_STATE_DELAYED;
|
||||
SetDelayStart(0);
|
||||
|
||||
if (m_caster->HasUnitState(UNIT_STAT_CASTING) && !m_caster->IsNonMeleeSpellCasted(false, false, true))
|
||||
m_caster->ClearUnitState(UNIT_STAT_CASTING);
|
||||
if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !m_caster->IsNonMeleeSpellCasted(false, false, true))
|
||||
m_caster->ClearUnitState(UNIT_STATE_CASTING);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3581,8 +3581,8 @@ void Spell::finish(bool ok)
|
||||
if (m_spellInfo->IsChanneled())
|
||||
m_caster->UpdateInterruptMask();
|
||||
|
||||
if (m_caster->HasUnitState(UNIT_STAT_CASTING) && !m_caster->IsNonMeleeSpellCasted(false, false, true))
|
||||
m_caster->ClearUnitState(UNIT_STAT_CASTING);
|
||||
if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !m_caster->IsNonMeleeSpellCasted(false, false, true))
|
||||
m_caster->ClearUnitState(UNIT_STATE_CASTING);
|
||||
|
||||
// Unsummon summon as possessed creatures on spell cancel
|
||||
if (m_spellInfo->IsChanneled() && m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -5000,7 +5000,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if (strict && m_caster->IsScriptOverriden(m_spellInfo, 6953))
|
||||
m_caster->RemoveMovementImpairingAuras();
|
||||
}
|
||||
if (m_caster->HasUnitState(UNIT_STAT_ROOT))
|
||||
if (m_caster->HasUnitState(UNIT_STATE_ROOT))
|
||||
return SPELL_FAILED_ROOTED;
|
||||
break;
|
||||
}
|
||||
@@ -5228,7 +5228,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
|
||||
|
||||
Unit* target = m_targets.GetUnitTarget();
|
||||
if (m_caster == target && m_caster->HasUnitState(UNIT_STAT_ROOT))
|
||||
if (m_caster == target && m_caster->HasUnitState(UNIT_STATE_ROOT))
|
||||
{
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
return SPELL_FAILED_ROOTED;
|
||||
@@ -5455,7 +5455,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
SpellCastResult Spell::CheckPetCast(Unit* target)
|
||||
{
|
||||
if (m_caster->HasUnitState(UNIT_STAT_CASTING) && !(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS)) //prevent spellcast interruption by another spellcast
|
||||
if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS)) //prevent spellcast interruption by another spellcast
|
||||
return SPELL_FAILED_SPELL_IN_PROGRESS;
|
||||
|
||||
// dead owner (pets still alive when owners ressed?)
|
||||
|
||||
Reference in New Issue
Block a user