fix(Scripts/Creature): Fel Guard Hound not despawning. (#15300)

This commit is contained in:
avarishd
2023-03-11 13:16:50 +02:00
committed by GitHub
parent 154f0b469b
commit 145a5a64bb

View File

@@ -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;