![]() |
TrinityCore
|
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 |
Binary predicate for sorting Units based on percent value of health.
Definition at line 58 of file CommonPredicates.h.
|
inline |
Definition at line 61 of file CommonPredicates.h.
Definition at line 48 of file CommonPredicates.cpp.
References Unit::GetHealth(), and Unit::GetMaxHealth().
| bool Trinity::Predicates::HealthPctOrderPred::operator() | ( | WorldObject const * | objA, |
| WorldObject const * | objB | ||
| ) | const |
Definition at line 39 of file CommonPredicates.cpp.
References Unit::GetHealth(), Unit::GetMaxHealth(), and Object::ToUnit().
|
private |
Definition at line 67 of file CommonPredicates.h.