aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-18 10:46:30 -0500
committermegamage <none@none>2009-04-18 10:46:30 -0500
commit5629168dbbc658d44e8b12544b768ac23bf95991 (patch)
treeaed28692f8dfea8996ea01eb0438435f3223bc49 /src
parent5d2968792fb04d54008466166e589dcd3ad7fc0f (diff)
*Fix some spells with TARGET_FLAG_CASTER.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Spell.cpp6
-rw-r--r--src/game/Spell.h2
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