From f9754e36309dd37c69109d5966d4be9fdfd902fd Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 27 Jan 2009 17:30:21 -0600 Subject: *Fix broken cone spells and chain spells. --HG-- branch : trunk --- src/game/Spell.cpp | 10 +++++----- src/game/Spell.h | 7 +------ 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index bf6959e1479..e17a360f90f 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1397,11 +1397,6 @@ void Spell::SearchAreaTarget(std::list &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(); - } else if(type == PUSH_TARGET_CENTER) { Unit *target = m_targets.getUnitTarget(); @@ -1413,6 +1408,11 @@ void Spell::SearchAreaTarget(std::list &TagUnitMap, float radius, const u x = target->GetPositionX(); y = target->GetPositionY(); } + else + { + x = m_caster->GetPositionX(); + y = m_caster->GetPositionY(); + } Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, type, TargetType, entry); if((m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_PLAYERS_ONLY) diff --git a/src/game/Spell.h b/src/game/Spell.h index 68d18fdeec1..7faa75a8cd8 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -81,7 +81,6 @@ enum SpellNotifyPushType PUSH_IN_FRONT, PUSH_IN_BACK, PUSH_IN_LINE, - PUSH_SELF_CENTER, PUSH_DEST_CENTER, PUSH_TARGET_CENTER, }; @@ -653,11 +652,7 @@ namespace Trinity if(i_caster->isInLine((Unit*)(itr->getSource()), i_radius )) i_data->push_back(itr->getSource()); break; - case PUSH_SELF_CENTER: - if(i_caster->IsWithinDistInMap((Unit*)(itr->getSource()), i_radius)) - i_data->push_back(itr->getSource()); - break; - case PUSH_DEST_CENTER: + default: if((itr->getSource()->GetDistance(i_spell.m_targets.m_destX, i_spell.m_targets.m_destY, i_spell.m_targets.m_destZ) < i_radius )) i_data->push_back(itr->getSource()); break; -- cgit v1.2.3