aboutsummaryrefslogtreecommitdiff
path: root/src/game/GridNotifiers.h
diff options
context:
space:
mode:
authorRat <none@none>2010-04-14 23:07:41 +0200
committerRat <none@none>2010-04-14 23:07:41 +0200
commit6bcb297de4d5231373a3e2bf2b40e527b91cdf46 (patch)
treea5379b14ceb2ac9e7273143b334bfc693e2ef042 /src/game/GridNotifiers.h
parentcc262e1cde544eb7cf643df79fa00c9f34af4785 (diff)
*code cleanup
*totally destroyed m_creature, use "me" for future coding --HG-- branch : trunk
Diffstat (limited to 'src/game/GridNotifiers.h')
-rw-r--r--src/game/GridNotifiers.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h
index 9143f14d0dd..7b860af1d1e 100644
--- a/src/game/GridNotifiers.h
+++ b/src/game/GridNotifiers.h
@@ -943,7 +943,7 @@ namespace Trinity
class NearestHostileUnitInAttackDistanceCheck
{
public:
- explicit NearestHostileUnitInAttackDistanceCheck(Creature const* creature, float dist = 0) : m_creature(creature)
+ explicit NearestHostileUnitInAttackDistanceCheck(Creature const* creature, float dist = 0) : me(creature)
{
m_range = (dist == 0 ? 9999 : dist);
m_force = (dist == 0 ? false : true);
@@ -951,26 +951,26 @@ namespace Trinity
bool operator()(Unit* u)
{
// TODO: addthreat for every enemy in range?
- if (!m_creature->IsWithinDistInMap(u, m_range))
+ if (!me->IsWithinDistInMap(u, m_range))
return false;
if (m_force)
{
- if (!m_creature->canAttack(u))
+ if (!me->canAttack(u))
return false;
}
else
{
- if (!m_creature->canStartAttack(u, false))
+ if (!me->canStartAttack(u, false))
return false;
}
- m_range = m_creature->GetDistance(u);
+ m_range = me->GetDistance(u);
return true;
}
float GetLastRange() const { return m_range; }
private:
- Creature const *m_creature;
+ Creature const *me;
float m_range;
bool m_force;
NearestHostileUnitInAttackDistanceCheck(NearestHostileUnitInAttackDistanceCheck const&);