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/sql/updates/world/4.3.4/2018_03_05_00_world_from_335_was_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 new file mode 100644 index 00000000000..749c45988f6 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_00_world_from_335_was_2018_02_24_00_world_335.sql @@ -0,0 +1,37 @@ +/* +-- 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,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'"), +(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"); +*/ 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/4.3.4/2018_03_05_02_world_from_335_was_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 new file mode 100644 index 00000000000..d2a4cdd79d4 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_02_world_from_335_was_2018_02_24_02_world.sql @@ -0,0 +1 @@ +UPDATE `spell_proc` SET `ProcFlags`=`ProcFlags`|2048 WHERE `SpellId`=17619; diff --git a/sql/updates/world/4.3.4/2018_03_05_03_world_from_335_was_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 new file mode 100644 index 00000000000..f66c9121e05 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_03_world_from_335_was_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; diff --git a/sql/updates/world/4.3.4/2018_03_05_04_world_from_335_was_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 new file mode 100644 index 00000000000..167b959156d --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_04_world_from_335_was_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"); diff --git a/sql/updates/world/4.3.4/2018_03_05_05_world_from_335_was_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 new file mode 100644 index 00000000000..0ff76b9a900 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_05_world_from_335_was_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; diff --git a/sql/updates/world/4.3.4/2018_03_05_06_world_from_335_was_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 new file mode 100644 index 00000000000..8e5597649b3 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_06_world_from_335_was_2018_02_25_00_world_335.sql @@ -0,0 +1,25 @@ +/* +-- +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); +*/ 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/4.3.4/2018_03_05_09_world_from_335_was_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 new file mode 100644 index 00000000000..9ac1010ff5b --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_09_world_from_335_was_2018_02_28_02_world_335.sql @@ -0,0 +1,11 @@ +/* +-- 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"); +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_10_world_from_335_was_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 new file mode 100644 index 00000000000..0a77bc46bbe --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_10_world_from_335_was_2018_02_28_03_world_335.sql @@ -0,0 +1,17 @@ +/* +-- 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"); +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_11_world_from_335_was_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 new file mode 100644 index 00000000000..9aaf0dccb80 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_11_world_from_335_was_2018_02_28_04_world_335.sql @@ -0,0 +1,27 @@ +/* +-- 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"); +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_12_world_from_335_was_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 new file mode 100644 index 00000000000..a577836fedc --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_12_world_from_335_was_2018_02_28_05_world_335.sql @@ -0,0 +1,29 @@ +/* +-- 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"); +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_13_world_from_335_was_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 new file mode 100644 index 00000000000..c27a7378e7b --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_13_world_from_335_was_2018_02_28_06_world_335.sql @@ -0,0 +1,27 @@ +/* +-- 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"); +*/ 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/4.3.4/2018_03_05_16_world_from_335_was_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 new file mode 100644 index 00000000000..3ef759e8201 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_16_world_from_335_was_2018_03_03_01_world_335.sql @@ -0,0 +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/4.3.4/2018_03_05_18_world_from_335_was_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 new file mode 100644 index 00000000000..87f495c7e01 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_18_world_from_335_was_2018_03_03_03_world_335.sql @@ -0,0 +1,14 @@ +/* +-- 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"); +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_19_world_from_335_was_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 new file mode 100644 index 00000000000..8f5e1b57755 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_19_world_from_335_was_2018_03_03_04_world_335.sql @@ -0,0 +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/4.3.4/2018_03_05_20_world_from_335_was_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 new file mode 100644 index 00000000000..e96a83ceb91 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_20_world_from_335_was_2018_03_03_05_world_335.sql @@ -0,0 +1,31 @@ +/* +-- 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"); +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_21_world_from_335_was_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 new file mode 100644 index 00000000000..bca7ffb59c1 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_21_world_from_335_was_2018_03_03_06_world_335.sql @@ -0,0 +1,29 @@ +/* +-- 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 +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_22_world_from_335_was_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 new file mode 100644 index 00000000000..3a4788028a0 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_22_world_from_335_was_2018_03_03_07_world_335.sql @@ -0,0 +1,146 @@ +/* +-- 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; +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_23_world_from_335_was_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 new file mode 100644 index 00000000000..f451d8f0b7f --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_23_world_from_335_was_2018_03_03_08_world_335.sql @@ -0,0 +1,14 @@ +/* +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 +*/ diff --git a/sql/updates/world/4.3.4/2018_03_05_24_world_from_335_was_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 new file mode 100644 index 00000000000..9e7767a3dc8 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_03_05_24_world_from_335_was_2018_03_04_00_world_335.sql @@ -0,0 +1,76 @@ +/* +-- 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'); +*/ 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 e2d082474d6..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,114 +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, 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()) - { - mmap->AddBaseTile(packedGridPos, data, fileHeader, fileHeader.size); - 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); - dtFree(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; } } @@ -327,8 +223,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, 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 @@ -340,16 +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()) - { - mmap->DeleteBaseTile(packedGridPos); - UnloadPhaseTile(phasedMaps, x, y); - } - else - dtFree(data); + TC_LOG_DEBUG("maps", "MMAP:unloadMap: Unloaded mmtile %04i[%02i, %02i] from %03i", mapId, x, y, mapId); return true; } @@ -372,19 +258,10 @@ 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, 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()) - { - 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); } @@ -424,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()) @@ -445,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); @@ -458,153 +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); - } - - 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; - - // remove old tile - if (dtStatusFailed(navMesh->removeTile(loadedTileRefs[packedXY], NULL, NULL))) - TC_LOG_ERROR("phase", "MMapData::AddSwap: Could not unload %03u%02i%02i.mmtile from navmesh", _mapId, x, y); - else - { - TC_LOG_DEBUG("phase", "MMapData::AddSwap: Unloaded %03u%02i%02i.mmtile from navmesh", _mapId, x, y); - - _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; - } - - 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..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,57 +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); - - void AddBaseTile(uint32 packedGridPos, unsigned char* data, MmapTileHeader const& fileHeader, int32 dataSize); - void DeleteBaseTile(uint32 packedGridPos); + 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] }; @@ -98,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/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]; }; 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()); diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp index 7eebfd731e7..502989aa891 100755 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp @@ -73,10 +73,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) 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/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index b23aa07500a..6f060f37a28 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3903,13 +3903,14 @@ 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; Unit* target = aurApp->GetTarget(); + // handle stack rules if (target->GetTypeId() == TYPEID_PLAYER) { target->ToPlayer()->UpdateMeleeHitChances(); @@ -3917,8 +3918,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; } } diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 50a15e1bc37..83f080a18d0 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)) @@ -2326,6 +2338,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 48aa0f6591b..621716491a2 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; @@ -4461,11 +4467,16 @@ 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); - if (spellInfo->Effects[j].TargetA.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CONE || spellInfo->Effects[j].TargetB.GetSelectionCategory() == TARGET_SELECT_CATEGORY_CONE) if (G3D::fuzzyEq(spellInfo->ConeAngle, 0.f)) spellInfo->ConeAngle = 90.f; - } + // 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 if (spellInfo->HasAura(SPELL_AURA_SPELL_MAGNET)) @@ -4500,6 +4511,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)); } diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index c7b7f80e388..d8ca90f1f93 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1513,19 +1513,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->MapID); 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 86d062c0bd8..a884a55b119 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.");