From fdab13e3c1ebd5f516eabca33fb98972a2d1b4c4 Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 15 Mar 2009 20:35:04 -0600 Subject: *Fix living bomb using a better way. --HG-- branch : trunk --- src/game/Spell.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/game/Spell.cpp') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 91c4a536d56..bfc58631079 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1380,9 +1380,6 @@ void Spell::SearchChainTarget(std::list &TagUnitMap, float max_range, uin void Spell::SearchAreaTarget(std::list &TagUnitMap, float radius, const uint32 &type, SpellTargets TargetType, uint32 entry) { float x, y, z; - - Unit *target = m_targets.getUnitTarget(); - if(type == PUSH_DEST_CENTER) { if(!m_targets.HasDest()) @@ -1396,6 +1393,7 @@ void Spell::SearchAreaTarget(std::list &TagUnitMap, float radius, const u } else if(type == PUSH_TARGET_CENTER) { + Unit *target = m_targets.getUnitTarget(); if(!target) { sLog.outError( "SPELL: cannot find unit target for spell ID %u\n", m_spellInfo->Id ); @@ -1412,7 +1410,7 @@ void Spell::SearchAreaTarget(std::list &TagUnitMap, float radius, const u z = m_caster->GetPositionZ(); } - Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, type, TargetType, entry, x, y, z, target); + 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); -- cgit v1.2.3