From b3cb2bedaea91eb6dfc49db7934f3b618858a69a Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Wed, 27 Sep 2023 19:08:20 -0600 Subject: [PATCH] Update boss_anubrekhan_40.cpp Ensures Corpse Scarabs engage in combat. --- src/naxx40Scripts/boss_anubrekhan_40.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/naxx40Scripts/boss_anubrekhan_40.cpp b/src/naxx40Scripts/boss_anubrekhan_40.cpp index 3301d71..fcaab47 100644 --- a/src/naxx40Scripts/boss_anubrekhan_40.cpp +++ b/src/naxx40Scripts/boss_anubrekhan_40.cpp @@ -94,7 +94,6 @@ public: me->SummonCreature(NPC_CRYPT_GUARD, 3299.086f, -3450.929f, 287.077f, 3.999f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); } - void Reset() override { BossAI::Reset(); @@ -112,15 +111,19 @@ public: void JustSummoned(Creature* cr) override { - if (me->IsInCombat()) - { - cr->SetInCombatWithZone(); + if (me->IsInCombat()) + { + cr->SetInCombatWithZone(); // This line will set the creature in combat with the zone. if (cr->GetEntry() == NPC_CRYPT_GUARD) { - cr->AI()->Talk(EMOTE_SPAWN, me); + cr->AI()->Talk(EMOTE_SPAWN, me); } - } - summons.Summon(cr); + else if (cr->GetEntry() == NPC_CORPSE_SCARAB) // Explicitly check for Corpse Scarabs here. + { + cr->SetInCombatWithZone(); // Set the Corpse Scarabs in combat with the zone too. + } + } + summons.Summon(cr); } void SummonedCreatureDies(Creature* cr, Unit*) override