From 6c2ebfc8e4b6ffe07366aa0f5dd8b08e360a77b0 Mon Sep 17 00:00:00 2001 From: Tartalo Date: Tue, 23 Feb 2010 20:36:56 +0100 Subject: Howling Fiord: Support for Quest 11255 Prisoners of Wyrmskull --HG-- branch : trunk --- src/scripts/world/go_scripts.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'src') 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 @@ -736,6 +736,38 @@ bool GOHello_go_soulwell(Player *pPlayer, GameObject* pGO) return true; } +/*###### +## 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(); } -- cgit v1.2.3