Scripts/Utgarde Keep: Fixed Ingvar evade in phase 2 (one more time)

Closes #21264
ScheduleEvents need happens after remove ImmuneToPc, or it will cause evade.
This commit is contained in:
Keader
2018-11-09 11:02:15 -03:00
parent 4c6f0eaa8d
commit f1a1acdc89

View File

@@ -228,9 +228,9 @@ class boss_ingvar_the_plunderer : public CreatureScript
events.ScheduleEvent(EVENT_SMASH, 12s, 16s, 0, PHASE_HUMAN);
break;
case EVENT_JUST_TRANSFORMED:
ScheduleSecondPhase();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetImmuneToPC(false);
ScheduleSecondPhase();
if (!me->IsThreatened())
{
EnterEvadeMode(EVADE_REASON_NO_HOSTILES);