@@ -119,7 +119,7 @@ struct boss_sacrolash : public BossAI
119
119
120
120
scheduler.CancelGroup (GROUP_SPECIAL_ABILITY);
121
121
ScheduleTimedEvent (20s, [&] {
122
- Unit* target = SelectTarget (SelectTargetMethod::MaxThreat, 1 , 100 .0f );
122
+ Unit* target = SelectTarget (SelectTargetMethod::Random, 0 , 100 .0f , true , false );
123
123
if (!target)
124
124
target = me->GetVictim ();
125
125
@@ -153,7 +153,14 @@ struct boss_sacrolash : public BossAI
153
153
}, 8s, 12s);
154
154
155
155
scheduler.Schedule (36s, GROUP_SPECIAL_ABILITY, [this ](TaskContext context) {
156
- Unit* target = SelectTarget (SelectTargetMethod::MaxThreat, 1 , 100 .0f );
156
+ Unit* target = nullptr ;
157
+ if (Creature* alythess = instance->GetCreature (DATA_ALYTHESS))
158
+ {
159
+ std::list<Unit*> targets;
160
+ alythess->AI ()->SelectTargetList (targets, 6 , SelectTargetMethod::MaxThreat, 0 , 100 .0f , true , false );
161
+ if (!targets.empty ())
162
+ target = Acore::Containers::SelectRandomContainerElement (targets);
163
+ }
157
164
if (!target)
158
165
target = me->GetVictim ();
159
166
Talk (EMOTE_SHADOW_NOVA, target);
@@ -244,7 +251,7 @@ struct boss_alythess : public BossAI
244
251
}, 8s, 10s);
245
252
246
253
ScheduleTimedEvent (20s, 26s, [&] {
247
- Unit* target = SelectTarget (SelectTargetMethod::MaxThreat, 1 , 100 .0f );
254
+ Unit* target = SelectTarget (SelectTargetMethod::Random, 0 , 100 .0f , true , false );
248
255
if (!target)
249
256
target = me->GetVictim ();
250
257
DoCast (target, SPELL_SHADOW_NOVA);
@@ -280,7 +287,14 @@ struct boss_alythess : public BossAI
280
287
}, 10s, 15s);
281
288
282
289
scheduler.Schedule (20s, GROUP_SPECIAL_ABILITY, [this ](TaskContext context) {
283
- Unit* target = SelectTarget (SelectTargetMethod::MaxThreat, 1 , 100 .0f );
290
+ Unit* target = nullptr ;
291
+ if (Creature* sacrolash = instance->GetCreature (DATA_SACROLASH))
292
+ {
293
+ std::list<Unit*> targets;
294
+ sacrolash->AI ()->SelectTargetList (targets, 6 , SelectTargetMethod::MaxThreat, 0 , 100 .0f , true , false );
295
+ if (!targets.empty ())
296
+ target = Acore::Containers::SelectRandomContainerElement (targets);
297
+ }
284
298
if (!target)
285
299
target = me->GetVictim ();
286
300
Talk (EMOTE_CONFLAGRATION, target);
0 commit comments