*Implement attribute flag SPELL_ATTR_EX_CANT_TARGET_SELF.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-18 18:44:16 +02:00
parent 6443bf531c
commit 91c309387a
2 changed files with 4 additions and 1 deletions

View File

@@ -271,7 +271,7 @@ enum SpellCategory
#define SPELL_ATTR_EX_UNK16 0x00010000 // 16 on immuniy
#define SPELL_ATTR_EX_UNAUTOCASTABLE_BY_PET 0x00020000 // 17
#define SPELL_ATTR_EX_UNK18 0x00040000 // 18
#define SPELL_ATTR_EX_UNK19 0x00080000 // 19
#define SPELL_ATTR_EX_CANT_TARGET_SELF 0x00080000 // 19 Applies only to unit target - for example Divine Intervention (19752)
#define SPELL_ATTR_EX_REQ_COMBO_POINTS1 0x00100000 // 20 Req combo points on target
#define SPELL_ATTR_EX_UNK21 0x00200000 // 21
#define SPELL_ATTR_EX_REQ_COMBO_POINTS2 0x00400000 // 22 Req combo points on target

View File

@@ -4341,6 +4341,9 @@ SpellCastResult Spell::CheckCast(bool strict)
if(m_spellInfo->excludeTargetAuraSpell && target->HasAura(m_spellInfo->excludeTargetAuraSpell))
return SPELL_FAILED_TARGET_AURASTATE;
if(target == m_caster && m_spellInfo->AttributesEx & SPELL_ATTR_EX_CANT_TARGET_SELF)
return SPELL_FAILED_BAD_TARGETS;
if(target != m_caster)
{
// target state requirements (apply to non-self only), to allow cast affects to self like Dirty Deeds