Add support for quest 10629 (Shizzwork) Hellfire Peninsula

--HG--
branch : trunk
This commit is contained in:
Supabad
2010-05-24 13:41:11 +02:00
parent b6add13f9e
commit 3083fc9885
3 changed files with 54 additions and 0 deletions

View File

@@ -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 */

View File

@@ -0,0 +1 @@
UPDATE `creature_template` SET `ScriptName` = 'npc_fel_guard_hound' WHERE `entry`=21847;

View File

@@ -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();
}