From 662a49bfd87d5a3f94933866e5117337e053ed40 Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 22 Jan 2019 08:12:46 +0000 Subject: [PATCH] [Core / Script] Mr Smite Event Update (#1340) Fixed an issue where Mr Smite would do his stomp event more than once. --- .../EasternKingdoms/Deadmines/boss_mr_smite.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp index 43989544b..6f27e7b7d 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp @@ -43,9 +43,13 @@ class boss_mr_smite : public CreatureScript } EventMap events; + bool health67; + bool health34; void Reset() { + health67 = false; + health34 = false; me->LoadEquipment(EQUIP_SWORD); me->SetCanDualWield(false); me->SetStandState(UNIT_STAND_STATE_STAND); @@ -73,7 +77,7 @@ class boss_mr_smite : public CreatureScript events.ScheduleEvent(EVENT_SMITE_SLAM, 15000); break; case EVENT_CHECK_HEALTH1: - if (me->HealthBelowPct(67)) + if (me->HealthBelowPct(67) && !health67) { me->CastSpell(me, SPELL_SMITE_STOMP, false); events.DelayEvents(10000); @@ -82,12 +86,13 @@ class boss_mr_smite : public CreatureScript Talk(SAY_SWAP1); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED); me->SetReactState(REACT_PASSIVE); + health67 = true; break; } events.ScheduleEvent(EVENT_CHECK_HEALTH1, 500); break; case EVENT_CHECK_HEALTH2: - if (me->HealthBelowPct(34)) + if (me->HealthBelowPct(34) && !health34) { me->CastSpell(me, SPELL_SMITE_STOMP, false); events.DelayEvents(10000); @@ -96,6 +101,7 @@ class boss_mr_smite : public CreatureScript Talk(SAY_SWAP2); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED); me->SetReactState(REACT_PASSIVE); + health34 = true; break; } events.ScheduleEvent(EVENT_CHECK_HEALTH2, 500);