diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp index fccec7652..be316716f 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp @@ -71,7 +71,8 @@ enum ApothecaryMisc NPC_VIAL_BUNNY = 36530, NPC_CROWN_APOTHECARY = 36885, PHASE_ALL = 0, - PHASE_INTRO = 1 + PHASE_INTRO = 1, + PHASE_COMBAT = 2 }; Position const BaxterMovePos = { -221.4115f, 2206.825f, 79.93151f, 0.0f }; @@ -108,22 +109,21 @@ public: _deadCount = 0; _isDead = false; _phase = PHASE_ALL; + summons.DespawnAll(); me->SetFaction(FACTION_FRIENDLY); me->SummonCreatureGroup(1); me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } - void EnterEvadeMode() override + void JustSummoned(Creature* summon) override { - summons.DespawnAll(); - _EnterEvadeMode(); + summons.Summon(summon); } void DoAction(int32 action) override { - if (action == ACTION_START_EVENT && events.IsInPhase(PHASE_ALL)) + if (action == ACTION_START_EVENT && _phase == PHASE_ALL) { - events.SetPhase(PHASE_INTRO); _phase = PHASE_INTRO; _scheduler.Schedule(1ms, [this](TaskContext /*context*/) { @@ -140,6 +140,7 @@ public: .Schedule(12s, [this](TaskContext context) { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); + _phase = PHASE_COMBAT; DoZoneInCombat(); context.Schedule(6s, [this](TaskContext /*context*/) // Call Baxter diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index 8b89a3a46..d667691f8 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -51,6 +51,15 @@ public: case NPC_DND_CRAZED_APOTHECARY_GENERATOR: _crazedApothecaryGeneratorGUIDs.push_back(creature->GetGUID()); break; + case NPC_APOTHECARY_HUMMEL: + _apothecaryHummel = creature->GetGUID(); + break; + case NPC_CRAZED_APOTHECARY: + if (Creature* hummel = instance->GetCreature(_apothecaryHummel)) + { + hummel->AI()->JustSummoned(creature); + } + break; default: break; } @@ -132,6 +141,7 @@ public: private: uint32 _encounters[MAX_ENCOUNTERS]; GuidVector _crazedApothecaryGeneratorGUIDs; + ObjectGuid _apothecaryHummel; }; }; diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h index 74bef34d2..fada11a7a 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h @@ -36,7 +36,9 @@ enum DataTypes enum SKCreatures { - NPC_DND_CRAZED_APOTHECARY_GENERATOR = 36212 + NPC_DND_CRAZED_APOTHECARY_GENERATOR = 36212, + NPC_APOTHECARY_HUMMEL = 36296, + NPC_CRAZED_APOTHECARY = 36568 }; enum GameObjects