From 338acf7c415de061554a653cd2e1eb775937b224 Mon Sep 17 00:00:00 2001 From: Tereneckla Date: Sat, 3 May 2025 01:41:17 +0000 Subject: [PATCH] refactor(Scripts/BlackTemple) remove tanks from Fatal Attraction after setting the target amount (#22038) --- .../scripts/Outland/BlackTemple/boss_mother_shahraz.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index 5a782f11e..980e9db82 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -102,11 +102,7 @@ struct boss_mother_shahraz : public BossAI ScheduleTimedEvent(50s, [&] { Talk(SAY_SPELL); - // weights for 1, 2, or 3 targets - static double chances[] = {5.0, 15.0, 80.0}; - uint32 selectedIndex = urandweighted(3, chances); - uint32 numTargets = selectedIndex + 1; - me->CastCustomSpell(SPELL_FATAL_ATTRACTION, SPELLVALUE_MAX_TARGETS, numTargets, me, false); + DoCast(SPELL_FATAL_ATTRACTION); }, 1min); me->m_Events.AddEventAtOffset([&] { @@ -298,6 +294,7 @@ class spell_mother_shahraz_fatal_attraction : public SpellScript void FilterTargets(std::list& targets) { + Acore::Containers::RandomResize(targets, 3); targets.remove_if(Acore::UnitAuraCheck(true, SPELL_SABER_LASH_IMMUNITY)); }