[10915] Use HasFlag function for check flags instead raw access.

This commit is contained in:
VladimirMangos 2010-12-24 05:36:21 +03:00
parent f56e13966f
commit d1b0e5b40f
3 changed files with 3 additions and 3 deletions

View file

@ -5035,7 +5035,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (m_caster->GetTypeId() != TYPEID_PLAYER || !m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetTypeId() != TYPEID_UNIT)
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;
Creature* creature = (Creature*)m_targets.getUnitTarget();