TrinityCore
Trinity::Predicates::HealthPctOrderPred Class Reference

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

#include <CommonPredicates.h>

Public Member Functions

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

Private Attributes

bool const _ascending
 

Detailed Description

Binary predicate for sorting Units based on percent value of health.

Definition at line 58 of file CommonPredicates.h.

Constructor & Destructor Documentation

◆ HealthPctOrderPred()

Trinity::Predicates::HealthPctOrderPred::HealthPctOrderPred ( bool  ascending = true)
inline

Definition at line 61 of file CommonPredicates.h.

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 48 of file CommonPredicates.cpp.

+ Here is the call graph for this function:

◆ operator()() [2/2]

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

Definition at line 39 of file CommonPredicates.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _ascending

bool const Trinity::Predicates::HealthPctOrderPred::_ascending
private

Definition at line 67 of file CommonPredicates.h.


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