refactor(Scripts/BlackTemple) remove tanks from Fatal Attraction after setting the target amount (#22038)

This commit is contained in:
Tereneckla
2025-05-03 01:41:17 +00:00
committed by GitHub
parent b9704d4fa1
commit 338acf7c41

View File

@@ -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<WorldObject*>& targets)
{
Acore::Containers::RandomResize(targets, 3);
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_SABER_LASH_IMMUNITY));
}