TrinityCore
Trinity::Predicates::PowerPctOrderPred Class Reference

Binary predicate for sorting Units based on percent value of a power. More...

#include <CommonPredicates.h>

Public Member Functions

 PowerPctOrderPred (Powers power, bool ascending=true)
 
bool operator() (WorldObject const *objA, WorldObject const *objB) const
 
bool operator() (Unit const *a, Unit const *b) const
 

Private Attributes

Powers const _power
 
bool const _ascending
 

Detailed Description

Binary predicate for sorting Units based on percent value of a power.

Definition at line 44 of file CommonPredicates.h.

Constructor & Destructor Documentation

◆ PowerPctOrderPred()

Trinity::Predicates::PowerPctOrderPred::PowerPctOrderPred ( Powers  power,
bool  ascending = true 
)
inline

Definition at line 47 of file CommonPredicates.h.

Member Function Documentation

◆ operator()() [1/2]

bool Trinity::Predicates::PowerPctOrderPred::operator() ( Unit const *  a,
Unit const *  b 
) const

Definition at line 32 of file CommonPredicates.cpp.

+ Here is the call graph for this function:

◆ operator()() [2/2]

bool Trinity::Predicates::PowerPctOrderPred::operator() ( WorldObject const *  objA,
WorldObject const *  objB 
) const

Definition at line 23 of file CommonPredicates.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _ascending

bool const Trinity::Predicates::PowerPctOrderPred::_ascending
private

Definition at line 54 of file CommonPredicates.h.

◆ _power

Powers const Trinity::Predicates::PowerPctOrderPred::_power
private

Definition at line 53 of file CommonPredicates.h.


The documentation for this class was generated from the following files: