From c0f976d23d7fd9ef687d47ae41bed0924bfdd5c7 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 3 Jan 2022 13:07:30 +0100 Subject: Core/Spells: Added helper function to select random injured healing spell targets --- src/server/scripts/Spells/spell_shaman.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/server/scripts') 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& targets) { - uint32 const maxTargets = 6; - if (targets.size() > maxTargets) - { - targets.sort(Trinity::HealthPctOrderPred()); - targets.resize(maxTargets); - } + Trinity::SelectRandomInjuredTargets(targets, 6, true); } void CountEffectivelyHealedTarget() -- cgit v1.2.3