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

View File

@@ -140,9 +140,12 @@ public:
events.ScheduleEvent(EVENT_CORRUPTED_BLOOD, urand(30000, 45000));
break;
case EVENT_CAUSE_INSANITY:
if (Unit* victim = SelectTarget(SelectTargetMethod::MaxThreat, 0, 30.f, true))
if (me->GetThreatMgr().getThreatList().size() > 1)
{
DoCast(victim, SPELL_CAUSE_INSANITY);
if (Unit* victim = SelectTarget(SelectTargetMethod::MaxThreat, 0, 30.f, true))
{
DoCast(victim, SPELL_CAUSE_INSANITY);
}
}
events.ScheduleEvent(EVENT_CAUSE_INSANITY, urand(35000, 45000));
break;