aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/SharedDefines.h2
-rw-r--r--src/game/Spell.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index 56e3214538f..1a9d5e470a4 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -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
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