aboutsummaryrefslogtreecommitdiff
path: root/src/game/GridNotifiersImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GridNotifiersImpl.h')
-rw-r--r--src/game/GridNotifiersImpl.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h
index 6502c2ea7c8..211bca9cd3c 100644
--- a/src/game/GridNotifiersImpl.h
+++ b/src/game/GridNotifiersImpl.h
@@ -631,4 +631,28 @@ void MaNGOS::LocalizedPacketListDo<Builder>::operator()( Player* p )
p->SendDirectMessage((*data_list)[i]);
}
+struct ObjectDistanceOrder : public std::binary_function<const WorldObject, const WorldObject, bool>
+{
+ const Unit* m_pSource;
+
+ ObjectDistanceOrder(const Unit* pSource) : m_pSource(pSource) {};
+
+ bool operator()(const WorldObject* pLeft, const WorldObject* pRight) const
+ {
+ return m_pSource->GetDistanceOrder(pLeft, pRight);
+ }
+};
+
+struct ObjectDistanceOrderReversed : public std::binary_function<const WorldObject, const WorldObject, bool>
+{
+ const Unit* m_pSource;
+
+ ObjectDistanceOrderReversed(const Unit* pSource) : m_pSource(pSource) {};
+
+ bool operator()(const WorldObject* pLeft, const WorldObject* pRight) const
+ {
+ return !m_pSource->GetDistanceOrder(pLeft, pRight);
+ }
+};
+
#endif // MANGOS_GRIDNOTIFIERSIMPL_H