aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-01-03 13:07:30 +0100
committerShauren <shauren.trinity@gmail.com>2022-01-03 13:07:30 +0100
commitc0f976d23d7fd9ef687d47ae41bed0924bfdd5c7 (patch)
tree9d9698bb3355ec3c46405733a2ac6135e132cfb2 /src/server/scripts/Spells
parent08b5a0586aadd26b6ffa050e8538fd9ebb57591b (diff)
Core/Spells: Added helper function to select random injured healing spell targets
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 1ed37c14a58..1cc2cfca560 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -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()