|
| 1 | +-- DB update 2026_03_27_04 -> 2026_03_28_00 |
| 2 | +-- Move Kalimdor gossip handlers from C++ to database |
| 3 | +-- NPCs: Rivern Frostwind, Stone Watcher of Norgannon, Great Bear Spirit, |
| 4 | +-- Braug Dimspirit, Steward of Time, Thrall Warchief |
| 5 | + |
| 6 | +-- ===================================================== |
| 7 | +-- 1. npc_rivern_frostwind (10618) - zone_winterspring |
| 8 | +-- Show vendor option only if Exalted with Wintersaber Trainers (faction 589) |
| 9 | +-- ===================================================== |
| 10 | + |
| 11 | +-- Condition: gossip_menu_option MenuID=3130, OptionID=0 requires Exalted (rank 7, mask 128) |
| 12 | +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=3130 AND `SourceEntry`=0 AND `ConditionTypeOrReference`=5; |
| 13 | +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES |
| 14 | +(15, 3130, 0, 0, 0, 5, 0, 589, 128, 0, 0, 0, 0, '', 'Rivern Frostwind - Show vendor option only if Exalted with Wintersaber Trainers'); |
| 15 | + |
| 16 | +-- Remove ScriptName |
| 17 | +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=10618; |
| 18 | + |
| 19 | +-- ===================================================== |
| 20 | +-- 2. npc_stone_watcher_of_norgannon (7918) - zone_tanaris |
| 21 | +-- 5-step gossip chain, quest 2954 credit at end |
| 22 | +-- ===================================================== |
| 23 | + |
| 24 | +-- Add missing gossip_menu entries (MenuID -> TextID) |
| 25 | +DELETE FROM `gossip_menu` WHERE `MenuID` IN (57000,57001,57002,57003,57004,57005); |
| 26 | +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES |
| 27 | +(57000, 1674), |
| 28 | +(57001, 1675), |
| 29 | +(57002, 1676), |
| 30 | +(57003, 1677), |
| 31 | +(57004, 1678), |
| 32 | +(57005, 1679); |
| 33 | + |
| 34 | +-- Condition: show first option only if quest 2954 is taken (incomplete) |
| 35 | +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=57000 AND `SourceEntry`=0 AND `ConditionTypeOrReference`=9; |
| 36 | +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES |
| 37 | +(15, 57000, 0, 0, 0, 9, 0, 2954, 0, 0, 0, 0, 0, '', 'Stone Watcher of Norgannon - Show gossip option if quest 2954 is taken'); |
| 38 | + |
| 39 | +-- SAI: on final gossip select (menu 57005, option 0) -> close gossip + quest credit 2954 |
| 40 | +DELETE FROM `smart_scripts` WHERE `entryorguid`=7918 AND `source_type`=0; |
| 41 | +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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES |
| 42 | +(7918, 0, 0, 1, 62, 0, 100, 512, 57005, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Stone Watcher of Norgannon - On Gossip Select - Close Gossip'), |
| 43 | +(7918, 0, 1, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 15, 2954, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Stone Watcher of Norgannon - Linked - Quest Credit 2954'); |
| 44 | + |
| 45 | +-- Update creature_template: set gossip_menu_id, add gossip npcflag, set SmartAI |
| 46 | +UPDATE `creature_template` SET `gossip_menu_id`=57000, `npcflag`=`npcflag`|1, `ScriptName`='', `AIName`='SmartAI' WHERE `entry`=7918; |
| 47 | + |
| 48 | +-- ===================================================== |
| 49 | +-- 3. npc_great_bear_spirit (11956) - zone_moonglade |
| 50 | +-- 4-step gossip chain, quest 5929/5930 credit at end |
| 51 | +-- ===================================================== |
| 52 | + |
| 53 | +-- Add quest-active text for menu 3882 |
| 54 | +DELETE FROM `gossip_menu` WHERE `MenuID`=3882 AND `TextID`=4719; |
| 55 | +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES |
| 56 | +(3882, 4719); |
| 57 | + |
| 58 | +-- Condition on gossip_menu: show TextID 4719 if quest 5929 OR 5930 is taken |
| 59 | +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=3882 AND `SourceEntry`=4719; |
| 60 | +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES |
| 61 | +(14, 3882, 4719, 0, 0, 9, 0, 5929, 0, 0, 0, 0, 0, '', 'Great Bear Spirit - Show text 4719 if quest 5929 is taken'), |
| 62 | +(14, 3882, 4719, 0, 1, 9, 0, 5930, 0, 0, 0, 0, 0, '', 'Great Bear Spirit - Show text 4719 if quest 5930 is taken'); |
| 63 | + |
| 64 | +-- Condition on gossip_menu_option: show option if quest 5929 OR 5930 is taken |
| 65 | +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=3882 AND `SourceEntry`=0; |
| 66 | +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES |
| 67 | +(15, 3882, 0, 0, 0, 9, 0, 5929, 0, 0, 0, 0, 0, '', 'Great Bear Spirit - Show gossip option if quest 5929 is taken'), |
| 68 | +(15, 3882, 0, 0, 1, 9, 0, 5930, 0, 0, 0, 0, 0, '', 'Great Bear Spirit - Show gossip option if quest 5930 is taken'); |
| 69 | + |
| 70 | +-- Clean up duplicate OptionID=1 on menu 3884 (identical to OptionID=0) |
| 71 | +DELETE FROM `gossip_menu_option` WHERE `MenuID`=3884 AND `OptionID`=1; |
| 72 | + |
| 73 | +-- SAI: on gossip select (menu 3884, option 0) -> quest credit for both 5929 and 5930 |
| 74 | +DELETE FROM `smart_scripts` WHERE `entryorguid`=11956 AND `source_type`=0; |
| 75 | +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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES |
| 76 | +(11956, 0, 0, 1, 62, 0, 100, 512, 3884, 0, 0, 0, 0, 0, 15, 5929, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Great Bear Spirit - On Gossip Select - Quest Credit 5929'), |
| 77 | +(11956, 0, 1, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 15, 5930, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Great Bear Spirit - On Gossip Select - Quest Credit 5930'); |
| 78 | + |
| 79 | +-- Update creature_template |
| 80 | +UPDATE `creature_template` SET `ScriptName`='', `AIName`='SmartAI' WHERE `entry`=11956; |
| 81 | + |
| 82 | +-- ===================================================== |
| 83 | +-- 4. npc_braug_dimspirit (4489) - zone_stonetalon_mountains |
| 84 | +-- Quiz: 5 dragon options, Neltharion = correct, others = wrong spell |
| 85 | +-- ===================================================== |
| 86 | + |
| 87 | +-- Add missing Nozdormu option (OptionID=4) |
| 88 | +DELETE FROM `gossip_menu_option` WHERE `MenuID`=4763 AND `OptionID`=4; |
| 89 | +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`) VALUES |
| 90 | +(4763, 4, 0, 'Nozdormu is my answer.', 0, 1, 1, 0, 0, 0, 0, ''); |
| 91 | + |
| 92 | +-- Condition on gossip_menu: show text 5820 (quiz text) if quest 6627 is taken |
| 93 | +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=4763 AND `SourceEntry`=5820; |
| 94 | +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES |
| 95 | +(14, 4763, 5820, 0, 0, 9, 0, 6627, 0, 0, 0, 0, 0, '', 'Braug Dimspirit - Show quiz text if quest 6627 is taken'); |
| 96 | + |
| 97 | +-- Conditions on all 5 options: show only if quest 6627 is taken |
| 98 | +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=4763 AND `SourceEntry` IN (0,1,2,3,4) AND `ConditionTypeOrReference`=9; |
| 99 | +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES |
| 100 | +(15, 4763, 0, 0, 0, 9, 0, 6627, 0, 0, 0, 0, 0, '', 'Braug Dimspirit - Show Ysera option if quest 6627 is taken'), |
| 101 | +(15, 4763, 1, 0, 0, 9, 0, 6627, 0, 0, 0, 0, 0, '', 'Braug Dimspirit - Show Neltharion option if quest 6627 is taken'), |
| 102 | +(15, 4763, 2, 0, 0, 9, 0, 6627, 0, 0, 0, 0, 0, '', 'Braug Dimspirit - Show Alexstrasza option if quest 6627 is taken'), |
| 103 | +(15, 4763, 3, 0, 0, 9, 0, 6627, 0, 0, 0, 0, 0, '', 'Braug Dimspirit - Show Malygos option if quest 6627 is taken'), |
| 104 | +(15, 4763, 4, 0, 0, 9, 0, 6627, 0, 0, 0, 0, 0, '', 'Braug Dimspirit - Show Nozdormu option if quest 6627 is taken'); |
| 105 | + |
| 106 | +-- SAI: Neltharion (option 1) = correct answer -> quest credit |
| 107 | +-- All others (options 0,2,3,4) = wrong answer -> cast spell 6766 |
| 108 | +DELETE FROM `smart_scripts` WHERE `entryorguid`=4489 AND `source_type`=0; |
| 109 | +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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES |
| 110 | +(4489, 0, 0, 0, 62, 0, 100, 512, 4763, 1, 0, 0, 0, 0, 15, 6627, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Braug Dimspirit - On Gossip Select Neltharion - Quest Credit 6627'), |
| 111 | +(4489, 0, 1, 0, 62, 0, 100, 512, 4763, 0, 0, 0, 0, 0, 11, 6766, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Braug Dimspirit - On Gossip Select Ysera - Cast Wrong Answer'), |
| 112 | +(4489, 0, 2, 0, 62, 0, 100, 512, 4763, 2, 0, 0, 0, 0, 11, 6766, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Braug Dimspirit - On Gossip Select Alexstrasza - Cast Wrong Answer'), |
| 113 | +(4489, 0, 3, 0, 62, 0, 100, 512, 4763, 3, 0, 0, 0, 0, 11, 6766, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Braug Dimspirit - On Gossip Select Malygos - Cast Wrong Answer'), |
| 114 | +(4489, 0, 4, 0, 62, 0, 100, 512, 4763, 4, 0, 0, 0, 0, 11, 6766, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Braug Dimspirit - On Gossip Select Nozdormu - Cast Wrong Answer'); |
| 115 | + |
| 116 | +-- Update creature_template |
| 117 | +UPDATE `creature_template` SET `ScriptName`='', `AIName`='SmartAI' WHERE `entry`=4489; |
| 118 | + |
| 119 | +-- ===================================================== |
| 120 | +-- 5. npc_steward_of_time (20142) - zone_tanaris |
| 121 | +-- Gossip shows flight option if quest 10279 incomplete or rewarded |
| 122 | +-- On select casts spell 34891. Keep OnQuestAccept in C++. |
| 123 | +-- ===================================================== |
| 124 | + |
| 125 | +-- Condition on gossip_menu: show text 9978 if quest 10279 is taken OR rewarded |
| 126 | +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=8072 AND `SourceEntry`=9978; |
| 127 | +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES |
| 128 | +(14, 8072, 9978, 0, 0, 9, 0, 10279, 0, 0, 0, 0, 0, '', 'Steward of Time - Show text 9978 if quest 10279 is taken'), |
| 129 | +(14, 8072, 9978, 0, 1, 8, 0, 10279, 0, 0, 0, 0, 0, '', 'Steward of Time - Show text 9978 if quest 10279 is rewarded'); |
| 130 | + |
| 131 | +-- Condition on gossip_menu_option: show option if quest 10279 is taken OR rewarded |
| 132 | +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=8072 AND `SourceEntry`=0; |
| 133 | +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES |
| 134 | +(15, 8072, 0, 0, 0, 9, 0, 10279, 0, 0, 0, 0, 0, '', 'Steward of Time - Show gossip option if quest 10279 is taken'), |
| 135 | +(15, 8072, 0, 0, 1, 8, 0, 10279, 0, 0, 0, 0, 0, '', 'Steward of Time - Show gossip option if quest 10279 is rewarded'); |
| 136 | + |
| 137 | +-- SAI: on gossip select (menu 8072, option 0) -> invoker self-casts spell 34891 |
| 138 | +-- Using SMART_ACTION_INVOKER_CAST (134) so the player casts on themselves, |
| 139 | +-- matching original C++: player->CastSpell(player, 34891, true) |
| 140 | +DELETE FROM `smart_scripts` WHERE `entryorguid`=20142 AND `source_type`=0; |
| 141 | +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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES |
| 142 | +(20142, 0, 0, 0, 62, 0, 100, 512, 8072, 0, 0, 0, 0, 0, 134, 34891, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Steward of Time - On Gossip Select - Invoker Cast Flight Through Caverns'); |
| 143 | + |
| 144 | +-- Update creature_template: add SmartAI (keep ScriptName for OnQuestAccept) |
| 145 | +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=20142; |
| 146 | + |
| 147 | +-- ===================================================== |
| 148 | +-- 6. npc_thrall_warchief (4949) - zone_orgrimmar |
| 149 | +-- 7-step gossip chain, quest 6566 credit at end |
| 150 | +-- Keep ScriptName for OnQuestReward + AI |
| 151 | +-- ===================================================== |
| 152 | + |
| 153 | +-- Add missing gossip_menu entries for chain steps |
| 154 | +DELETE FROM `gossip_menu` WHERE `MenuID` IN (3665,3666,3667,3668,3669,3670); |
| 155 | +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES |
| 156 | +(3665, 5733), |
| 157 | +(3666, 5734), |
| 158 | +(3667, 5735), |
| 159 | +(3668, 5736), |
| 160 | +(3669, 5737), |
| 161 | +(3670, 5738); |
| 162 | + |
| 163 | +-- Fix menu 3670: ActionMenuID should be 0 (close), not 3664 (loop) |
| 164 | +UPDATE `gossip_menu_option` SET `ActionMenuID`=0 WHERE `MenuID`=3670 AND `OptionID`=0; |
| 165 | + |
| 166 | +-- Condition on gossip_menu_option: show first option only if quest 6566 is taken |
| 167 | +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=3664 AND `SourceEntry`=0 AND `ConditionTypeOrReference`=9; |
| 168 | +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES |
| 169 | +(15, 3664, 0, 0, 0, 9, 0, 6566, 0, 0, 0, 0, 0, '', 'Thrall - Show gossip option if quest 6566 is taken'); |
| 170 | + |
| 171 | +-- Quest credit on final gossip step handled via sGossipSelect in C++ AI struct. |
| 172 | +-- Cannot use SAI because Thrall's custom C++ AI (GetAI) takes precedence over SmartAI. |
| 173 | +-- No AIName change needed. |
0 commit comments