From ccfa82e7d516c9d280fc7214fcf3672397c741ff Mon Sep 17 00:00:00 2001 From: joschiwald Date: Thu, 14 Aug 2014 16:09:14 +0200 Subject: Core/Creature: update creature_template and some other small things http://www.trinitycore.org/f/topic/9572-creature-damage/ --- src/server/game/Entities/Object/Object.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/server/game/Entities/Object') diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index dc6007cbfe0..13f4dd13a83 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -805,14 +805,16 @@ namespace Trinity class ObjectDistanceOrderPred { public: - ObjectDistanceOrderPred(WorldObject const* pRefObj, bool ascending = true) : m_refObj(pRefObj), m_ascending(ascending) { } - bool operator()(WorldObject const* pLeft, WorldObject const* pRight) const + ObjectDistanceOrderPred(WorldObject const* refObj, bool ascending = true) : _refObj(refObj), _ascending(ascending) { } + + bool operator()(WorldObject const* left, WorldObject const* right) const { - return m_ascending ? m_refObj->GetDistanceOrder(pLeft, pRight) : !m_refObj->GetDistanceOrder(pLeft, pRight); + return _refObj->GetDistanceOrder(left, right) == _ascending; } + private: - WorldObject const* m_refObj; - const bool m_ascending; + WorldObject const* _refObj; + bool _ascending; }; } -- cgit v1.2.3