From 77652773818f8fab11513b67e86e5c194b068bd3 Mon Sep 17 00:00:00 2001 From: Grimfeather <88028633+Grimfeather@users.noreply.github.com> Date: Fri, 11 Jul 2025 15:16:26 +0200 Subject: [PATCH] Update zone_darnassus.sql code cleaning --- sql/world/base/zone_darnassus.sql | 129 ++++++++---------------------- 1 file changed, 34 insertions(+), 95 deletions(-) diff --git a/sql/world/base/zone_darnassus.sql b/sql/world/base/zone_darnassus.sql index b9ab45c..0a60ce6 100644 --- a/sql/world/base/zone_darnassus.sql +++ b/sql/world/base/zone_darnassus.sql @@ -1,94 +1,41 @@ --- Milla Fairancora -UPDATE `creature_template` SET `subname`='Journeyman Alchemist', `npcflag`=81, `trainer_type`=2 WHERE `entry`=11041; +UPDATE `creature_template` SET `subname` = 'Journeyman Alchemist' WHERE `entry` = 11041; -- Milla Fairancora +UPDATE `creature_template` SET `subname` = 'Expert Alchemist' WHERE `entry` = 11042; -- Sylvanna Forestmoon +UPDATE `creature_template` SET `subname` = 'Journeyman Tailor' WHERE `entry` = 11050; -- Trianna +UPDATE `creature_template` SET `subname` = 'Journeyman Enchanter' WHERE `entry` = 11070; -- Lalina Summermoon +UPDATE `creature_template` SET `subname` = 'Journeyman Leatherworker' WHERE `entry` = 11083; -- Darianna +UPDATE `creature_template` SET `subname` = 'Journeyman Leatherworker' WHERE `entry` = 11081; -- Faldron --- Sylvanna Forestmoon -UPDATE `creature_template` SET `subname`='Expert Alchemist', `npcflag`=81, `trainer_type`=2, `type_flags`=134217728 WHERE `entry`=11042; - --- Lalina Summermoon -UPDATE `creature_template` SET `subname`='Journeyman Enchanter', `npcflag`=81, `trainer_type`=2 WHERE `entry`=11070; - --- Darianna -UPDATE `creature_template` SET `subname`='Journeyman Leatherworker', `npcflag`=81, `trainer_type`=2 WHERE `entry`=11083; - --- Faldron -UPDATE `creature_template` SET `subname`='Journeyman Leatherworker', `npcflag`=81, `trainer_type`=2, `type_flags`=134217728 WHERE `entry`=11081; - --- Telonis -UPDATE `creature_template` SET `type_flags`=134217728 WHERE `entry`=4212; - --- Trianna -UPDATE `creature_template` SET `subname`='Journeyman Tailor', `npcflag`=81, `trainer_type`=2 WHERE `entry`=11050; +UPDATE `creature_template` SET `npcflag` = 81, `trainer_type` = 2 WHERE `entry` IN (11041, 11042, 11050, 11070, 11081, 11083); +UPDATE `creature_template` SET `type_flags` = 134217728 WHERE `entry` IN (4212, 11042, 11081); --- Milla Fairancora -DELETE FROM `npc_trainer` WHERE `ID`=11041; -INSERT INTO `npc_trainer` (`ID`, `SpellID`) VALUES (11041, -300000); +DELETE FROM `npc_trainer` WHERE `ID` IN (11041, 11042, 11050, 11070, 11081, 11083); +INSERT INTO `npc_trainer` (`ID`, `SpellID`) VALUES +(11041, -300000), -- Milla Fairancora +(11042, -300000), -- Sylvanna Forestmoon +(11042, -300001), -- Sylvanna Forestmoon +(11050, -410000), -- Trianna +(11070, -330000), -- Lalina Summermoon +(11081, -380000), -- Faldron +(11081, -380001), -- Faldron +(11083, -380000); -- Darianna --- Sylvanna Forestmoon -DELETE FROM `npc_trainer` WHERE `ID`=11042; -INSERT INTO `npc_trainer` (`ID`, `SpellID`) VALUES (11042, -300000), (11042, -300001); --- Lalina Summermoon -DELETE FROM `npc_trainer` WHERE `ID`=11070; -INSERT INTO `npc_trainer` (`ID`, `SpellID`) VALUES (11070, -330000); - --- Trianna -DELETE FROM `npc_trainer` WHERE `ID`=11050; -INSERT INTO `npc_trainer` (`ID`, `SpellID`) VALUES (11050, -410000); - --- Darianna -DELETE FROM `npc_trainer` WHERE `ID`=11083; -INSERT INTO `npc_trainer` (`ID`, `SpellID`) VALUES (11083, -380000); - --- Faldron -DELETE FROM `npc_trainer` WHERE `ID`=11081; -INSERT INTO `npc_trainer` (`ID`, `SpellID`) VALUES (11081, -380000), (11081, -380001); - --- Sylvanna Forestmoon -DELETE FROM `gossip_menu_option` WHERE `MenuID`=4125; +DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (4125, 4204, 4241); INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`) VALUES -(4125, 0, 3, 'Train me.', 3266, 5, 16); - --- Faldron -DELETE FROM `gossip_menu_option` WHERE `MenuID`=4204; -INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`) VALUES -(4204, 0, 3, 'Train me.', 3266, 5, 16); - --- Telonis -DELETE FROM `gossip_menu_option` WHERE `MenuID`=4241; -INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`) VALUES -(4241, 0, 3, 'Train me.', 3266, 5, 16); +(4125, 0, 3, 'Train me.', 3266, 5, 16), -- Sylvanna Forestmoon +(4204, 0, 3, 'Train me.', 3266, 5, 16), -- Faldron +(4241, 0, 3, 'Train me.', 3266, 5, 16); -- Telonis --- Sylvanna Forestmoon -DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=4125 AND `SourceEntry`=0 AND `ConditionTypeOrReference`=7; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceEntry` = 0 AND `ConditionTypeOrReference` = 7 AND `SourceGroup` IN (4125, 4131, 4163, 4204, 4241, 4349); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `Comment`) VALUES -(15, 4125, 0, 7, 171, 50, 'Show menu if alchemy is 50 or higher'); - --- Ainethil -DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=4131 AND `SourceEntry`=0 AND `ConditionTypeOrReference`=7; -INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `Comment`) VALUES -(15, 4131, 0, 7, 171, 125, 'Show menu if alchemy is 125 or higher'); - --- Taladan -DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=4163 AND `SourceEntry`=0 AND `ConditionTypeOrReference`=7; -INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `Comment`) VALUES -(15, 4163, 0, 7, 333, 50, 'Show menu if enchanting is 50 or higher'); - --- Faldron -DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=4204 AND `SourceEntry`=0 AND `ConditionTypeOrReference`=7; -INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `Comment`) VALUES -(15, 4204, 0, 7, 165, 50, 'Show menu if leatherworking is 50 or higher'); - --- Telonis -DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=4241 AND `SourceEntry`=0 AND `ConditionTypeOrReference`=7; -INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `Comment`) VALUES -(15, 4241, 0, 7, 165, 125, 'Show menu if leatherworking is 125 or higher'); - --- Me'lynn -DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=4349 AND `SourceEntry`=0 AND `ConditionTypeOrReference`=7; -INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `Comment`) VALUES -(15, 4349, 0, 7, 197, 50, 'Show menu if tailoring is 50 or higher'); +(15, 4125, 0, 7, 171, 50, 'Show menu if alchemy is 50 or higher'), -- Sylvanna Forestmoon +(15, 4131, 0, 7, 171, 125, 'Show menu if alchemy is 125 or higher'), -- Ainethil +(15, 4163, 0, 7, 333, 50, 'Show menu if enchanting is 50 or higher'), -- Taladan +(15, 4204, 0, 7, 165, 50, 'Show menu if leatherworking is 50 or higher'), -- Faldron +(15, 4241, 0, 7, 165, 125, 'Show menu if leatherworking is 125 or higher'), -- Telonis +(15, 4349, 0, 7, 197, 50, 'Show menu if tailoring is 50 or higher'); -- Me'lynn -- Dannelor @@ -96,17 +43,9 @@ DELETE FROM `npc_trainer` WHERE `ID`=4211; INSERT INTO `npc_trainer` (`ID`, `SpellID`) VALUES (4211, -350000); --- Keras Wolfheart -DELETE FROM `creature` WHERE `id1`= 907; +-- Batllemasters +DELETE FROM `creature` WHERE `id1` IN (907, 2302, 5118); INSERT INTO `creature` (`guid`, `id1`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`) VALUES -(600907, 907, 0, 9976.16, 2314.49, 1330.87, 0.750492, 120); - --- Aethalas -DELETE FROM `creature` WHERE `id1`= 2302; -INSERT INTO `creature` (`guid`, `id1`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`) VALUES -(602302, 2302, 0, 9976.16, 2314.49, 1330.87, 0.750492, 120); - --- Brogun Stoneshield -DELETE FROM `creature` WHERE `id1`= 5118; -INSERT INTO `creature` (`guid`, `id1`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`) VALUES -(605118, 5118, 0, 9976.16, 2314.49, 1330.87, 0.750492, 120); +(600907, 907, 0, 9976.16, 2314.49, 1330.87, 0.750492, 120), -- Keras Wolfheart +(602302, 2302, 0, 9976.16, 2314.49, 1330.87, 0.750492, 120), -- Aethalas +(605118, 5118, 0, 9976.16, 2314.49, 1330.87, 0.750492, 120); -- Brogun Stoneshield