mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
*Implement attribute flag SPELL_ATTR_EX_CANT_TARGET_SELF.
--HG-- branch : trunk
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user