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