aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts
diff options
context:
space:
mode:
authormegamage <none@none>2008-10-19 14:42:12 -0500
committermegamage <none@none>2008-10-19 14:42:12 -0500
commit672d304a4478afa58d6e094b1bf53ae25b176356 (patch)
tree6c8524a714d9885415249a20274e773be71a10d6 /src/bindings/scripts
parente7519059c93476d2ea78225d3785ddbf6d607900 (diff)
[svn] Add Unit::IsWithinCombatDist function to check melee range and spell range (now range is related to the attacker's bounding_radius and target's combat_reach, not sure if both should be combat_reach).
--HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts')
-rw-r--r--src/bindings/scripts/include/sc_creature.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp
index b18d018c5a9..a5401b8100d 100644
--- a/src/bindings/scripts/include/sc_creature.cpp
+++ b/src/bindings/scripts/include/sc_creature.cpp
@@ -133,7 +133,7 @@ void ScriptedAI::DoMeleeAttackIfReady()
if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false))
{
//If we are within range melee the target
- if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE))
+ if( m_creature->IsWithinCombatDist(m_creature->getVictim(), ATTACK_DISTANCE))
{
m_creature->AttackerStateUpdate(m_creature->getVictim());
m_creature->resetAttackTimer();