diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 6 | ||||
-rw-r--r-- | src/game/Spell.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index b7f67f63501..f5758a22b15 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -466,6 +466,12 @@ void Spell::FillTargetMap() continue; } + if(tmpUnitMap.empty() && m_spellInfo->Targets & TARGET_FLAG_CASTER) + { + AddUnitTarget(m_caster, i); + continue; + } + if(!targetA && !targetB) { // add here custom effects that need default target. diff --git a/src/game/Spell.h b/src/game/Spell.h index f012fdff231..0f9483bf38c 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -56,7 +56,7 @@ enum SpellCastTargetFlags TARGET_FLAG_SOURCE_LOCATION = 0x00000020, // 3 float TARGET_FLAG_DEST_LOCATION = 0x00000040, // 3 float TARGET_FLAG_OBJECT_UNK = 0x00000080, // used in 7 spells only - TARGET_FLAG_UNIT_UNK = 0x00000100, // looks like self target (480 spells) + TARGET_FLAG_CASTER = 0x00000100, // looks like self target (480 spells) TARGET_FLAG_PVP_CORPSE = 0x00000200, // pguid TARGET_FLAG_UNIT_CORPSE = 0x00000400, // 10 spells (gathering professions) TARGET_FLAG_OBJECT = 0x00000800, // pguid, 2 spells |