diff options
| author | Supabad <none@none> | 2010-05-24 13:41:11 +0200 |
|---|---|---|
| committer | Supabad <none@none> | 2010-05-24 13:41:11 +0200 |
| commit | 3083fc988547403e7a2872aaf0739735fa9d9bb0 (patch) | |
| tree | 43d7ac5d59e6939dec70c85d9a176981329a0109 /src | |
| parent | b6add13f9e69048aa2e812a1f9920bbc3a069f26 (diff) | |
Add support for quest 10629 (Shizzwork) Hellfire Peninsula
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/scripts/outland/hellfire_peninsula.cpp | 52 |
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(); } |
