fix(Scripts/ZulGurub): Jindo cannot attack targets affected by Hex. (#11837)

Fixed #11556
This commit is contained in:
UltraNix
2022-05-30 11:36:32 +02:00
committed by GitHub
parent 9c6bcf9e28
commit f85b62a77f

View File

@@ -110,12 +110,7 @@ public:
events.ScheduleEvent(EVENT_POWERFULLHEALINGWARD, urand(14000, 20000));
break;
case EVENT_HEX:
if (Unit* target = me->GetVictim())
{
DoCast(target, SPELL_HEX, true);
if (DoGetThreat(target))
DoModifyThreatPercent(target, -80);
}
DoCastVictim(SPELL_HEX, true);
events.ScheduleEvent(EVENT_HEX, urand(12000, 20000));
break;
case EVENT_DELUSIONSOFJINDO: // HACK
@@ -174,6 +169,11 @@ public:
DoMeleeAttackIfReady();
}
bool CanAIAttack(Unit const* target) const override
{
return !target->HasAura(SPELL_HEX);
}
};
CreatureAI* GetAI(Creature* creature) const override