aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-07-18 18:44:16 +0200
committerQAston <none@none>2009-07-18 18:44:16 +0200
commit91c309387a54aa34dfe982b8325f0b3b6e79f436 (patch)
treeeafb5aec1d5b5058d669e5fca96d60ee1793a249 /src/game/Spell.cpp
parent6443bf531c00423a6dca36c6f49bc91a991fbfe6 (diff)
*Implement attribute flag SPELL_ATTR_EX_CANT_TARGET_SELF.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index a501f83710d..090749b32db 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -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