mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
fix(Scripts/SunwellPlateau): Make Twin special abilities target one of the highest 6 in threat of the other twin (#21964)
This commit is contained in:
@@ -119,7 +119,7 @@ struct boss_sacrolash : public BossAI
|
||||
|
||||
scheduler.CancelGroup(GROUP_SPECIAL_ABILITY);
|
||||
ScheduleTimedEvent(20s, [&] {
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 100.0f);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
|
||||
@@ -153,7 +153,14 @@ struct boss_sacrolash : public BossAI
|
||||
}, 8s, 12s);
|
||||
|
||||
scheduler.Schedule(36s, GROUP_SPECIAL_ABILITY, [this](TaskContext context) {
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 100.0f);
|
||||
Unit* target = nullptr;
|
||||
if (Creature* alythess = instance->GetCreature(DATA_ALYTHESS))
|
||||
{
|
||||
std::list<Unit*> targets;
|
||||
alythess->AI()->SelectTargetList(targets, 6, SelectTargetMethod::MaxThreat, 0, 100.0f, true, false);
|
||||
if (!targets.empty())
|
||||
target = Acore::Containers::SelectRandomContainerElement(targets);
|
||||
}
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
Talk(EMOTE_SHADOW_NOVA, target);
|
||||
@@ -244,7 +251,7 @@ struct boss_alythess : public BossAI
|
||||
}, 8s, 10s);
|
||||
|
||||
ScheduleTimedEvent(20s, 26s, [&] {
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 100.0f);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
DoCast(target, SPELL_SHADOW_NOVA);
|
||||
@@ -280,7 +287,14 @@ struct boss_alythess : public BossAI
|
||||
}, 10s, 15s);
|
||||
|
||||
scheduler.Schedule(20s, GROUP_SPECIAL_ABILITY, [this](TaskContext context) {
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 100.0f);
|
||||
Unit* target = nullptr;
|
||||
if (Creature* sacrolash = instance->GetCreature(DATA_SACROLASH))
|
||||
{
|
||||
std::list<Unit*> targets;
|
||||
sacrolash->AI()->SelectTargetList(targets, 6, SelectTargetMethod::MaxThreat, 0, 100.0f, true, false);
|
||||
if (!targets.empty())
|
||||
target = Acore::Containers::SelectRandomContainerElement(targets);
|
||||
}
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
Talk(EMOTE_CONFLAGRATION, target);
|
||||
|
||||
Reference in New Issue
Block a user