18#ifndef TRINITY_COMMONPREDICATES_H
19#define TRINITY_COMMONPREDICATES_H
50 bool operator()(
Unit const* a,
Unit const* b)
const;
64 bool operator() (
Unit const* a,
Unit const* b)
const;
70 template <
typename PRED>
76 template <
typename... Args>
79 return !_child(std::forward<Args>(args)...);
82 template <
typename... Args>
85 return !_child(std::forward<Args>(args)...);
92 template <
typename PRED>
Binary predicate for sorting Units based on percent value of health.
HealthPctOrderPred(bool ascending=true)
bool operator()(Args &&... args)
bool operator()(Args &&... args) const
Only returns true for the given attacker's current victim, if any.
WorldObject const * _victim
bool operator()(WorldObject const *obj) const
Binary predicate for sorting Units based on percent value of a power.
PowerPctOrderPred(Powers power, bool ascending=true)
Inverter< PRED > Invert(PRED &&p)
Inverts the given predicate to return the opposite result.