aboutsummaryrefslogtreecommitdiff
path: root/src/scripts/outland/hellfire_peninsula.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/outland/hellfire_peninsula.cpp')
-rw-r--r--src/scripts/outland/hellfire_peninsula.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/scripts/outland/hellfire_peninsula.cpp b/src/scripts/outland/hellfire_peninsula.cpp
index 317e045fc1d..41e534d1cb5 100644
--- a/src/scripts/outland/hellfire_peninsula.cpp
+++ b/src/scripts/outland/hellfire_peninsula.cpp
@@ -405,6 +405,53 @@ bool QuestAccept_npc_wounded_blood_elf(Player* pPlayer, Creature* pCreature, Que
return true;
}
+/*######
+## npc_fel_guard_hound
+######*/
+
+enum eFelGuard
+{
+SPELL_SUMMON_POO = 37688,
+
+DERANGED_HELBOAR = 16863
+};
+
+struct npc_fel_guard_houndAI : public ScriptedAI
+{
+ npc_fel_guard_houndAI(Creature* c) : ScriptedAI(c) {}
+
+ uint32 checkTimer;
+ uint64 lastHelboar; //store last helboar GUID to prevent multiple spawns of poo with the same mob
+
+ void Reset()
+ {
+ me->GetMotionMaster()->MoveFollow(me->GetOwner(), PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ checkTimer = 5000; //check for creature every 5 sec
+ }
+
+ void Aggro(Unit* /*pWho*/) {}
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (checkTimer < diff)
+ {
+ Creature* pHelboar = me->FindNearestCreature(DERANGED_HELBOAR, 10, false);
+ if (pHelboar && pHelboar->GetGUID() != lastHelboar)
+ {
+ lastHelboar = pHelboar->GetGUID();
+ DoCast(me, SPELL_SUMMON_POO);
+ pHelboar->RemoveCorpse();
+ checkTimer = 5000;
+ }
+ }else checkTimer -= diff;
+ }
+};
+
+CreatureAI* GetAI_npc_fel_guard_hound(Creature* pCreature)
+{
+ return new npc_fel_guard_houndAI(pCreature);
+}
+
void AddSC_hellfire_peninsula()
{
Script *newscript;
@@ -447,5 +494,10 @@ void AddSC_hellfire_peninsula()
newscript->GetAI = &GetAI_npc_wounded_blood_elf;
newscript->pQuestAccept = &QuestAccept_npc_wounded_blood_elf;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_fel_guard_hound";
+ newscript->GetAI = &GetAI_npc_fel_guard_hound;
+ newscript->RegisterSelf();
}