AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::ThreatOrderPred Class Reference

#include "ThreatMgr.h"

Public Member Functions

 ThreatOrderPred (bool ascending=false)
 
bool operator() (HostileReference const *a, HostileReference const *b) const
 

Private Attributes

const bool m_ascending
 

Detailed Description

Constructor & Destructor Documentation

◆ ThreatOrderPred()

Acore::ThreatOrderPred::ThreatOrderPred ( bool  ascending = false)
inline
322: m_ascending(ascending) {}
const bool m_ascending
Definition: ThreatMgr.h:328

Member Function Documentation

◆ operator()()

bool Acore::ThreatOrderPred::operator() ( HostileReference const *  a,
HostileReference const *  b 
) const
inline
324 {
325 return m_ascending ? a->GetThreat() < b->GetThreat() : a->GetThreat() > b->GetThreat();
326 }

References HostileReference::GetThreat(), and m_ascending.

Member Data Documentation

◆ m_ascending

const bool Acore::ThreatOrderPred::m_ascending
private

Referenced by operator()().