From 21ffda7eaf9596dab4e8f14aeda65d9d032fac71 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 22 Aug 2009 21:29:43 -0500 Subject: *Consider target size for AOE spells. --HG-- branch : trunk --- src/game/Spell.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/game/Spell.h b/src/game/Spell.h index 298a86445fc..9b8430fe121 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -660,7 +660,7 @@ namespace Trinity std::list *i_data; Spell &i_spell; SpellNotifyPushType i_push_type; - float i_radius, i_radiusSq; + float i_radius; SpellTargets i_TargetType; Unit* i_source; uint32 i_entry; @@ -668,7 +668,7 @@ namespace Trinity SpellNotifierCreatureAndPlayer(Spell &spell, std::list &data, float radius, SpellNotifyPushType type, SpellTargets TargetType = SPELL_TARGETS_ENEMY, uint32 entry = 0, float x = 0, float y = 0, float z = 0) - : i_data(&data), i_spell(spell), i_push_type(type), i_radius(radius), i_radiusSq(radius*radius) + : i_data(&data), i_spell(spell), i_push_type(type), i_radius(radius) , i_TargetType(TargetType), i_entry(entry), i_x(x), i_y(y), i_z(z) { i_source = spell.GetCaster(); @@ -723,7 +723,7 @@ namespace Trinity case PUSH_DST_CENTER: case PUSH_CHAIN: default: - if((target->GetDistanceSq(i_x, i_y, i_z) < i_radiusSq)) + if(target->IsWithinDist3d(i_x, i_y, i_z, i_radius)) i_data->push_back(target); break; case PUSH_IN_FRONT: -- cgit v1.2.3