mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[10915] Use HasFlag function for check flags instead raw access.
This commit is contained in:
parent
f56e13966f
commit
d1b0e5b40f
3 changed files with 3 additions and 3 deletions
|
|
@ -5035,7 +5035,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
if (m_caster->GetTypeId() != TYPEID_PLAYER || !m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetTypeId() != TYPEID_UNIT)
|
if (m_caster->GetTypeId() != TYPEID_PLAYER || !m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetTypeId() != TYPEID_UNIT)
|
||||||
return SPELL_FAILED_BAD_TARGETS;
|
return SPELL_FAILED_BAD_TARGETS;
|
||||||
|
|
||||||
if( !(m_targets.getUnitTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & UNIT_FLAG_SKINNABLE) )
|
if (!m_targets.getUnitTarget()->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE))
|
||||||
return SPELL_FAILED_TARGET_UNSKINNABLE;
|
return SPELL_FAILED_TARGET_UNSKINNABLE;
|
||||||
|
|
||||||
Creature* creature = (Creature*)m_targets.getUnitTarget();
|
Creature* creature = (Creature*)m_targets.getUnitTarget();
|
||||||
|
|
|
||||||
|
|
@ -7456,7 +7456,7 @@ void Aura::PeriodicDummyTick()
|
||||||
if (spell->Id == 52179)
|
if (spell->Id == 52179)
|
||||||
{
|
{
|
||||||
// Periodic need for remove visual on stun/fear/silence lost
|
// Periodic need for remove visual on stun/fear/silence lost
|
||||||
if (!(target->GetUInt32Value(UNIT_FIELD_FLAGS)&(UNIT_FLAG_STUNNED|UNIT_FLAG_FLEEING|UNIT_FLAG_SILENCED)))
|
if (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED | UNIT_FLAG_FLEEING | UNIT_FLAG_SILENCED))
|
||||||
target->RemoveAurasDueToSpell(52179);
|
target->RemoveAurasDueToSpell(52179);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10914"
|
#define REVISION_NR "10915"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue