fix(Scripts/Zulgurub): Hakkar should cast Insanity only if there are … (#12325)

…at least 2 valid targets in raid.
This commit is contained in:
UltraNix
2022-07-09 16:57:11 +02:00
committed by GitHub
parent f66a1150ef
commit 330c1ac2a4
@@ -140,10 +140,13 @@ public:
events.ScheduleEvent(EVENT_CORRUPTED_BLOOD, urand(30000, 45000)); events.ScheduleEvent(EVENT_CORRUPTED_BLOOD, urand(30000, 45000));
break; break;
case EVENT_CAUSE_INSANITY: case EVENT_CAUSE_INSANITY:
if (me->GetThreatMgr().getThreatList().size() > 1)
{
if (Unit* victim = SelectTarget(SelectTargetMethod::MaxThreat, 0, 30.f, true)) if (Unit* victim = SelectTarget(SelectTargetMethod::MaxThreat, 0, 30.f, true))
{ {
DoCast(victim, SPELL_CAUSE_INSANITY); DoCast(victim, SPELL_CAUSE_INSANITY);
} }
}
events.ScheduleEvent(EVENT_CAUSE_INSANITY, urand(35000, 45000)); events.ScheduleEvent(EVENT_CAUSE_INSANITY, urand(35000, 45000));
break; break;
case EVENT_ENRAGE: case EVENT_ENRAGE: