From 145a5a64bbd11cfac14fb351530f962b92c8e09e Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 11 Mar 2023 13:16:50 +0200 Subject: [PATCH] fix(Scripts/Creature): Fel Guard Hound not despawning. (#15300) --- .../scripts/Outland/zone_hellfire_peninsula.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index b6cd91367..b3cd980ac 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -329,7 +329,8 @@ public: enum FelGuard { SPELL_SUMMON_POO = 37688, - NPC_DERANGED_HELBOAR = 16863 + NPC_DERANGED_HELBOAR = 16863, + QUEST_SHIZZ_WORK = 10629, }; class npc_fel_guard_hound : public CreatureScript @@ -358,7 +359,7 @@ public: DoCast(SPELL_SUMMON_POO); if (Player* owner = me->GetCharmerOrOwnerPlayerOrPlayerItself()) - me->GetMotionMaster()->MoveFollow(owner, 0.0f, 0.0f); + me->GetMotionMaster()->MoveFollow(owner, 1.0f, 90.0f); } } @@ -374,6 +375,13 @@ public: me->GetMotionMaster()->MovePoint(1, helboar->GetPositionX(), helboar->GetPositionY(), helboar->GetPositionZ()); } } + if (Player* owner = me->GetCharmerOrOwnerPlayerOrPlayerItself()) + { + if (!owner->HasQuest(QUEST_SHIZZ_WORK)) + { + me->DespawnOrUnsummon(); + } + } checkTimer = 5000; } else checkTimer -= diff;