*Update melee range calculation. By QAston.
--HG-- branch : trunk
This commit is contained in:
+4
-4
@@ -771,10 +771,10 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
bool haveOffhandWeapon() const;
|
||||
bool CanDualWield() const { return m_canDualWield; }
|
||||
void SetCanDualWield(bool value) { m_canDualWield = value; }
|
||||
bool canReachWithAttack(Unit *pVictim) const;
|
||||
float GetCombatReach() const { return m_floatValues[UNIT_FIELD_COMBATREACH]; }
|
||||
bool IsWithinCombatDist(Unit *obj, float dist2compare) const;
|
||||
bool IsWithinMeleeRange(Unit *obj) const { return IsWithinCombatDist(obj, ATTACK_DISTANCE); }
|
||||
float GetMeleeReach() const { float reach = m_floatValues[UNIT_FIELD_COMBATREACH]; return reach > MIN_MELEE_REACH ? reach : MIN_MELEE_REACH; }
|
||||
bool IsWithinCombatRange(Unit *obj, float dist2compare) const;
|
||||
bool IsWithinMeleeRange(Unit *obj) const;
|
||||
void GetRandomContactPoint( const Unit* target, float &x, float &y, float &z, float distance2dMin, float distance2dMax ) const;
|
||||
uint32 m_extraAttacks;
|
||||
bool m_canDualWield;
|
||||
@@ -810,7 +810,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
Unit* getVictim() const { return m_attacking; }
|
||||
void CombatStop(bool cast = false);
|
||||
void CombatStopWithPets(bool cast = false);
|
||||
Unit* SelectNearbyTarget(float dist = ATTACK_DISTANCE) const;
|
||||
Unit* SelectNearbyTarget(float dist = NOMINAL_MELEE_RANGE) const;
|
||||
|
||||
void addUnitState(uint32 f) { m_state |= f; }
|
||||
bool hasUnitState(const uint32 f) const { return (m_state & f); }
|
||||
|
||||
Reference in New Issue
Block a user