mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 08:17:56 +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, [&] {
|
ScheduleTimedEvent(50s, [&] {
|
||||||
Talk(SAY_SPELL);
|
Talk(SAY_SPELL);
|
||||||
// weights for 1, 2, or 3 targets
|
DoCast(SPELL_FATAL_ATTRACTION);
|
||||||
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);
|
|
||||||
}, 1min);
|
}, 1min);
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
me->m_Events.AddEventAtOffset([&] {
|
||||||
@@ -298,6 +294,7 @@ class spell_mother_shahraz_fatal_attraction : public SpellScript
|
|||||||
|
|
||||||
void FilterTargets(std::list<WorldObject*>& targets)
|
void FilterTargets(std::list<WorldObject*>& targets)
|
||||||
{
|
{
|
||||||
|
Acore::Containers::RandomResize(targets, 3);
|
||||||
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_SABER_LASH_IMMUNITY));
|
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_SABER_LASH_IMMUNITY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user