diff options
| author | QAston <qaston@gmail.com> | 2011-09-03 16:43:15 +0200 |
|---|---|---|
| committer | QAston <qaston@gmail.com> | 2011-09-03 16:44:05 +0200 |
| commit | 7871ead79835761584ee0f8faee58ae5c9a3001b (patch) | |
| tree | 9e156705561b6b5257986b99fc19933854d9823b /src/server/scripts/Northrend | |
| parent | 414f048bd5c2ac5b840ed2bfe1c9345d24e2ff8f (diff) | |
Merge pull request 'Fix quest New Recruit(13143) & Fix quest King of the Mountain(13280&13283)' from Kiperr/TrinityCore
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/icecrown.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp index 86b375fc274..dc55c2f6ad3 100644 --- a/src/server/scripts/Northrend/icecrown.cpp +++ b/src/server/scripts/Northrend/icecrown.cpp @@ -381,6 +381,51 @@ public: } }; +/*###### +## npc_vereth_the_cunning +######*/ + +enum eVerethTheCunning +{ + NPC_GEIST_RETURN_BUNNY_KC = 31049, + NPC_LITHE_STALKER = 30894, + SPELL_SUBDUED_LITHE_STALKER = 58151, +}; + +class npc_vereth_the_cunning : public CreatureScript +{ +public: + npc_vereth_the_cunning() : CreatureScript("npc_vereth_the_cunning") { } + + struct npc_vereth_the_cunningAI : public ScriptedAI + { + npc_vereth_the_cunningAI(Creature* pCreature) : ScriptedAI(pCreature) {} + + void MoveInLineOfSight(Unit* who) + { + ScriptedAI::MoveInLineOfSight(who); + + if (who->GetEntry() == NPC_LITHE_STALKER && me->IsWithinDistInMap(who, 10.0f)) + { + if (Unit* owner = who->GetCharmer()) + { + if (who->HasAura(SPELL_SUBDUED_LITHE_STALKER)) + { + owner->ToPlayer()->KilledMonsterCredit(NPC_GEIST_RETURN_BUNNY_KC, 0); + who->ToCreature()->DisappearAndDie(); + + } + } + } + } + }; + + CreatureAI *GetAI(Creature *creature) const + { + return new npc_vereth_the_cunningAI(creature); + } +}; + void AddSC_icecrown() { new npc_arete; @@ -389,4 +434,5 @@ void AddSC_icecrown() new npc_argent_valiant; new npc_alorah_and_grimmin; new npc_guardian_pavilion; + new npc_vereth_the_cunning; } |
