mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Units: moved health and power ordering predicates from Unit header into CommonPredicates (#29584)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "Battleground.h"
|
||||
#include "BattlePetMgr.h"
|
||||
#include "CellImpl.h"
|
||||
#include "CommonPredicates.h"
|
||||
#include "Containers.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "DB2Stores.h"
|
||||
@@ -2991,7 +2992,7 @@ class spell_gen_replenishment : public SpellScript
|
||||
|
||||
if (targets.size() > maxTargets)
|
||||
{
|
||||
targets.sort(Trinity::PowerPctOrderPred(POWER_MANA));
|
||||
targets.sort(Trinity::Predicates::PowerPctOrderPred(POWER_MANA));
|
||||
targets.resize(maxTargets);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Battleground.h"
|
||||
#include "CommonPredicates.h"
|
||||
#include "Containers.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAIImpl.h"
|
||||
@@ -995,7 +996,7 @@ class spell_item_echoes_of_light : public SpellScript
|
||||
if (targets.size() < 2)
|
||||
return;
|
||||
|
||||
targets.sort(Trinity::HealthPctOrderPred());
|
||||
targets.sort(Trinity::Predicates::HealthPctOrderPred());
|
||||
|
||||
WorldObject* target = targets.front();
|
||||
targets.clear();
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "AreaTrigger.h"
|
||||
#include "AreaTriggerAI.h"
|
||||
#include "CommonPredicates.h"
|
||||
#include "Containers.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Group.h"
|
||||
@@ -692,7 +693,7 @@ class spell_pal_glyph_of_holy_light : public SpellScript
|
||||
|
||||
if (targets.size() > maxTargets)
|
||||
{
|
||||
targets.sort(Trinity::HealthPctOrderPred());
|
||||
targets.sort(Trinity::Predicates::HealthPctOrderPred());
|
||||
targets.resize(maxTargets);
|
||||
}
|
||||
}
|
||||
@@ -897,7 +898,7 @@ class spell_pal_holy_prism_selector : public SpellScript
|
||||
{
|
||||
if (GetSpellInfo()->Id == SPELL_PALADIN_HOLY_PRISM_TARGET_ALLY)
|
||||
{
|
||||
targets.sort(Trinity::HealthPctOrderPred());
|
||||
targets.sort(Trinity::Predicates::HealthPctOrderPred());
|
||||
targets.resize(maxTargets);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user