diff options
-rw-r--r-- | sql/updates/world/master/2022_10_13_03_world_2022_10_02_01_world.sql | 22 | ||||
-rw-r--r-- | src/server/scripts/Northrend/zone_borean_tundra.cpp | 62 |
2 files changed, 22 insertions, 62 deletions
diff --git a/sql/updates/world/master/2022_10_13_03_world_2022_10_02_01_world.sql b/sql/updates/world/master/2022_10_13_03_world_2022_10_02_01_world.sql new file mode 100644 index 00000000000..c7dd2d53008 --- /dev/null +++ b/sql/updates/world/master/2022_10_13_03_world_2022_10_02_01_world.sql @@ -0,0 +1,22 @@ +-- *** Quest "Aces High!" *** +-- Condition for source Gossip menu condition type Quest taken +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=10204 AND `SourceEntry` IN (14169,14170) AND `SourceId`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 10204, 14169, 0, 0, 9, 0, 13413, 0, 0, 0, 0, 0, '', 'Show gossip menu 10204 text id 14169 if quest Aces High! has been taken.'), +(14, 10204, 14170, 0, 0, 9, 0, 13414, 0, 0, 0, 0, 0, '', 'Show gossip menu 10204 text id 14170 if quest Aces High! "Daily" has been taken.'); + +-- Condition for source Gossip menu option condition type Quest taken +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10204 AND `SourceEntry` IN (0,1) AND `SourceId`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 10204, 0, 0, 0, 9, 0, 13413, 0, 0, 0, 0, 0, '', 'Show gossip menu 10204 option id 0 if quest Aces High! has been taken.'), +(15, 10204, 1, 0, 0, 9, 0, 13414, 0, 0, 0, 0, 0, '', 'Show gossip menu 10204 option id 1 if quest Aces High! "Daily" has been taken.'); + +-- Corastrasza SAI +SET @ENTRY := 32548; +UPDATE `creature_template` SET `AIName`="SmartAI", `ScriptName`='' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,2,62,0,100,0,10204,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Corastrasza - Gossip option select 0 - Close Gossip for player"), +(@ENTRY,0,1,2,62,0,100,0,10204,1,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Corastrasza - Gossip option select 1 - Close Gossip for player"), +(@ENTRY,0,2,3,61,0,100,0,0,0,0,0,85,61240,0,0,0,0,0,7,0,0,0,0,0,0,0,"Corastrasza - Gossip option select - Player Cast 'Summon Wyrmrest Skytalon' on self"), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,85,61244,0,0,0,0,0,7,0,0,0,0,0,0,0,"Corastrasza - Gossip option select - Player Cast 'Wyrmrest Skytalon Ride Periodic' on self"); diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 0db85c4b90d..20e0f58a20c 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -36,67 +36,6 @@ #include "WorldSession.h" /*###### -## npc_corastrasza -######*/ - -enum Corastrasza -{ - GOSSIP_MENU_ID_CORASTRASZA = 10204, - GOSSIP_MENU_ITEM_ID_I_I_THINK_SO = 0, - GOSSIP_MENU_ITEM_ID_I_AM_READY = 1, - - NPC_TEXT_MOST_DRAGONS_WOULD_FEAR_TO = 14168, - NPC_TEXT_DO_YOU_POSSESS_THE_COURAGE = 14169, - NPC_TEXT_EAGERLY_AWAITING_YOUR_RETURN = 14170, - - QUEST_ACES_HIGH = 13413, - QUEST_ACES_HIGH_DAILY = 13414, - - SPELL_SUMMON_WYRMREST_SKYTALON = 61240, - SPELL_WYRMREST_SKYTALON_RIDE_PERIODIC = 61244 -}; - -struct npc_corastrasza : public ScriptedAI -{ - npc_corastrasza(Creature* creature) : ScriptedAI(creature) { } - - bool OnGossipHello(Player* player) override - { - if (me->IsQuestGiver()) - player->PrepareQuestMenu(me->GetGUID()); - - if (player->GetQuestStatus(QUEST_ACES_HIGH) == QUEST_STATUS_INCOMPLETE) - { - AddGossipItemFor(player, GOSSIP_MENU_ID_CORASTRASZA, GOSSIP_MENU_ITEM_ID_I_I_THINK_SO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - SendGossipMenuFor(player, NPC_TEXT_DO_YOU_POSSESS_THE_COURAGE, me->GetGUID()); - } - else if (player->GetQuestStatus(QUEST_ACES_HIGH_DAILY) == QUEST_STATUS_INCOMPLETE) - { - AddGossipItemFor(player, GOSSIP_MENU_ID_CORASTRASZA, GOSSIP_MENU_ITEM_ID_I_AM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - SendGossipMenuFor(player, NPC_TEXT_EAGERLY_AWAITING_YOUR_RETURN, me->GetGUID()); - } - else - SendGossipMenuFor(player, NPC_TEXT_MOST_DRAGONS_WOULD_FEAR_TO, me->GetGUID()); - - return true; - } - - bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override - { - uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId); - ClearGossipMenuFor(player); - if (action == GOSSIP_ACTION_INFO_DEF + 1) - { - CloseGossipMenuFor(player); - player->CastSpell(player, SPELL_SUMMON_WYRMREST_SKYTALON, true); - player->CastSpell(player, SPELL_WYRMREST_SKYTALON_RIDE_PERIODIC, true); - } - - return true; - } -}; - -/*###### ## Quest 11865: Unfit for Death ######*/ @@ -1868,7 +1807,6 @@ class spell_borean_tundra_arcane_prisoner_rescue : public SpellScript void AddSC_borean_tundra() { - RegisterCreatureAI(npc_corastrasza); RegisterGameObjectAI(go_caribou_trap); RegisterSpellScript(spell_red_dragonblood); new npc_thassarian(); |