fix(Script/Mandorik): enrage on reset and on subsequent pulls. (#7176)

* Fixed issue with Ohgan data not being reset properly causing Mandokir to enrage even when Ohgan is alive on subsequent pulls. Mandokir now correctly removes Frenzy when resetting.

Signed-off-by: ChrisCGalbraith <chriscgalbraith@gmai.com>

* Update src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

Co-authored-by: ChrisCGalbraith <chriscgalbraith@gmai.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
Christopher Galbraith
2021-07-31 10:16:02 +01:00
committed by GitHub
parent 275b107fea
commit 19bbe2cd79

View File

@@ -105,14 +105,17 @@ public:
{
if (me->GetPositionZ() > 140.0f)
{
killCount = 0;
events.ScheduleEvent(EVENT_CHECK_START, 1000);
if (Creature* speaker = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_VILEBRANCH_SPEAKER)))
if (!speaker->IsAlive())
speaker->Respawn(true);
}
killCount = 0;
me->RemoveAurasDueToSpell(SPELL_FRENZY);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
summons.DespawnAll();
instance->SetBossState(DATA_OHGAN, NOT_STARTED);
me->Mount(MODEL_OHGAN_MOUNT);
}