aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-29 19:35:49 -0600
committermegamage <none@none>2009-01-29 19:35:49 -0600
commitb0bf621a139aaa6e620098fc7a4411a800fda43d (patch)
treea80cfed503a562c4e436814dc056e8b22386efef /src/game/Spell.cpp
parent25ab1fa4adfe1e9be1f8bfb6701f6a0d48887770 (diff)
parentadee7cab17e191ab9d735c326cd611f0380736d6 (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index cf6245d9624..852c7943612 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1323,7 +1323,7 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin
void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, const uint32 &type, SpellTargets TargetType, uint32 entry)
{
- float x, y;
+ float x, y, z;
if(type == PUSH_DEST_CENTER)
{
if(!m_targets.HasDest())
@@ -1333,11 +1333,7 @@ void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, const u
}
x = m_targets.m_destX;
y = m_targets.m_destY;
- }
- else if(type == PUSH_SELF_CENTER)
- {
- x = m_caster->GetPositionX();
- y = m_caster->GetPositionY();
+ z = m_targets.m_destZ;
}
else if(type == PUSH_TARGET_CENTER)
{
@@ -1349,9 +1345,16 @@ void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, const u
}
x = target->GetPositionX();
y = target->GetPositionY();
+ z = target->GetPositionZ();
+ }
+ else
+ {
+ x = m_caster->GetPositionX();
+ y = m_caster->GetPositionY();
+ z = m_caster->GetPositionZ();
}
- Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, type, TargetType, entry);
+ Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, type, TargetType, entry, x, y, z);
if((m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_PLAYERS_ONLY)
|| TargetType == SPELL_TARGETS_ENTRY && !entry)
m_caster->GetMap()->VisitWorld(x, y, radius, notifier);