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 | |
parent | b6add13f9e69048aa2e812a1f9920bbc3a069f26 (diff) |
Add support for quest 10629 (Shizzwork) Hellfire Peninsula
--HG--
branch : trunk
-rw-r--r-- | sql/FULL/world_scripts_full.sql | 1 | ||||
-rw-r--r-- | sql/updates/8277_world_scriptname.sql | 1 | ||||
-rw-r--r-- | src/scripts/outland/hellfire_peninsula.cpp | 52 |
3 files changed, 54 insertions, 0 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 06e3265b0da..c2401205e08 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -815,6 +815,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_naladu' WHERE `entry`=19361; UPDATE `creature_template` SET `ScriptName`='npc_tracy_proudwell' WHERE `entry`=18266; UPDATE `creature_template` SET `ScriptName`='npc_trollbane' WHERE `entry`=16819; UPDATE `creature_template` SET `ScriptName`='npc_ancestral_wolf' WHERE `entry`=17077; +UPDATE `creature_template` SET `ScriptName`='npc_fel_guard_hound' WHERE `entry`=21847; /* HILLSBRAD FOOTHILLS */ diff --git a/sql/updates/8277_world_scriptname.sql b/sql/updates/8277_world_scriptname.sql new file mode 100644 index 00000000000..bcdee2029b6 --- /dev/null +++ b/sql/updates/8277_world_scriptname.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_fel_guard_hound' WHERE `entry`=21847;
\ No newline at end of file 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(); } |