Core/Spells: Added helper function to select random injured healing spell targets

This commit is contained in:
Shauren
2022-01-03 13:07:30 +01:00
parent 08b5a0586a
commit c0f976d23d
3 changed files with 72 additions and 6 deletions

View File

@@ -324,12 +324,7 @@ class spell_sha_downpour : public SpellScript
void FilterTargets(std::list<WorldObject*>& targets)
{
uint32 const maxTargets = 6;
if (targets.size() > maxTargets)
{
targets.sort(Trinity::HealthPctOrderPred());
targets.resize(maxTargets);
}
Trinity::SelectRandomInjuredTargets(targets, 6, true);
}
void CountEffectivelyHealedTarget()