aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTartalo <none@none>2010-02-23 20:36:56 +0100
committerTartalo <none@none>2010-02-23 20:36:56 +0100
commit6c2ebfc8e4b6ffe07366aa0f5dd8b08e360a77b0 (patch)
treebd0ec93cbb3ac93d903f94ff5207e6f777aa6a85
parenta518114f5657921cc2f36c54702f45235c68595b (diff)
Howling Fiord: Support for Quest 11255
Prisoners of Wyrmskull --HG-- branch : trunk
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/updates/7406_world_scriptname.sql2
-rw-r--r--src/scripts/world/go_scripts.cpp37
3 files changed, 40 insertions, 0 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index b098a166025..e31268532a3 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -49,6 +49,7 @@ UPDATE `gameobject_template` SET `ScriptName`='go_matrix_punchograph' WHERE `ent
UPDATE `gameobject_template` SET `ScriptName`='go_jotunheim_cage' WHERE `entry`=192135;
UPDATE `gameobject_template` SET `scriptname` = 'go_inconspicuous_landmark' WHERE `entry`=142189;
UPDATE `gameobject_template` SET `ScriptName` = 'go_soulwell' WHERE `entry` IN (181621,193169);
+UPDATE `gameobject_template` SET `ScriptName`='go_dragonflayer_cage' WHERE entry IN (186566,186567,186568,186569,186570,186571,186572,186573,186574,186575);
/* GUARD */
UPDATE `creature_template` SET `ScriptName`='guard_azuremyst' WHERE `entry`=18038;
diff --git a/sql/updates/7406_world_scriptname.sql b/sql/updates/7406_world_scriptname.sql
new file mode 100644
index 00000000000..2f0fbb130b1
--- /dev/null
+++ b/sql/updates/7406_world_scriptname.sql
@@ -0,0 +1,2 @@
+UPDATE `gameobject_template` SET `ScriptName`='go_dragonflayer_cage' WHERE entry IN (186566,186567,186568,186569,186570,186571,186572,186573,186574,186575);
+
diff --git a/src/scripts/world/go_scripts.cpp b/src/scripts/world/go_scripts.cpp
index ee75698ddf6..91988022917 100644
--- a/src/scripts/world/go_scripts.cpp
+++ b/src/scripts/world/go_scripts.cpp
@@ -737,6 +737,38 @@ bool GOHello_go_soulwell(Player *pPlayer, GameObject* pGO)
}
/*######
+## Quest 11255: Prisoners of Wyrmskull
+## go_dragonflayer_cage
+######*/
+
+enum ePrisonersOfWyrmskull
+{
+ QUEST_PRISONERS_OF_WYRMSKULL = 11255,
+ NPC_PRISONER_PRIEST = 24086,
+ NPC_PRISONER_MAGE = 24088,
+ NPC_PRISONER_WARRIOR = 24089,
+ NPC_PRISONER_PALADIN = 24090
+};
+
+bool GOHello_go_dragonflayer_cage(Player *pPlayer, GameObject *pGO)
+{
+ Creature *pPrisoner = NULL;
+ Quest const* qInfo = objmgr.GetQuestTemplate(QUEST_PRISONERS_OF_WYRMSKULL);
+
+ if (pPlayer->GetQuestStatus(QUEST_PRISONERS_OF_WYRMSKULL) == QUEST_STATUS_INCOMPLETE &&
+ ((pPrisoner = pGO->FindNearestCreature(NPC_PRISONER_PRIEST,2.0f)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_PRISONER_MAGE,2.0f)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_PRISONER_WARRIOR,2.0f)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_PRISONER_PALADIN,2.0f))) && pPrisoner->isAlive())
+ {
+ //TODO: prisoner should help player for a short period of time
+ pPlayer->KilledMonsterCredit(qInfo->ReqCreatureOrGOId[0],0);
+ pPrisoner->DisappearAndDie();
+ }
+ return true;
+}
+
+/*######
## Quest 11560: Oh Noes, the Tadpoles!
## go_tadpole_cage
######*/
@@ -920,4 +952,9 @@ void AddSC_go_scripts()
newscript->Name = "go_tadpole_cage";
newscript->pGOHello = &GOHello_go_tadpole_cage;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_dragonflayer_cage";
+ newscript->pGOHello = &GOHello_go_dragonflayer_cage;
+ newscript->RegisterSelf();
}