diff options
author | Discover- <amort11@hotmail.com> | 2011-12-25 00:36:17 +0100 |
---|---|---|
committer | Discover- <amort11@hotmail.com> | 2011-12-25 00:36:17 +0100 |
commit | c3e527da6d0e5b6fcf7c7faadfd441c2f0a941bc (patch) | |
tree | 8fd043ee502bf1b91db5d66e5669b6c9fb92148b /src | |
parent | 8cec401f0c4c61bb69fc6353bc13e0b2c4582130 (diff) |
Core/Quests: Script quest Captain Tyralius.
Closes #3091.
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Outland/netherstorm.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index 5f2626c0039..f892169f7ae 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -29,6 +29,7 @@ go_manaforge_control_console npc_commander_dawnforge npc_bessy npc_maxx_a_million +go_captain_tyralius_prison EndContentData */ #include "ScriptPCH.h" @@ -1046,6 +1047,40 @@ public: } }; +/*###### +## go_captain_tyralius_prison +######*/ + +enum CaptainTyralius +{ + NPC_CAPTAIN_TYRALIUS = 20787, + SAY_FREE = 0, +}; + +class go_captain_tyralius_prison : public GameObjectScript +{ + public: + go_captain_tyralius_prison() : GameObjectScript("go_captain_tyralius_prison") { } + + bool OnGossipHello(Player* player, GameObject* go) + { + if (Creature* tyralius = go->FindNearestCreature(NPC_CAPTAIN_TYRALIUS, 1.0f)) + { + if (tyralius) + { + go->UseDoorOrButton(); + + if (player) + player->KilledMonsterCredit(NPC_CAPTAIN_TYRALIUS, 0); + + tyralius->AI()->Talk(SAY_FREE); + tyralius->ForcedDespawn(8000); + } + } + return true; + } +}; + void AddSC_netherstorm() { new go_manaforge_control_console(); @@ -1056,4 +1091,5 @@ void AddSC_netherstorm() new mob_phase_hunter(); new npc_bessy(); new npc_maxx_a_million_escort(); + new go_captain_tyralius_prison(); } |