aboutsummaryrefslogtreecommitdiff
path: root/src/game/ThreatManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/ThreatManager.cpp')
-rw-r--r--src/game/ThreatManager.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp
index fcc3b466954..52f02f0f66d 100644
--- a/src/game/ThreatManager.cpp
+++ b/src/game/ThreatManager.cpp
@@ -246,21 +246,13 @@ void ThreatContainer::modifyThreatPercent(Unit *pVictim, int32 iPercent)
}
//============================================================
-
-bool HostileReferenceSortPredicate(const HostileReference* lhs, const HostileReference* rhs)
-{
- // std::list::sort ordering predicate must be: (Pred(x,y)&&Pred(y,x)) == false
- return lhs->getThreat() > rhs->getThreat(); // reverse sorting
-}
-
-//============================================================
// Check if the list is dirty and sort if necessary
void ThreatContainer::update()
{
if (iDirty && iThreatList.size() >1)
- {
- iThreatList.sort(HostileReferenceSortPredicate);
+ {
+ iThreatList.sort(Trinity::ThreatOrderPred());
}
iDirty = false;
}