diff options
| -rw-r--r-- | sql/updates/world/2011_12_25_00_world_misc.sql | 5 | ||||
| -rw-r--r-- | src/server/scripts/Outland/netherstorm.cpp | 36 |
2 files changed, 41 insertions, 0 deletions
diff --git a/sql/updates/world/2011_12_25_00_world_misc.sql b/sql/updates/world/2011_12_25_00_world_misc.sql new file mode 100644 index 00000000000..4096bbf35c7 --- /dev/null +++ b/sql/updates/world/2011_12_25_00_world_misc.sql @@ -0,0 +1,5 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_captain_tyralius_prison' WHERE `entry`=184588; +UPDATE `quest_template` SET `ReqSpellCast1`=0 WHERE `entry`=10422; +DELETE FROM `creature_text` WHERE `entry`=20787; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(20787,0,0,"You've saved me, fleshling! Ameer will hear of this noble act.",12,0,100,0,0,0,"Captain Tyralius");
\ No newline at end of file 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(); } |
