mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-18 13:59:39 -04:00
[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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user