diff options
author | Kudlaty <none@none> | 2009-07-23 20:04:58 +0200 |
---|---|---|
committer | Kudlaty <none@none> | 2009-07-23 20:04:58 +0200 |
commit | a7832a632b79965bfa0e18686dd03ce8201c9a85 (patch) | |
tree | c27bc578fb0c735444cb98960618d1c8cc85065c /src | |
parent | 95b5da8cdfd38321cb438a002eb2d041d5fabb94 (diff) |
Script for quest 11878. Author: Drethek
Missing update of *full.sql
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp b/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp index c45ef53a81a..7a8a2de4a39 100644 --- a/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp +++ b/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp @@ -197,6 +197,40 @@ CreatureAI* GetAI_npc_sinkhole_kill_credit(Creature* pCreature) return new npc_sinkhole_kill_creditAI(pCreature); } +/*###### +## npc_khunok_the_behemoth +######*/ + +struct TRINITY_DLL_DECL npc_khunok_the_behemothAI : public ScriptedAI +{ + npc_khunok_the_behemothAI(Creature *c) : ScriptedAI(c) {} + + void MoveInLineOfSight(Unit *who) + { + ScriptedAI::MoveInLineOfSight(who); + + if(who->GetTypeId() != TYPEID_UNIT) + return; + + if(who->GetEntry() == 25861 && me->IsWithinDistInMap(who, 10.0f)) + { + if(Unit *owner = who->GetOwner()) + { + if(owner->GetTypeId() == TYPEID_PLAYER) + { + DoCast(owner, 46231, true); + ((Creature*)who)->ForcedDespawn(); + } + } + } + } +}; + +CreatureAI* GetAI_npc_khunok_the_behemoth(Creature *_Creature) +{ + return new npc_khunok_the_behemothAI(_Creature); +} + void AddSC_borean_tundra() { Script *newscript; @@ -217,4 +251,9 @@ void AddSC_borean_tundra() newscript->Name="npc_sinkhole_kill_credit"; newscript->GetAI = &GetAI_npc_sinkhole_kill_credit; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_khunok_the_behemoth"; + newscript->GetAI = &GetAI_npc_khunok_the_behemoth; + newscript->RegisterSelf(); } |