From f59cca2dd245ef118cdfcdd763ac0178bb62dba8 Mon Sep 17 00:00:00 2001 From: Wyreth <32145860+Wyreth@users.noreply.github.com> Date: Mon, 30 Oct 2017 00:55:30 +0100 Subject: [PATCH] Script/Trainer: move alchemy specialization-related script to DB and fix some wrong texts --- .../world/3.3.5/2017_10_29_12_world_335.sql | 2 - ..._from_335_was_2017_10_29_02_world_335.sql} | 2 + ...orld_from_335_was_2017_10_29_03_world.sql} | 0 ..._from_335_was_2017_10_29_04_world_335.sql} | 2 + ...orld_from_335_was_2017_10_29_05_world.sql} | 0 ..._from_335_was_2017_10_29_06_world_335.sql} | 2 + ..._from_335_was_2017_10_29_07_world_335.sql} | 2 + ..._from_335_was_2017_10_29_08_world_335.sql} | 2 + ...orld_from_335_was_2017_10_29_09_world.sql} | 0 ..._from_335_was_2017_10_29_10_world_335.sql} | 2 + ..._from_335_was_2017_10_29_11_world_335.sql} | 2 + ...d_from_335_was_2017_10_29_12_world_335.sql | 2 + ..._from_335_was_2017_10_29_13_world_335.sql} | 2 + ...world_from_335_was_2017_10_29_14_world.sql | 112 ++++++++++ src/server/scripts/World/npc_professions.cpp | 209 +----------------- 15 files changed, 133 insertions(+), 208 deletions(-) delete mode 100644 sql/updates/world/3.3.5/2017_10_29_12_world_335.sql rename sql/updates/world/{3.3.5/2017_10_29_02_world_335.sql => 4.3.4/2017_10_29_11_world_from_335_was_2017_10_29_02_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2017_10_29_03_world.sql => 4.3.4/2017_10_29_12_world_from_335_was_2017_10_29_03_world.sql} (100%) rename sql/updates/world/{3.3.5/2017_10_29_04_world_335.sql => 4.3.4/2017_10_29_13_world_from_335_was_2017_10_29_04_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2017_10_29_05_world.sql => 4.3.4/2017_10_29_14_world_from_335_was_2017_10_29_05_world.sql} (100%) rename sql/updates/world/{3.3.5/2017_10_29_06_world_335.sql => 4.3.4/2017_10_29_15_world_from_335_was_2017_10_29_06_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2017_10_29_07_world_335.sql => 4.3.4/2017_10_29_16_world_from_335_was_2017_10_29_07_world_335.sql} (98%) rename sql/updates/world/{3.3.5/2017_10_29_08_world_335.sql => 4.3.4/2017_10_29_17_world_from_335_was_2017_10_29_08_world_335.sql} (96%) rename sql/updates/world/{3.3.5/2017_10_29_09_world.sql => 4.3.4/2017_10_29_18_world_from_335_was_2017_10_29_09_world.sql} (100%) rename sql/updates/world/{3.3.5/2017_10_29_10_world_335.sql => 4.3.4/2017_10_29_19_world_from_335_was_2017_10_29_10_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2017_10_29_11_world_335.sql => 4.3.4/2017_10_29_20_world_from_335_was_2017_10_29_11_world_335.sql} (98%) create mode 100644 sql/updates/world/4.3.4/2017_10_29_21_world_from_335_was_2017_10_29_12_world_335.sql rename sql/updates/world/{3.3.5/2017_10_29_13_world_335.sql => 4.3.4/2017_10_29_22_world_from_335_was_2017_10_29_13_world_335.sql} (99%) create mode 100644 sql/updates/world/4.3.4/2017_10_29_23_world_from_335_was_2017_10_29_14_world.sql diff --git a/sql/updates/world/3.3.5/2017_10_29_12_world_335.sql b/sql/updates/world/3.3.5/2017_10_29_12_world_335.sql deleted file mode 100644 index 373ea9228c2..00000000000 --- a/sql/updates/world/3.3.5/2017_10_29_12_world_335.sql +++ /dev/null @@ -1,2 +0,0 @@ --- -UPDATE `creature_template` SET `type_flags`=`type_flags`&~134217728 WHERE `npcflag`>16 AND `gossip_menu_id`!= 0 AND `type_flags`&134217728; diff --git a/sql/updates/world/3.3.5/2017_10_29_02_world_335.sql b/sql/updates/world/4.3.4/2017_10_29_11_world_from_335_was_2017_10_29_02_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2017_10_29_02_world_335.sql rename to sql/updates/world/4.3.4/2017_10_29_11_world_from_335_was_2017_10_29_02_world_335.sql index 4714670a8a5..ddde39e230a 100644 --- a/sql/updates/world/3.3.5/2017_10_29_02_world_335.sql +++ b/sql/updates/world/4.3.4/2017_10_29_11_world_from_335_was_2017_10_29_02_world_335.sql @@ -1,3 +1,4 @@ +/* -- Add waypoints to Hezrul Bloodmark SET @GUID := 13990; SET @PATHID := @GUID * 10; @@ -116,3 +117,4 @@ INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `positio (@PATHID, 99, -1197.42, -2061.97, 93.0869, 0.66061), (@PATHID, 100, -1191.3, -2057.78, 93.244, 0.558508), (@PATHID, 101, -1179.36, -2050.48, 93.4187, 0.566362); +*/ diff --git a/sql/updates/world/3.3.5/2017_10_29_03_world.sql b/sql/updates/world/4.3.4/2017_10_29_12_world_from_335_was_2017_10_29_03_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2017_10_29_03_world.sql rename to sql/updates/world/4.3.4/2017_10_29_12_world_from_335_was_2017_10_29_03_world.sql diff --git a/sql/updates/world/3.3.5/2017_10_29_04_world_335.sql b/sql/updates/world/4.3.4/2017_10_29_13_world_from_335_was_2017_10_29_04_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2017_10_29_04_world_335.sql rename to sql/updates/world/4.3.4/2017_10_29_13_world_from_335_was_2017_10_29_04_world_335.sql index 410c8288a91..2809207f52e 100644 --- a/sql/updates/world/3.3.5/2017_10_29_04_world_335.sql +++ b/sql/updates/world/4.3.4/2017_10_29_13_world_from_335_was_2017_10_29_04_world_335.sql @@ -1,3 +1,4 @@ +/* DELETE FROM `quest_greeting` WHERE `ID` IN (234, 235, 237, 238, 241, 253, 261, 342, 714, 786, 823, 1343, 1374, 1495, 1499, 1500, 1515, 1518, 2519, 2546, 2930, 3139, 3188, 3338, 3391, 3419, 3446, 3453, 3567, 3616, 3649, 4077, 4453, 5887, 6171, 7407, 7876, 27337); INSERT INTO `quest_greeting` (`ID`, `Type`, `GreetEmoteType`, `GreetEmoteDelay`, `Greeting`, `VerifiedBuild`) VALUES (234, 0, 1, 0, "A foul corruption has crept into Westfall. While I was upholding my duty on the battlefields of Lordaeron these honest farms were overrun and made into hide-outs for thugs and murderers. The People's Militia needs your help.", 0), @@ -42,3 +43,4 @@ INSERT INTO `quest_greeting` (`ID`, `Type`, `GreetEmoteType`, `GreetEmoteDelay`, UPDATE `creature_template` SET `gossip_menu_id`=0, `npcflag`=2 WHERE `entry` IN (786, 1343); DELETE FROM `gossip_menu` WHERE `MenuID` IN (694, 10893); DELETE FROM `npc_text` WHERE `ID`=1244; +*/ diff --git a/sql/updates/world/3.3.5/2017_10_29_05_world.sql b/sql/updates/world/4.3.4/2017_10_29_14_world_from_335_was_2017_10_29_05_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2017_10_29_05_world.sql rename to sql/updates/world/4.3.4/2017_10_29_14_world_from_335_was_2017_10_29_05_world.sql diff --git a/sql/updates/world/3.3.5/2017_10_29_06_world_335.sql b/sql/updates/world/4.3.4/2017_10_29_15_world_from_335_was_2017_10_29_06_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2017_10_29_06_world_335.sql rename to sql/updates/world/4.3.4/2017_10_29_15_world_from_335_was_2017_10_29_06_world_335.sql index cd248c26d1d..f82d0ab870c 100644 --- a/sql/updates/world/3.3.5/2017_10_29_06_world_335.sql +++ b/sql/updates/world/4.3.4/2017_10_29_15_world_from_335_was_2017_10_29_06_world_335.sql @@ -1,6 +1,8 @@ +/* DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=21; DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=21 AND `SourceEntry`=0; INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES (14,21,519,0,0,8,0,894,0,0,1,0,0,"","Show gossip text if Samophlange not rewarded"), (15,21,0,0,0,8,0,894,0,0,1,0,0,"","Show gossip option if Samophlange not rewarded"); +*/ diff --git a/sql/updates/world/3.3.5/2017_10_29_07_world_335.sql b/sql/updates/world/4.3.4/2017_10_29_16_world_from_335_was_2017_10_29_07_world_335.sql similarity index 98% rename from sql/updates/world/3.3.5/2017_10_29_07_world_335.sql rename to sql/updates/world/4.3.4/2017_10_29_16_world_from_335_was_2017_10_29_07_world_335.sql index 02bea6f892c..1aee78b09aa 100644 --- a/sql/updates/world/3.3.5/2017_10_29_07_world_335.sql +++ b/sql/updates/world/4.3.4/2017_10_29_16_world_from_335_was_2017_10_29_07_world_335.sql @@ -1,4 +1,6 @@ +/* -- UPDATE `gossip_menu_option` SET `OptionBroadcastTextID`=2466 WHERE `MenuID`=21 AND `OptionID`=0; UPDATE `conditions` SET ConditionValue1=858 WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=21; UPDATE `conditions` SET ConditionValue1=858 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=21 AND `SourceEntry`=0; +*/ diff --git a/sql/updates/world/3.3.5/2017_10_29_08_world_335.sql b/sql/updates/world/4.3.4/2017_10_29_17_world_from_335_was_2017_10_29_08_world_335.sql similarity index 96% rename from sql/updates/world/3.3.5/2017_10_29_08_world_335.sql rename to sql/updates/world/4.3.4/2017_10_29_17_world_from_335_was_2017_10_29_08_world_335.sql index 375f56a97f5..40cc9d4af6c 100644 --- a/sql/updates/world/3.3.5/2017_10_29_08_world_335.sql +++ b/sql/updates/world/4.3.4/2017_10_29_17_world_from_335_was_2017_10_29_08_world_335.sql @@ -1,5 +1,7 @@ +/* -- DELETE FROM `creature` WHERE `id`=12580; DELETE FROM `creature_addon` WHERE `guid`=86900; DELETE FROM `waypoint_data` WHERE `id`=869000; DELETE FROM `spawn_group` WHERE `spawnId`=86900; +*/ diff --git a/sql/updates/world/3.3.5/2017_10_29_09_world.sql b/sql/updates/world/4.3.4/2017_10_29_18_world_from_335_was_2017_10_29_09_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2017_10_29_09_world.sql rename to sql/updates/world/4.3.4/2017_10_29_18_world_from_335_was_2017_10_29_09_world.sql diff --git a/sql/updates/world/3.3.5/2017_10_29_10_world_335.sql b/sql/updates/world/4.3.4/2017_10_29_19_world_from_335_was_2017_10_29_10_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2017_10_29_10_world_335.sql rename to sql/updates/world/4.3.4/2017_10_29_19_world_from_335_was_2017_10_29_10_world_335.sql index cc714b75915..79d1d2c5cb9 100644 --- a/sql/updates/world/3.3.5/2017_10_29_10_world_335.sql +++ b/sql/updates/world/4.3.4/2017_10_29_19_world_from_335_was_2017_10_29_10_world_335.sql @@ -1,3 +1,4 @@ +/* -- SET @GUID := 81116; -- Need 6 SET @EVENT_ID := 74; @@ -120,3 +121,4 @@ INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Lan (35589, 1, 0, "The champions of the world's great nations have gathered at the Argent Tournament Grounds in northeastern Icecrown to face all challengers.", 12, 0, 100, 0, 0, 0, 35871, 0, "Jaeren Sunsworn"), (35604, 0, 0, "The Argent Crusade invites you to test your skills in honorable combat against other heroes of Azeroth at the Argent Tournament.", 12, 0, 100, 0, 0, 0, 35896, 0, "Arelas Brightstar"), (35604, 1, 0, "The champions of the world's great nations have gathered at the Argent Tournament Grounds in northeastern Icecrown to face all challengers.", 12, 0, 100, 0, 0, 0, 35871, 0, "Arelas Brightstar"); +*/ diff --git a/sql/updates/world/3.3.5/2017_10_29_11_world_335.sql b/sql/updates/world/4.3.4/2017_10_29_20_world_from_335_was_2017_10_29_11_world_335.sql similarity index 98% rename from sql/updates/world/3.3.5/2017_10_29_11_world_335.sql rename to sql/updates/world/4.3.4/2017_10_29_20_world_from_335_was_2017_10_29_11_world_335.sql index 66a997418ba..5af051f01e0 100644 --- a/sql/updates/world/3.3.5/2017_10_29_11_world_335.sql +++ b/sql/updates/world/4.3.4/2017_10_29_20_world_from_335_was_2017_10_29_11_world_335.sql @@ -1,3 +1,4 @@ +/* -- UPDATE `creature_template` SET `npcflag`=2, `gossip_menu_id`=0 WHERE `entry`=240; DELETE FROM `gossip_menu` WHERE `MenuID`=11611; @@ -6,3 +7,4 @@ DELETE FROM `npc_text` WHERE `ID`=16211; DELETE FROM `quest_greeting` WHERE `ID`=240; INSERT INTO `quest_greeting` (`ID`, `Type`, `GreetEmoteType`, `GreetEmoteDelay`, `Greeting`, `VerifiedBuild`) VALUES (240, 0, 0, 0, "Ach, it's hard enough keeping order around here without all these new troubles popping up! I hope you have good news, $n...", 0); +*/ diff --git a/sql/updates/world/4.3.4/2017_10_29_21_world_from_335_was_2017_10_29_12_world_335.sql b/sql/updates/world/4.3.4/2017_10_29_21_world_from_335_was_2017_10_29_12_world_335.sql new file mode 100644 index 00000000000..7b8757a045c --- /dev/null +++ b/sql/updates/world/4.3.4/2017_10_29_21_world_from_335_was_2017_10_29_12_world_335.sql @@ -0,0 +1,2 @@ +-- +-- UPDATE `creature_template` SET `type_flags`=`type_flags`&~134217728 WHERE `npcflag`>16 AND `gossip_menu_id`!= 0 AND `type_flags`&134217728; diff --git a/sql/updates/world/3.3.5/2017_10_29_13_world_335.sql b/sql/updates/world/4.3.4/2017_10_29_22_world_from_335_was_2017_10_29_13_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2017_10_29_13_world_335.sql rename to sql/updates/world/4.3.4/2017_10_29_22_world_from_335_was_2017_10_29_13_world_335.sql index ac255534970..c3de6d96034 100644 --- a/sql/updates/world/3.3.5/2017_10_29_13_world_335.sql +++ b/sql/updates/world/4.3.4/2017_10_29_22_world_from_335_was_2017_10_29_13_world_335.sql @@ -1,3 +1,4 @@ +/* -- The Missing Diplomat, id 1265 DELETE FROM `areatrigger_involvedrelation` WHERE `id` in (302,1667); @@ -14,3 +15,4 @@ DELETE FROM `smart_scripts` WHERE entryorguid = 4967 AND id in (2,3); 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 (4967, 0, 2, 3, 20, 0, 100, 0, 1265, 0, 0, 0, 11, 7120, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Archmage Tervosh - On Quest 'The Missing Diplomat' Finished - Cast Proudmoore's Defense"), (4967, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Archmage Tervosh - On Quest 'The Missing Diplomat' Finished - Say Line 0"); +*/ diff --git a/sql/updates/world/4.3.4/2017_10_29_23_world_from_335_was_2017_10_29_14_world.sql b/sql/updates/world/4.3.4/2017_10_29_23_world_from_335_was_2017_10_29_14_world.sql new file mode 100644 index 00000000000..f1dbc242b69 --- /dev/null +++ b/sql/updates/world/4.3.4/2017_10_29_23_world_from_335_was_2017_10_29_14_world.sql @@ -0,0 +1,112 @@ +-- +SET @TEXTID := 11074; +DELETE FROM `npc_text` WHERE `ID`=@TEXTID; +INSERT INTO `npc_text` (`ID`, `text0_1`, `BroadcastTextID0`) VALUES +(@TEXTID, "Forgetting your skill in Potion Mastery is not something to do lightly.$B$BAre you absolutely sure?", 21870); + +SET @MENUID := 21402; -- Need 3 +DELETE FROM `gossip_menu` WHERE `MenuID` BETWEEN @MENUID AND @MENUID+2; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(@MENUID, 11076, 0), -- Transmutation +(@MENUID+1, 11075, 0), -- Elixir +(@MENUID+2, @TEXTID, 0); -- Potion + +DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (8542, @MENUID, 8540, @MENUID+1, 7571, @MENUID+2); +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(8542, 0, 0, "I wish to unlearn Transmutation Mastery.", 21876, 1, 1, @MENUID, 0, 0, 0, "", 0, 0), +(8542, 1, 0, "I've trained as an alchemist once again. I wish to specialize in transmutations.", 20292, 1, 1, 0, 0, 0, 0, "", 0, 0), +(@MENUID, 0, 0, "I've made up my mind. Make me forget my alchemy mastery!", 21873, 1, 1, 0, 0, 0, 1500000, "Forgetting your knowledge is an expensive endeavor. Are you willing to pay the cost?", 21569, 0), +(8540, 0, 0, "I wish to unlearn Elixir Mastery.", 21875, 1, 1, @MENUID+1, 0, 0, 0, "", 0, 0), +(8540, 1, 0, "I've trained as an alchemist once again. I wish to specialize in elixirs.", 20289, 1, 1, 0, 0, 0, 0, "", 0, 0), +(@MENUID+1, 0, 0, "I've made up my mind. Make me forget my alchemy mastery!", 21873, 1, 1, 0, 0, 0, 1500000, "Forgetting your knowledge is an expensive endeavor. Are you willing to pay the cost?", 21569, 0), +(7571, 0, 0, "I wish to unlearn Potion Mastery.", 21874, 1, 1, @MENUID+2, 0, 0, 0, "", 0, 0), +(7571, 1, 0, "I've trained as an alchemist once again. I wish to specialize in potions.", 20287, 1, 1, 0, 0, 0, 0, "", 0, 0), +(@MENUID+2, 0, 0, "I've made up my mind. Make me forget my alchemy mastery!", 21873, 1, 1, 0, 0, 0, 1500000, "Forgetting your knowledge is an expensive endeavor. Are you willing to pay the cost?", 21569, 0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (8542, 8540, 7571); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +-- Unlearn Transmutation +(15, 8542, 0, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 8542, 0, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 8542, 0, 0, 0, 25, 0, 28672, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' learned"), +-- Learn Transmutation +(15, 8542, 1, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 8542, 1, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 8542, 1, 0, 0, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"), +(15, 8542, 1, 0, 0, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"), +(15, 8542, 1, 0, 0, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"), +(15, 8542, 1, 0, 0, 8, 0, 10899, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Transmutation' rewarded OR"), +(15, 8542, 1, 0, 1, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 8542, 1, 0, 1, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 8542, 1, 0, 1, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"), +(15, 8542, 1, 0, 1, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"), +(15, 8542, 1, 0, 1, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"), +(15, 8542, 1, 0, 1, 8, 0, 10902, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Elixirs' rewarded OR"), +(15, 8542, 1, 0, 2, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 8542, 1, 0, 2, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 8542, 1, 0, 2, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"), +(15, 8542, 1, 0, 2, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"), +(15, 8542, 1, 0, 2, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"), +(15, 8542, 1, 0, 2, 8, 0, 10897, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Potions' rewarded"), +-- Unlearn Elixir +(15, 8540, 0, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 8540, 0, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 8540, 0, 0, 0, 25, 0, 28677, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' learned"), +-- Learn Elixir +(15, 8540, 1, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 8540, 1, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 8540, 1, 0, 0, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"), +(15, 8540, 1, 0, 0, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"), +(15, 8540, 1, 0, 0, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"), +(15, 8540, 1, 0, 0, 8, 0, 10899, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Transmutation' rewarded OR"), +(15, 8540, 1, 0, 1, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 8540, 1, 0, 1, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 8540, 1, 0, 1, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"), +(15, 8540, 1, 0, 1, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"), +(15, 8540, 1, 0, 1, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"), +(15, 8540, 1, 0, 1, 8, 0, 10902, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Elixirs' rewarded OR"), +(15, 8540, 1, 0, 2, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 8540, 1, 0, 2, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 8540, 1, 0, 2, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"), +(15, 8540, 1, 0, 2, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"), +(15, 8540, 1, 0, 2, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"), +(15, 8540, 1, 0, 2, 8, 0, 10897, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Potions' rewarded"), +-- Unlearn Potion +(15, 7571, 0, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 7571, 0, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 7571, 0, 0, 0, 25, 0, 28675, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' learned"), +-- Learn Potion +(15, 7571, 1, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 7571, 1, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 7571, 1, 0, 0, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"), +(15, 7571, 1, 0, 0, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"), +(15, 7571, 1, 0, 0, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"), +(15, 7571, 1, 0, 0, 8, 0, 10899, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Transmutation' rewarded OR"), +(15, 7571, 1, 0, 1, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 7571, 1, 0, 1, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 7571, 1, 0, 1, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"), +(15, 7571, 1, 0, 1, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"), +(15, 7571, 1, 0, 1, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"), +(15, 7571, 1, 0, 1, 8, 0, 10902, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Elixirs' rewarded OR"), +(15, 7571, 1, 0, 2, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"), +(15, 7571, 1, 0, 2, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"), +(15, 7571, 1, 0, 2, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"), +(15, 7571, 1, 0, 2, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"), +(15, 7571, 1, 0, 2, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"), +(15, 7571, 1, 0, 2, 8, 0, 10897, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Potions' rewarded"); + +UPDATE `creature_template` SET `AIName`="SmartAI", `ScriptName`="" WHERE `entry` IN (22427, 19052, 17909); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22427, 19052, 17909) 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 +(22427, 0, 0, 1, 62, 0, 100, 0, @MENUID, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Zarevhi - On Gossip Option 0 Selected - Close Gossip"), +(22427, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 41565, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Zarevhi - On Gossip Option 0 Selected - Cast 'Unlearn Transmutation Mastery'"), +(22427, 0, 2, 3, 62, 0, 100, 0, 8542, 1, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Zarevhi - On Gossip Option 1 Selected - Close Gossip"), +(22427, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 85, 28674, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Zarevhi - On Gossip Option 1 Selected - Invoker Cast 'Transmutation Master'"), +(19052, 0, 0, 1, 62, 0, 100, 0, @MENUID+1, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lorokeem - On Gossip Option 0 Selected - Close Gossip"), +(19052, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 41564, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lorokeem - On Gossip Option 0 Selected - Cast 'Unlearn Elixir Mastery'"), +(19052, 0, 2, 3, 62, 0, 100, 0, 8540, 1, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lorokeem - On Gossip Option 1 Selected - Close Gossip"), +(19052, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 85, 28678, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lorokeem - On Gossip Option 1 Selected - Invoker Cast 'Elixir Master'"), +(17909, 0, 0, 1, 62, 0, 100, 0, @MENUID+2, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lauranna Thar'well - On Gossip Option 0 Selected - Close Gossip"), +(17909, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 41563, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lauranna Thar'well - On Gossip Option 0 Selected - Cast 'Unlearn Potion Mastery'"), +(17909, 0, 2, 3, 62, 0, 100, 0, 7571, 1, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lauranna Thar'well - On Gossip Option 1 Selected - Close Gossip"), +(17909, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 85, 28676, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lauranna Thar'well - On Gossip Option 1 Selected - Invoker Cast 'Potion Master'"); diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 3eeb0a7d831..db089e87d76 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -60,15 +60,6 @@ A few notes for future developement: # gossip item and box texts ###*/ -#define GOSSIP_LEARN_POTION "Please teach me how to become a Master of Potions, Lauranna" -#define GOSSIP_UNLEARN_POTION "I wish to unlearn Potion Mastery" -#define GOSSIP_LEARN_TRANSMUTE "Please teach me how to become a Master of Transmutations, Zarevhi" -#define GOSSIP_UNLEARN_TRANSMUTE "I wish to unlearn Transmutation Mastery" -#define GOSSIP_LEARN_ELIXIR "Please teach me how to become a Master of Elixirs, Lorokeem" -#define GOSSIP_UNLEARN_ELIXIR "I wish to unlearn Elixir Mastery" - -#define BOX_UNLEARN_ALCHEMY_SPEC "Do you really want to unlearn your alchemy specialty and lose all associated recipes? \n Cost: " - #define GOSSIP_WEAPON_LEARN "Please teach me how to become a Weaponsmith" #define GOSSIP_WEAPON_UNLEARN "I wish to unlearn the art of Weaponsmithing" #define GOSSIP_ARMOR_LEARN "Please teach me how to become a Armorsmith" @@ -158,19 +149,7 @@ enum ProfessionSpells S_UNLEARN_SPELLFIRE = 41299, S_UNLEARN_MOONCLOTH = 41558, - S_UNLEARN_SHADOWEAVE = 41559, - - S_TRANSMUTE = 28672, - S_ELIXIR = 28677, - S_POTION = 28675, - - S_LEARN_TRANSMUTE = 28674, - S_LEARN_ELIXIR = 28678, - S_LEARN_POTION = 28676, - - S_UNLEARN_TRANSMUTE = 41565, - S_UNLEARN_ELIXIR = 41564, - S_UNLEARN_POTION = 41563, + S_UNLEARN_SHADOWEAVE = 41559 }; /*### @@ -178,11 +157,6 @@ enum ProfessionSpells ###*/ enum SpecializationTrainers { - /* Alchemy */ - N_TRAINER_TRANSMUTE = 22427, // Zarevhi - N_TRAINER_ELIXIR = 19052, // Lorokeem - N_TRAINER_POTION = 17909, // Lauranna Thar'well - /* Blacksmithing */ N_TRAINER_SMITHOMNI1 = 11145, // Myolor Sunderfury N_TRAINER_SMITHOMNI2 = 11176, // Krathok Moltenfist @@ -208,27 +182,16 @@ enum SpecializationTrainers N_TRAINER_SHADOWEAVE = 22212, // Andrion Darkspinner }; -/*### -# specialization quests -###*/ -enum SpecializationQuests -{ - /* Alchemy */ - Q_MASTER_TRANSMUTE = 10899, - Q_MASTER_ELIXIR = 10902, - Q_MASTER_POTION = 10897, -}; - /*### # formulas to calculate unlearning cost ###*/ -int32 DoLearnCost(Player* /*player*/) //tailor, alchemy +int32 DoLearnCost(Player* /*player*/) //tailor { return 200000; } -int32 DoHighUnlearnCost(Player* /*player*/) //tailor, alchemy +int32 DoHighUnlearnCost(Player* /*player*/) //tailor { return 1500000; } @@ -409,171 +372,6 @@ void ProcessUnlearnAction(Player* player, Creature* creature, uint32 spellId, ui CloseGossipMenuFor(player); } -/*### -# start menues alchemy -###*/ - -class npc_prof_alchemy : public CreatureScript -{ -public: - npc_prof_alchemy() : CreatureScript("npc_prof_alchemy") { } - - inline bool HasAlchemySpell(Player* player) - { - return (player->HasSpell(S_TRANSMUTE) || player->HasSpell(S_ELIXIR) || player->HasSpell(S_POTION)); - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (creature->IsVendor()) - AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - if (creature->IsTrainer()) - AddGossipItemFor(player, GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); - - if (player->HasSkill(SKILL_ALCHEMY) && player->GetBaseSkillValue(SKILL_ALCHEMY) >= 350 && player->getLevel() > 67) - { - if (player->GetQuestRewardStatus(Q_MASTER_TRANSMUTE) || player->GetQuestRewardStatus(Q_MASTER_ELIXIR) || player->GetQuestRewardStatus(Q_MASTER_POTION)) - { - switch (creature->GetEntry()) - { - case N_TRAINER_TRANSMUTE: //Zarevhi - if (!HasAlchemySpell(player)) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1); - if (player->HasSpell(S_TRANSMUTE)) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4); - break; - case N_TRAINER_ELIXIR: //Lorokeem - if (!HasAlchemySpell(player)) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2); - if (player->HasSpell(S_ELIXIR)) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 5); - break; - case N_TRAINER_POTION: //Lauranna Thar'well - if (!HasAlchemySpell(player)) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 3); - if (player->HasSpell(S_POTION)) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 6); - break; - } - } - } - - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - return true; - } - - void SendActionMenu(Player* player, Creature* creature, uint32 action) - { - switch (action) - { - case GOSSIP_ACTION_TRADE: - player->GetSession()->SendListInventory(creature->GetGUID()); - break; - case GOSSIP_ACTION_TRAIN: - player->GetSession()->SendTrainerList(creature->GetGUID()); - break; - //Learn Alchemy - case GOSSIP_ACTION_INFO_DEF + 1: - ProcessCastaction(player, creature, S_TRANSMUTE, S_LEARN_TRANSMUTE, DoLearnCost(player)); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - ProcessCastaction(player, creature, S_ELIXIR, S_LEARN_ELIXIR, DoLearnCost(player)); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - ProcessCastaction(player, creature, S_POTION, S_LEARN_POTION, DoLearnCost(player)); - break; - //Unlearn Alchemy - case GOSSIP_ACTION_INFO_DEF + 4: - ProcessCastaction(player, creature, 0, S_UNLEARN_TRANSMUTE, DoHighUnlearnCost(player)); - break; - case GOSSIP_ACTION_INFO_DEF + 5: - ProcessCastaction(player, creature, 0, S_UNLEARN_ELIXIR, DoHighUnlearnCost(player)); - break; - case GOSSIP_ACTION_INFO_DEF + 6: - ProcessCastaction(player, creature, 0, S_UNLEARN_POTION, DoHighUnlearnCost(player)); - break; - } - } - - void SendConfirmLearn(Player* player, Creature* creature, uint32 action) - { - if (action) - { - switch (creature->GetEntry()) - { - case N_TRAINER_TRANSMUTE: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, action); - //unknown textID () - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - break; - case N_TRAINER_ELIXIR: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_CHECK, action); - //unknown textID () - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - break; - case N_TRAINER_POTION: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_CHECK, action); - //unknown textID () - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - break; - } - } - } - - void SendConfirmUnlearn(Player* player, Creature* creature, uint32 action) - { - if (action) - { - switch (creature->GetEntry()) - { - case N_TRAINER_TRANSMUTE: - AddGossipItemFor(player, 0, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(player), false); - //unknown textID () - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - break; - case N_TRAINER_ELIXIR: - AddGossipItemFor(player, 0, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(player), false); - //unknown textID () - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - break; - case N_TRAINER_POTION: - AddGossipItemFor(player, 0, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(player), false); - //unknown textID () - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - break; - } - } - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) override - { - ClearGossipMenuFor(player); - switch (sender) - { - case GOSSIP_SENDER_MAIN: - SendActionMenu(player, creature, action); - break; - - case GOSSIP_SENDER_LEARN: - SendConfirmLearn(player, creature, action); - break; - - case GOSSIP_SENDER_UNLEARN: - SendConfirmUnlearn(player, creature, action); - break; - - case GOSSIP_SENDER_CHECK: - SendActionMenu(player, creature, action); - break; - } - return true; - } -}; - /*### # start menues blacksmith ###*/ @@ -1320,7 +1118,6 @@ public: void AddSC_npc_professions() { - new npc_prof_alchemy(); new npc_prof_blacksmith(); new npc_engineering_tele_trinket(); new npc_prof_leather();