From 72b7c5c69d14a96d9fa4489ab95e8be40b8acd24 Mon Sep 17 00:00:00 2001 From: n0n4m3 Date: Wed, 30 Dec 2009 18:42:55 +0100 Subject: [PATCH] Added script support for quest The Valiant's Challenge(13699), by alister --HG-- branch : trunk --- sql/FULL/world_scripts_full.sql | 3 ++- .../scripts/scripts/northrend/icecrown.cpp | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 2cf3247a24..b1b11eeee8 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -1,4 +1,4 @@ --- Up to TC2 5408 +-- Up to TC2 6857 -- Cleanup first UPDATE `creature_template` SET `ScriptName`=''; @@ -702,6 +702,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_apothecary_hanes' WHERE `entry` /* ICECROWN */ UPDATE `creature_template` SET `ScriptName`='npc_arete' WHERE `entry`=29344; +UPDATE `creature_template` SET `ScriptName`='valiant_challenge' WHERE `entry`=33518; /* IRONFORGE */ UPDATE `creature_template` SET `ScriptName`='npc_royal_historian_archesonus' WHERE `entry`=8879; diff --git a/src/bindings/scripts/scripts/northrend/icecrown.cpp b/src/bindings/scripts/scripts/northrend/icecrown.cpp index 2c60709eb5..bb6f83c389 100644 --- a/src/bindings/scripts/scripts/northrend/icecrown.cpp +++ b/src/bindings/scripts/scripts/northrend/icecrown.cpp @@ -105,6 +105,19 @@ bool GossipSelect_npc_arete(Player* pPlayer, Creature* pCreature, uint32 uiSende return true; } +/*###### +## The Valiant's Challenge Quest 13699 +######*/ + +bool GossipHello_valiant_challenge(Player* player, Creature* _Creature) +{ + if (player->GetQuestStatus(13699) == QUEST_STATUS_INCOMPLETE) + { + player->SummonCreature(30675, player->GetInnPosX(),player->GetInnPosY(),player->GetInnPosZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000000); + } + return true; +} + void AddSC_icecrown() { Script *newscript; @@ -114,4 +127,9 @@ void AddSC_icecrown() newscript->pGossipHello = &GossipHello_npc_arete; newscript->pGossipSelect = &GossipSelect_npc_arete; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "valiant_challenge"; + newscript->pGossipHello = &GossipHello_valiant_challenge; + newscript->RegisterSelf(); }