Core/Quests: Script quest Captain Tyralius.

Closes #3091.
This commit is contained in:
Discover-
2011-12-25 00:36:17 +01:00
parent 8cec401f0c
commit c3e527da6d
2 changed files with 41 additions and 0 deletions

View File

@@ -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");

View File

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