mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
refactor(Scripts/BlackTemple) remove tanks from Fatal Attraction after setting the target amount (#22038)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user