aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-22 21:29:43 -0500
committermegamage <none@none>2009-08-22 21:29:43 -0500
commit21ffda7eaf9596dab4e8f14aeda65d9d032fac71 (patch)
tree93904d133d4fd59b36f03286b9a801a7165da532
parent5c82ba864d4f9989f1d8898857f445a976793665 (diff)
*Consider target size for AOE spells.
--HG-- branch : trunk
-rw-r--r--src/game/Spell.h6
1 files changed, 3 insertions, 3 deletions
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<Unit*> *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<Unit*> &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: