From 92e345fb32a360b93ba15558d8478b6de1e24fe7 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Sat, 24 Feb 2018 14:38:18 +0100 Subject: [PATCH 01/38] DB/Creature: Deathguard Elite & Stormwind City Guard use Crossbow on ranged attack - also add some missing emote responses to Stormwind City Guard Closes #21470 --- .../world/3.3.5/2018_02_24_00_world_335.sql | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_24_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_24_00_world_335.sql b/sql/updates/world/3.3.5/2018_02_24_00_world_335.sql new file mode 100644 index 00000000000..6d4ce16a205 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_24_00_world_335.sql @@ -0,0 +1,35 @@ +-- Deathguard Elite +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=7980; +DELETE FROM `smart_scripts` WHERE `entryorguid`=7980 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 +(7980,0,0,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Deathguard Elite - In Combat - Cast 'Shoot'"); + +-- Stormwind City Guard +DELETE FROM `smart_scripts` WHERE `entryorguid`=68 AND `source_type`=0 AND `id` IN (1,2,3,4,5,6,7,8,9); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (6800,6801,6802,6803,6804) AND `source_type`=9; +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 +(68, 0, 1,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Stormwind City Guard - In Combat - Cast 'Shoot'"), +(68, 0, 2,0,9,0,100,0,0,5,11000,14000,11,12169,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - Within 0-5 Range - Cast 'Shield Block'"), +(68, 0, 3,0,0,0,100,0,5000,9000,8000,13000,11,12170,0,0,0,0,0,2,0,0,0,0,0,0,0,"Stormwind City Guard - In Combat - Cast 'Revenge'"), +(68, 0, 4,0,22,0,100,0,101,5000,5000,0,80,6800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Received Emote 'Wave' - Run Script"), +(68, 0, 5,0,22,0,100,0,78,5000,5000,0,80,6801,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Received Emote 'Salute' - Run Script"), +(68, 0, 6,0,22,0,100,0,58,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Received Emote 'Kiss' - Run Script"), +(68, 0, 7,0,22,0,100,0,84,5000,5000,0,80,6803,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Received Emote 'Shy' - Run Script"), +(68, 0, 8,0,22,0,100,0,77,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Received Emote 'Rude' - Run Script"), +(68, 0, 9,0,22,0,100,0,22,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Received Emote 'Chicken' - Run Script"), +(68, 0,10,0,22,0,100,0,17,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Received Emote 'Bow' - Run Script"), +(6800,9, 0,0, 0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"), +(6800,9, 1,0, 0,0,100,0,2000,2000,0,0,5,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Play Emote 'Wave'"), +(6800,9, 2,0, 0,0,100,0,10000,10000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"), +(6801,9, 0,0, 0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"), +(6801,9, 1,0, 0,0,100,0,2000,2000,0,0,5,66,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Play Emote 'Salute'"), +(6801,9, 2,0, 0,0,100,0,10000,10000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"), +(6802,9, 0,0, 0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"), +(6802,9, 1,0, 0,0,100,0,2000,2000,0,0,5,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Play Emote 'Bow'"), +(6802,9, 2,0, 0,0,100,0,10000,10000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"), +(6803,9, 0,0, 0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"), +(6803,9, 1,0, 0,0,100,0,2000,2000,0,0,5,23,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Play Emote 'Flex'"), +(6803,9, 2,0, 0,0,100,0,10000,10000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"), +(6804,9, 0,0, 0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"), +(6804,9, 1,0, 0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Play Emote 'Point'"), +(6804,9, 2,0, 0,0,100,0,10000,10000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"); From 17bd341fdaf8011f50ac3b49e74f8619c229d603 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Mon, 5 Mar 2018 14:02:05 +0100 Subject: [PATCH 02/38] Core/DBUpdater: Code cleanup --- src/server/database/Updater/DBUpdater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp index 0edaed763bb..75abd9bcd0f 100644 --- a/src/server/database/Updater/DBUpdater.cpp +++ b/src/server/database/Updater/DBUpdater.cpp @@ -288,7 +288,7 @@ bool DBUpdater::Populate(DatabaseWorkerPool& pool) case LOCATION_DOWNLOAD: { std::string const filename = base.filename().generic_string(); - std::string const workdir = boost::filesystem::current_path().generic_string().c_str(); + std::string const workdir = boost::filesystem::current_path().generic_string(); TC_LOG_ERROR("sql.updates", ">> File \"%s\" is missing, download it from \"https://t.me/trinitycorelegacy\"" \ " Mirror: \"https://github.com/TrinityCoreLegacy/TrinityCore/releases\"" \ " uncompress it and place the file \"%s\" in the directory \"%s\".", filename.c_str(), filename.c_str(), workdir.c_str()); From d5df330b611a83df624b4727a9728f573cba385f Mon Sep 17 00:00:00 2001 From: Killyana Date: Sat, 24 Feb 2018 15:01:13 +0100 Subject: [PATCH 03/38] DB/Creature: assign SmartAI to Apothecary Keever's test subjects + typo fix - missing row number in one of the DELETE FROM queries in commit 20a0d27b5bcbc2c3a334edef37f6a05e653ca401 Closes #21488 --- sql/updates/world/3.3.5/2018_02_24_00_world_335.sql | 2 +- sql/updates/world/3.3.5/2018_02_24_01_world_335.sql | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/3.3.5/2018_02_24_01_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_24_00_world_335.sql b/sql/updates/world/3.3.5/2018_02_24_00_world_335.sql index 6d4ce16a205..9d87518b782 100644 --- a/sql/updates/world/3.3.5/2018_02_24_00_world_335.sql +++ b/sql/updates/world/3.3.5/2018_02_24_00_world_335.sql @@ -5,7 +5,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type (7980,0,0,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Deathguard Elite - In Combat - Cast 'Shoot'"); -- Stormwind City Guard -DELETE FROM `smart_scripts` WHERE `entryorguid`=68 AND `source_type`=0 AND `id` IN (1,2,3,4,5,6,7,8,9); +DELETE FROM `smart_scripts` WHERE `entryorguid`=68 AND `source_type`=0 AND `id` IN (1,2,3,4,5,6,7,8,9,10); DELETE FROM `smart_scripts` WHERE `entryorguid` IN (6800,6801,6802,6803,6804) AND `source_type`=9; 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 (68, 0, 1,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Stormwind City Guard - In Combat - Cast 'Shoot'"), diff --git a/sql/updates/world/3.3.5/2018_02_24_01_world_335.sql b/sql/updates/world/3.3.5/2018_02_24_01_world_335.sql new file mode 100644 index 00000000000..fb853ff5a20 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_24_01_world_335.sql @@ -0,0 +1,2 @@ +-- Apothecary Keever's test subjects (Caged Human Male, Squirrel, Rabbit, Toad, Sheep) +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry` IN (5736,5739,5741,5742,5743); From 49ba2a2fe3802fad20081f14742757ee47178628 Mon Sep 17 00:00:00 2001 From: Keader Date: Sat, 24 Feb 2018 11:34:16 -0300 Subject: [PATCH 04/38] DB/Spells: Fixed Alchemy stones procs with potions like endless mana potion --- sql/updates/world/3.3.5/2018_02_24_02_world.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/world/3.3.5/2018_02_24_02_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_24_02_world.sql b/sql/updates/world/3.3.5/2018_02_24_02_world.sql new file mode 100644 index 00000000000..d2a4cdd79d4 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_24_02_world.sql @@ -0,0 +1 @@ +UPDATE `spell_proc` SET `ProcFlags`=`ProcFlags`|2048 WHERE `SpellId`=17619; From c1d70ea7a4bbfcba0e35c0ac891502bc1b6b4357 Mon Sep 17 00:00:00 2001 From: Killyana Date: Sat, 24 Feb 2018 19:12:23 +0100 Subject: [PATCH 05/38] DB: Fix DB errors related to the respawn action Action 70 will be used only for gobs and requires always an action_param1=respawntime (the time which the gob will remain spawned) Action 133 will be used for Npcs and in some cases for gobs if they must remain spawned for ever (this action uses always target_type=1 and action_param1=0/1 (npc/gob) and action_param2= guid of the unit Closes #21494 --- .../world/3.3.5/2018_02_24_03_world.sql | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_24_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_24_03_world.sql b/sql/updates/world/3.3.5/2018_02_24_03_world.sql new file mode 100644 index 00000000000..f66c9121e05 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_24_03_world.sql @@ -0,0 +1,27 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (34925) AND `source_type`=0 AND `id`=11 AND `action_type`=70; +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=49141, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=30420 AND `source_type`=0 AND `id` IN (3); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=202969, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=28659 AND `source_type`=0 AND `id` IN (20); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=202970, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=28659 AND `source_type`=0 AND `id` IN (1); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=202969, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=28659 AND `source_type`=0 AND `id` IN (0); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=202970, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=28659 AND `source_type`=0 AND `id` IN (21); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=85322, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=27210 AND `source_type`=0 AND `id` IN (8); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=85098, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=26073 AND `source_type`=0 AND `id` IN (0); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=85118, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=26073 AND `source_type`=0 AND `id` IN (2); +UPDATE `smart_scripts` SET `action_type`=118, `action_param1`=1 WHERE `entryorguid`=25201 AND `source_type`=0 AND `id` IN (5) AND `action_type`=70; +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=74518, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=24023 AND `source_type`=0 AND `id` IN (6); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=74519, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=24023 AND `source_type`=0 AND `id` IN (7); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=74520, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=24023 AND `source_type`=0 AND `id` IN (8); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=70376, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=19720 AND `source_type`=0 AND `id` IN (9); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=70377, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=19720 AND `source_type`=0 AND `id` IN (10); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=48191, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=18471 AND `source_type`=0 AND `id`=26; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=18399 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_type`=7, `action_type`=41, `target_type`=1, `target_param1`=0, `target_param2`=0, `Comment`="Murkblood Twin - On evade - Despawn" WHERE `entryorguid`=18399 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=56862, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=17826 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `action_param1`=180 WHERE `entryorguid`=8479 AND `source_type`=0 AND `id` IN (5,6); +UPDATE `smart_scripts` SET `action_param1`=120 WHERE `entryorguid`=7750 AND `source_type`=0 AND `id` IN (1,2); +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=48191, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=1806901 AND `source_type`=9 AND `id`=1; +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=24762, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=2362200 AND `source_type`=9 AND `id`=3; +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=106544, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=2724800 AND `source_type`=9 AND `id`=1; +UPDATE `smart_scripts` SET `action_type`=133, `action_param1`=0, `action_param2`=95366, `target_type`=1, `target_param1`=0, `target_param2`=0 WHERE `entryorguid`=3011600 AND `source_type`=9 AND `id`=0; +UPDATE `smart_scripts` SET `action_param1`=60 WHERE `entryorguid`=173265 AND `source_type`=1 AND `id`=0; From 0dbf83ef8a3a304a174d2715bbb4c653784b0790 Mon Sep 17 00:00:00 2001 From: Killyana Date: Sat, 24 Feb 2018 21:25:05 +0100 Subject: [PATCH 06/38] DB/Conditions: Flaming spear could be casted only if the player is in taxi Ref #15560 --- sql/updates/world/3.3.5/2018_02_24_04_world.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_24_04_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_24_04_world.sql b/sql/updates/world/3.3.5/2018_02_24_04_world.sql new file mode 100644 index 00000000000..167b959156d --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_24_04_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=66588 AND ConditionTypeOrReference=46; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 66588, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, '', "Flaming Spear could be casted only if the player is in taxi"), +(17, 0, 66588, 0, 1, 46, 0, 0, 0, 0, 0, 0, 0, '', "Flaming Spear could be casted only if the player is in taxi"); From a754dfcae9b7291dfcce137063b310cdcd31d96b Mon Sep 17 00:00:00 2001 From: TecDian Date: Sat, 24 Feb 2018 21:54:19 +0100 Subject: [PATCH 07/38] DB/Gossip: Midsummer Fire Festival - Fix wrong gossip option conditions Closes #21495 --- .../world/3.3.5/2018_02_24_05_world.sql | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_24_05_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_24_05_world.sql b/sql/updates/world/3.3.5/2018_02_24_05_world.sql new file mode 100644 index 00000000000..0ff76b9a900 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_24_05_world.sql @@ -0,0 +1,30 @@ +-- +UPDATE `conditions` SET `ConditionValue1`=11581 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9406; +UPDATE `conditions` SET `ConditionValue1`=11783 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9374; +UPDATE `conditions` SET `ConditionValue1`=11785 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9376; +UPDATE `conditions` SET `ConditionValue1`=11802 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9382; +UPDATE `conditions` SET `ConditionValue1`=11775 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9365; +UPDATE `conditions` SET `ConditionValue1`=11800 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9380; +UPDATE `conditions` SET `ConditionValue1`=11773 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9363; +UPDATE `conditions` SET `ConditionValue1`=11771 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9361; +UPDATE `conditions` SET `ConditionValue1`=11769 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9359; +UPDATE `conditions` SET `ConditionValue1`=11780 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9371; +UPDATE `conditions` SET `ConditionValue1`=11803 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9383; +UPDATE `conditions` SET `ConditionValue1`=11782 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9373; +UPDATE `conditions` SET `ConditionValue1`=11778 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9368; +UPDATE `conditions` SET `ConditionValue1`=11787 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9378; +UPDATE `conditions` SET `ConditionValue1`=11781 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9372; +UPDATE `conditions` SET `ConditionValue1`=11801 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9381; +UPDATE `conditions` SET `ConditionValue1`=11768 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9358; +UPDATE `conditions` SET `ConditionValue1`=11766 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9356; +UPDATE `conditions` SET `ConditionValue1`=11784 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9375; +UPDATE `conditions` SET `ConditionValue1`=11776 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9366; +UPDATE `conditions` SET `ConditionValue1`=11580 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9370; +UPDATE `conditions` SET `ConditionValue1`=11777 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9367; +UPDATE `conditions` SET `ConditionValue1`=11770 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9360; +UPDATE `conditions` SET `ConditionValue1`=11779 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9369; +UPDATE `conditions` SET `ConditionValue1`=11799 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9379; +UPDATE `conditions` SET `ConditionValue1`=11774 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9364; +UPDATE `conditions` SET `ConditionValue1`=11767 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9357; +UPDATE `conditions` SET `ConditionValue1`=11772 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9362; +UPDATE `conditions` SET `ConditionValue1`=11786 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9377; From 907e47804fba620a81ed8d72cfcfe128148963a2 Mon Sep 17 00:00:00 2001 From: Killyana Date: Sun, 25 Feb 2018 01:32:29 +0100 Subject: [PATCH 08/38] DB/GameObject: Make spawned Bountiful Feast not selectable Closes #20957 --- .../world/3.3.5/2018_02_25_00_world_335.sql | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_25_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_25_00_world_335.sql b/sql/updates/world/3.3.5/2018_02_25_00_world_335.sql new file mode 100644 index 00000000000..7762bbbbe8e --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_25_00_world_335.sql @@ -0,0 +1,23 @@ +-- +DELETE FROM `gameobject_overrides` WHERE `spawnId` IN (76499, 76498, 76436, 76435, 76229, 76228, 76182, 76181, 76147, 76146, 76145, 76144, 76099, 76098, 76097, 76067, 76066, 76065, 76579, 76580); +INSERT INTO `gameobject_overrides` (`spawnId`, `faction`, `flags`) VALUES +(76499, 0, 16), +(76498, 0, 16), +(76436, 0, 16), +(76435, 0, 16), +(76229, 0, 16), +(76228, 0, 16), +(76182, 0, 16), +(76181, 0, 16), +(76147, 0, 16), +(76146, 0, 16), +(76145, 0, 16), +(76144, 0, 16), +(76099, 0, 16), +(76098, 0, 16), +(76097, 0, 16), +(76067, 0, 16), +(76066, 0, 16), +(76065, 0, 16), +(76579, 0, 16), +(76580, 0, 16); From 81e7cb4c4242982a7feffd6b0e8b547b3f23a4e3 Mon Sep 17 00:00:00 2001 From: Chaouki Dhib Date: Wed, 28 Feb 2018 13:40:41 +0100 Subject: [PATCH 09/38] Core/Movement: Correct distance checking Distance checking should always be in 3D, independently on if the mover has the ability to fly or not. --- .../MovementGenerators/TargetedMovementGenerator.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp index f5e603e25d6..d2b413ca0c1 100755 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp @@ -72,10 +72,7 @@ bool TargetedMovementGenerator::DoUpdate(T* owner, uint32 diff) transport->CalculatePassengerPosition(destination.x, destination.y, destination.z); // First check distance - if (owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->CanFly()) - targetMoved = !GetTarget()->IsInDist(destination.x, destination.y, destination.z, distance); - else - targetMoved = !GetTarget()->IsInDist2d(destination.x, destination.y, distance); + targetMoved = !GetTarget()->IsInDist(destination.x, destination.y, destination.z, distance); // then, if the target is in range, check also Line of Sight. if (!targetMoved) From ccdee716a4d0d22acb30ef1321c1649923063355 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Wed, 28 Feb 2018 21:33:41 +0100 Subject: [PATCH 10/38] DB/Quest: Hallowed Scroll & Glyphic Scroll Closes #21506 --- sql/updates/world/3.3.5/2018_02_28_00_world_335.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_28_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_28_00_world_335.sql b/sql/updates/world/3.3.5/2018_02_28_00_world_335.sql new file mode 100644 index 00000000000..d3c3b8e6cde --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_28_00_world_335.sql @@ -0,0 +1,2 @@ +-- Fix prerequisite for quests "Hallowed Scroll" & "Glyphic Scroll" +UPDATE `quest_template_addon` SET `PrevQuestID`=364 WHERE `ID` IN (3097,3098); From a55b2160a04eb018120a57228c4886b04ca3e1f2 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Wed, 28 Feb 2018 21:34:16 +0100 Subject: [PATCH 11/38] DB/Quest: Rot Hide Ichor Closes #21507 --- sql/updates/world/3.3.5/2018_02_28_01_world_335.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_28_01_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_28_01_world_335.sql b/sql/updates/world/3.3.5/2018_02_28_01_world_335.sql new file mode 100644 index 00000000000..a21f5d25181 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_28_01_world_335.sql @@ -0,0 +1,2 @@ +-- Fix prerequisite for quest "Rot Hide Ichor" +UPDATE `quest_template_addon` SET `PrevQuestID`=439 WHERE `ID`=443; From f120d20cfed9a092a5c54736afee4aae0186443a Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Wed, 28 Feb 2018 21:34:53 +0100 Subject: [PATCH 12/38] DB/Gossip: Advisor Duskingdawn Closes #21508 --- sql/updates/world/3.3.5/2018_02_28_02_world_335.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_28_02_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_28_02_world_335.sql b/sql/updates/world/3.3.5/2018_02_28_02_world_335.sql new file mode 100644 index 00000000000..39e6eabfc35 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_28_02_world_335.sql @@ -0,0 +1,9 @@ +-- Advisor Duskingdawn --> Fix gossip text +DELETE FROM `gossip_menu` WHERE `MenuID`=7358 AND `TextID`=8787; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(7358,8787,0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=7358; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14,7358,8789,0,0,16,0,512,0,0,0,0,0,"","Show gossip text if player is a Blood Elf"), +(14,7358,8787,0,0,16,0,1279,0,0,0,0,0,"","Show gossip text if player is not a Blood Elf"); From c89714c2c78fec35f269eadc3a9b9941a0b4ce4c Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Wed, 28 Feb 2018 21:35:47 +0100 Subject: [PATCH 13/38] DB/Creature: Gol'dir Closes #21509 --- .../world/3.3.5/2018_02_28_03_world_335.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_28_03_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_28_03_world_335.sql b/sql/updates/world/3.3.5/2018_02_28_03_world_335.sql new file mode 100644 index 00000000000..26a074ccc05 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_28_03_world_335.sql @@ -0,0 +1,15 @@ +-- Gol'dir +DELETE FROM `creature_text` WHERE `CreatureID`=2316; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(2316,0,0,"Over here! Inside the room. Did you find the key to my chains? The human Borhuin has them.",12,1,100,22,0,0,598,0,"Gol'dir"); + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=2316; +DELETE FROM `smart_scripts` WHERE `entryorguid`=2316 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 +(2316,0,0,0,10,0,100,0,1,30,180000,180000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gol'dir - OOC LOS - Say Line 0"); + +-- Condition +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=2316; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22,1,2316,0,0,9,0,503,0,0,0,0,0,"","SAI triggers only if player has quest 'Gol'dir' taken"), +(22,1,2316,0,1,28,0,503,0,0,0,0,0,"","SAI triggers only if player has quest 'Gol'dir' completed"); From de41dee9be2193dd39aa163140a3386e278a3624 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Wed, 28 Feb 2018 21:36:44 +0100 Subject: [PATCH 14/38] DB/Quest: Smith Mathiel Closes #21510 --- .../world/3.3.5/2018_02_28_04_world_335.sql | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_28_04_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_28_04_world_335.sql b/sql/updates/world/3.3.5/2018_02_28_04_world_335.sql new file mode 100644 index 00000000000..97c4333d2b7 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_28_04_world_335.sql @@ -0,0 +1,25 @@ +-- Blacksmith's Anvil +SET @GUID := 1508; +DELETE FROM `gameobject` WHERE `guid`=@GUID; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES +(@GUID,1684,1,1657,1657,1,1,9920.39,2308.9,1330.78,3.32399,-0,-0,-0.995844,0.0910739,300,255,1,"",0); + +-- Mathiel +DELETE FROM `creature_text` WHERE `CreatureID`=6142; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(6142,0,0,"%s begins crafting...",16,0,100,0,0,0,2306,0,"Mathiel"), +(6142,1,0,"It is done. I have your weapon, $n.",12,0,100,1,0,0,2307,0,"Mathiel"); + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=6142; +DELETE FROM `smart_scripts` WHERE `entryorguid`=6142 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=614200 AND `source_type`=9; +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 +(6142,0,0,0,20,0,100,0,1692,0,0,0,80,614200,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mathiel - On Quest 'Smith Mathiel' Finished - Run Script"), +(614200,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mathiel - On Script - Remove Npc Flag Questgiver"), +(614200,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.166394,"Mathiel - On Script - Set Orientation"), +(614200,9,2,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mathiel - On Script - Say Line 0"), +(614200,9,3,0,0,0,100,0,0,0,0,0,17,233,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mathiel - On Script - Set Emote State 233"), +(614200,9,4,0,0,0,100,0,20000,20000,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mathiel - On Script - Set Emote State 0"), +(614200,9,5,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.71042,"Mathiel - On Script - Set Orientation"), +(614200,9,6,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mathiel - On Script - Say Line 2"), +(614200,9,7,0,0,0,100,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mathiel - On Script - Add Npc Flag Questgiver"); From d0f42c764b3eecd2061f5d99e1d03a6c8ecb3f1e Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Wed, 28 Feb 2018 21:37:28 +0100 Subject: [PATCH 15/38] DB/Quest: The Rescue Closes #21511 --- .../world/3.3.5/2018_02_28_05_world_335.sql | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_28_05_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_28_05_world_335.sql b/sql/updates/world/3.3.5/2018_02_28_05_world_335.sql new file mode 100644 index 00000000000..aa2443b0ffd --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_28_05_world_335.sql @@ -0,0 +1,27 @@ +-- Quest "The Rescue" +-- Locked ball and chain +UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry` IN (1721,1722); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (1721,1722) AND `source_type`=1; +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 +(1721,1,0,0,70,0,100,0,2,0,0,0,45,1,1,0,0,0,0,19,2239,0,0,0,0,0,0,"Locked ball and chain - On Gameobject State Changed - Set Data to Drull"), +(1722,1,0,0,70,0,100,0,2,0,0,0,45,1,1,0,0,0,0,19,2238,0,0,0,0,0,0,"Locked ball and chain - On Gameobject State Changed - Set Data to Tog'thar"); + +-- Tog'thar / Drull +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry` IN (2238,2239); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2238,2239) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (223800,223900) AND `source_type`=9; +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 +(2238,0,0,0,38,0,100,0,1,1,0,0,80,223800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tog'thar - On Data Set - Run Script"), +(2239,0,0,0,38,0,100,0,1,1,0,0,80,223900,0,0,0,0,0,1,0,0,0,0,0,0,0,"Drull - On Data Set - Run Script"), +(223800,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tog'thar - On Script - Say Line 0"), +(223800,9,1,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tog'thar - On Script - Say Line 1"), +(223900,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Drull - On Script - Say Line 0"), +(223900,9,1,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Drull - On Script - Say Line 1"); + +-- Texts +DELETE FROM `creature_text` WHERE `CreatureID` IN (2238,2239); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(2238,0,0,"Have you freed Drull yet? I don't know where he's being held.",12,1,100,6,0,0,593,0,"Tog'thar"), +(2238,1,0,"I will only slow you down, but no pink-skinned humans will keep me from freedom!",12,1,100,15,0,0,595,0,"Tog'thar"), +(2239,0,0,"Ah, it is good to be free of my bonds! Have you freed Tog'thar yet? The humans split us up after our capture.",12,1,100,4,0,0,592,0,"Drull"), +(2239,1,0,"Go on ahead without me! I will make my own way to Tarren Mill.",12,1,100,5,0,0,594,0,"Drull"); From 22807ebf8a0c6143b3044116ffd6007ec5becbe4 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Wed, 28 Feb 2018 21:38:03 +0100 Subject: [PATCH 16/38] DB/Quest: Helcular's Revenge (Part 2) Closes #21512 --- .../world/3.3.5/2018_02_28_06_world_335.sql | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_28_06_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_28_06_world_335.sql b/sql/updates/world/3.3.5/2018_02_28_06_world_335.sql new file mode 100644 index 00000000000..8440db65827 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_28_06_world_335.sql @@ -0,0 +1,25 @@ +-- Quest "Helcular's Revenge (Part 2)" +-- Helcular's Grave +UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=1767; +DELETE FROM `smart_scripts` WHERE `entryorguid`=1767 AND `source_type`=1; +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 +(1767,1,0,0,20,0,100,0,553,0,0,0,12,2433,3,600000,0,0,0,8,0,0,0,-742.94,-615.67,18.72,1.61731,"Helcular's Grave - On Quest 'Helcular's Revenge (Part 2)' Rewarded - Summon Creature 'Helcular's Remains'"); + +-- Condition +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=1767; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22,1,1767,1,0,29,1,2433,200,0,1,0,0,"","SAI triggers only if Helcular's Remains is not already spawned"); + +-- Helcular's Remains +DELETE FROM `smart_scripts` WHERE `entryorguid`=2433 AND `source_type`=0 AND `id` IN (3,4); +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 +(2433,0,3,0,11,0,100,0,0,0,0,0,89,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Helcular's Remains - On Respawn - Start Random Movement"), +(2433,0,4,0,11,0,100,0,0,0,0,0,11,3390,0,0,0,0,0,1,0,0,0,0,0,0,0,"Helcular's Remains - On Respawn - Cast 'Helcular's Spawn'"); + +UPDATE `creature_text` SET `Emote`=15 WHERE `CreatureID`=2433 AND `GroupID`=0; +UPDATE `creature_text` SET `Emote`=0 WHERE `CreatureID`=2433 AND `GroupID`=1; +DELETE FROM `creature_text` WHERE `CreatureID`=2433 AND `GroupID`=0 AND `ID`=3; +DELETE FROM `creature_text` WHERE `CreatureID`=2433 AND `GroupID`=1 AND `ID`=1; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(2433,0,3,"I returned from the grave to take my revenge!",14,0,100,15,0,0,599,0,"Helcular's Remains"), +(2433,1,1,"Die in the name of the Dark Lady, $n.",14,0,100,0,0,0,600,0,"Helcular's Remains"); From 03219557264f9febfb0f4c758e3972dd1e60f8e6 Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 1 Mar 2018 20:38:07 -0300 Subject: [PATCH 17/38] Core/Auras: added sanity checks for area auras having a different owner unit than caster Closes #21517 --- src/server/game/Spells/Auras/SpellAuras.cpp | 17 ++++++++++++++++- src/server/game/Spells/SpellMgr.cpp | 7 +++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 077d51eef90..d68ff6aeba4 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -976,8 +976,20 @@ bool Aura::CanBeSaved() const // Check if aura is single target, not only spell info if (GetCasterGUID() != GetOwner()->GetGUID()) - if (GetSpellInfo()->IsSingleTarget() || IsSingleTarget()) + { + // owner == caster for area auras, check for possible bad data in DB + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + { + if (!GetSpellInfo()->Effects[i].IsEffect()) + continue; + + if (GetSpellInfo()->Effects[i].IsTargetingArea() || GetSpellInfo()->Effects[i].IsAreaAuraEffect()) + return false; + } + + if (IsSingleTarget() || GetSpellInfo()->IsSingleTarget()) return false; + } // Can't be saved - aura handler relies on calculated amount and changes it if (HasEffectType(SPELL_AURA_CONVERT_RUNE)) @@ -2325,6 +2337,9 @@ void UnitAura::FillTargetMap(std::unordered_map& targets, Unit* ca units.push_back(GetUnitOwner()); else { + ASSERT(caster, "Area aura (Id: %u) has nullptr caster (%s)", m_spellInfo->Id, GetCasterGUID().ToString().c_str()); + ASSERT(GetCasterGUID() == GetUnitOwner()->GetGUID(), "Area aura (Id: %u) has owner (%s) different to caster (%s)", m_spellInfo->Id, GetUnitOwner()->GetGUID().ToString().c_str(), GetCasterGUID().ToString().c_str()); + // skip area update if owner is not in world! if (!GetUnitOwner()->IsInWorld()) continue; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 2c474523b3f..ede5d0bea7f 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -4297,6 +4297,13 @@ void SpellMgr::LoadSpellInfoCorrections() if (spellInfo->IsPassive() && GetTalentSpellCost(i)) if (spellInfo->Effects[j].TargetA.GetTarget() == TARGET_UNIT_PET) spellInfo->Effects[j].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_CASTER); + + // Area auras may not target area (they're self cast) + if (spellInfo->Effects[j].IsAreaAuraEffect() && spellInfo->Effects[j].IsTargetingArea()) + { + spellInfo->Effects[j].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_CASTER); + spellInfo->Effects[j].TargetB = SpellImplicitTargetInfo(0); + } } // disable proc for magnet auras, they're handled differently From 62c114d4021066d37b0065c2768f258bbb1d6f1e Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 1 Mar 2018 23:18:49 -0300 Subject: [PATCH 18/38] Core/Auras: fixed SPELL_AURA_MOD_HIT_CHANCE honoring stack rules in all cases Updates #21367 --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index fc4f8f0ff2f..f911ca25201 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3904,6 +3904,7 @@ void AuraEffect::HandleModHitChance(AuraApplication const* aurApp, uint8 mode, b Unit* target = aurApp->GetTarget(); + // handle stack rules if (target->GetTypeId() == TYPEID_PLAYER) { target->ToPlayer()->UpdateMeleeHitChances(); @@ -3911,8 +3912,9 @@ void AuraEffect::HandleModHitChance(AuraApplication const* aurApp, uint8 mode, b } else { - target->m_modMeleeHitChance += (apply) ? GetAmount() : (-GetAmount()); - target->m_modRangedHitChance += (apply) ? GetAmount() : (-GetAmount()); + float value = target->GetTotalAuraModifier(SPELL_AURA_MOD_HIT_CHANCE); + target->m_modMeleeHitChance = value; + target->m_modRangedHitChance = value; } } From b795e71e6b70ce45acb91a348e71b78aa092798c Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 1 Mar 2018 23:21:12 -0300 Subject: [PATCH 19/38] DB/Spell: fix Hit debuff stack rule By Despondencyy Closes #21367 --- sql/updates/world/3.3.5/2018_03_01_00_world_335.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_03_01_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_03_01_00_world_335.sql b/sql/updates/world/3.3.5/2018_03_01_00_world_335.sql new file mode 100644 index 00000000000..b2e791b532b --- /dev/null +++ b/sql/updates/world/3.3.5/2018_03_01_00_world_335.sql @@ -0,0 +1,2 @@ +-- Hit debuff stacking (Insect Swarm & Scorpid Sting) +UPDATE `spell_group_stack_rules` SET `stack_rule`= 3 WHERE `group_id`= 1060; From 24413cd30f00a45e66f0bac9fd65c16308f7f2dd Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 1 Mar 2018 23:27:45 -0300 Subject: [PATCH 20/38] Core/Auras: travis fix --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index f911ca25201..6b75f2eeb1f 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3897,7 +3897,7 @@ void AuraEffect::HandleAuraModWeaponCritPercent(AuraApplication const* aurApp, u target->HandleBaseModValue(RANGED_CRIT_PERCENTAGE, FLAT_MOD, float(GetAmount()), apply); } -void AuraEffect::HandleModHitChance(AuraApplication const* aurApp, uint8 mode, bool apply) const +void AuraEffect::HandleModHitChance(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const { if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT))) return; From 2697bdf2b2cdb636c4d9cf9124b61eb470d07a21 Mon Sep 17 00:00:00 2001 From: ariel- Date: Fri, 2 Mar 2018 01:28:51 -0300 Subject: [PATCH 21/38] Core/Misc: fix bad dbc data for lock 'Locked ball and chain' Closes #12260 --- src/server/game/Spells/SpellMgr.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index ede5d0bea7f..ea11fd37a33 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -4346,6 +4346,9 @@ void SpellMgr::LoadSpellInfoCorrections() if (SummonPropertiesEntry* properties = const_cast(sSummonPropertiesStore.LookupEntry(628))) // Hungry Plaguehound properties->Category = SUMMON_CATEGORY_PET; + if (LockEntry* entry = const_cast(sLockStore.LookupEntry(36))) // 3366 Opening, allows to open without proper key + entry->Type[2] = LOCK_KEY_NONE; + TC_LOG_INFO("server.loading", ">> Loaded SpellInfo corrections in %u ms", GetMSTimeDiffToNow(oldMSTime)); } From 23b2d7bcea8fae78e139547efbfe75f4781aa78c Mon Sep 17 00:00:00 2001 From: ariel- Date: Fri, 2 Mar 2018 02:57:23 -0300 Subject: [PATCH 22/38] Core/Spells: explicitly disable non proccing auras when generating default procs Closes #21529 --- src/server/game/Spells/SpellMgr.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index ea11fd37a33..81da7b3e566 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1818,6 +1818,7 @@ void SpellMgr::LoadSpellProcs() bool addTriggerFlag = false; uint32 procSpellTypeMask = PROC_SPELL_TYPE_NONE; + uint32 nonProcMask = 0; for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { if (!spellInfo->Effects[i].IsEffect()) @@ -1828,7 +1829,11 @@ void SpellMgr::LoadSpellProcs() continue; if (!isTriggerAura[auraName]) + { + // explicitly disable non proccing auras to avoid losing charges on self proc + nonProcMask |= 1 << i; continue; + } procSpellTypeMask |= spellTypeMask[auraName]; if (isAlwaysTriggeredAura[auraName]) @@ -1848,7 +1853,6 @@ void SpellMgr::LoadSpellProcs() break; } } - break; } if (!procSpellTypeMask) @@ -1911,6 +1915,8 @@ void SpellMgr::LoadSpellProcs() procEntry.AttributesMask |= PROC_ATTR_REQ_EXP_OR_HONOR; if (addTriggerFlag) procEntry.AttributesMask |= PROC_ATTR_TRIGGERED_CAN_PROC; + if (nonProcMask) + procEntry.AttributesMask |= nonProcMask * PROC_ATTR_DISABLE_EFF_0; procEntry.ProcsPerMinute = 0; procEntry.Chance = spellInfo->ProcChance; From d7ad614f52d26a7960a1a1d7919568ae54d330ce Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Sat, 3 Mar 2018 18:30:08 +0100 Subject: [PATCH 23/38] DB/Conditions: Mountaineer Pebblebitty Closes #21539 --- sql/updates/world/3.3.5/2018_03_03_00_world_335.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_03_03_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_03_03_00_world_335.sql b/sql/updates/world/3.3.5/2018_03_03_00_world_335.sql new file mode 100644 index 00000000000..de1367d5105 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_03_03_00_world_335.sql @@ -0,0 +1,2 @@ +-- Mountaineer Pebblebitty +UPDATE `conditions` SET `ConditionTypeOrReference`=14, `Comment`="Show gossip menu option only if quest 'The Horn of the Beast' is not taken" WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=1201; From f79db1650bfeb25d0c26cb9a15c7ed37980de59a Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Sat, 3 Mar 2018 18:30:53 +0100 Subject: [PATCH 24/38] DB/Conditions: Sha'ni Proudtusk's Remains Closes #21540 --- sql/updates/world/3.3.5/2018_03_03_01_world_335.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_03_03_01_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_03_03_01_world_335.sql b/sql/updates/world/3.3.5/2018_03_03_01_world_335.sql new file mode 100644 index 00000000000..5f61dd154a2 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_03_03_01_world_335.sql @@ -0,0 +1,4 @@ +-- Sha'ni Proudtusk's Remains +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=160445; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22,1,160445,1,0,29,1,9136,200,0,1,0,0,"","SAI triggers only if Sha'ni Proudtusk is not already spawned"); From 07fc048e88687ceb3afa7fa418d2de9f027edec7 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Sat, 3 Mar 2018 18:31:36 +0100 Subject: [PATCH 25/38] DB/Gossip: Spark Nilminer Closes #21541 --- sql/updates/world/3.3.5/2018_03_03_02_world_335.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_03_03_02_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_03_03_02_world_335.sql b/sql/updates/world/3.3.5/2018_03_03_02_world_335.sql new file mode 100644 index 00000000000..0662195eecc --- /dev/null +++ b/sql/updates/world/3.3.5/2018_03_03_02_world_335.sql @@ -0,0 +1,2 @@ +-- Fix gossip option for Spark Nilminer +UPDATE `gossip_menu_option` SET `ActionMenuID`=2721 WHERE `MenuID`=2422; From df5c91bc7dc966c3a49f6d670268a7092e95e373 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Sat, 3 Mar 2018 18:32:13 +0100 Subject: [PATCH 26/38] DB/Gossip: Jes'rimon Closes #21542 --- sql/updates/world/3.3.5/2018_03_03_03_world_335.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_03_03_03_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_03_03_03_world_335.sql b/sql/updates/world/3.3.5/2018_03_03_03_world_335.sql new file mode 100644 index 00000000000..f429092b306 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_03_03_03_world_335.sql @@ -0,0 +1,12 @@ +-- Jes'rimon - add Gossip Option +DELETE FROM `gossip_menu` WHERE `MenuID`=2190; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(2190,2823,0); + +DELETE FROM `gossip_menu_option` WHERE `MenuID`=2189; +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(2189,0,0,"Where is Un'Goro Crater?",5184,1,1,2190,0,0,0,"",0,0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=2189; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15,2189,0,0,0,9,0,4300,0,0,0,0,0,"","Show gossip option if quest 'Bone-Bladed Weapons' is taken"); From 55bf0e68f4eaa0881182df9edd74710dfd73eaf9 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Sat, 3 Mar 2018 18:32:50 +0100 Subject: [PATCH 27/38] DB/Text: Blastmaster Emi Shortfuse Closes #21543 --- sql/updates/world/3.3.5/2018_03_03_04_world_335.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_03_03_04_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_03_03_04_world_335.sql b/sql/updates/world/3.3.5/2018_03_03_04_world_335.sql new file mode 100644 index 00000000000..961b677cdac --- /dev/null +++ b/sql/updates/world/3.3.5/2018_03_03_04_world_335.sql @@ -0,0 +1,3 @@ +-- Blastmaster Emi Shortfuse +UPDATE `creature_text` SET `Text`="FIRE IN THE HOLE!", `Language`=0, `BroadcastTextId`=4137 WHERE `CreatureID`=7998 AND `GroupID`=11; +UPDATE `creature_text` SET `BroadcastTextId`=4207 WHERE `CreatureID`=7998 AND `GroupID`=13; From 6a7c3a15828896ee364f6ae8315760cdc4f2ce64 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Sat, 3 Mar 2018 18:33:20 +0100 Subject: [PATCH 28/38] DB/Gossip: Laris Geardawdle Closes #21544 --- .../world/3.3.5/2018_03_03_05_world_335.sql | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_03_03_05_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_03_03_05_world_335.sql b/sql/updates/world/3.3.5/2018_03_03_05_world_335.sql new file mode 100644 index 00000000000..20c443ba3ad --- /dev/null +++ b/sql/updates/world/3.3.5/2018_03_03_05_world_335.sql @@ -0,0 +1,29 @@ +-- Laris Geardawdle - fix Gossip Texts +DELETE FROM `gossip_menu` WHERE `MenuID`=2405 AND `TextID` IN (3099,3098,3097); +DELETE FROM `gossip_menu` WHERE `MenuID` IN (2406,2407,2408); +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(2405,3097,0), +(2405,3099,0), +(2405,3098,0), +(2406,3100,0), +(2407,3101,0), +(2408,3102,0); + +DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (2406,2407,2405); +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(2405,0,0,"Is there a difference between ooze and slime?",5450,1,1,2406,0,0,0,"",0,0), +(2406,0,0,"What do you mean by \"pure?\"",5452,1,1,2407,0,0,0,"",0,0), +(2407,0,0,"Are there any areas you can think of that would be so untouched?",5454,1,1,2408,0,0,0,"",0,0); + +DELETE FROM `npc_text` WHERE `ID` IN (3097,3099); +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `Probability0`, `em0_1`) VALUES +(3097,"Incredible! Amazing! I don't even know what this means!","",5447,0,1,0), +(3099,"There must be someplace on Azeroth that we can find oozes uncorrupted by the Scourge or anything else. But where?!","",5449,0,1,0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=2405; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14,2405,3097,0,0,8,0,4512,0,0,0,0,0,"","Show gossip text 3099 if quest 'A Little Slime Goes a Long Way (Part 1)' is rewarded"), +(14,2405,3097,0,0,9,0,4513,0,0,1,0,0,"","Show gossip text 3099 if quest 'A Little Slime Goes a Long Way (Part 2)' is not taken"), +(14,2405,3099,0,0,9,0,4513,0,0,0,0,0,"","Show gossip text 3099 if quest 'A Little Slime Goes a Long Way (Part 2)' is taken"), +(14,2405,3098,0,0,8,0,4513,0,0,0,0,0,"","Show gossip text 3098 if quest 'A Little Slime Goes a Long Way (Part 2)' is rewarded"), +(15,2405,0,0,0,9,0,4513,0,0,0,0,0,"","Show gossip option if quest 'A Little Slime Goes a Long Way (Part 2)' is taken"); From 79a536cc5009d7bf7df081ee9f88636d344cd34f Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Sat, 3 Mar 2018 18:34:04 +0100 Subject: [PATCH 29/38] DB/Quest: The Ancient Statuette Closes #21545 --- .../world/3.3.5/2018_03_03_06_world_335.sql | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_03_03_06_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_03_03_06_world_335.sql b/sql/updates/world/3.3.5/2018_03_03_06_world_335.sql new file mode 100644 index 00000000000..a955ad0dbab --- /dev/null +++ b/sql/updates/world/3.3.5/2018_03_03_06_world_335.sql @@ -0,0 +1,27 @@ +-- Talen +DELETE FROM `creature_text` WHERE `CreatureID`=3846; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(3846,0,0,"This statuette must hold a hidden compartment....",12,7,100,1,0,0,0,0,"Talen"), +(3846,1,0,"%s searches the ancient statuette.",16,0,100,0,0,0,0,0,"Talen"), +(3846,2,0,"It's locked! NO!!",12,7,100,15,0,0,0,0,"Talen"), +(3846,3,0,"$n, I am in need of your help once again.",12,7,100,1,0,0,1355,0,"Talen"); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=3846 AND `source_type`=0 AND `id`=1; +DELETE FROM `smart_scripts` WHERE `entryorguid`=384600 AND `source_type`=9; +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 +(3846,0,1,0,20,0,100,0,1007,0,0,0,80,384600,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Quest 'The Ancient Statuette' Finished - Run Script"), +(384600,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Remove Npc Flag Questgiver"), +(384600,9,1,0,0,0,100,0,0,0,0,0,91,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Remove Flag Standstate 'Sit Down'"), +(384600,9,2,0,0,0,100,0,2000,2000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,6.16678,"Talen - On Script - Set Orientation"), +(384600,9,3,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Say Line 0"), +(384600,9,4,0,0,0,100,0,4000,4000,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Set Flag Standstate 'Kneel'"), +(384600,9,5,0,0,0,100,0,1000,1000,0,0,50,18603,12,0,0,0,0,8,0,0,0,3471.69,846.893,5.39909,4.67058,"Talen - On Script - Summon Gameobject 'Ancient Statuette'"), +(384600,9,6,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Say Line 1"), +(384600,9,7,0,0,0,100,0,8000,8000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Say Line 2"), +(384600,9,8,0,0,0,100,0,4000,4000,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Remove Flag Standstate 'Kneel'"), +(384600,9,9,0,0,0,100,0,2000,2000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Set Orientation"), +(384600,9,10,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Say Line 3"), +(384600,9,11,0,0,0,100,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Add Npc Flag Questgiver"), +(384600,9,12,0,0,0,100,0,20000,20000,0,0,90,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Set Flag Standstate Sit Down"); + +UPDATE `creature_template` SET `npcflag`=2, `gossip_menu_id`=0 WHERE `entry`=3846; -- Fix NPC flag and remove gossip From a70c2a516fefb1073f66af691df5c441cb157968 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Sat, 3 Mar 2018 18:34:39 +0100 Subject: [PATCH 30/38] DB/SAI: Burning Steppes Closes #21546 --- .../world/3.3.5/2018_03_03_07_world_335.sql | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_03_03_07_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_03_03_07_world_335.sql b/sql/updates/world/3.3.5/2018_03_03_07_world_335.sql new file mode 100644 index 00000000000..fc91aef0048 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_03_03_07_world_335.sql @@ -0,0 +1,144 @@ +-- Ember Worg +UPDATE `smart_scripts` SET `event_param1`=6000, `event_param2`=13000, `event_param3`=17000, `event_param4`=24000 WHERE `entryorguid`=9690 AND `source_type`=0 AND `id`=0; + +-- Ember Worg +UPDATE `smart_scripts` SET `event_param1`=8000, `event_param2`=12000, `event_param3`=18000, `event_param4`=22000 WHERE `entryorguid`=9694 AND `source_type`=0 AND `id`=0; + +-- Ember Worg +UPDATE `smart_scripts` SET `event_param1`=7000, `event_param2`=11000, `event_param3`=16000, `event_param4`=20000 WHERE `entryorguid`=9697 AND `source_type`=0 AND `id`=0; + +-- Deathmaw +UPDATE `smart_scripts` SET `event_param1`=8000, `event_param2`=11000, `event_param3`=13000, `event_param4`=16000 WHERE `entryorguid`=10077 AND `source_type`=0 AND `id`=0; + +-- Flamekin Sprite +DELETE FROM `smart_scripts` WHERE `entryorguid`=9777 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 +(9777,0,0,0,25,0,100,0,0,0,0,0,11,8876,0,0,0,0,0,1,0,0,0,0,0,0,0,"Flamekin Sprite - On Reset - Cast 'Thrash'"); + +-- Black Wyrmkin +UPDATE `smart_scripts` SET `event_param3`=15000, `event_param4`=19000, `action_param2`=0 WHERE `entryorguid`=7041 AND `source_type`=0 AND `id`=1; + +-- Firegut Ogres +UPDATE `smart_scripts` SET `event_chance`=15 WHERE `entryorguid` IN (7033,7034,7035,9604) AND `source_type`=0 AND `id`=0; + +-- Black Dragonspawn +UPDATE `smart_scripts` SET `event_param1`=8000, `event_param2`=12000, `event_param3`=18000, `event_param4`=24000 WHERE `entryorguid`=7040 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=5000, `event_param2`=7000, `event_param3`=9000, `event_param4`=11000 WHERE `entryorguid`=7040 AND `source_type`=0 AND `id`=1; + +-- Venomtip Scorpid +DELETE FROM `smart_scripts` WHERE `entryorguid`=9691 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 +(9691,0,0,0,25,0,100,0,0,0,0,0,11,3616,0,0,0,0,0,1,0,0,0,0,0,0,0,"Venomtip Scorpid - On Reset - Cast 'Poison Proc'"); + +-- Deathlash Scorpid +UPDATE `smart_scripts` SET `event_param1`=8000, `event_param2`=12000, `event_param3`=12000, `event_param4`=18000 WHERE `entryorguid`=9695 AND `source_type`=0 AND `id`=0; + +-- War Reaver +DELETE FROM `smart_scripts` WHERE `entryorguid`=7039 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 +(7039,0,0,0,25,0,100,0,0,0,0,0,11,8876,0,0,0,0,0,1,0,0,0,0,0,0,0,"War Reaver - On Reset - Cast 'Thrash'"), +(7039,0,1,0,0,0,100,0,7000,11000,17000,21000,11,10966,0,0,0,0,0,2,0,0,0,0,0,0,0,"War Reaver - In Combat - Cast 'Uppercut'"); + +-- Malfunctioning Reaver +DELETE FROM `smart_scripts` WHERE `entryorguid`=8981 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 +(8981,0,0,0,25,0,100,0,0,0,0,0,11,8876,0,0,0,0,0,1,0,0,0,0,0,0,0,"Malfunctioning Reaver - On Reset - Cast 'Thrash'"), +(8981,0,1,0,0,0,100,0,7000,11000,17000,21000,11,10966,0,0,0,0,0,2,0,0,0,0,0,0,0,"Malfunctioning Reaver - In Combat - Cast 'Uppercut'"); + +-- Thaurissan Firewalker +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=7037 AND `source_type`=0 AND `id`=1; + +-- Thaurissan Spy +DELETE FROM `smart_scripts` WHERE `entryorguid`=7036 AND `source_type`=0 AND `id`=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 +(7036,0,0,0,25,0,100,0,0,0,0,0,11,3616,0,0,0,0,0,1,0,0,0,0,0,0,0,"Thaurissan Spy - On Reset - Cast 'Poison Proc'"); + +-- Thaurissan Agent +UPDATE `smart_scripts` SET `event_param3`=16000, `event_param4`=20000 WHERE `entryorguid`=7038 AND `source_type`=0 AND `id`=1; + +-- Thauris Balgarr +DELETE FROM `smart_scripts` WHERE `entryorguid`=8978 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 +(8978,0,0,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Thauris Balgarr - In Combat CMC - Cast 'Shoot'"), +(8978,0,1,0,9,0,100,0,0,20,11000,15000,11,6533,0,0,0,0,0,2,0,0,0,0,0,0,0,"Thauris Balgarr - Within 0-20 Range - Cast 'Net'"), +(8978,0,2,0,0,0,100,0,1000,3000,19000,23000,11,11802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Thauris Balgarr - In Combat - Cast 'Dark Iron Land Mine'"); + +-- Dark Iron Land Mine +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=8035 AND `source_type`=0; + +-- Scalding Drake +DELETE FROM `smart_scripts` WHERE `entryorguid`=7045 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 +(7045,0,0,0,9,0,100,0,0,5,8000,16000,11,9573,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scalding Drake - Within 0-5 Range - Cast 'Flame Breath'"); + +-- Blackrock Sorcerer +UPDATE `smart_scripts` SET `event_param1`=8000, `event_param2`=12000, `event_param3`=14000, `event_param4`=19000, `action_param2`=0 WHERE `entryorguid`=7026 AND `source_type`=0 AND `id`=1; + +-- Blackrock Warlock +UPDATE `smart_scripts` SET `action_param2`=32 WHERE `entryorguid`=7028 AND `source_type`=0 AND `id` IN (1,2); +UPDATE `smart_scripts` SET `event_param3`=19000, `event_param4`=24000 WHERE `entryorguid`=7028 AND `source_type`=0 AND `id`=1; + +-- Gor'tesh +DELETE FROM `smart_scripts` WHERE `entryorguid`=9176 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 +(9176,0,0,0,25,0,100,0,0,0,0,0,11,8876,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gor'tesh - On Reset - Cast 'Thrash'"), +(9176,0,1,0,0,0,100,0,5000,7000,12000,15000,11,12734,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gor'tesh - In Combat - Cast 'Ground Smash'"), +(9176,0,2,0,0,0,100,0,9000,11000,14000,18000,11,10101,0,0,0,0,0,2,0,0,0,0,0,0,0,"Gor'tesh - In Combat - Cast 'Knock Away'"); + +-- Flamescale Dragonspawn +UPDATE `smart_scripts` SET `event_param1`=8000, `event_param2`=12000, `event_param3`=13000, `event_param4`=17000 WHERE `entryorguid`=7042 AND `source_type`=0 AND `id`=1; + +-- Flamescale Wyrmkin +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=7043 AND `source_type`=0 AND `id`=1; + +-- Searscale Drake +DELETE FROM `smart_scripts` WHERE `entryorguid`=7046 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 +(7046,0,0,0,9,0,100,0,0,5,8000,16000,11,8873,0,0,0,0,0,2,0,0,0,0,0,0,0,"Searscale Drake - Within 0-5 Range - Cast 'Flame Breath'"); + +-- Flamescale Broodling +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=7049 AND `source_type`=0 AND `id`=1; + +-- Firetail Scorpid +UPDATE `smart_scripts` SET `event_param1`=6000, `event_param2`=12000, `event_param3`=12000, `event_param4`=20000, `action_param2`=0 WHERE `entryorguid`=9698 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=12000, `event_param2`=16000, `event_param3`=14000, `event_param4`=18000, `action_param2`=32 WHERE `entryorguid`=9698 AND `source_type`=0 AND `id`=1; + +-- Terrorspark +DELETE FROM `smart_scripts` WHERE `entryorguid`=10078 AND `source_type`=0 AND `id` IN (1,2); +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 +(10078,0,1,0,0,0,100,0,3000,3000,3000,3000,11,11968,0,0,0,0,0,1,0,0,0,0,0,0,0,"Terrorspark - In Combat - Cast 'Fire Shield'"), +(10078,0,2,3,0,0,100,0,11000,15000,33000,37000,11,15710,0,0,0,0,0,1,0,0,0,0,0,0,0,"Terrorspark - In Combat - Cast 'Summon Flamekin Torcher'"); + +-- Blackrock Battlemaster +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=7029; +DELETE FROM `smart_scripts` WHERE `entryorguid`=7029 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 +(7029,0,0,0,4,0,100,0,0,0,0,0,11,674,0,0,0,0,0,1,0,0,0,0,0,0,0,"Blackrock Battlemaster - On Aggro - Cast 'Dual Wield'"); + +-- Volchan +DELETE FROM `smart_scripts` WHERE `entryorguid`=10119 AND `source_type`=0 AND `id` IN (0,2); +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 +(10119,0,0,0,0,0,100,0,3000,3000,3000,3000,11,13376,0,0,0,0,0,1,0,0,0,0,0,0,0,"Volchan - In Combat - Cast 'Fire Shield'"), +(10119,0,2,0,0,0,100,0,11000,13000,9000,24000,11,12470,0,0,0,0,0,1,0,0,0,0,0,0,0,"Volchan - In Combat - Cast 'Fire Nova'"); + +-- Hematos +DELETE FROM `smart_scripts` WHERE `entryorguid`=8976 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 +(8976,0,0,0,9,0,100,0,0,5,8000,16000,11,9573,0,0,0,0,0,2,0,0,0,0,0,0,0,"Hematos - Within 0-5 Range - Cast 'Flame Breath'"); + +-- Scarshield Sentry +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=9044; +DELETE FROM `smart_scripts` WHERE `entryorguid`=9044 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 +(9044,0,0,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scarshield Sentry - Combat CMC - Cast 'Shoot'"), +(9044,0,1,0,0,0,100,0,7000,11000,11000,15000,11,14443,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scarshield Sentry - In Combat - Cast 'Multi-Shot'"), +(9044,0,2,0,0,0,100,0,7000,12000,10000,16000,11,14897,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scarshield Sentry - In Combat - Cast 'Slowing Poison'"); + +-- Scarshield Grunt +DELETE FROM `smart_scripts` WHERE `entryorguid`=9043 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 +(9043,0,0,0,0,0,100,0,3000,5000,3000,5000,11,11976,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scarshield Grunt - In Combat - Cast 'Strike'"); + +-- Fix bytes2 for some creatures +UPDATE `creature_addon` SET `bytes2`=2 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id` IN (7038,8978)); +UPDATE `creature_template_addon` SET `bytes2`=2 WHERE `entry`=9044; From a2b6006d01fdf91ed294330f35f4d299e94adcae Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Sat, 3 Mar 2018 18:35:13 +0100 Subject: [PATCH 31/38] DB/Gossip: Quest Greetings Closes #21547 --- sql/updates/world/3.3.5/2018_03_03_08_world_335.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_03_03_08_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_03_03_08_world_335.sql b/sql/updates/world/3.3.5/2018_03_03_08_world_335.sql new file mode 100644 index 00000000000..2afedd72859 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_03_03_08_world_335.sql @@ -0,0 +1,12 @@ +DELETE FROM `quest_greeting` WHERE `ID` IN (5204,1776,3441,4500,1950,7777,9536,6986,4485,7825); +INSERT INTO `quest_greeting` (`ID`, `Type`, `GreetEmoteType`, `GreetEmoteDelay`, `Greeting`, `VerifiedBuild`) VALUES +(5204,0,0,0,"If we are to make our place in this world, then we will do so through study, and through the will to ignore our fading human instincts.",0), -- Apothecary Zinge +(1776,0,0,0,"We spent so much of our lives in fight, memories of peaceful times grow evermore distant.",0), -- Magtoor +(3441,0,0,0,"To hunt a beast, one must know that beast. One must learn and respect its ways.$B$BTo do otherwise is not to hunt. To do otherwise is merely to kill.",0), -- Melor Stonehoof +(4500,0,0,0,"Overlord Mok'Morokk boss. You do what I say.",0), -- Overlord Mok'Morokk +(7777,0,0,0,"",0), -- Rok Orhan +(9536,0,0,0,"The quest for wealth is the only goal for a respectable goblin.$B$BWell, maybe wealth... and a big, loud death!",0), -- Maxwort Uberglint +(1950,0,0,0,"My brother and I are on a scouting mission, but we are holed up in this farmhouse. The Deathstalkers need your help!",0), -- Rane Yorick +(7825,0,0,0,"",0), -- Oran Snakewrithe +(6986,0,1,0,"My name is Dran Droffers, and this over here is my dummy son Malton. If you need salvage, or are looking to sell salvage, then we're who you need to be talking to!",0), -- Dran Droffers +(4485,0,1,0,"The days grow long, and still no end to the conflicts of these lands can be seen. It takes no spell caster to know that much. Take up a blade while you can, $c. War can come to our doors at any time, and if I'm not mistaken, you look to be one who revels in it.",0); -- Belgrom Rockmaul From ba65f58687bd7ceef1cc301f6df68457a92d688c Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Sun, 4 Mar 2018 13:03:57 +0100 Subject: [PATCH 32/38] DB/Quest: Keeping Pace (Zamek's Distraction) Closes #2191 --- .../world/3.3.5/2018_03_04_00_world_335.sql | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_03_04_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_03_04_00_world_335.sql b/sql/updates/world/3.3.5/2018_03_04_00_world_335.sql new file mode 100644 index 00000000000..56e77b5d1de --- /dev/null +++ b/sql/updates/world/3.3.5/2018_03_04_00_world_335.sql @@ -0,0 +1,74 @@ +-- Fix availability for quest "Zamek's Distraction" +UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `ID`=1191; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceEntry`=1191; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19,0,1191,0,0,28,0,1190,0,0,0,0,0,'',"Show quest 'Zamek's Distraction' only if quest 'Keeping Pace' is taken but not rewarded"), +(19,0,1191,0,1,8,0,1190,0,0,0,0,0,'',"Show quest 'Zamek's Distraction' only if quest 'Keeping Pace' is rewarded"), +(19,0,1191,0,1,14,0,1194,0,0,0,0,0,'',"Show quest 'Zamek's Distraction' only if quest 'Rizzle's Schematics' is not taken and not rewarded"); + +-- Add gossip text for gameobjects "Rizzle's Guarded Plans" & "Rizzle's Unguarded Plans" +UPDATE `gossip_menu` SET `TextID`=7182 WHERE `MenuID`=6029; +UPDATE `gossip_menu` SET `TextID`=7181 WHERE `MenuID`=6030; + +-- Texts +DELETE FROM `creature_text` WHERE `CreatureID` IN (4709,4720); +INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(4709,0,0,'Hehehe! Things go boom!',12,0,100,11,0,0,1540,0,'Zamek'), +(4720,0,0,'What was that!',14,0,100,5,0,0,1541,0,'Rizzle Brassbolts'), +(4720,1,0,"Bloody... Must have been the goblins... Let's see how bad the damage is.",12,0,100,5,0,0,1542,0,'Rizzle Brassbolts'), +(4720,2,0,"Guess there's nothing more to be done. Blast!",12,0,100,6,0,0,1543,0,'Rizzle Brassbolts'); + +-- Waypoints +DELETE FROM `waypoints` WHERE `entry` IN (4709,4720); +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(4709, 1,-6237.13,-3911.58,-60.5103,'Zamek'), +(4709, 2,-6257.43,-3879.56,-58.8595,'Zamek'), +(4709, 3,-6267.61,-3850.91,-58.7503,'Zamek'), +(4709, 4,-6266.24,-3846.35,-58.7503,'Zamek'), +(4709, 5,-6267.61,-3850.91,-58.7503,'Zamek'), +(4709, 6,-6257.43,-3879.56,-58.8595,'Zamek'), +(4709, 7,-6237.13,-3911.58,-60.5103,'Zamek'), +(4709, 8,-6226.13,-3944.94,-58.6251,'Zamek'), +(4720, 1,-6243.39,-3845.91,-58.7498,'Rizzle Brassbolts'), +(4720, 2,-6250.63,-3847.35,-58.7491,'Rizzle Brassbolts'), +(4720, 3,-6255.06,-3853.64,-58.7491,'Rizzle Brassbolts'), +(4720, 4,-6262.2, -3851.84,-58.7491,'Rizzle Brassbolts'), +(4720, 5,-6266.24,-3846.35,-58.7503,'Rizzle Brassbolts'), +(4720, 6,-6262.2, -3851.84,-58.7491,'Rizzle Brassbolts'), +(4720, 7,-6255.06,-3853.64,-58.7491,'Rizzle Brassbolts'), +(4720, 8,-6250.63,-3847.35,-58.7491,'Rizzle Brassbolts'), +(4720, 9,-6243.39,-3845.91,-58.7498,'Rizzle Brassbolts'), +(4720,10,-6236.99,-3831.23,-58.1364,'Rizzle Brassbolts'); + +-- Zamek +DELETE FROM `smart_scripts` WHERE `entryorguid`=4709 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=470900 AND `source_type`=9; +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 +(4709,0,0,0,20,0,100,0,1191,0,0,0,53,1,4709,0,0,0,0,1,0,0,0,0,0,0,0,"Zamek - On Quest 'Zamek's Distraction' Finished - Start Waypoint"), +(4709,0,1,0,20,0,100,0,1191,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Zamek - On Quest 'Zamek's Distraction' Finished - Remove NPC Flag Questgiver"), +(4709,0,2,0,40,0,100,0,4,4709,0,0,80,470900,0,0,0,0,0,1,0,0,0,0,0,0,0,'Zamek - On Waypoint 4 Reached - Run Script'), +(4709,0,3,0,40,0,100,0,8,4709,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Zamek - On Waypoint 8 Reached - Set Orientation'), +(470900,9,0,0,0,0,100,0,0,0,0,0,54,7000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Zamek - On Script - Pause Waypoint'), +(470900,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.943443,'Zamek - On Script - Set Orientation'), +(470900,9,2,0,0,0,100,0,2000,2000,0,0,50,144065,8,0,0,0,0,8,0,0,0,-6265.67,-3845.57,-58.75,0.943443,"Zamek - On Script - Summon Gameobject 'Explosive Charge'"), +(470900,9,3,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Zamek - On Script - Say Line 0'), +(470900,9,4,0,0,0,100,0,7000,7000,0,0,9,0,0,0,0,0,0,20,144065,0,0,0,0,0,0,"Zamek - On Script - Activate Gameobject 'Explosive Charge'"), +(470900,9,5,0,0,0,100,0,1000,1000,0,0,45,1,1,0,0,0,0,19,4720,0,0,0,0,0,0,'Zamek - On Script - Set Data to Rizzle Brassbolts'), +(470900,9,6,0,0,0,100,0,60000,60000,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Zamek - On Script - Add NPC Flag Questgiver'); + +-- Rizzle Brassbolts +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=4720; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4720 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (472000,472001) AND `source_type`=9; +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 +(4720,0,0,0,38,0,100,0,1,1,0,0,80,472000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rizzle Brassbolts - On Data Set - Run Script'), +(4720,0,1,0,40,0,100,0,5,4720,0,0,80,472001,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rizzle Brassbolts - On Waypoint 5 Reached - Run Script'), +(4720,0,2,0,40,0,100,0,10,4720,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rizzle Brassbolts - On Waypoint 10 Reached - Set Orientation'), +(472000,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rizzle Brassbolts - On Script - Say Line 0'), +(472000,9,1,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rizzle Brassbolts - On Script - Say Line 1'), +(472000,9,2,0,0,0,100,0,0,0,0,0,53,0,4720,0,0,0,0,1,0,0,0,0,0,0,0,'Rizzle Brassbolts - On Script - Start Waypoint'), +(472000,9,3,0,0,0,100,0,0,0,0,0,41,0,60,0,0,0,0,14,17087,179888,0,0,0,0,0,"Rizzle Brassbolts - On Script - Despawn Gameobject 'Rizzle's Guarded Plans'"), +(472000,9,4,0,0,0,100,0,0,0,0,0,70,60,0,0,0,0,0,14,13621,20805,0,0,0,0,0,"Rizzle Brassbolts - On Script - Respawn Gameobject 'Rizzle's Unguarded Plans'"), +(472001,9,0,0,0,0,100,0,0,0,0,0,54,25000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rizzle Brassbolts - On Script - Pause Waypoint'), +(472001,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.943443,'Rizzle Brassbolts - On Script - Set Orientation'), +(472001,9,2,0,0,0,100,0,20000,20000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rizzle Brassbolts - On Script - Say Line 2'); From 6a8c0df9a8cb561c4e034db48aa5f03249bc1fb6 Mon Sep 17 00:00:00 2001 From: Warlockbugs Date: Sun, 4 Mar 2018 17:26:08 +0300 Subject: [PATCH 33/38] Core/Crypto: Transitional Cryptography update for OpenSSL 1.1 (#21534) Support for both OpenSSL 1.0 LTS and OpenSSL 1.1 versions. Many Linux distributions are still on 1.0 and will stay on LTS for quite some time. Port of CMaNGOS commit: https://github.com/cmangos/mangos-wotlk/commit/e1b0048f052eda46bb27d20224d0339960816ac2 --- cmake/macros/FindOpenSSL.cmake | 2 +- src/common/Cryptography/ARC4.cpp | 30 +++++++++++------------ src/common/Cryptography/ARC4.h | 10 ++++---- src/common/Cryptography/HmacHash.cpp | 36 +++++++++++++++++++--------- src/common/Cryptography/HmacHash.h | 4 ++-- 5 files changed, 48 insertions(+), 34 deletions(-) diff --git a/cmake/macros/FindOpenSSL.cmake b/cmake/macros/FindOpenSSL.cmake index ca67601427c..d970ef02f65 100644 --- a/cmake/macros/FindOpenSSL.cmake +++ b/cmake/macros/FindOpenSSL.cmake @@ -26,7 +26,7 @@ # http://www.slproweb.com/products/Win32OpenSSL.html set(OPENSSL_EXPECTED_VERSION "1.0") -set(OPENSSL_MAX_VERSION "1.1") +set(OPENSSL_MAX_VERSION "1.2") SET(_OPENSSL_ROOT_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]" diff --git a/src/common/Cryptography/ARC4.cpp b/src/common/Cryptography/ARC4.cpp index cc10dc39c9c..a5e77e92646 100644 --- a/src/common/Cryptography/ARC4.cpp +++ b/src/common/Cryptography/ARC4.cpp @@ -18,34 +18,34 @@ #include "ARC4.h" -ARC4::ARC4(uint32 len) : m_ctx() +ARC4::ARC4(uint32 len) : m_ctx(EVP_CIPHER_CTX_new()) { - EVP_CIPHER_CTX_init(&m_ctx); - EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL); - EVP_CIPHER_CTX_set_key_length(&m_ctx, len); + EVP_CIPHER_CTX_init(m_ctx); + EVP_EncryptInit_ex(m_ctx, EVP_rc4(), nullptr, nullptr, nullptr); + EVP_CIPHER_CTX_set_key_length(m_ctx, len); } -ARC4::ARC4(uint8 *seed, uint32 len) : m_ctx() +ARC4::ARC4(uint8* seed, uint32 len) : m_ctx(EVP_CIPHER_CTX_new()) { - EVP_CIPHER_CTX_init(&m_ctx); - EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL); - EVP_CIPHER_CTX_set_key_length(&m_ctx, len); - EVP_EncryptInit_ex(&m_ctx, NULL, NULL, seed, NULL); + EVP_CIPHER_CTX_init(m_ctx); + EVP_EncryptInit_ex(m_ctx, EVP_rc4(), nullptr, nullptr, nullptr); + EVP_CIPHER_CTX_set_key_length(m_ctx, len); + EVP_EncryptInit_ex(m_ctx, nullptr, nullptr, seed, nullptr); } ARC4::~ARC4() { - EVP_CIPHER_CTX_cleanup(&m_ctx); + EVP_CIPHER_CTX_free(m_ctx); } -void ARC4::Init(uint8 *seed) +void ARC4::Init(uint8* seed) { - EVP_EncryptInit_ex(&m_ctx, NULL, NULL, seed, NULL); + EVP_EncryptInit_ex(m_ctx, nullptr, nullptr, seed, nullptr); } -void ARC4::UpdateData(int len, uint8 *data) +void ARC4::UpdateData(int len, uint8* data) { int outlen = 0; - EVP_EncryptUpdate(&m_ctx, data, &outlen, data, len); - EVP_EncryptFinal_ex(&m_ctx, data, &outlen); + EVP_EncryptUpdate(m_ctx, data, &outlen, data, len); + EVP_EncryptFinal_ex(m_ctx, data, &outlen); } diff --git a/src/common/Cryptography/ARC4.h b/src/common/Cryptography/ARC4.h index 4f7fba1f31d..629be510bbc 100644 --- a/src/common/Cryptography/ARC4.h +++ b/src/common/Cryptography/ARC4.h @@ -19,19 +19,19 @@ #ifndef _AUTH_SARC4_H #define _AUTH_SARC4_H -#include #include "Define.h" +#include class TC_COMMON_API ARC4 { public: ARC4(uint32 len); - ARC4(uint8 *seed, uint32 len); + ARC4(uint8* seed, uint32 len); ~ARC4(); - void Init(uint8 *seed); - void UpdateData(int len, uint8 *data); + void Init(uint8* seed); + void UpdateData(int len, uint8* data); private: - EVP_CIPHER_CTX m_ctx; + EVP_CIPHER_CTX* m_ctx; }; #endif diff --git a/src/common/Cryptography/HmacHash.cpp b/src/common/Cryptography/HmacHash.cpp index f12fb0f26d1..a0ad8356ef9 100644 --- a/src/common/Cryptography/HmacHash.cpp +++ b/src/common/Cryptography/HmacHash.cpp @@ -20,44 +20,58 @@ #include "BigNumber.h" #include "Common.h" -template -HmacHash::HmacHash(uint32 len, uint8 *seed) +#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100000L +HMAC_CTX* HMAC_CTX_new() { - HMAC_CTX_init(&_ctx); - HMAC_Init_ex(&_ctx, seed, len, HashCreator(), NULL); + HMAC_CTX *ctx = new HMAC_CTX(); + HMAC_CTX_init(ctx); + return ctx; +} + +void HMAC_CTX_free(HMAC_CTX* ctx) +{ + HMAC_CTX_cleanup(ctx); + delete ctx; +} +#endif + +template +HmacHash::HmacHash(uint32 len, uint8 const* seed) : _ctx(HMAC_CTX_new()) +{ + HMAC_Init_ex(_ctx, seed, len, HashCreator(), nullptr); memset(_digest, 0, DigestLength); } template HmacHash::~HmacHash() { - HMAC_CTX_cleanup(&_ctx); + HMAC_CTX_free(_ctx); } template -void HmacHash::UpdateData(const std::string &str) +void HmacHash::UpdateData(std::string const& str) { - HMAC_Update(&_ctx, (uint8 const*)str.c_str(), str.length()); + HMAC_Update(_ctx, reinterpret_cast(str.c_str()), str.length()); } template -void HmacHash::UpdateData(const uint8* data, size_t len) +void HmacHash::UpdateData(uint8 const* data, size_t len) { - HMAC_Update(&_ctx, data, len); + HMAC_Update(_ctx, data, len); } template void HmacHash::Finalize() { uint32 length = 0; - HMAC_Final(&_ctx, _digest, &length); + HMAC_Final(_ctx, _digest, &length); ASSERT(length == DigestLength); } template uint8* HmacHash::ComputeHash(BigNumber* bn) { - HMAC_Update(&_ctx, bn->AsByteArray().get(), bn->GetNumBytes()); + HMAC_Update(_ctx, bn->AsByteArray().get(), bn->GetNumBytes()); Finalize(); return _digest; } diff --git a/src/common/Cryptography/HmacHash.h b/src/common/Cryptography/HmacHash.h index bf744e5b91b..a8c2eee6f09 100644 --- a/src/common/Cryptography/HmacHash.h +++ b/src/common/Cryptography/HmacHash.h @@ -34,7 +34,7 @@ template class TC_COMMON_API HmacHash { public: - HmacHash(uint32 len, uint8 *seed); + HmacHash(uint32 len, uint8 const* seed); ~HmacHash(); void UpdateData(std::string const& str); void UpdateData(uint8 const* data, size_t len); @@ -43,7 +43,7 @@ class TC_COMMON_API HmacHash uint8* GetDigest() { return _digest; } uint32 GetLength() const { return DigestLength; } private: - HMAC_CTX _ctx; + HMAC_CTX* _ctx; uint8 _digest[DigestLength]; }; From 47e2f8c06f4e7381e7581967d5ed9c01aa2da86c Mon Sep 17 00:00:00 2001 From: Aokromes Date: Mon, 5 Mar 2018 15:03:50 +0100 Subject: [PATCH 34/38] rename files --- sql/updates/world/3.3.5/2018_02_24_01_world_335.sql | 2 -- sql/updates/world/3.3.5/2018_02_28_00_world_335.sql | 2 -- sql/updates/world/3.3.5/2018_02_28_01_world_335.sql | 2 -- sql/updates/world/3.3.5/2018_03_01_00_world_335.sql | 2 -- sql/updates/world/3.3.5/2018_03_03_00_world_335.sql | 2 -- sql/updates/world/3.3.5/2018_03_03_02_world_335.sql | 2 -- ...018_03_05_00_world_from_335_was_2018_02_24_00_world_335.sql} | 2 ++ ...2018_03_05_01_world_from_335_was_2018_02_24_01_world_335.sql | 2 ++ .../2018_03_05_02_world_from_335_was_2018_02_24_02_world.sql} | 0 .../2018_03_05_03_world_from_335_was_2018_02_24_03_world.sql} | 0 .../2018_03_05_04_world_from_335_was_2018_02_24_04_world.sql} | 0 .../2018_03_05_05_world_from_335_was_2018_02_24_05_world.sql} | 0 ...018_03_05_06_world_from_335_was_2018_02_25_00_world_335.sql} | 2 ++ ...2018_03_05_07_world_from_335_was_2018_02_28_00_world_335.sql | 2 ++ ...2018_03_05_08_world_from_335_was_2018_02_28_01_world_335.sql | 2 ++ ...018_03_05_09_world_from_335_was_2018_02_28_02_world_335.sql} | 2 ++ ...018_03_05_10_world_from_335_was_2018_02_28_03_world_335.sql} | 2 ++ ...018_03_05_11_world_from_335_was_2018_02_28_04_world_335.sql} | 2 ++ ...018_03_05_12_world_from_335_was_2018_02_28_05_world_335.sql} | 2 ++ ...018_03_05_13_world_from_335_was_2018_02_28_06_world_335.sql} | 2 ++ ...2018_03_05_14_world_from_335_was_2018_03_01_00_world_335.sql | 2 ++ ...2018_03_05_15_world_from_335_was_2018_03_03_00_world_335.sql | 2 ++ ...018_03_05_16_world_from_335_was_2018_03_03_01_world_335.sql} | 2 ++ ...2018_03_05_17_world_from_335_was_2018_03_03_02_world_335.sql | 2 ++ ...018_03_05_18_world_from_335_was_2018_03_03_03_world_335.sql} | 2 ++ ...018_03_05_19_world_from_335_was_2018_03_03_04_world_335.sql} | 2 ++ ...018_03_05_20_world_from_335_was_2018_03_03_05_world_335.sql} | 2 ++ ...018_03_05_21_world_from_335_was_2018_03_03_06_world_335.sql} | 2 ++ ...018_03_05_22_world_from_335_was_2018_03_03_07_world_335.sql} | 2 ++ ...018_03_05_23_world_from_335_was_2018_03_03_08_world_335.sql} | 2 ++ ...018_03_05_24_world_from_335_was_2018_03_04_00_world_335.sql} | 2 ++ 31 files changed, 42 insertions(+), 12 deletions(-) delete mode 100644 sql/updates/world/3.3.5/2018_02_24_01_world_335.sql delete mode 100644 sql/updates/world/3.3.5/2018_02_28_00_world_335.sql delete mode 100644 sql/updates/world/3.3.5/2018_02_28_01_world_335.sql delete mode 100644 sql/updates/world/3.3.5/2018_03_01_00_world_335.sql delete mode 100644 sql/updates/world/3.3.5/2018_03_03_00_world_335.sql delete mode 100644 sql/updates/world/3.3.5/2018_03_03_02_world_335.sql rename sql/updates/world/{3.3.5/2018_02_24_00_world_335.sql => 4.3.4/2018_03_05_00_world_from_335_was_2018_02_24_00_world_335.sql} (99%) create mode 100644 sql/updates/world/4.3.4/2018_03_05_01_world_from_335_was_2018_02_24_01_world_335.sql rename sql/updates/world/{3.3.5/2018_02_24_02_world.sql => 4.3.4/2018_03_05_02_world_from_335_was_2018_02_24_02_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_24_03_world.sql => 4.3.4/2018_03_05_03_world_from_335_was_2018_02_24_03_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_24_04_world.sql => 4.3.4/2018_03_05_04_world_from_335_was_2018_02_24_04_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_24_05_world.sql => 4.3.4/2018_03_05_05_world_from_335_was_2018_02_24_05_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_25_00_world_335.sql => 4.3.4/2018_03_05_06_world_from_335_was_2018_02_25_00_world_335.sql} (99%) create mode 100644 sql/updates/world/4.3.4/2018_03_05_07_world_from_335_was_2018_02_28_00_world_335.sql create mode 100644 sql/updates/world/4.3.4/2018_03_05_08_world_from_335_was_2018_02_28_01_world_335.sql rename sql/updates/world/{3.3.5/2018_02_28_02_world_335.sql => 4.3.4/2018_03_05_09_world_from_335_was_2018_02_28_02_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_02_28_03_world_335.sql => 4.3.4/2018_03_05_10_world_from_335_was_2018_02_28_03_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_02_28_04_world_335.sql => 4.3.4/2018_03_05_11_world_from_335_was_2018_02_28_04_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_02_28_05_world_335.sql => 4.3.4/2018_03_05_12_world_from_335_was_2018_02_28_05_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_02_28_06_world_335.sql => 4.3.4/2018_03_05_13_world_from_335_was_2018_02_28_06_world_335.sql} (99%) create mode 100644 sql/updates/world/4.3.4/2018_03_05_14_world_from_335_was_2018_03_01_00_world_335.sql create mode 100644 sql/updates/world/4.3.4/2018_03_05_15_world_from_335_was_2018_03_03_00_world_335.sql rename sql/updates/world/{3.3.5/2018_03_03_01_world_335.sql => 4.3.4/2018_03_05_16_world_from_335_was_2018_03_03_01_world_335.sql} (98%) create mode 100644 sql/updates/world/4.3.4/2018_03_05_17_world_from_335_was_2018_03_03_02_world_335.sql rename sql/updates/world/{3.3.5/2018_03_03_03_world_335.sql => 4.3.4/2018_03_05_18_world_from_335_was_2018_03_03_03_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_03_03_04_world_335.sql => 4.3.4/2018_03_05_19_world_from_335_was_2018_03_03_04_world_335.sql} (97%) rename sql/updates/world/{3.3.5/2018_03_03_05_world_335.sql => 4.3.4/2018_03_05_20_world_from_335_was_2018_03_03_05_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_03_03_06_world_335.sql => 4.3.4/2018_03_05_21_world_from_335_was_2018_03_03_06_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_03_03_07_world_335.sql => 4.3.4/2018_03_05_22_world_from_335_was_2018_03_03_07_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_03_03_08_world_335.sql => 4.3.4/2018_03_05_23_world_from_335_was_2018_03_03_08_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_03_04_00_world_335.sql => 4.3.4/2018_03_05_24_world_from_335_was_2018_03_04_00_world_335.sql} (99%) diff --git a/sql/updates/world/3.3.5/2018_02_24_01_world_335.sql b/sql/updates/world/3.3.5/2018_02_24_01_world_335.sql deleted file mode 100644 index fb853ff5a20..00000000000 --- a/sql/updates/world/3.3.5/2018_02_24_01_world_335.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Apothecary Keever's test subjects (Caged Human Male, Squirrel, Rabbit, Toad, Sheep) -UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry` IN (5736,5739,5741,5742,5743); diff --git a/sql/updates/world/3.3.5/2018_02_28_00_world_335.sql b/sql/updates/world/3.3.5/2018_02_28_00_world_335.sql deleted file mode 100644 index d3c3b8e6cde..00000000000 --- a/sql/updates/world/3.3.5/2018_02_28_00_world_335.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Fix prerequisite for quests "Hallowed Scroll" & "Glyphic Scroll" -UPDATE `quest_template_addon` SET `PrevQuestID`=364 WHERE `ID` IN (3097,3098); diff --git a/sql/updates/world/3.3.5/2018_02_28_01_world_335.sql b/sql/updates/world/3.3.5/2018_02_28_01_world_335.sql deleted file mode 100644 index a21f5d25181..00000000000 --- a/sql/updates/world/3.3.5/2018_02_28_01_world_335.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Fix prerequisite for quest "Rot Hide Ichor" -UPDATE `quest_template_addon` SET `PrevQuestID`=439 WHERE `ID`=443; diff --git a/sql/updates/world/3.3.5/2018_03_01_00_world_335.sql b/sql/updates/world/3.3.5/2018_03_01_00_world_335.sql deleted file mode 100644 index b2e791b532b..00000000000 --- a/sql/updates/world/3.3.5/2018_03_01_00_world_335.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Hit debuff stacking (Insect Swarm & Scorpid Sting) -UPDATE `spell_group_stack_rules` SET `stack_rule`= 3 WHERE `group_id`= 1060; diff --git a/sql/updates/world/3.3.5/2018_03_03_00_world_335.sql b/sql/updates/world/3.3.5/2018_03_03_00_world_335.sql deleted file mode 100644 index de1367d5105..00000000000 --- a/sql/updates/world/3.3.5/2018_03_03_00_world_335.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Mountaineer Pebblebitty -UPDATE `conditions` SET `ConditionTypeOrReference`=14, `Comment`="Show gossip menu option only if quest 'The Horn of the Beast' is not taken" WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=1201; diff --git a/sql/updates/world/3.3.5/2018_03_03_02_world_335.sql b/sql/updates/world/3.3.5/2018_03_03_02_world_335.sql deleted file mode 100644 index 0662195eecc..00000000000 --- a/sql/updates/world/3.3.5/2018_03_03_02_world_335.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Fix gossip option for Spark Nilminer -UPDATE `gossip_menu_option` SET `ActionMenuID`=2721 WHERE `MenuID`=2422; diff --git a/sql/updates/world/3.3.5/2018_02_24_00_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_00_world_from_335_was_2018_02_24_00_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_02_24_00_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_00_world_from_335_was_2018_02_24_00_world_335.sql index 9d87518b782..749c45988f6 100644 --- a/sql/updates/world/3.3.5/2018_02_24_00_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_00_world_from_335_was_2018_02_24_00_world_335.sql @@ -1,3 +1,4 @@ +/* -- Deathguard Elite UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=7980; DELETE FROM `smart_scripts` WHERE `entryorguid`=7980 AND `source_type`=0; @@ -33,3 +34,4 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type (6804,9, 0,0, 0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"), (6804,9, 1,0, 0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Play Emote 'Point'"), (6804,9, 2,0, 0,0,100,0,10000,10000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"); +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_01_world_from_335_was_2018_02_24_01_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_01_world_from_335_was_2018_02_24_01_world_335.sql new file mode 100644 index 00000000000..5a65cfbcb37 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_01_world_from_335_was_2018_02_24_01_world_335.sql @@ -0,0 +1,2 @@ +-- Apothecary Keever's test subjects (Caged Human Male, Squirrel, Rabbit, Toad, Sheep) +-- UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry` IN (5736,5739,5741,5742,5743); diff --git a/sql/updates/world/3.3.5/2018_02_24_02_world.sql b/sql/updates/world/4.3.4/2018_03_05_02_world_from_335_was_2018_02_24_02_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_24_02_world.sql rename to sql/updates/world/4.3.4/2018_03_05_02_world_from_335_was_2018_02_24_02_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_24_03_world.sql b/sql/updates/world/4.3.4/2018_03_05_03_world_from_335_was_2018_02_24_03_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_24_03_world.sql rename to sql/updates/world/4.3.4/2018_03_05_03_world_from_335_was_2018_02_24_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_24_04_world.sql b/sql/updates/world/4.3.4/2018_03_05_04_world_from_335_was_2018_02_24_04_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_24_04_world.sql rename to sql/updates/world/4.3.4/2018_03_05_04_world_from_335_was_2018_02_24_04_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_24_05_world.sql b/sql/updates/world/4.3.4/2018_03_05_05_world_from_335_was_2018_02_24_05_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_24_05_world.sql rename to sql/updates/world/4.3.4/2018_03_05_05_world_from_335_was_2018_02_24_05_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_25_00_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_06_world_from_335_was_2018_02_25_00_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_02_25_00_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_06_world_from_335_was_2018_02_25_00_world_335.sql index 7762bbbbe8e..8e5597649b3 100644 --- a/sql/updates/world/3.3.5/2018_02_25_00_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_06_world_from_335_was_2018_02_25_00_world_335.sql @@ -1,3 +1,4 @@ +/* -- DELETE FROM `gameobject_overrides` WHERE `spawnId` IN (76499, 76498, 76436, 76435, 76229, 76228, 76182, 76181, 76147, 76146, 76145, 76144, 76099, 76098, 76097, 76067, 76066, 76065, 76579, 76580); INSERT INTO `gameobject_overrides` (`spawnId`, `faction`, `flags`) VALUES @@ -21,3 +22,4 @@ INSERT INTO `gameobject_overrides` (`spawnId`, `faction`, `flags`) VALUES (76065, 0, 16), (76579, 0, 16), (76580, 0, 16); +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_07_world_from_335_was_2018_02_28_00_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_07_world_from_335_was_2018_02_28_00_world_335.sql new file mode 100644 index 00000000000..781cff5226c --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_07_world_from_335_was_2018_02_28_00_world_335.sql @@ -0,0 +1,2 @@ +-- Fix prerequisite for quests "Hallowed Scroll" & "Glyphic Scroll" +-- UPDATE `quest_template_addon` SET `PrevQuestID`=364 WHERE `ID` IN (3097,3098); diff --git a/sql/updates/world/4.3.4/2018_03_05_08_world_from_335_was_2018_02_28_01_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_08_world_from_335_was_2018_02_28_01_world_335.sql new file mode 100644 index 00000000000..c3d16de895a --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_08_world_from_335_was_2018_02_28_01_world_335.sql @@ -0,0 +1,2 @@ +-- Fix prerequisite for quest "Rot Hide Ichor" +-- UPDATE `quest_template_addon` SET `PrevQuestID`=439 WHERE `ID`=443; diff --git a/sql/updates/world/3.3.5/2018_02_28_02_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_09_world_from_335_was_2018_02_28_02_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_02_28_02_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_09_world_from_335_was_2018_02_28_02_world_335.sql index 39e6eabfc35..9ac1010ff5b 100644 --- a/sql/updates/world/3.3.5/2018_02_28_02_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_09_world_from_335_was_2018_02_28_02_world_335.sql @@ -1,3 +1,4 @@ +/* -- Advisor Duskingdawn --> Fix gossip text DELETE FROM `gossip_menu` WHERE `MenuID`=7358 AND `TextID`=8787; INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES @@ -7,3 +8,4 @@ DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=73 INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES (14,7358,8789,0,0,16,0,512,0,0,0,0,0,"","Show gossip text if player is a Blood Elf"), (14,7358,8787,0,0,16,0,1279,0,0,0,0,0,"","Show gossip text if player is not a Blood Elf"); +*/ diff --git a/sql/updates/world/3.3.5/2018_02_28_03_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_10_world_from_335_was_2018_02_28_03_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_02_28_03_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_10_world_from_335_was_2018_02_28_03_world_335.sql index 26a074ccc05..0a77bc46bbe 100644 --- a/sql/updates/world/3.3.5/2018_02_28_03_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_10_world_from_335_was_2018_02_28_03_world_335.sql @@ -1,3 +1,4 @@ +/* -- Gol'dir DELETE FROM `creature_text` WHERE `CreatureID`=2316; INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES @@ -13,3 +14,4 @@ DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=23 INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES (22,1,2316,0,0,9,0,503,0,0,0,0,0,"","SAI triggers only if player has quest 'Gol'dir' taken"), (22,1,2316,0,1,28,0,503,0,0,0,0,0,"","SAI triggers only if player has quest 'Gol'dir' completed"); +*/ diff --git a/sql/updates/world/3.3.5/2018_02_28_04_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_11_world_from_335_was_2018_02_28_04_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_02_28_04_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_11_world_from_335_was_2018_02_28_04_world_335.sql index 97c4333d2b7..9aaf0dccb80 100644 --- a/sql/updates/world/3.3.5/2018_02_28_04_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_11_world_from_335_was_2018_02_28_04_world_335.sql @@ -1,3 +1,4 @@ +/* -- Blacksmith's Anvil SET @GUID := 1508; DELETE FROM `gameobject` WHERE `guid`=@GUID; @@ -23,3 +24,4 @@ INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_ (614200,9,5,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.71042,"Mathiel - On Script - Set Orientation"), (614200,9,6,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mathiel - On Script - Say Line 2"), (614200,9,7,0,0,0,100,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mathiel - On Script - Add Npc Flag Questgiver"); +*/ diff --git a/sql/updates/world/3.3.5/2018_02_28_05_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_12_world_from_335_was_2018_02_28_05_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_02_28_05_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_12_world_from_335_was_2018_02_28_05_world_335.sql index aa2443b0ffd..a577836fedc 100644 --- a/sql/updates/world/3.3.5/2018_02_28_05_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_12_world_from_335_was_2018_02_28_05_world_335.sql @@ -1,3 +1,4 @@ +/* -- Quest "The Rescue" -- Locked ball and chain UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry` IN (1721,1722); @@ -25,3 +26,4 @@ INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Lan (2238,1,0,"I will only slow you down, but no pink-skinned humans will keep me from freedom!",12,1,100,15,0,0,595,0,"Tog'thar"), (2239,0,0,"Ah, it is good to be free of my bonds! Have you freed Tog'thar yet? The humans split us up after our capture.",12,1,100,4,0,0,592,0,"Drull"), (2239,1,0,"Go on ahead without me! I will make my own way to Tarren Mill.",12,1,100,5,0,0,594,0,"Drull"); +*/ diff --git a/sql/updates/world/3.3.5/2018_02_28_06_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_13_world_from_335_was_2018_02_28_06_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_02_28_06_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_13_world_from_335_was_2018_02_28_06_world_335.sql index 8440db65827..c27a7378e7b 100644 --- a/sql/updates/world/3.3.5/2018_02_28_06_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_13_world_from_335_was_2018_02_28_06_world_335.sql @@ -1,3 +1,4 @@ +/* -- Quest "Helcular's Revenge (Part 2)" -- Helcular's Grave UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=1767; @@ -23,3 +24,4 @@ DELETE FROM `creature_text` WHERE `CreatureID`=2433 AND `GroupID`=1 AND `ID`=1; INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES (2433,0,3,"I returned from the grave to take my revenge!",14,0,100,15,0,0,599,0,"Helcular's Remains"), (2433,1,1,"Die in the name of the Dark Lady, $n.",14,0,100,0,0,0,600,0,"Helcular's Remains"); +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_14_world_from_335_was_2018_03_01_00_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_14_world_from_335_was_2018_03_01_00_world_335.sql new file mode 100644 index 00000000000..52f3a7ea26d --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_14_world_from_335_was_2018_03_01_00_world_335.sql @@ -0,0 +1,2 @@ +-- Hit debuff stacking (Insect Swarm & Scorpid Sting) +-- UPDATE `spell_group_stack_rules` SET `stack_rule`= 3 WHERE `group_id`= 1060; diff --git a/sql/updates/world/4.3.4/2018_03_05_15_world_from_335_was_2018_03_03_00_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_15_world_from_335_was_2018_03_03_00_world_335.sql new file mode 100644 index 00000000000..495c53ee2eb --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_15_world_from_335_was_2018_03_03_00_world_335.sql @@ -0,0 +1,2 @@ +-- Mountaineer Pebblebitty +-- UPDATE `conditions` SET `ConditionTypeOrReference`=14, `Comment`="Show gossip menu option only if quest 'The Horn of the Beast' is not taken" WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=1201; diff --git a/sql/updates/world/3.3.5/2018_03_03_01_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_16_world_from_335_was_2018_03_03_01_world_335.sql similarity index 98% rename from sql/updates/world/3.3.5/2018_03_03_01_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_16_world_from_335_was_2018_03_03_01_world_335.sql index 5f61dd154a2..3ef759e8201 100644 --- a/sql/updates/world/3.3.5/2018_03_03_01_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_16_world_from_335_was_2018_03_03_01_world_335.sql @@ -1,4 +1,6 @@ +/* -- Sha'ni Proudtusk's Remains DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=160445; INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES (22,1,160445,1,0,29,1,9136,200,0,1,0,0,"","SAI triggers only if Sha'ni Proudtusk is not already spawned"); +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_17_world_from_335_was_2018_03_03_02_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_17_world_from_335_was_2018_03_03_02_world_335.sql new file mode 100644 index 00000000000..3e64be1682a --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_17_world_from_335_was_2018_03_03_02_world_335.sql @@ -0,0 +1,2 @@ +-- Fix gossip option for Spark Nilminer +-- UPDATE `gossip_menu_option` SET `ActionMenuID`=2721 WHERE `MenuID`=2422; diff --git a/sql/updates/world/3.3.5/2018_03_03_03_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_18_world_from_335_was_2018_03_03_03_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_03_03_03_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_18_world_from_335_was_2018_03_03_03_world_335.sql index f429092b306..87f495c7e01 100644 --- a/sql/updates/world/3.3.5/2018_03_03_03_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_18_world_from_335_was_2018_03_03_03_world_335.sql @@ -1,3 +1,4 @@ +/* -- Jes'rimon - add Gossip Option DELETE FROM `gossip_menu` WHERE `MenuID`=2190; INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES @@ -10,3 +11,4 @@ INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionTex DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=2189; INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES (15,2189,0,0,0,9,0,4300,0,0,0,0,0,"","Show gossip option if quest 'Bone-Bladed Weapons' is taken"); +*/ diff --git a/sql/updates/world/3.3.5/2018_03_03_04_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_19_world_from_335_was_2018_03_03_04_world_335.sql similarity index 97% rename from sql/updates/world/3.3.5/2018_03_03_04_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_19_world_from_335_was_2018_03_03_04_world_335.sql index 961b677cdac..8f5e1b57755 100644 --- a/sql/updates/world/3.3.5/2018_03_03_04_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_19_world_from_335_was_2018_03_03_04_world_335.sql @@ -1,3 +1,5 @@ +/* -- Blastmaster Emi Shortfuse UPDATE `creature_text` SET `Text`="FIRE IN THE HOLE!", `Language`=0, `BroadcastTextId`=4137 WHERE `CreatureID`=7998 AND `GroupID`=11; UPDATE `creature_text` SET `BroadcastTextId`=4207 WHERE `CreatureID`=7998 AND `GroupID`=13; +*/ diff --git a/sql/updates/world/3.3.5/2018_03_03_05_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_20_world_from_335_was_2018_03_03_05_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_03_03_05_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_20_world_from_335_was_2018_03_03_05_world_335.sql index 20c443ba3ad..e96a83ceb91 100644 --- a/sql/updates/world/3.3.5/2018_03_03_05_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_20_world_from_335_was_2018_03_03_05_world_335.sql @@ -1,3 +1,4 @@ +/* -- Laris Geardawdle - fix Gossip Texts DELETE FROM `gossip_menu` WHERE `MenuID`=2405 AND `TextID` IN (3099,3098,3097); DELETE FROM `gossip_menu` WHERE `MenuID` IN (2406,2407,2408); @@ -27,3 +28,4 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry (14,2405,3099,0,0,9,0,4513,0,0,0,0,0,"","Show gossip text 3099 if quest 'A Little Slime Goes a Long Way (Part 2)' is taken"), (14,2405,3098,0,0,8,0,4513,0,0,0,0,0,"","Show gossip text 3098 if quest 'A Little Slime Goes a Long Way (Part 2)' is rewarded"), (15,2405,0,0,0,9,0,4513,0,0,0,0,0,"","Show gossip option if quest 'A Little Slime Goes a Long Way (Part 2)' is taken"); +*/ diff --git a/sql/updates/world/3.3.5/2018_03_03_06_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_21_world_from_335_was_2018_03_03_06_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_03_03_06_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_21_world_from_335_was_2018_03_03_06_world_335.sql index a955ad0dbab..bca7ffb59c1 100644 --- a/sql/updates/world/3.3.5/2018_03_03_06_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_21_world_from_335_was_2018_03_03_06_world_335.sql @@ -1,3 +1,4 @@ +/* -- Talen DELETE FROM `creature_text` WHERE `CreatureID`=3846; INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES @@ -25,3 +26,4 @@ INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_ (384600,9,12,0,0,0,100,0,20000,20000,0,0,90,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talen - On Script - Set Flag Standstate Sit Down"); UPDATE `creature_template` SET `npcflag`=2, `gossip_menu_id`=0 WHERE `entry`=3846; -- Fix NPC flag and remove gossip +*/ diff --git a/sql/updates/world/3.3.5/2018_03_03_07_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_22_world_from_335_was_2018_03_03_07_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_03_03_07_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_22_world_from_335_was_2018_03_03_07_world_335.sql index fc91aef0048..3a4788028a0 100644 --- a/sql/updates/world/3.3.5/2018_03_03_07_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_22_world_from_335_was_2018_03_03_07_world_335.sql @@ -1,3 +1,4 @@ +/* -- Ember Worg UPDATE `smart_scripts` SET `event_param1`=6000, `event_param2`=13000, `event_param3`=17000, `event_param4`=24000 WHERE `entryorguid`=9690 AND `source_type`=0 AND `id`=0; @@ -142,3 +143,4 @@ INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_ -- Fix bytes2 for some creatures UPDATE `creature_addon` SET `bytes2`=2 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id` IN (7038,8978)); UPDATE `creature_template_addon` SET `bytes2`=2 WHERE `entry`=9044; +*/ diff --git a/sql/updates/world/3.3.5/2018_03_03_08_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_23_world_from_335_was_2018_03_03_08_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_03_03_08_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_23_world_from_335_was_2018_03_03_08_world_335.sql index 2afedd72859..f451d8f0b7f 100644 --- a/sql/updates/world/3.3.5/2018_03_03_08_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_23_world_from_335_was_2018_03_03_08_world_335.sql @@ -1,3 +1,4 @@ +/* DELETE FROM `quest_greeting` WHERE `ID` IN (5204,1776,3441,4500,1950,7777,9536,6986,4485,7825); INSERT INTO `quest_greeting` (`ID`, `Type`, `GreetEmoteType`, `GreetEmoteDelay`, `Greeting`, `VerifiedBuild`) VALUES (5204,0,0,0,"If we are to make our place in this world, then we will do so through study, and through the will to ignore our fading human instincts.",0), -- Apothecary Zinge @@ -10,3 +11,4 @@ INSERT INTO `quest_greeting` (`ID`, `Type`, `GreetEmoteType`, `GreetEmoteDelay`, (7825,0,0,0,"",0), -- Oran Snakewrithe (6986,0,1,0,"My name is Dran Droffers, and this over here is my dummy son Malton. If you need salvage, or are looking to sell salvage, then we're who you need to be talking to!",0), -- Dran Droffers (4485,0,1,0,"The days grow long, and still no end to the conflicts of these lands can be seen. It takes no spell caster to know that much. Take up a blade while you can, $c. War can come to our doors at any time, and if I'm not mistaken, you look to be one who revels in it.",0); -- Belgrom Rockmaul +*/ diff --git a/sql/updates/world/3.3.5/2018_03_04_00_world_335.sql b/sql/updates/world/4.3.4/2018_03_05_24_world_from_335_was_2018_03_04_00_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_03_04_00_world_335.sql rename to sql/updates/world/4.3.4/2018_03_05_24_world_from_335_was_2018_03_04_00_world_335.sql index 56e77b5d1de..9e7767a3dc8 100644 --- a/sql/updates/world/3.3.5/2018_03_04_00_world_335.sql +++ b/sql/updates/world/4.3.4/2018_03_05_24_world_from_335_was_2018_03_04_00_world_335.sql @@ -1,3 +1,4 @@ +/* -- Fix availability for quest "Zamek's Distraction" UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `ID`=1191; DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceEntry`=1191; @@ -72,3 +73,4 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type (472001,9,0,0,0,0,100,0,0,0,0,0,54,25000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rizzle Brassbolts - On Script - Pause Waypoint'), (472001,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.943443,'Rizzle Brassbolts - On Script - Set Orientation'), (472001,9,2,0,0,0,100,0,20000,20000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rizzle Brassbolts - On Script - Say Line 2'); +*/ From cbf7a27478dfe3c63cbf7d1e40515cd85bb19675 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Tue, 6 Mar 2018 00:01:52 +0100 Subject: [PATCH 35/38] Revert "Core/MMaps: Fix crash introduced in commit 32e8b65 (#17447)" This reverts commit f293994. --- .../Collision/Management/MMapManager.cpp | 70 +++++++------------ src/common/Collision/Management/MMapManager.h | 3 - 2 files changed, 26 insertions(+), 47 deletions(-) diff --git a/src/common/Collision/Management/MMapManager.cpp b/src/common/Collision/Management/MMapManager.cpp index e2d082474d6..5b55e2e09a3 100644 --- a/src/common/Collision/Management/MMapManager.cpp +++ b/src/common/Collision/Management/MMapManager.cpp @@ -191,7 +191,7 @@ namespace MMAP dtTileRef tileRef = 0; // memory allocated for data is now managed by detour, and will be deallocated when the tile is removed - if (dtStatusSucceed(mmap->navMesh->addTile(data, fileHeader.size, 0, 0, &tileRef))) + if (dtStatusSucceed(mmap->navMesh->addTile(data, fileHeader.size, DT_TILE_FREE_DATA, 0, &tileRef))) { mmap->loadedTileRefs.insert(std::pair(packedGridPos, tileRef)); ++loadedTiles; @@ -199,10 +199,7 @@ namespace MMAP PhaseChildMapContainer::const_iterator phasedMaps = phaseMapData.find(mapId); if (phasedMaps != phaseMapData.end()) - { - mmap->AddBaseTile(packedGridPos, data, fileHeader, fileHeader.size); LoadPhaseTiles(phasedMaps, x, y); - } return true; } @@ -295,7 +292,7 @@ namespace MMAP if (dataItr != phasedTileItr->second.end()) { TC_LOG_DEBUG("phase", "MMAP:UnloadPhaseTile: Unloaded phased %04u%02i%02i.mmtile for root phase map %u", phaseMapId, x, y, phasedMapData->first); - dtFree(dataItr->second->data); + delete dataItr->second->data; delete dataItr->second; phasedTileItr->second.erase(dataItr); } @@ -327,8 +324,7 @@ namespace MMAP dtTileRef tileRef = mmap->loadedTileRefs[packedGridPos]; // unload, and mark as non loaded - unsigned char* data = NULL; - if (dtStatusFailed(mmap->navMesh->removeTile(tileRef, &data, NULL))) + if (dtStatusFailed(mmap->navMesh->removeTile(tileRef, NULL, NULL))) { // this is technically a memory leak // if the grid is later reloaded, dtNavMesh::addTile will return error but no extra memory is used @@ -344,12 +340,7 @@ namespace MMAP PhaseChildMapContainer::const_iterator phasedMaps = phaseMapData.find(mapId); if (phasedMaps != phaseMapData.end()) - { - mmap->DeleteBaseTile(packedGridPos); UnloadPhaseTile(phasedMaps, x, y); - } - else - dtFree(data); return true; } @@ -372,19 +363,13 @@ namespace MMAP { uint32 x = (i->first >> 16); uint32 y = (i->first & 0x0000FFFF); - unsigned char* data = NULL; - if (dtStatusFailed(mmap->navMesh->removeTile(i->second, &data, NULL))) + if (dtStatusFailed(mmap->navMesh->removeTile(i->second, NULL, NULL))) TC_LOG_ERROR("maps", "MMAP:unloadMap: Could not unload %03u%02i%02i.mmtile from navmesh", mapId, x, y); else { PhaseChildMapContainer::const_iterator phasedMaps = phaseMapData.find(mapId); if (phasedMaps != phaseMapData.end()) - { - mmap->DeleteBaseTile(i->first); UnloadPhaseTile(phasedMaps, x, y); - } - else - dtFree(data); --loadedTiles; TC_LOG_DEBUG("maps", "MMAP:unloadMap: Unloaded mmtile %03i[%02i, %02i] from %03i", mapId, x, y, mapId); } @@ -471,6 +456,12 @@ namespace MMAP dtFreeNavMeshQuery(i->second); dtFreeNavMesh(navMesh); + + for (PhaseTileContainer::iterator i = _baseTiles.begin(); i != _baseTiles.end(); ++i) + { + delete (*i).second->data; + delete (*i).second; + } } void MMapData::RemoveSwap(PhasedTile* ptile, uint32 swap, uint32 packedXY) @@ -494,7 +485,9 @@ namespace MMAP // restore base tile if (dtStatusSucceed(navMesh->addTile(_baseTiles[packedXY]->data, _baseTiles[packedXY]->dataSize, 0, 0, &loadedTileRefs[packedXY]))) + { TC_LOG_DEBUG("phase", "MMapData::RemoveSwap: Loaded base mmtile %03u[%02i, %02i] into %03i[%02i, %02i]", _mapId, x, y, _mapId, header->x, header->y); + } else TC_LOG_ERROR("phase", "MMapData::RemoveSwap: Could not load base %03u%02i%02i.mmtile to navmesh", _mapId, x, y); } @@ -510,6 +503,7 @@ namespace MMAP void MMapData::AddSwap(PhasedTile* ptile, uint32 swap, uint32 packedXY) { + uint32 x = (packedXY >> 16); uint32 y = (packedXY & 0x0000FFFF); @@ -524,6 +518,7 @@ namespace MMAP return; } + dtMeshHeader* header = (dtMeshHeader*)ptile->data; const dtMeshTile* oldTile = navMesh->getTileByRef(loadedTileRefs[packedXY]); @@ -538,19 +533,30 @@ namespace MMAP header->x = oldTile->header->x; header->y = oldTile->header->y; + // the removed tile's data + PhasedTile* pt = new PhasedTile(); // remove old tile - if (dtStatusFailed(navMesh->removeTile(loadedTileRefs[packedXY], NULL, NULL))) + if (dtStatusFailed(navMesh->removeTile(loadedTileRefs[packedXY], &pt->data, &pt->dataSize))) + { TC_LOG_ERROR("phase", "MMapData::AddSwap: Could not unload %03u%02i%02i.mmtile from navmesh", _mapId, x, y); + delete pt; + } else { TC_LOG_DEBUG("phase", "MMapData::AddSwap: Unloaded %03u%02i%02i.mmtile from navmesh", _mapId, x, y); + // store the removed data first time, this is the origonal, non-phased tile + if (_baseTiles.find(packedXY) == _baseTiles.end()) + _baseTiles[packedXY] = pt; _activeSwaps.insert(swap); + loadedPhasedTiles[swap].insert(packedXY); // add new swapped tile if (dtStatusSucceed(navMesh->addTile(ptile->data, ptile->fileHeader.size, 0, 0, &loadedTileRefs[packedXY]))) + { TC_LOG_DEBUG("phase", "MMapData::AddSwap: Loaded phased mmtile %03u[%02i, %02i] into %03i[%02i, %02i]", swap, x, y, _mapId, header->x, header->y); + } else TC_LOG_ERROR("phase", "MMapData::AddSwap: Could not load %03u%02i%02i.mmtile to navmesh", swap, x, y); } @@ -583,28 +589,4 @@ namespace MMAP return navMesh; } - - void MMapData::AddBaseTile(uint32 packedGridPos, unsigned char* data, MmapTileHeader const& fileHeader, int32 dataSize) - { - auto itr = _baseTiles.find(packedGridPos); - if (itr == _baseTiles.end()) - { - PhasedTile* pt = new PhasedTile(); - pt->data = data; - pt->fileHeader = fileHeader; - pt->dataSize = dataSize; - _baseTiles[packedGridPos] = pt; - } - } - - void MMapData::DeleteBaseTile(uint32 packedGridPos) - { - auto itr = _baseTiles.find(packedGridPos); - if (itr != _baseTiles.end()) - { - dtFree(itr->second->data); - delete itr->second; - _baseTiles.erase(itr); - } - } } diff --git a/src/common/Collision/Management/MMapManager.h b/src/common/Collision/Management/MMapManager.h index 27133ed3e04..3fc5e8c4c41 100644 --- a/src/common/Collision/Management/MMapManager.h +++ b/src/common/Collision/Management/MMapManager.h @@ -69,9 +69,6 @@ namespace MMAP dtNavMesh* GetNavMesh(TerrainSet swaps); - void AddBaseTile(uint32 packedGridPos, unsigned char* data, MmapTileHeader const& fileHeader, int32 dataSize); - void DeleteBaseTile(uint32 packedGridPos); - // we have to use single dtNavMeshQuery for every instance, since those are not thread safe NavMeshQuerySet navMeshQueries; // instanceId to query From 523a2dccdc367ed9a9b37b707e3d26b51e31ac94 Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 20 Feb 2018 21:59:41 +0100 Subject: [PATCH 36/38] Revert "Collision/MMap: Fix a memleak reported by valgrind" This reverts commit 32e8b6506fc064fdba134d692dfe99298e43f055. --- src/common/Collision/Management/MMapManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Collision/Management/MMapManager.cpp b/src/common/Collision/Management/MMapManager.cpp index 5b55e2e09a3..83caabdf05e 100644 --- a/src/common/Collision/Management/MMapManager.cpp +++ b/src/common/Collision/Management/MMapManager.cpp @@ -191,7 +191,7 @@ namespace MMAP dtTileRef tileRef = 0; // memory allocated for data is now managed by detour, and will be deallocated when the tile is removed - if (dtStatusSucceed(mmap->navMesh->addTile(data, fileHeader.size, DT_TILE_FREE_DATA, 0, &tileRef))) + if (dtStatusSucceed(mmap->navMesh->addTile(data, fileHeader.size, 0/*DT_TILE_FREE_DATA*/, 0, &tileRef))) { mmap->loadedTileRefs.insert(std::pair(packedGridPos, tileRef)); ++loadedTiles; From c33ff02c34ec00d0926a40541ba4d75c5f27ec1f Mon Sep 17 00:00:00 2001 From: Aokromes Date: Tue, 6 Mar 2018 00:22:05 +0100 Subject: [PATCH 37/38] Core/MMaps: Remove phased tile support * Extremely slow * Needs to be implemented partially in tools * Conflicts with upcoming phasing rewrite --- .../Collision/Management/MMapFactory.cpp | 6 +- .../Collision/Management/MMapManager.cpp | 294 ++---------------- src/common/Collision/Management/MMapManager.h | 74 +---- .../Collision/Management/VMapManager2.cpp | 6 +- .../Collision/Management/VMapManager2.h | 2 +- src/server/game/Movement/PathGenerator.cpp | 4 +- src/server/game/World/World.cpp | 12 +- src/server/scripts/Commands/cs_misc.cpp | 2 +- src/server/scripts/Commands/cs_mmaps.cpp | 12 +- 9 files changed, 54 insertions(+), 358 deletions(-) diff --git a/src/common/Collision/Management/MMapFactory.cpp b/src/common/Collision/Management/MMapFactory.cpp index 240dbc60637..ed93d10bd1c 100644 --- a/src/common/Collision/Management/MMapFactory.cpp +++ b/src/common/Collision/Management/MMapFactory.cpp @@ -23,11 +23,11 @@ namespace MMAP { // ######################## MMapFactory ######################## // our global singleton copy - MMapManager* g_MMapManager = NULL; + MMapManager* g_MMapManager = nullptr; MMapManager* MMapFactory::createOrGetMMapManager() { - if (g_MMapManager == NULL) + if (g_MMapManager == nullptr) g_MMapManager = new MMapManager(); return g_MMapManager; @@ -38,7 +38,7 @@ namespace MMAP if (g_MMapManager) { delete g_MMapManager; - g_MMapManager = NULL; + g_MMapManager = nullptr; } } } diff --git a/src/common/Collision/Management/MMapManager.cpp b/src/common/Collision/Management/MMapManager.cpp index 83caabdf05e..2cabac63090 100644 --- a/src/common/Collision/Management/MMapManager.cpp +++ b/src/common/Collision/Management/MMapManager.cpp @@ -37,19 +37,11 @@ namespace MMAP // if we had, tiles in MMapData->mmapLoadedTiles, their actual data is lost! } - void MMapManager::InitializeThreadUnsafe(std::unordered_map> const& mapData) + void MMapManager::InitializeThreadUnsafe(const std::vector& mapIds) { - // the caller must pass the list of all mapIds that will be used in the MMapManager lifetime - for (auto const& p : mapData) - { - loadedMMaps.insert(MMapDataSet::value_type(p.first, nullptr)); - if (!p.second.empty()) - { - phaseMapData[p.first] = p.second; - for (uint32 phasedMapId : p.second) - _phaseTiles.insert(PhaseTileMap::value_type(phasedMapId, PhaseTileContainer())); - } - } + // the caller must pass the list of all mapIds that will be used in the VMapManager2 lifetime + for (uint32 const& mapId : mapIds) + loadedMMaps.insert(MMapDataSet::value_type(mapId, nullptr)); thread_safe_environment = false; } @@ -111,7 +103,7 @@ namespace MMAP TC_LOG_DEBUG("maps", "MMAP:loadMapData: Loaded %03i.mmap", mapId); // store inside our map list - MMapData* mmap_data = new MMapData(mesh, mapId); + MMapData* mmap_data = new MMapData(mesh); itr->second = mmap_data; return true; @@ -191,111 +183,18 @@ namespace MMAP dtTileRef tileRef = 0; // memory allocated for data is now managed by detour, and will be deallocated when the tile is removed - if (dtStatusSucceed(mmap->navMesh->addTile(data, fileHeader.size, 0/*DT_TILE_FREE_DATA*/, 0, &tileRef))) + if (dtStatusSucceed(mmap->navMesh->addTile(data, fileHeader.size, DT_TILE_FREE_DATA, 0, &tileRef))) { mmap->loadedTileRefs.insert(std::pair(packedGridPos, tileRef)); ++loadedTiles; TC_LOG_DEBUG("maps", "MMAP:loadMap: Loaded mmtile %03i[%02i, %02i] into %03i[%02i, %02i]", mapId, x, y, mapId, header->x, header->y); - - PhaseChildMapContainer::const_iterator phasedMaps = phaseMapData.find(mapId); - if (phasedMaps != phaseMapData.end()) - LoadPhaseTiles(phasedMaps, x, y); - return true; } - - TC_LOG_ERROR("maps", "MMAP:loadMap: Could not load %03u%02i%02i.mmtile into navmesh", mapId, x, y); - dtFree(data); - return false; - } - - PhasedTile* MMapManager::LoadTile(uint32 mapId, int32 x, int32 y) - { - // load this tile :: mmaps/MMMXXYY.mmtile - std::string fileName = Trinity::StringFormat(TILE_FILE_NAME_FORMAT, sConfigMgr->GetStringDefault("DataDir", ".").c_str(), mapId, x, y); - - FILE* file = fopen(fileName.c_str(), "rb"); - if (!file) + else { - // Not all tiles have phased versions, don't flood this msg - //TC_LOG_DEBUG("phase", "MMAP:LoadTile: Could not open mmtile file '%s'", fileName); - return NULL; - } - - PhasedTile* pTile = new PhasedTile(); - - // read header - if (fread(&pTile->fileHeader, sizeof(MmapTileHeader), 1, file) != 1 || pTile->fileHeader.mmapMagic != MMAP_MAGIC) - { - TC_LOG_ERROR("phase", "MMAP:LoadTile: Bad header in mmap %03u%02i%02i.mmtile", mapId, x, y); - fclose(file); - delete pTile; - return nullptr; - } - - if (pTile->fileHeader.mmapVersion != MMAP_VERSION) - { - TC_LOG_ERROR("phase", "MMAP:LoadTile: %03u%02i%02i.mmtile was built with generator v%i, expected v%i", - mapId, x, y, pTile->fileHeader.mmapVersion, MMAP_VERSION); - fclose(file); - delete pTile; - return nullptr; - } - - pTile->data = (unsigned char*)dtAlloc(pTile->fileHeader.size, DT_ALLOC_PERM); - ASSERT(pTile->data); - - size_t result = fread(pTile->data, pTile->fileHeader.size, 1, file); - if (!result) - { - TC_LOG_ERROR("phase", "MMAP:LoadTile: Bad header or data in mmap %03u%02i%02i.mmtile", mapId, x, y); - fclose(file); - delete pTile; - return nullptr; - } - - fclose(file); - - return pTile; - } - - void MMapManager::LoadPhaseTiles(PhaseChildMapContainer::const_iterator phasedMapData, int32 x, int32 y) - { - TC_LOG_DEBUG("phase", "MMAP:LoadPhaseTiles: Loading phased mmtiles for map %u, x: %i, y: %i", phasedMapData->first, x, y); - - uint32 packedGridPos = packTileID(x, y); - - for (uint32 phaseMapId : phasedMapData->second) - { - // only a few tiles have terrain swaps, do not write error for them - if (PhasedTile* data = LoadTile(phaseMapId, x, y)) - { - TC_LOG_DEBUG("phase", "MMAP:LoadPhaseTiles: Loaded phased %03u%02i%02i.mmtile for root phase map %u", phaseMapId, x, y, phasedMapData->first); - _phaseTiles[phaseMapId][packedGridPos] = data; - } - } - } - - void MMapManager::UnloadPhaseTile(PhaseChildMapContainer::const_iterator phasedMapData, int32 x, int32 y) - { - TC_LOG_DEBUG("phase", "MMAP:UnloadPhaseTile: Unloading phased mmtile for map %u, x: %i, y: %i", phasedMapData->first, x, y); - - uint32 packedGridPos = packTileID(x, y); - - for (uint32 phaseMapId : phasedMapData->second) - { - auto phasedTileItr = _phaseTiles.find(phaseMapId); - if (phasedTileItr == _phaseTiles.end()) - continue; - - auto dataItr = phasedTileItr->second.find(packedGridPos); - if (dataItr != phasedTileItr->second.end()) - { - TC_LOG_DEBUG("phase", "MMAP:UnloadPhaseTile: Unloaded phased %04u%02i%02i.mmtile for root phase map %u", phaseMapId, x, y, phasedMapData->first); - delete dataItr->second->data; - delete dataItr->second; - phasedTileItr->second.erase(dataItr); - } + TC_LOG_ERROR("maps", "MMAP:loadMap: Could not load %04u%02i%02i.mmtile into navmesh", mapId, x, y); + dtFree(data); + return false; } } @@ -324,7 +223,7 @@ namespace MMAP dtTileRef tileRef = mmap->loadedTileRefs[packedGridPos]; // unload, and mark as non loaded - if (dtStatusFailed(mmap->navMesh->removeTile(tileRef, NULL, NULL))) + if (dtStatusFailed(mmap->navMesh->removeTile(tileRef, nullptr, nullptr))) { // this is technically a memory leak // if the grid is later reloaded, dtNavMesh::addTile will return error but no extra memory is used @@ -336,11 +235,7 @@ namespace MMAP { mmap->loadedTileRefs.erase(packedGridPos); --loadedTiles; - TC_LOG_DEBUG("maps", "MMAP:unloadMap: Unloaded mmtile %03i[%02i, %02i] from %03i", mapId, x, y, mapId); - - PhaseChildMapContainer::const_iterator phasedMaps = phaseMapData.find(mapId); - if (phasedMaps != phaseMapData.end()) - UnloadPhaseTile(phasedMaps, x, y); + TC_LOG_DEBUG("maps", "MMAP:unloadMap: Unloaded mmtile %04i[%02i, %02i] from %03i", mapId, x, y, mapId); return true; } @@ -363,13 +258,10 @@ namespace MMAP { uint32 x = (i->first >> 16); uint32 y = (i->first & 0x0000FFFF); - if (dtStatusFailed(mmap->navMesh->removeTile(i->second, NULL, NULL))) + if (dtStatusFailed(mmap->navMesh->removeTile(i->second, nullptr, nullptr))) TC_LOG_ERROR("maps", "MMAP:unloadMap: Could not unload %03u%02i%02i.mmtile from navmesh", mapId, x, y); else { - PhaseChildMapContainer::const_iterator phasedMaps = phaseMapData.find(mapId); - if (phasedMaps != phaseMapData.end()) - UnloadPhaseTile(phasedMaps, x, y); --loadedTiles; TC_LOG_DEBUG("maps", "MMAP:unloadMap: Unloaded mmtile %03i[%02i, %02i] from %03i", mapId, x, y, mapId); } @@ -409,20 +301,20 @@ namespace MMAP return true; } - dtNavMesh const* MMapManager::GetNavMesh(uint32 mapId, TerrainSet swaps) + dtNavMesh const* MMapManager::GetNavMesh(uint32 mapId) { MMapDataSet::const_iterator itr = GetMMapData(mapId); if (itr == loadedMMaps.end()) - return NULL; + return nullptr; - return itr->second->GetNavMesh(swaps); + return itr->second->navMesh; } - dtNavMeshQuery const* MMapManager::GetNavMeshQuery(uint32 mapId, uint32 instanceId, TerrainSet swaps) + dtNavMeshQuery const* MMapManager::GetNavMeshQuery(uint32 mapId, uint32 instanceId) { MMapDataSet::const_iterator itr = GetMMapData(mapId); if (itr == loadedMMaps.end()) - return NULL; + return nullptr; MMapData* mmap = itr->second; if (mmap->navMeshQueries.find(instanceId) == mmap->navMeshQueries.end()) @@ -430,11 +322,11 @@ namespace MMAP // allocate mesh query dtNavMeshQuery* query = dtAllocNavMeshQuery(); ASSERT(query); - if (dtStatusFailed(query->init(mmap->GetNavMesh(swaps), 1024))) + if (dtStatusFailed(query->init(mmap->navMesh, 1024))) { dtFreeNavMeshQuery(query); TC_LOG_ERROR("maps", "MMAP:GetNavMeshQuery: Failed to initialize dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId); - return NULL; + return nullptr; } TC_LOG_DEBUG("maps", "MMAP:GetNavMeshQuery: created dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId); @@ -443,150 +335,4 @@ namespace MMAP return mmap->navMeshQueries[instanceId]; } - - MMapData::MMapData(dtNavMesh* mesh, uint32 mapId) - { - navMesh = mesh; - _mapId = mapId; - } - - MMapData::~MMapData() - { - for (NavMeshQuerySet::iterator i = navMeshQueries.begin(); i != navMeshQueries.end(); ++i) - dtFreeNavMeshQuery(i->second); - - dtFreeNavMesh(navMesh); - - for (PhaseTileContainer::iterator i = _baseTiles.begin(); i != _baseTiles.end(); ++i) - { - delete (*i).second->data; - delete (*i).second; - } - } - - void MMapData::RemoveSwap(PhasedTile* ptile, uint32 swap, uint32 packedXY) - { - uint32 x = (packedXY >> 16); - uint32 y = (packedXY & 0x0000FFFF); - - if (loadedPhasedTiles[swap].find(packedXY) == loadedPhasedTiles[swap].end()) - { - TC_LOG_DEBUG("phase", "MMapData::RemoveSwap: mmtile %03u[%02i, %02i] unload skipped, due to not loaded", swap, x, y); - return; - } - dtMeshHeader* header = (dtMeshHeader*)ptile->data; - - // remove old tile - if (dtStatusFailed(navMesh->removeTile(loadedTileRefs[packedXY], NULL, NULL))) - TC_LOG_ERROR("phase", "MMapData::RemoveSwap: Could not unload phased %03u%02i%02i.mmtile from navmesh", swap, x, y); - else - { - TC_LOG_DEBUG("phase", "MMapData::RemoveSwap: Unloaded phased %03u%02i%02i.mmtile from navmesh", swap, x, y); - - // restore base tile - if (dtStatusSucceed(navMesh->addTile(_baseTiles[packedXY]->data, _baseTiles[packedXY]->dataSize, 0, 0, &loadedTileRefs[packedXY]))) - { - TC_LOG_DEBUG("phase", "MMapData::RemoveSwap: Loaded base mmtile %03u[%02i, %02i] into %03i[%02i, %02i]", _mapId, x, y, _mapId, header->x, header->y); - } - else - TC_LOG_ERROR("phase", "MMapData::RemoveSwap: Could not load base %03u%02i%02i.mmtile to navmesh", _mapId, x, y); - } - - loadedPhasedTiles[swap].erase(packedXY); - - if (loadedPhasedTiles[swap].empty()) - { - _activeSwaps.erase(swap); - TC_LOG_DEBUG("phase", "MMapData::RemoveSwap: Fully removed swap %u from map %u", swap, _mapId); - } - } - - void MMapData::AddSwap(PhasedTile* ptile, uint32 swap, uint32 packedXY) - { - - uint32 x = (packedXY >> 16); - uint32 y = (packedXY & 0x0000FFFF); - - if (loadedTileRefs.find(packedXY) == loadedTileRefs.end()) - { - TC_LOG_DEBUG("phase", "MMapData::AddSwap: phased mmtile %03u[%02i, %02i] load skipped, due to not loaded base tile on map %u", swap, x, y, _mapId); - return; - } - if (loadedPhasedTiles[swap].find(packedXY) != loadedPhasedTiles[swap].end()) - { - TC_LOG_DEBUG("phase", "MMapData::AddSwap: WARNING! phased mmtile %03u[%02i, %02i] load skipped, due to already loaded on map %u", swap, x, y, _mapId); - return; - } - - - dtMeshHeader* header = (dtMeshHeader*)ptile->data; - - const dtMeshTile* oldTile = navMesh->getTileByRef(loadedTileRefs[packedXY]); - - if (!oldTile) - { - TC_LOG_DEBUG("phase", "MMapData::AddSwap: phased mmtile %03u[%02i, %02i] load skipped, due to not loaded base tile ref on map %u", swap, x, y, _mapId); - return; - } - - // header xy is based on the swap map's tile set, wich doesn't have all the same tiles as root map, so copy the xy from the orignal header - header->x = oldTile->header->x; - header->y = oldTile->header->y; - - // the removed tile's data - PhasedTile* pt = new PhasedTile(); - // remove old tile - if (dtStatusFailed(navMesh->removeTile(loadedTileRefs[packedXY], &pt->data, &pt->dataSize))) - { - TC_LOG_ERROR("phase", "MMapData::AddSwap: Could not unload %03u%02i%02i.mmtile from navmesh", _mapId, x, y); - delete pt; - } - else - { - TC_LOG_DEBUG("phase", "MMapData::AddSwap: Unloaded %03u%02i%02i.mmtile from navmesh", _mapId, x, y); - - // store the removed data first time, this is the origonal, non-phased tile - if (_baseTiles.find(packedXY) == _baseTiles.end()) - _baseTiles[packedXY] = pt; - _activeSwaps.insert(swap); - - loadedPhasedTiles[swap].insert(packedXY); - - // add new swapped tile - if (dtStatusSucceed(navMesh->addTile(ptile->data, ptile->fileHeader.size, 0, 0, &loadedTileRefs[packedXY]))) - { - TC_LOG_DEBUG("phase", "MMapData::AddSwap: Loaded phased mmtile %03u[%02i, %02i] into %03i[%02i, %02i]", swap, x, y, _mapId, header->x, header->y); - } - else - TC_LOG_ERROR("phase", "MMapData::AddSwap: Could not load %03u%02i%02i.mmtile to navmesh", swap, x, y); - } - } - - dtNavMesh* MMapData::GetNavMesh(TerrainSet swaps) - { - std::set activeSwaps = _activeSwaps; // _activeSwaps is modified inside RemoveSwap - for (uint32 swap : activeSwaps) - { - if (!swaps.count(swap)) // swap not active - { - if (PhaseTileContainer const* ptc = MMAP::MMapFactory::createOrGetMMapManager()->GetPhaseTileContainer(swap)) - for (PhaseTileContainer::const_iterator itr = ptc->begin(); itr != ptc->end(); ++itr) - RemoveSwap(itr->second, swap, itr->first); // remove swap - } - } - - // for each of the calling unit's terrain swaps - for (uint32 swap : swaps) - { - if (!_activeSwaps.count(swap)) // swap not active - { - // for each of the terrain swap's xy tiles - if (PhaseTileContainer const* ptc = MMAP::MMapFactory::createOrGetMMapManager()->GetPhaseTileContainer(swap)) - for (PhaseTileContainer::const_iterator itr = ptc->begin(); itr != ptc->end(); ++itr) - AddSwap(itr->second, swap, itr->first); // add swap - } - } - - return navMesh; - } } diff --git a/src/common/Collision/Management/MMapManager.h b/src/common/Collision/Management/MMapManager.h index 3fc5e8c4c41..dbabeb07d21 100644 --- a/src/common/Collision/Management/MMapManager.h +++ b/src/common/Collision/Management/MMapManager.h @@ -22,10 +22,8 @@ #include "Define.h" #include "DetourNavMesh.h" #include "DetourNavMeshQuery.h" -#include "MapDefines.h" #include #include -#include #include // move map related classes @@ -34,54 +32,25 @@ namespace MMAP typedef std::unordered_map MMapTileSet; typedef std::unordered_map NavMeshQuerySet; - - typedef std::set TerrainSet; - - struct NavMeshHolder + // dummy struct to hold map's mmap data + struct TC_COMMON_API MMapData { - // Pre-built navMesh - dtNavMesh* navMesh; + MMapData(dtNavMesh* mesh) : navMesh(mesh) { } + ~MMapData() + { + for (NavMeshQuerySet::iterator i = navMeshQueries.begin(); i != navMeshQueries.end(); ++i) + dtFreeNavMeshQuery(i->second); - // List of terrain swap map ids used to build the navMesh - TerrainSet terrainIds; - - MMapTileSet loadedTileRefs; - }; - - struct PhasedTile - { - unsigned char* data; - MmapTileHeader fileHeader; - int32 dataSize; - }; - - typedef std::unordered_map PhaseTileContainer; - typedef std::unordered_map PhaseTileMap; - - - typedef std::unordered_map TerrainSetMap; - - class TC_COMMON_API MMapData - { - public: - MMapData(dtNavMesh* mesh, uint32 mapId); - ~MMapData(); - - dtNavMesh* GetNavMesh(TerrainSet swaps); + if (navMesh) + dtFreeNavMesh(navMesh); + } // we have to use single dtNavMeshQuery for every instance, since those are not thread safe NavMeshQuerySet navMeshQueries; // instanceId to query dtNavMesh* navMesh; - MMapTileSet loadedTileRefs; - TerrainSetMap loadedPhasedTiles; - private: - uint32 _mapId; - PhaseTileContainer _baseTiles; - std::set _activeSwaps; - void RemoveSwap(PhasedTile* ptile, uint32 swap, uint32 packedXY); - void AddSwap(PhasedTile* tile, uint32 swap, uint32 packedXY); + MMapTileSet loadedTileRefs; // maps [map grid coords] to [dtTile] }; @@ -95,41 +64,26 @@ namespace MMAP MMapManager() : loadedTiles(0), thread_safe_environment(true) {} ~MMapManager(); - void InitializeThreadUnsafe(std::unordered_map> const& mapData); + void InitializeThreadUnsafe(const std::vector& mapIds); bool loadMap(const std::string& basePath, uint32 mapId, int32 x, int32 y); bool unloadMap(uint32 mapId, int32 x, int32 y); bool unloadMap(uint32 mapId); bool unloadMapInstance(uint32 mapId, uint32 instanceId); // the returned [dtNavMeshQuery const*] is NOT threadsafe - dtNavMeshQuery const* GetNavMeshQuery(uint32 mapId, uint32 instanceId, TerrainSet swaps); - dtNavMesh const* GetNavMesh(uint32 mapId, TerrainSet swaps); + dtNavMeshQuery const* GetNavMeshQuery(uint32 mapId, uint32 instanceId); + dtNavMesh const* GetNavMesh(uint32 mapId); uint32 getLoadedTilesCount() const { return loadedTiles; } uint32 getLoadedMapsCount() const { return uint32(loadedMMaps.size()); } - - typedef std::unordered_map> PhaseChildMapContainer; - void LoadPhaseTiles(PhaseChildMapContainer::const_iterator phasedMapData, int32 x, int32 y); - void UnloadPhaseTile(PhaseChildMapContainer::const_iterator phasedMapData, int32 x, int32 y); - PhaseTileContainer const* GetPhaseTileContainer(uint32 mapId) const - { - auto itr = _phaseTiles.find(mapId); - if (itr != _phaseTiles.end()) - return &itr->second; - return nullptr; - } - private: bool loadMapData(uint32 mapId); uint32 packTileID(int32 x, int32 y); MMapDataSet::const_iterator GetMMapData(uint32 mapId) const; MMapDataSet loadedMMaps; - PhaseChildMapContainer phaseMapData; uint32 loadedTiles; bool thread_safe_environment; - PhasedTile* LoadTile(uint32 mapId, int32 x, int32 y); - PhaseTileMap _phaseTiles; }; } diff --git a/src/common/Collision/Management/VMapManager2.cpp b/src/common/Collision/Management/VMapManager2.cpp index 297e4053098..94f8f8beb4b 100644 --- a/src/common/Collision/Management/VMapManager2.cpp +++ b/src/common/Collision/Management/VMapManager2.cpp @@ -52,11 +52,11 @@ namespace VMAP } } - void VMapManager2::InitializeThreadUnsafe(std::unordered_map> const& mapData) + void VMapManager2::InitializeThreadUnsafe(const std::vector& mapIds) { // the caller must pass the list of all mapIds that will be used in the VMapManager2 lifetime - for (auto const& p : mapData) - iInstanceMapTrees.insert(InstanceTreeMap::value_type(p.first, nullptr)); + for (uint32 const& mapId : mapIds) + iInstanceMapTrees.insert(InstanceTreeMap::value_type(mapId, nullptr)); thread_safe_environment = false; } diff --git a/src/common/Collision/Management/VMapManager2.h b/src/common/Collision/Management/VMapManager2.h index 110f2bd12f2..a45454291c4 100644 --- a/src/common/Collision/Management/VMapManager2.h +++ b/src/common/Collision/Management/VMapManager2.h @@ -101,7 +101,7 @@ namespace VMAP VMapManager2(); ~VMapManager2(void); - void InitializeThreadUnsafe(std::unordered_map> const& mapData); + void InitializeThreadUnsafe(const std::vector& mapIds); int loadMap(const char* pBasePath, unsigned int mapId, int x, int y) override; void unloadMap(unsigned int mapId, int x, int y) override; diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index 694c350b81b..0d447effabb 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -43,8 +43,8 @@ PathGenerator::PathGenerator(const Unit* owner) : if (DisableMgr::IsPathfindingEnabled(mapId)) { MMAP::MMapManager* mmap = MMAP::MMapFactory::createOrGetMMapManager(); - _navMesh = mmap->GetNavMesh(mapId, _sourceUnit->GetTerrainSwaps()); - _navMeshQuery = mmap->GetNavMeshQuery(mapId, _sourceUnit->GetInstanceId(), _sourceUnit->GetTerrainSwaps()); + _navMesh = mmap->GetNavMesh(mapId); + _navMeshQuery = mmap->GetNavMeshQuery(mapId, _sourceUnit->GetInstanceId()); } CreateFilter(); diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index c614657273d..b63d12e506a 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1502,19 +1502,15 @@ void World::SetInitialWorldSettings() // Load M2 fly by cameras LoadM2Cameras(m_dataPath); - std::unordered_map> mapData; + std::vector mapIds; for (MapEntry const* mapEntry : sMapStore) - { - mapData.insert(std::unordered_map>::value_type(mapEntry->MapID, std::vector())); - if (mapEntry->rootPhaseMap != -1) - mapData[mapEntry->rootPhaseMap].push_back(mapEntry->MapID); - } + mapIds.push_back(mapEntry->ID); if (VMAP::VMapManager2* vmmgr2 = dynamic_cast(VMAP::VMapFactory::createOrGetVMapManager())) - vmmgr2->InitializeThreadUnsafe(mapData); + vmmgr2->InitializeThreadUnsafe(mapIds); MMAP::MMapManager* mmmgr = MMAP::MMapFactory::createOrGetMMapManager(); - mmmgr->InitializeThreadUnsafe(mapData); + mmmgr->InitializeThreadUnsafe(mapIds); TC_LOG_INFO("server.loading", "Initializing PlayerDump tables..."); PlayerDump::InitializeTables(); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index a105bee1f9d..61f69d9c9d0 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -248,7 +248,7 @@ public: uint32 haveMap = Map::ExistMap(mapId, gridX, gridY) ? 1 : 0; uint32 haveVMap = Map::ExistVMap(mapId, gridX, gridY) ? 1 : 0; - uint32 haveMMap = (DisableMgr::IsPathfindingEnabled(mapId) && MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId(), handler->GetSession()->GetPlayer()->GetTerrainSwaps())) ? 1 : 0; + uint32 haveMMap = (DisableMgr::IsPathfindingEnabled(mapId) && MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId())) ? 1 : 0; if (haveVMap) { diff --git a/src/server/scripts/Commands/cs_mmaps.cpp b/src/server/scripts/Commands/cs_mmaps.cpp index 5babfe82484..1a3259bb23f 100644 --- a/src/server/scripts/Commands/cs_mmaps.cpp +++ b/src/server/scripts/Commands/cs_mmaps.cpp @@ -62,7 +62,7 @@ public: static bool HandleMmapPathCommand(ChatHandler* handler, char const* args) { - if (!MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId(), handler->GetSession()->GetPlayer()->GetTerrainSwaps())) + if (!MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId())) { handler->PSendSysMessage("NavMesh not loaded for current map."); return true; @@ -134,8 +134,8 @@ public: handler->PSendSysMessage("gridloc [%i, %i]", gy, gx); // calculate navmesh tile location - dtNavMesh const* navmesh = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId(), handler->GetSession()->GetPlayer()->GetTerrainSwaps()); - dtNavMeshQuery const* navmeshquery = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMeshQuery(handler->GetSession()->GetPlayer()->GetMapId(), player->GetInstanceId(), handler->GetSession()->GetPlayer()->GetTerrainSwaps()); + dtNavMesh const* navmesh = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId()); + dtNavMeshQuery const* navmeshquery = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMeshQuery(handler->GetSession()->GetPlayer()->GetMapId(), player->GetInstanceId()); if (!navmesh || !navmeshquery) { handler->PSendSysMessage("NavMesh not loaded for current map."); @@ -186,8 +186,8 @@ public: static bool HandleMmapLoadedTilesCommand(ChatHandler* handler, char const* /*args*/) { uint32 mapid = handler->GetSession()->GetPlayer()->GetMapId(); - dtNavMesh const* navmesh = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(mapid, handler->GetSession()->GetPlayer()->GetTerrainSwaps()); - dtNavMeshQuery const* navmeshquery = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMeshQuery(mapid, handler->GetSession()->GetPlayer()->GetInstanceId(), handler->GetSession()->GetPlayer()->GetTerrainSwaps()); + dtNavMesh const* navmesh = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(mapid); + dtNavMeshQuery const* navmeshquery = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMeshQuery(mapid, handler->GetSession()->GetPlayer()->GetInstanceId()); if (!navmesh || !navmeshquery) { handler->PSendSysMessage("NavMesh not loaded for current map."); @@ -217,7 +217,7 @@ public: MMAP::MMapManager* manager = MMAP::MMapFactory::createOrGetMMapManager(); handler->PSendSysMessage(" %u maps loaded with %u tiles overall", manager->getLoadedMapsCount(), manager->getLoadedTilesCount()); - dtNavMesh const* navmesh = manager->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId(), handler->GetSession()->GetPlayer()->GetTerrainSwaps()); + dtNavMesh const* navmesh = manager->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId()); if (!navmesh) { handler->PSendSysMessage("NavMesh not loaded for current map."); From 7c041c7366ba4cba2febbcab711c2a617a790615 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Tue, 6 Mar 2018 00:27:54 +0100 Subject: [PATCH 38/38] build fix --- src/server/game/World/World.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index b63d12e506a..008d1f13aaa 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1504,7 +1504,7 @@ void World::SetInitialWorldSettings() std::vector mapIds; for (MapEntry const* mapEntry : sMapStore) - mapIds.push_back(mapEntry->ID); + mapIds.push_back(mapEntry->MapID); if (VMAP::VMapManager2* vmmgr2 = dynamic_cast(VMAP::VMapFactory::createOrGetVMapManager())) vmmgr2->InitializeThreadUnsafe(mapIds);