diff --git a/data/sql/updates/db_world/2023_10_24_00.sql b/data/sql/updates/db_world/2023_10_24_00.sql new file mode 100644 index 00000000000000..17d5cd1cd4c528 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_24_00.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_22_09 -> 2023_10_24_00 +-- Shadow Labyrinth Enterance Door +UPDATE `gameobject_template_addon` SET `flags` = 0 WHERE (`entry` = 183518); diff --git a/data/sql/updates/db_world/2023_10_25_00.sql b/data/sql/updates/db_world/2023_10_25_00.sql new file mode 100644 index 00000000000000..9c97d715129ec8 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_25_00.sql @@ -0,0 +1,24 @@ +-- DB update 2023_10_24_00 -> 2023_10_25_00 +-- Wanton Hostess +UPDATE `smart_scripts` SET `action_param1`=0, `comment`='Wanton Hostess - Between 0-50% Health - Remove All Auras' WHERE `entryorguid`=16459 AND `source_type`=0 AND `id`=4; + +-- Wanton Hostess Transform (Still doesn't fix it for some reason, core issue?) +DELETE FROM `creature_text` WHERE `CreatureID`=17063; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(17063, 0, 0, 'So I said, "Yeah, but that\'ll cost you extra."', 12, 0, 100, 0, 0, 0, 13883, 0, 'Wanton Hostess Transform - Out of Combat'), +(17063, 0, 1, 'Five seconds. I\'m not kidding!', 12, 0, 100, 0, 0, 0, 13884, 0, 'Wanton Hostess Transform - Out of Combat'), +(17063, 0, 2, 'He asked if the imp could join in--can you believe it? Actually, it wasn\'t half bad....', 12, 0, 100, 0, 0, 0, 13885, 0, 'Wanton Hostess Transform - Out of Combat'), +(17063, 0, 3, 'They fall asleep after. Me, I fall asleep during....', 12, 0, 100, 0, 0, 0, 13886, 0, 'Wanton Hostess Transform - Out of Combat'), +(17063, 1, 0, 'Come play with me!', 12, 0, 100, 0, 0, 0, 13880, 0, 'Wanton Hostess Transform - On Aggro'), +(17063, 1, 1, 'You WILL be mine.', 12, 0, 100, 0, 0, 0, 13881, 0, 'Wanton Hostess Transform - On Aggro'), +(17063, 1, 2, 'Come here, pretty. You have what I need!', 12, 0, 100, 0, 0, 0, 13882, 0, 'Wanton Hostess Transform - On Aggro'), +(17063, 2, 0, 'It was fun while it lasted....', 12, 0, 100, 0, 0, 0, 13889, 0, 'Wanton Hostess Transform - On Death'), +(17063, 2, 1, ' It\'s always over too soon.', 12, 0, 100, 0, 0, 0, 13890, 0, 'Wanton Hostess Transform - On Death'), +(17063, 2, 2, 'Just when things were getting interesting.', 12, 0, 100, 0, 0, 0, 13897, 0, 'Wanton Hostess Transform - On Death'), +(17063, 2, 3, 'We could have had so much fun!', 12, 0, 100, 0, 0, 0, 13898, 0, 'Wanton Hostess Transform - On Death'), +(17063, 3, 0, 'Come any closer, and I\'ll scream.', 12, 0, 100, 0, 0, 0, 13887, 0, 'Wanton Hostess Transform - On Transform'), +(17063, 3, 1, 'I want to show you a different side of me....', 12, 0, 100, 0, 0, 0, 13888, 0, 'Wanton Hostess Transform - On Transform'), +(17063, 3, 2, 'I want you to be with me... forever and ever.', 12, 0, 100, 0, 0, 0, 13891, 0, 'Wanton Hostess Transform - On Transform'), +(17063, 3, 3, 'Shhh... I have a little secret I\'ve been keeping.\n', 12, 0, 100, 0, 0, 0, 13892, 0, 'Wanton Hostess Transform - On Transform'), +(17063, 3, 4, 'I\'ve been very, very naughty....', 12, 0, 100, 0, 0, 0, 13895, 0, 'Wanton Hostess Transform - On Transform'), +(17063, 3, 5, 'Enough foreplay. Let\'s get down to business.', 12, 0, 100, 0, 0, 0, 13896, 0, 'Wanton Hostess Transform - On Transform'); diff --git a/data/sql/updates/db_world/2023_10_25_01.sql b/data/sql/updates/db_world/2023_10_25_01.sql new file mode 100644 index 00000000000000..5c59c435300071 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_25_01.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_25_00 -> 2023_10_25_01 +-- +UPDATE `creature_text` SET `Type` = 41 WHERE `CreatureId` = 16816 AND `GroupId` = 2 AND `ID` = 0; diff --git a/data/sql/updates/db_world/2023_10_25_02.sql b/data/sql/updates/db_world/2023_10_25_02.sql new file mode 100644 index 00000000000000..c9e38ccc150818 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_25_02.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_25_01 -> 2023_10_25_02 +-- +UPDATE`smart_scripts` SET `action_param2` = 2 WHERE `source_type` = 0 AND `id` = 0 AND `entryorguid` IN (19007,19006); diff --git a/data/sql/updates/db_world/2023_10_29_00.sql b/data/sql/updates/db_world/2023_10_29_00.sql new file mode 100644 index 00000000000000..ec660376256279 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_29_00.sql @@ -0,0 +1,5 @@ +-- DB update 2023_10_25_02 -> 2023_10_29_00 +-- Judgement Group Heal (Ranged Ability -> Physical Ability) +DELETE FROM `spell_proc_event` WHERE `entry`=37195; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(37195, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0); diff --git a/data/sql/updates/db_world/2023_10_29_01.sql b/data/sql/updates/db_world/2023_10_29_01.sql new file mode 100644 index 00000000000000..d9ff321f943512 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_29_01.sql @@ -0,0 +1,7 @@ +-- DB update 2023_10_29_00 -> 2023_10_29_01 +-- Unyielding Knight +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 16906); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(16906, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 22911, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unyielding Knight - On Aggro - Cast \'Charge\''), +(16906, 0, 1, 0, 74, 0, 100, 0, 0, 0, 22000, 22000, 50, 40, 11, 33910, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unyielding Knight - On Friendly Below 50% Health - Cast \'Heal Other\''), +(16906, 0, 2, 0, 2, 0, 100, 0, 0, 30, 0, 0, 0, 0, 39, 25, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unyielding Knight - Between 0-30% Health - Call For Help (25 yards)'); diff --git a/data/sql/updates/db_world/2023_10_31_00.sql b/data/sql/updates/db_world/2023_10_31_00.sql new file mode 100644 index 00000000000000..58dc1c7be117e0 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_31_00.sql @@ -0,0 +1,4 @@ +-- DB update 2023_10_29_01 -> 2023_10_31_00 +-- Venom Sting +DELETE FROM `spell_custom_attr` WHERE `spell_id`=5416; +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (5416, 4194304); diff --git a/data/sql/updates/db_world/2023_10_31_01.sql b/data/sql/updates/db_world/2023_10_31_01.sql new file mode 100644 index 00000000000000..fbead29470df4e --- /dev/null +++ b/data/sql/updates/db_world/2023_10_31_01.sql @@ -0,0 +1,4 @@ +-- DB update 2023_10_31_00 -> 2023_10_31_01 +-- Blistering Rot +DELETE FROM `spell_custom_attr` WHERE `spell_id`=32722; +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (32722, 4194304); diff --git a/data/sql/updates/db_world/2023_10_31_02.sql b/data/sql/updates/db_world/2023_10_31_02.sql new file mode 100644 index 00000000000000..c02d176b849ef5 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_31_02.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_31_01 -> 2023_10_31_02 +-- Fire Nova Totem VII - Cast Fire Nova (Rank 7) +UPDATE `creature_template_spell` SET `Spell` = 25537, `VerifiedBuild` = 42328 WHERE `CreatureID` = 15483 AND `Index` = 0; diff --git a/data/sql/updates/db_world/2023_11_02_00.sql b/data/sql/updates/db_world/2023_11_02_00.sql new file mode 100644 index 00000000000000..7d5714df79be69 --- /dev/null +++ b/data/sql/updates/db_world/2023_11_02_00.sql @@ -0,0 +1,367 @@ +-- DB update 2023_10_31_02 -> 2023_11_02_00 +-- Whelp, Alpha, Ambusher +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` IN (16927,16929,16928); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(16927, 0, 0, 1, 2, 0, 100, 1, 0, 60, 0, 0, 0, 0, 11, 33896, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stonescythe Whelp - Between 0-60% Health - Cast \'Desperate Defense\' (No Repeat)'), +(16927, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stonescythe Whelp - Between 0-60% Health - Say Line 0 (No Repeat)'), +(16927, 0, 2, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stonescythe Whelp - Between 0-15% Health - Flee For Assist (No Repeat)'), +(16929, 0, 0, 1, 2, 0, 100, 1, 0, 60, 0, 0, 0, 0, 11, 33896, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stonescythe Alpha - Between 0-60% Health - Cast \'Desperate Defense\' (No Repeat)'), +(16929, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stonescythe Alpha - Between 0-60% Health - Say Line 0 (No Repeat)'), +(16929, 0, 2, 0, 0, 0, 100, 0, 5000, 15000, 5000, 9000, 0, 0, 11, 33911, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Stonescythe Alpha - In Combat - Cast \'Tear Armor\''), +(16928, 0, 0, 1, 2, 0, 100, 1, 0, 60, 0, 0, 0, 0, 11, 33896, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stonescythe Ambusher - Between 0-60% Health - Cast \'Desperate Defense\' (No Repeat)'), +(16928, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stonescythe Ambusher - Between 0-60% Health - Say Line 0 (No Repeat)'), +(16928, 0, 2, 0, 9, 0, 100, 1, 0, 0, 0, 0, 0, 5, 11, 31819, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Stonescythe Ambusher - Within 0-5 Range - Cast \'Cheap Shot\' (No Repeat)'); -- Doesn't work + +-- Stonescythe Alpha +DELETE FROM `spell_custom_attr` WHERE `spell_id`=33911; +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (33911, 4194304); + +UPDATE `creature_template_addon` SET `auras` = '32732' WHERE (`entry` = 16929); + +-- Stonescythe Ambusher +UPDATE `creature_template_addon` SET `bytes1` = 0, `auras` = '22766' WHERE (`entry` = 16928); +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 16928; + +DELETE FROM `creature` WHERE `id1` = 16928; +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(61296, 16928, 0, 0, 530, 0, 0, 1, 1, 0, -646.982, 3491.79, 75.7053, 2.68565, 300, 0, 0, 5158, 0, 2, 0, 0, 0, '', 0, 0, NULL), +(61297, 16928, 0, 0, 530, 0, 0, 1, 1, 0, -917.092, 3686.01, 81.4365, 2.59059, 300, 0, 0, 5158, 0, 2, 0, 0, 0, '', 0, 0, NULL), +(61298, 16928, 0, 0, 530, 0, 0, 1, 1, 0, -1171.27, 3939.43, 150.498, 4.50381, 300, 0, 0, 5158, 0, 2, 0, 0, 0, '', 0, 0, NULL), +(61299, 16928, 0, 0, 530, 0, 0, 1, 1, 0, -1007.62, 3493.44, 138.13, 5.63558, 300, 0, 0, 5158, 0, 2, 0, 0, 0, '', 0, 0, NULL), +(61300, 16928, 0, 0, 530, 0, 0, 1, 1, 0, -883.902, 3815.24, 155.032, 0.115016, 300, 0, 0, 5158, 0, 2, 0, 0, 0, '', 0, 0, NULL); + +DELETE FROM `creature_addon` WHERE `guid` IN (61296,61297,61298,61299,61300,58785); -- 58785 whelp +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(61296, 612960, 0, 0, 1, 0, 0, '22766'), +(61297, 612970, 0, 0, 1, 0, 0, '22766'), +(61298, 612980, 0, 0, 1, 0, 0, '22766'), +(61299, 612990, 0, 0, 1, 0, 0, '22766'), +(61300, 613000, 0, 0, 1, 0, 0, '22766'); + +DELETE FROM `waypoint_data` where `id` IN (612960,612970,612980,612990,613000); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(612960, 1, -646.982, 3491.79, 75.7053, 2.68565, 0, 0, 0, 100, 0), +(612960, 2, -668.039, 3500.24, 83.347, 2.76026, 0, 0, 0, 100, 0), +(612960, 3, -691.814, 3505.73, 88.9209, 2.95347, 0, 0, 0, 100, 0), +(612960, 4, -712.436, 3509.65, 93.4389, 2.95347, 0, 0, 0, 100, 0), +(612960, 5, -728.177, 3510.19, 99.1626, 3.10741, 0, 0, 0, 100, 0), +(612960, 6, -739.753, 3506.18, 101.257, 3.47497, 0, 0, 0, 100, 0), +(612960, 7, -754.195, 3498.53, 101.073, 3.62891, 0, 0, 0, 100, 0), +(612960, 8, -771.173, 3489.53, 98.5072, 3.62891, 0, 0, 0, 100, 0), +(612960, 9, -783.773, 3482.2, 98.8041, 3.74436, 0, 0, 0, 100, 0), +(612960, 10, -798.488, 3472.74, 98.3305, 3.5111, 0, 0, 0, 100, 0), +(612960, 11, -810.997, 3470.54, 99.2646, 3.23543, 0, 0, 0, 100, 0), +(612960, 12, -819.807, 3473.35, 105.601, 2.76419, 0, 0, 0, 100, 0), +(612960, 13, -825.789, 3476.92, 108.265, 2.60397, 0, 0, 0, 100, 0), +(612960, 14, -832.446, 3480.57, 106.476, 2.8498, 0, 0, 0, 100, 0), +(612960, 15, -845.251, 3484.42, 98.0031, 2.8498, 0, 0, 0, 100, 0), +(612960, 16, -857.586, 3488.13, 92.1053, 2.8498, 0, 0, 0, 100, 0), +(612960, 17, -867.073, 3490.97, 91.2551, 2.8498, 0, 0, 0, 100, 0), +(612960, 18, -879.246, 3494.93, 93.4994, 2.65423, 0, 0, 0, 100, 0), +(612960, 19, -891.564, 3501.5, 99.6467, 2.36835, 0, 0, 0, 100, 0), +(612960, 20, -895.8, 3512.32, 102.446, 1.91282, 0, 0, 0, 100, 0), +(612960, 21, -900.894, 3526.63, 104.568, 1.91282, 0, 0, 0, 100, 0), +(612960, 22, -905.444, 3538.58, 107.124, 2.07068, 0, 0, 0, 100, 0), +(612960, 23, -913.939, 3554.51, 110.207, 1.91517, 0, 0, 0, 100, 0), +(612960, 24, -918.065, 3567.2, 113.142, 1.47142, 0, 0, 0, 100, 0), +(612960, 25, -913.081, 3582.77, 113.535, 1.26093, 0, 0, 0, 100, 0), +(612960, 26, -909, 3597.29, 114.398, 1.49655, 0, 0, 0, 100, 0), +(612960, 27, -911.064, 3610.54, 115.513, 1.76516, 0, 0, 0, 100, 0), +(612960, 28, -909.191, 3597.19, 114.451, 4.85177, 0, 0, 0, 100, 0), +(612960, 29, -911.061, 3583.99, 113.314, 4.45907, 0, 0, 0, 100, 0), +(612960, 30, -916.545, 3568.66, 112.853, 4.49991, 0, 0, 0, 100, 0), +(612960, 31, -916.695, 3556.1, 111.374, 5.08896, 0, 0, 0, 100, 0), +(612960, 32, -908.226, 3538.8, 107.913, 5.20442, 0, 0, 0, 100, 0), +(612960, 33, -899.703, 3522.88, 104.055, 5.00885, 0, 0, 0, 100, 0), +(612960, 34, -896.88, 3506.31, 103.704, 4.73318, 0, 0, 0, 100, 0), +(612960, 35, -894.44, 3497.91, 102.107, 5.05912, 0, 0, 0, 100, 0), +(612960, 36, -885.017, 3484.73, 98.4122, 5.57041, 0, 0, 0, 100, 0), +(612960, 37, -863.667, 3482.61, 93.3591, 0.014506, 0, 0, 0, 100, 0), +(612960, 38, -844.454, 3482.89, 99.0078, 0.014506, 0, 0, 0, 100, 0), +(612960, 39, -832.537, 3481.04, 106.336, 5.90421, 0, 0, 0, 100, 0), +(612960, 40, -824.515, 3477.65, 108.571, 5.64502, 0, 0, 0, 100, 0), +(612960, 41, -815.554, 3473.65, 103.378, 6.15004, 0, 0, 0, 100, 0), +(612960, 42, -803.357, 3472.76, 98.7477, 0.182581, 0, 0, 0, 100, 0), +(612960, 43, -784.468, 3473.93, 96.4372, 0.378146, 0, 0, 0, 100, 0), +(612960, 44, -768.758, 3480.17, 96.074, 0.378146, 0, 0, 0, 100, 0), +(612960, 45, -753.228, 3489.36, 97.8841, 0.576066, 0, 0, 0, 100, 0), +(612960, 46, -737.613, 3499.51, 98.6957, 0.576066, 0, 0, 0, 100, 0), +(612960, 47, -722.23, 3506.11, 95.9942, 0.265048, 0, 0, 0, 100, 0), +(612960, 48, -703.12, 3507.79, 91.1768, 6.19245, 0, 0, 0, 100, 0), +(612960, 49, -680.422, 3500.71, 86.1103, 6.0872, 0, 0, 0, 100, 0), +(612970, 1, -917.092, 3686.01, 81.4365, 2.59059, 0, 0, 0, 100, 0), +(612970, 2, -926.008, 3691.49, 86.1768, 2.59059, 0, 0, 0, 100, 0), +(612970, 3, -933.728, 3696.71, 89.7997, 1.83033, 0, 0, 0, 100, 0), +(612970, 4, -934.313, 3704.21, 91.3807, 1.39914, 0, 0, 0, 100, 0), +(612970, 5, -932.019, 3715.04, 91.9301, 0.795957, 0, 0, 0, 100, 0), +(612970, 6, -921.444, 3720.72, 93.1835, 0.287019, 0, 0, 0, 100, 0), +(612970, 7, -906.368, 3721.87, 97.896, 0.076532, 0, 0, 0, 100, 0), +(612970, 8, -893.21, 3724.06, 102.036, 0.232041, 0, 0, 0, 100, 0), +(612970, 9, -882.035, 3727.16, 105.116, 0.38755, 0, 0, 0, 100, 0), +(612970, 10, -869.641, 3732.22, 107.19, 0.38755, 0, 0, 0, 100, 0), +(612970, 11, -859.388, 3736.41, 109.23, 0.38755, 0, 0, 0, 100, 0), +(612970, 12, -850.207, 3740.15, 111.46, 0.38755, 0, 0, 0, 100, 0), +(612970, 13, -839.475, 3744.53, 112.012, 0.38755, 0, 0, 0, 100, 0), +(612970, 14, -826.481, 3749.84, 113.451, 0.38755, 0, 0, 0, 100, 0), +(612970, 15, -816.921, 3754.14, 115.161, 0.806167, 0, 0, 0, 100, 0), +(612970, 16, -807.242, 3764.23, 116.341, 0.806167, 0, 0, 0, 100, 0), +(612970, 17, -796.339, 3775.59, 117.288, 0.806167, 0, 0, 0, 100, 0), +(612970, 18, -788.295, 3783.98, 117.129, 0.806167, 0, 0, 0, 100, 0), +(612970, 19, -781.162, 3790.01, 116.644, 0.702494, 0, 0, 0, 100, 0), +(612970, 20, -772.117, 3799.06, 114.005, 0.820304, 0, 0, 0, 100, 0), +(612970, 21, -755.429, 3809.49, 108.967, 0.671078, 0, 0, 0, 100, 0), +(612970, 22, -744.026, 3818.54, 104.665, 0.774751, 0, 0, 0, 100, 0), +(612970, 23, -731.607, 3830.87, 97.8091, 0.81245, 0, 0, 0, 100, 0), +(612970, 24, -717.024, 3846.79, 88.314, 0.852505, 0, 0, 0, 100, 0), +(612970, 25, -709.488, 3856.36, 82.2608, 1.04807, 0, 0, 0, 100, 0), +(612970, 26, -702.367, 3869.09, 75.628, 1.30961, 0, 0, 0, 100, 0), +(612970, 27, -702.185, 3876.08, 74.5738, 1.57115, 0, 0, 0, 100, 0), +(612970, 28, -703.119, 3868.82, 75.9491, 4.20223, 0, 0, 0, 100, 0), +(612970, 29, -710.263, 3856.05, 82.7032, 3.99174, 0, 0, 0, 100, 0), +(612970, 30, -718.97, 3846.13, 89.3042, 3.99174, 0, 0, 0, 100, 0), +(612970, 31, -732.561, 3830.38, 98.2744, 3.93676, 0, 0, 0, 100, 0), +(612970, 32, -743.495, 3817.96, 104.626, 3.72941, 0, 0, 0, 100, 0), +(612970, 33, -755.758, 3809.43, 109.05, 3.76868, 0, 0, 0, 100, 0), +(612970, 34, -772.583, 3799.18, 114.101, 3.97917, 0, 0, 0, 100, 0), +(612970, 35, -781.18, 3789.64, 116.687, 3.77183, 0, 0, 0, 100, 0), +(612970, 36, -788.836, 3783.5, 117.159, 3.92969, 0, 0, 0, 100, 0), +(612970, 37, -797.041, 3775.25, 117.334, 3.92969, 0, 0, 0, 100, 0), +(612970, 38, -809.382, 3762.84, 115.885, 3.92969, 0, 0, 0, 100, 0), +(612970, 39, -818.866, 3753.37, 114.997, 3.69171, 0, 0, 0, 100, 0), +(612970, 40, -827.107, 3749.16, 113.341, 3.53385, 0, 0, 0, 100, 0), +(612970, 41, -840.044, 3743.81, 112.177, 3.53385, 0, 0, 0, 100, 0), +(612970, 42, -849.196, 3740.02, 111.755, 3.53385, 0, 0, 0, 100, 0), +(612970, 43, -861.615, 3734.89, 108.818, 3.53385, 0, 0, 0, 100, 0), +(612970, 44, -867.534, 3732.44, 107.596, 3.53385, 0, 0, 0, 100, 0), +(612970, 45, -881.021, 3726.86, 105.494, 3.37677, 0, 0, 0, 100, 0), +(612970, 46, -894.091, 3723.73, 101.803, 3.37677, 0, 0, 0, 100, 0), +(612970, 47, -904.88, 3721.14, 98.4548, 3.21969, 0, 0, 0, 100, 0), +(612970, 48, -921.13, 3720.98, 93.2442, 3.74434, 0, 0, 0, 100, 0), +(612970, 49, -930.731, 3714.38, 92.0086, 4.31925, 0, 0, 0, 100, 0), +(612970, 50, -932.992, 3704.25, 91.3966, 4.63262, 0, 0, 0, 100, 0), +(612970, 51, -933.691, 3694.93, 89.5042, 5.75653, 0, 0, 0, 100, 0), +(612970, 52, -926.388, 3691.28, 86.3083, 5.84842, 0, 0, 0, 100, 0), +(612980, 1, -1171.27, 3939.43, 150.498, 1.30332, 0, 0, 0, 100, 0), +(612980, 2, -1166.02, 3956.71, 136.427, 1.27583, 0, 0, 0, 100, 0), +(612980, 3, -1158.21, 3973.53, 121.491, 1.04021, 0, 0, 0, 100, 0), +(612980, 4, -1149.89, 3984.79, 111.051, 0.715054, 0, 0, 0, 100, 0), +(612980, 5, -1140.19, 3994.7, 97.2502, 0.664788, 0, 0, 0, 100, 0), +(612980, 6, -1128.45, 4003.07, 88.6663, 0.349058, 0, 0, 0, 100, 0), +(612980, 7, -1101.68, 4010.49, 86.035, 0.113438, 0, 0, 0, 100, 0), +(612980, 8, -1080.82, 4012.87, 85.5085, 0.113438, 0, 0, 0, 100, 0), +(612980, 9, -1066.91, 4014.46, 84.7468, 0.113438, 0, 0, 0, 100, 0), +(612980, 10, -1044.37, 4018.45, 81.0537, 0.309003, 0, 0, 0, 100, 0), +(612980, 11, -1024.88, 4025.45, 80.5006, 0.506923, 0, 0, 0, 100, 0), +(612980, 12, -1009.73, 4033.96, 80.5216, 0.742543, 0, 0, 0, 100, 0), +(612980, 13, -1003.53, 4042.49, 80.3447, 1.25384, 0, 0, 0, 100, 0), +(612980, 14, -1001.17, 4052.08, 78.9287, 1.45176, 0, 0, 0, 100, 0), +(612980, 15, -1000.41, 4063.5, 76.2368, 1.53658, 0, 0, 0, 100, 0), +(612980, 16, -999.935, 4077.49, 79.0768, 1.53658, 0, 0, 0, 100, 0), +(612980, 17, -1000.68, 4089.08, 82.0382, 1.69445, 0, 0, 0, 100, 0), +(612980, 18, -1001.85, 4097.62, 82.7395, 1.96776, 0, 0, 0, 100, 0), +(612980, 19, -1008.28, 4110.47, 78.237, 1.9819, 0, 0, 0, 100, 0), +(612980, 20, -1012.14, 4119.34, 75.9806, 1.9819, 0, 0, 0, 100, 0), +(612980, 21, -1016.43, 4129.17, 75.8627, 1.9819, 0, 0, 0, 100, 0), +(612980, 22, -1020.39, 4140.74, 69.4817, 1.9819, 0, 0, 0, 100, 0), +(612980, 23, -1016.01, 4126.14, 76.4527, 5.13919, 0, 0, 0, 100, 0), +(612980, 24, -1011.08, 4115.3, 76.2955, 5.13919, 0, 0, 0, 100, 0), +(612980, 25, -1004.28, 4103.51, 81.3859, 5.257, 0, 0, 0, 100, 0), +(612980, 26, -1001.02, 4093.35, 82.7356, 4.82346, 0, 0, 0, 100, 0), +(612980, 27, -1001.55, 4082.92, 80.354, 4.59256, 0, 0, 0, 100, 0), +(612980, 28, -1003.41, 4071.94, 75.2321, 4.86823, 0, 0, 0, 100, 0), +(612980, 29, -1001.32, 4064.25, 75.9438, 5.37953, 0, 0, 0, 100, 0), +(612980, 30, -989.39, 4047.53, 79.3944, 5.1282, 0, 0, 0, 100, 0), +(612980, 31, -980.558, 4025.79, 81.9783, 4.94756, 0, 0, 0, 100, 0), +(612980, 32, -977.065, 4002.31, 88.5426, 4.82975, 0, 0, 0, 100, 0), +(612980, 33, -974.228, 3978.59, 99.2027, 4.85723, 0, 0, 0, 100, 0), +(612980, 34, -970.912, 3971.07, 102.227, 5.17061, 0, 0, 0, 100, 0), +(612980, 35, -967.702, 3957.48, 102.502, 4.38364, 0, 0, 0, 100, 0), +(612980, 36, -974.058, 3946.01, 106.935, 3.87235, 0, 0, 0, 100, 0), +(612980, 37, -980.45, 3940.36, 111.731, 3.66971, 0, 0, 0, 100, 0), +(612980, 38, -989.516, 3935.07, 120.163, 3.66971, 0, 0, 0, 100, 0), +(612980, 39, -995.008, 3930.67, 126.021, 3.93832, 0, 0, 0, 100, 0), +(612980, 40, -997.879, 3927.47, 128.684, 4.29175, 0, 0, 0, 100, 0), +(612980, 41, -1000.33, 3921.44, 134.4, 4.68288, 0, 0, 0, 100, 0), +(612980, 42, -999.42, 3913.46, 139.724, 5.30727, 0, 0, 0, 100, 0), +(612980, 43, -998.011, 3917.43, 137.387, 1.71407, 0, 0, 0, 100, 0), +(612980, 44, -998.665, 3926.39, 129.616, 1.04962, 0, 0, 0, 100, 0), +(612980, 45, -992.649, 3931.98, 124.028, 0.462931, 0, 0, 0, 100, 0), +(612980, 46, -986.607, 3935.47, 117.749, 0.580741, 0, 0, 0, 100, 0), +(612980, 47, -981.634, 3938.76, 113.149, 0.703263, 0, 0, 0, 100, 0), +(612980, 48, -975.973, 3943.61, 108.666, 0.861128, 0, 0, 0, 100, 0), +(612980, 49, -969.51, 3952.55, 103.319, 1.25933, 0, 0, 0, 100, 0), +(612980, 50, -968.161, 3961.29, 102.502, 1.61275, 0, 0, 0, 100, 0), +(612980, 51, -969.615, 3970.78, 102.338, 1.88607, 0, 0, 0, 100, 0), +(612980, 52, -975.678, 3991.27, 92.8655, 1.88607, 0, 0, 0, 100, 0), +(612980, 53, -980.84, 4007.98, 86.2619, 1.87822, 0, 0, 0, 100, 0), +(612980, 54, -986.136, 4024.66, 81.7252, 1.87822, 0, 0, 0, 100, 0), +(612980, 55, -991.431, 4041.34, 79.8279, 1.87822, 0, 0, 0, 100, 0), +(612980, 56, -994.564, 4053.15, 78.9212, 1.84052, 0, 0, 0, 100, 0), +(612980, 57, -998.657, 4066.08, 76.5678, 1.84052, 0, 0, 0, 100, 0), +(612980, 58, -999.878, 4073.4, 77.4052, 1.52243, 0, 0, 0, 100, 0), +(612980, 59, -1000.13, 4083.2, 80.9055, 1.67794, 0, 0, 0, 100, 0), +(612980, 60, -1000.63, 4091.78, 82.7437, 1.67794, 0, 0, 0, 100, 0), +(612980, 61, -1001.27, 4098.73, 82.6762, 1.95126, 0, 0, 0, 100, 0), +(612980, 62, -1005.52, 4107.78, 79.6517, 2.10913, 0, 0, 0, 100, 0), +(612980, 63, -1010.91, 4116.79, 75.8364, 2.10913, 0, 0, 0, 100, 0), +(612980, 64, -1014.49, 4122.8, 76.5666, 2.10913, 0, 0, 0, 100, 0), +(612980, 65, -1012.61, 4119.42, 76.2145, 5.12113, 0, 0, 0, 100, 0), +(612980, 66, -1006.81, 4108.53, 79.3584, 5.12113, 0, 0, 0, 100, 0), +(612980, 67, -1002.44, 4098.89, 82.6773, 4.88551, 0, 0, 0, 100, 0), +(612980, 68, -1001.48, 4089.98, 81.8943, 4.72764, 0, 0, 0, 100, 0), +(612980, 69, -1003.33, 4073.94, 75.61, 4.53208, 0, 0, 0, 100, 0), +(612980, 70, -1005.21, 4063.61, 75.7989, 4.53208, 0, 0, 0, 100, 0), +(612980, 71, -1008.12, 4050.77, 80.6235, 4.45433, 0, 0, 0, 100, 0), +(612980, 72, -1011.38, 4043.49, 81.8694, 3.98544, 0, 0, 0, 100, 0), +(612980, 73, -1033.8, 4026.31, 80.7237, 3.5519, 0, 0, 0, 100, 0), +(612980, 74, -1059.64, 4018.79, 83.6699, 3.37362, 0, 0, 0, 100, 0), +(612980, 75, -1096.66, 4013.92, 85.3866, 3.22046, 0, 0, 0, 100, 0), +(612980, 76, -1116.51, 4008.76, 86.4402, 3.4875, 0, 0, 0, 100, 0), +(612980, 77, -1134.47, 3999.1, 91.9523, 3.87863, 0, 0, 0, 100, 0), +(612980, 78, -1142.24, 3992.04, 100.821, 3.87863, 0, 0, 0, 100, 0), +(612980, 79, -1150.02, 3984.98, 110.912, 3.87863, 0, 0, 0, 100, 0), +(612980, 80, -1157.1, 3977.74, 119.184, 4.1166, 0, 0, 0, 100, 0), +(612980, 81, -1164.91, 3964.93, 129.009, 4.30981, 0, 0, 0, 100, 0), +(612980, 82, -1168.23, 3954, 139.558, 4.62319, 0, 0, 0, 100, 0), +(612990, 1, -1007.62, 3493.44, 138.13, 5.74161, 0, 0, 0, 100, 0), +(612990, 2, -1000.27, 3489.18, 130.611, 5.5052, 0, 0, 0, 100, 0), +(612990, 3, -988.201, 3477.29, 119.838, 5.5052, 0, 0, 0, 100, 0), +(612990, 4, -973.942, 3463.5, 109.558, 5.66306, 0, 0, 0, 100, 0), +(612990, 5, -964.907, 3458.24, 106.304, 5.85863, 0, 0, 0, 100, 0), +(612990, 6, -951.58, 3457.56, 104.184, 0.015266, 0, 0, 0, 100, 0), +(612990, 7, -925.92, 3457.08, 100.329, 6.26939, 0, 0, 0, 100, 0), +(612990, 8, -903.724, 3452.09, 95.4655, 6.06205, 0, 0, 0, 100, 0), +(612990, 9, -882.083, 3447.37, 93.7854, 6.14216, 0, 0, 0, 100, 0), +(612990, 10, -864.202, 3444.83, 92.9012, 6.14216, 0, 0, 0, 100, 0), +(612990, 11, -850.331, 3442.97, 93.7365, 6.25997, 0, 0, 0, 100, 0), +(612990, 12, -840.311, 3444.3, 97.1225, 0.100089, 0, 0, 0, 100, 0), +(612990, 13, -829.049, 3444.43, 97.5387, 0.623949, 0, 0, 0, 100, 0), +(612990, 14, -823.644, 3449.2, 101.677, 0.781815, 0, 0, 0, 100, 0), +(612990, 15, -819.174, 3453.64, 101.565, 0.781815, 0, 0, 0, 100, 0), +(612990, 16, -813.292, 3459.48, 97.6405, 0.781815, 0, 0, 0, 100, 0), +(612990, 17, -808.607, 3464.66, 97.5086, 0.934967, 0, 0, 0, 100, 0), +(612990, 18, -803.552, 3471.51, 98.2578, 0.934967, 0, 0, 0, 100, 0), +(612990, 19, -795.401, 3486.53, 101.875, 1.13917, 0, 0, 0, 100, 0), +(612990, 20, -793.861, 3496.49, 103.956, 1.60805, 0, 0, 0, 100, 0), +(612990, 21, -794.382, 3510.48, 106.993, 1.60805, 0, 0, 0, 100, 0), +(612990, 22, -795.167, 3523.75, 108.789, 1.68816, 0, 0, 0, 100, 0), +(612990, 23, -798.125, 3538.12, 111.565, 1.80597, 0, 0, 0, 100, 0), +(612990, 24, -800.802, 3554.68, 115.355, 1.68816, 0, 0, 0, 100, 0), +(612990, 25, -802.032, 3565.11, 118.057, 1.68816, 0, 0, 0, 100, 0), +(612990, 26, -801.783, 3581.47, 120.883, 1.4549, 0, 0, 0, 100, 0), +(612990, 27, -802.011, 3564.58, 117.938, 4.8871, 0, 0, 0, 100, 0), +(612990, 28, -800.145, 3554.25, 115.262, 4.89102, 0, 0, 0, 100, 0), +(612990, 29, -797.161, 3537.61, 111.41, 4.89102, 0, 0, 0, 100, 0), +(612990, 30, -794.568, 3523.24, 108.635, 4.73394, 0, 0, 0, 100, 0), +(612990, 31, -794.291, 3510.4, 106.971, 4.73394, 0, 0, 0, 100, 0), +(612990, 32, -793.952, 3494.69, 103.573, 4.63341, 0, 0, 0, 100, 0), +(612990, 33, -794.781, 3484.22, 100.959, 4.15903, 0, 0, 0, 100, 0), +(612990, 34, -808.911, 3464.4, 97.574, 3.9454, 0, 0, 0, 100, 0), +(612990, 35, -812.943, 3460.21, 97.9133, 3.9454, 0, 0, 0, 100, 0), +(612990, 36, -819.016, 3453.91, 101.435, 3.9454, 0, 0, 0, 100, 0), +(612990, 37, -823.898, 3448.85, 101.523, 3.9454, 0, 0, 0, 100, 0), +(612990, 38, -829.557, 3442.98, 96.3154, 2.94952, 0, 0, 0, 100, 0), +(612990, 39, -840.841, 3444.34, 97.0612, 3.22991, 0, 0, 0, 100, 0), +(612990, 40, -850.703, 3443.43, 93.8689, 2.91967, 0, 0, 0, 100, 0), +(612990, 41, -864.652, 3444.11, 92.7238, 2.93538, 0, 0, 0, 100, 0), +(612990, 42, -882.329, 3447.81, 93.886, 2.93538, 0, 0, 0, 100, 0), +(612990, 43, -903.432, 3452.22, 95.4664, 2.93538, 0, 0, 0, 100, 0), +(612990, 44, -926.852, 3457.08, 100.479, 3.06576, 0, 0, 0, 100, 0), +(612990, 45, -952.426, 3457.29, 104.25, 3.22127, 0, 0, 0, 100, 0), +(612990, 46, -964.028, 3457.69, 106.011, 2.77752, 0, 0, 0, 100, 0), +(612990, 47, -974.238, 3462.86, 109.309, 2.41309, 0, 0, 0, 100, 0), +(612990, 48, -987.943, 3477.91, 120.001, 2.41309, 0, 0, 0, 100, 0), +(613000, 1, -883.902, 3815.24, 155.032, 0.115016, 0, 0, 0, 100, 0), +(613000, 2, -866.321, 3819.42, 143.614, 0.363988, 0, 0, 0, 100, 0), +(613000, 3, -857.883, 3826.87, 134.224, 1.0732, 0, 0, 0, 100, 0), +(613000, 4, -852.887, 3836.06, 123.863, 0.757472, 0, 0, 0, 100, 0), +(613000, 5, -843.807, 3842.7, 116.465, 0.323932, 0, 0, 0, 100, 0), +(613000, 6, -827.218, 3848.27, 112.925, 0.323932, 0, 0, 0, 100, 0), +(613000, 7, -813.946, 3852.72, 111.301, 0.323932, 0, 0, 0, 100, 0), +(613000, 8, -797.357, 3858.29, 108.921, 0.323932, 0, 0, 0, 100, 0), +(613000, 9, -789.58, 3862.87, 106.204, 1.14625, 0, 0, 0, 100, 0), +(613000, 10, -786.217, 3877.37, 100.771, 1.53973, 0, 0, 0, 100, 0), +(613000, 11, -787.039, 3895.84, 94.8607, 1.89316, 0, 0, 0, 100, 0), +(613000, 12, -792.819, 3912.6, 93.5031, 1.90887, 0, 0, 0, 100, 0), +(613000, 13, -798.624, 3929.11, 92.1476, 1.90887, 0, 0, 0, 100, 0), +(613000, 14, -806.438, 3946.41, 91.2526, 2.02432, 0, 0, 0, 100, 0), +(613000, 15, -812.527, 3957.02, 90.634, 2.13977, 0, 0, 0, 100, 0), +(613000, 16, -821.648, 3969.31, 89.2225, 2.41545, 0, 0, 0, 100, 0), +(613000, 17, -831.029, 3978.54, 87.6796, 2.41545, 0, 0, 0, 100, 0), +(613000, 18, -840.806, 3985.38, 88.0529, 2.57096, 0, 0, 0, 100, 0), +(613000, 19, -864.536, 3998.61, 87.9035, 2.65107, 0, 0, 0, 100, 0), +(613000, 20, -881.942, 4010.37, 86.1201, 2.53561, 0, 0, 0, 100, 0), +(613000, 21, -896.456, 4019.34, 84.2886, 2.76888, 0, 0, 0, 100, 0), +(613000, 22, -909.495, 4024.44, 83.9085, 2.76888, 0, 0, 0, 100, 0), +(613000, 23, -930.28, 4027.95, 83.3102, 3.67052, 0, 0, 0, 100, 0), +(613000, 24, -942.952, 4019.18, 85.7441, 3.94384, 0, 0, 0, 100, 0), +(613000, 25, -951.01, 4004.82, 89.9901, 4.42843, 0, 0, 0, 100, 0), +(613000, 26, -957.652, 3980.42, 99.4742, 4.50697, 0, 0, 0, 100, 0), +(613000, 27, -962.654, 3955.51, 102.519, 4.86039, 0, 0, 0, 100, 0), +(613000, 28, -960.186, 3940.06, 109.491, 5.0159, 0, 0, 0, 100, 0), +(613000, 29, -954.745, 3932.73, 113.372, 5.35284, 0, 0, 0, 100, 0), +(613000, 30, -951.805, 3928.54, 113.254, 5.15728, 0, 0, 0, 100, 0), +(613000, 31, -947.94, 3920.43, 115.986, 5.15728, 0, 0, 0, 100, 0), +(613000, 32, -945.544, 3913.56, 120.594, 4.70017, 0, 0, 0, 100, 0), +(613000, 33, -947.432, 3906.96, 123.711, 4.14882, 0, 0, 0, 100, 0), +(613000, 34, -956.781, 3892.16, 125.741, 4.14882, 0, 0, 0, 100, 0), +(613000, 35, -964.283, 3883.54, 128.997, 4.14882, 0, 0, 0, 100, 0), +(613000, 36, -967.124, 3871.09, 136.986, 4.58236, 0, 0, 0, 100, 0), +(613000, 37, -963.066, 3859.67, 143.225, 5.20911, 0, 0, 0, 100, 0), +(613000, 38, -957.817, 3853.79, 146.29, 5.75339, 0, 0, 0, 100, 0), +(613000, 39, -949.102, 3852.52, 150.526, 0.229688, 0, 0, 0, 100, 0), +(613000, 40, -942.815, 3860.96, 153.78, 1.13211, 0, 0, 0, 100, 0), +(613000, 41, -937.82, 3872.37, 158.677, 1.09912, 0, 0, 0, 100, 0), +(613000, 42, -932.153, 3879.17, 160.452, 0.859578, 0, 0, 0, 100, 0), +(613000, 43, -926.192, 3884.25, 157.241, 0.272885, 0, 0, 0, 100, 0), +(613000, 44, -914.509, 3886.43, 149.865, 0.155075, 0, 0, 0, 100, 0), +(613000, 45, -909.079, 3891.92, 145.448, 1.04807, 0, 0, 0, 100, 0), +(613000, 46, -907.437, 3900.86, 139.699, 1.63477, 0, 0, 0, 100, 0), +(613000, 47, -908.43, 3905.46, 137.44, 2.48457, 0, 0, 0, 100, 0), +(613000, 48, -917.699, 3908.43, 133.434, 2.91339, 0, 0, 0, 100, 0), +(613000, 49, -907.672, 3905.26, 137.768, 4.97114, 0, 0, 0, 100, 0), +(613000, 50, -906.874, 3901.13, 139.86, 4.60043, 0, 0, 0, 100, 0), +(613000, 51, -908.488, 3892.11, 145.325, 4.32004, 0, 0, 0, 100, 0), +(613000, 52, -914.11, 3886.45, 149.706, 3.37442, 0, 0, 0, 100, 0), +(613000, 53, -926.398, 3884.14, 157.373, 3.7357, 0, 0, 0, 100, 0), +(613000, 54, -931.886, 3878.94, 160.606, 3.92891, 0, 0, 0, 100, 0), +(613000, 55, -937.467, 3872.28, 158.778, 4.28706, 0, 0, 0, 100, 0), +(613000, 56, -942.905, 3859.79, 153.531, 4.05143, 0, 0, 0, 100, 0), +(613000, 57, -949.055, 3852.01, 150.712, 3.13409, 0, 0, 0, 100, 0), +(613000, 58, -957.357, 3853.77, 146.434, 2.17669, 0, 0, 0, 100, 0), +(613000, 59, -962.5, 3860.28, 142.804, 1.9395, 0, 0, 0, 100, 0), +(613000, 60, -966.927, 3870.49, 137.149, 1.36223, 0, 0, 0, 100, 0), +(613000, 61, -963.771, 3883.5, 128.825, 0.88785, 0, 0, 0, 100, 0), +(613000, 62, -956.539, 3891.88, 125.746, 1.06692, 0, 0, 0, 100, 0), +(613000, 63, -947.525, 3906, 123.962, 1.29547, 0, 0, 0, 100, 0), +(613000, 64, -945.256, 3914.4, 120.144, 1.88452, 0, 0, 0, 100, 0), +(613000, 65, -947.702, 3920.96, 116.021, 2.0848, 0, 0, 0, 100, 0), +(613000, 66, -952.066, 3928.69, 113.149, 2.0848, 0, 0, 0, 100, 0), +(613000, 67, -954.686, 3932.67, 113.385, 2.24266, 0, 0, 0, 100, 0), +(613000, 68, -960.04, 3939.58, 109.774, 1.70545, 0, 0, 0, 100, 0), +(613000, 69, -961.993, 3956.69, 102.559, 1.39522, 0, 0, 0, 100, 0), +(613000, 70, -957.594, 3979.55, 99.9281, 1.3206, 0, 0, 0, 100, 0), +(613000, 71, -950.874, 4004.39, 90.1346, 1.00723, 0, 0, 0, 100, 0), +(613000, 72, -942.656, 4018.96, 85.8151, 0.618458, 0, 0, 0, 100, 0), +(613000, 73, -930.919, 4028.06, 83.2657, 6.15473, 0, 0, 0, 100, 0), +(613000, 74, -909.68, 4024.72, 83.859, 5.91911, 0, 0, 0, 100, 0), +(613000, 75, -896.129, 4019.38, 84.2688, 5.68113, 0, 0, 0, 100, 0), +(613000, 76, -881.342, 4009.85, 86.2724, 5.68113, 0, 0, 0, 100, 0), +(613000, 77, -864.288, 3998.72, 87.913, 5.8068, 0, 0, 0, 100, 0), +(613000, 78, -840.036, 3985.31, 88.0187, 5.65129, 0, 0, 0, 100, 0), +(613000, 79, -829.879, 3977.87, 87.6329, 5.47693, 0, 0, 0, 100, 0), +(613000, 80, -821.48, 3969.9, 89.1567, 5.39211, 0, 0, 0, 100, 0), +(613000, 81, -813.095, 3958.57, 90.5741, 5.23188, 0, 0, 0, 100, 0), +(613000, 82, -806.216, 3946.06, 91.2668, 5.07638, 0, 0, 0, 100, 0), +(613000, 83, -798.468, 3928.75, 92.2036, 5.03868, 0, 0, 0, 100, 0), +(613000, 84, -792.492, 3912.82, 93.4395, 5.11643, 0, 0, 0, 100, 0), +(613000, 85, -786.84, 3896.35, 94.6782, 4.76536, 0, 0, 0, 100, 0), +(613000, 86, -786.121, 3878.29, 100.502, 4.48968, 0, 0, 0, 100, 0), +(613000, 87, -788.124, 3863.61, 105.516, 3.70507, 0, 0, 0, 100, 0), +(613000, 88, -795.949, 3858.74, 108.592, 3.50479, 0, 0, 0, 100, 0), +(613000, 89, -814.243, 3852.41, 111.347, 3.50479, 0, 0, 0, 100, 0), +(613000, 90, -828.511, 3847.51, 113.164, 3.50479, 0, 0, 0, 100, 0), +(613000, 91, -844.763, 3841.84, 116.786, 3.698, 0, 0, 0, 100, 0), +(613000, 92, -851.874, 3836.83, 122.654, 4.04908, 0, 0, 0, 100, 0), +(613000, 93, -857.369, 3826.42, 134.113, 4.00981, 0, 0, 0, 100, 0), +(613000, 94, -866.727, 3819.13, 143.969, 3.57705, 0, 0, 0, 100, 0); diff --git a/data/sql/updates/db_world/2023_11_02_01.sql b/data/sql/updates/db_world/2023_11_02_01.sql new file mode 100644 index 00000000000000..4fea02ed3d34a0 --- /dev/null +++ b/data/sql/updates/db_world/2023_11_02_01.sql @@ -0,0 +1,7 @@ +-- DB update 2023_11_02_00 -> 2023_11_02_01 +-- Choking Vines +DELETE FROM `spell_custom_attr` WHERE `spell_id`=35244; +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (35244, 4194304); + +DELETE FROM `spell_script_names` WHERE `spell_id`=35244 AND `ScriptName`='spell_gen_choking_vines'; +INSERT INTO `spell_script_names` VALUES (35244, 'spell_gen_choking_vines'); diff --git a/data/sql/updates/db_world/2023_11_02_02.sql b/data/sql/updates/db_world/2023_11_02_02.sql new file mode 100644 index 00000000000000..823d6d29a0f4de --- /dev/null +++ b/data/sql/updates/db_world/2023_11_02_02.sql @@ -0,0 +1,20 @@ +-- DB update 2023_11_02_01 -> 2023_11_02_02 +-- Captive Child +DELETE FROM `creature_addon` WHERE `guid`=78491; + +DELETE FROM `creature` WHERE `id1` = 22314; +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(78883, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2580.26, 5430.34, 28.0412, 3.735, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78884, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2579.23, 5430.93, 28.044, 2.28638, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78885, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2463.61, 5402, 2.12734, 5.3058, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78886, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2464.22, 5402.19, 2.16002, 0.575959, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78887, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2544.75, 5484.75, 8.3439, 5.53269, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78888, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2545.31, 5484.29, 8.3446, 0.226893, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78889, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2579.58, 5430.13, 28.0408, 5.46288, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78890, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2579.89, 5431.16, 28.0445, 6.17846, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78891, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2525.89, 5384.91, 28.0885, 1.01229, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78892, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2526.76, 5384.53, 28.0916, 2.21657, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78893, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2526.22, 5384.38, 28.0895, 1.37881, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78894, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2525.42, 5384.26, 28.0864, 4.76475, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78895, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2525.61, 5383.78, 28.0869, 4.46804, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL), +(78896, 22314, 0, 0, 530, 0, 0, 1, 1, 0, -2526.51, 5383.79, 28.0903, 3.19395, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL); diff --git a/data/sql/updates/db_world/2023_11_02_03.sql b/data/sql/updates/db_world/2023_11_02_03.sql new file mode 100644 index 00000000000000..f2b68888ad4782 --- /dev/null +++ b/data/sql/updates/db_world/2023_11_02_03.sql @@ -0,0 +1,8 @@ +-- DB update 2023_11_02_02 -> 2023_11_02_03 +-- Skullflame Shield / Demon Forged Breastplate proc on critical/normal/partial block +-- Demon Forged Breastplate, Drain Life, Flamestrike +DELETE FROM `spell_proc_event` WHERE `entry` IN (16611,18815,18816); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(16611, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0), +(18815, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0), +(18816, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0); diff --git a/src/common/Cryptography/OpenSSLCrypto.cpp b/src/common/Cryptography/OpenSSLCrypto.cpp index 1a69a0c0f86075..036a94c0e7e638 100644 --- a/src/common/Cryptography/OpenSSLCrypto.cpp +++ b/src/common/Cryptography/OpenSSLCrypto.cpp @@ -16,6 +16,7 @@ */ #include "OpenSSLCrypto.h" +#include "Errors.h" #include // NOTE: this import is NEEDED (even though some IDEs report it as unused) #if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1010000fL diff --git a/src/common/Threading/ProcessPriority.cpp b/src/common/Threading/ProcessPriority.cpp index eb1401a181fe7b..93e6893360244a 100644 --- a/src/common/Threading/ProcessPriority.cpp +++ b/src/common/Threading/ProcessPriority.cpp @@ -16,6 +16,7 @@ */ #include "ProcessPriority.h" +#include "Log.h" #ifdef _WIN32 // Windows #include diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 8e728460b8fc97..01e9fa84b2d970 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -1372,13 +1372,22 @@ DetectPosCollision = 1 CheckGameObjectLoS = 1 +# +# GridUnload +# Description: Unload grids to save memory. Can be disabled if enough memory is available +# to speed up moving players to new grids. +# Default: 1 - (enable, Unload grids) +# 0 - (disable, Do not unload grids) + +GridUnload = 1 + # # PreloadAllNonInstancedMapGrids -# Description: Preload all grids on all non-instanced maps. This will take a great amount -# of additional RAM (ca. 9 GB) and causes the server to take longer to start, -# but can increase performance if used on a server with a high amount of players. -# It will also activate all creatures which are set active (e.g. the Fel Reavers -# in Hellfire Peninsula) on server start. +# Description: Preload all grids on all non-instanced maps. Requires GridUnload to be disabled. +# This will take a great amount of additional RAM (ca. 9 GB) and causes the server +# to take longer to start, but can increase performance if used on a server with a +# high amount of players. It will also activate all creatures which are set active +# (e.g. the Fel Reavers in Hellfire Peninsula) on server start. # Default: 0 - (Disabled) # 1 - (Enabled) diff --git a/src/server/game/AI/CoreAI/TotemAI.h b/src/server/game/AI/CoreAI/TotemAI.h index 36639a006a1dbb..91de5e2ea2162a 100644 --- a/src/server/game/AI/CoreAI/TotemAI.h +++ b/src/server/game/AI/CoreAI/TotemAI.h @@ -50,7 +50,7 @@ class KillMagnetEvent : public BasicEvent KillMagnetEvent(Unit& self) : _self(self) { } bool Execute(uint64 /*e_time*/, uint32 /*p_time*/) override { - _self.setDeathState(JUST_DIED); + _self.setDeathState(DeathState::JustDied); return true; } diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index 7369277d59319e..88e33c93cbaf80 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -259,7 +259,7 @@ void npc_escortAI::UpdateAI(uint32 diff) if (m_bCanInstantRespawn) { - me->setDeathState(JUST_DIED); + me->setDeathState(DeathState::JustDied); me->Respawn(); } else @@ -299,7 +299,7 @@ void npc_escortAI::UpdateAI(uint32 diff) { if (m_bCanInstantRespawn) { - me->setDeathState(JUST_DIED); + me->setDeathState(DeathState::JustDied); me->Respawn(); } else diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 82ed79027ef833..0216c5be204272 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1635,7 +1635,7 @@ bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float if (Creature* creature = AddCreature(entry, type, x, y, z, o)) { - creature->setDeathState(DEAD); + creature->setDeathState(DeathState::Dead); creature->SetGuidValue(UNIT_FIELD_CHANNEL_OBJECT, creature->GetGUID()); // aura /// @todo: Fix display here diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index ca5191964a9f6c..d9369ec4878c8c 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -339,7 +339,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type) //else wander_distance will be 15, so creatures move maximum=10 //creature->SetDefaultMovementType(RANDOM_MOTION_TYPE); creature->GetMotionMaster()->Initialize(); - creature->setDeathState(JUST_DIED); + creature->setDeathState(DeathState::JustDied); creature->Respawn(); //TODO: find a way to add a motionmaster without killing the creature (i //just copied this code from a gm-command diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 9a678623a0c123..e0ef54ee42a200 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -361,7 +361,7 @@ void Creature::DisappearAndDie() //SetVisibility(VISIBILITY_OFF); //ObjectAccessor::UpdateObjectVisibility(this); if (IsAlive()) - setDeathState(JUST_DIED, true); + setDeathState(DeathState::JustDied, true); RemoveCorpse(false, true); } @@ -387,11 +387,11 @@ void Creature::SearchFormation() void Creature::RemoveCorpse(bool setSpawnTime, bool skipVisibility) { - if (getDeathState() != CORPSE) + if (getDeathState() != DeathState::Corpse) return; m_corpseRemoveTime = GameTime::GetGameTime().count(); - setDeathState(DEAD); + setDeathState(DeathState::Dead); RemoveAllAuras(); if (!skipVisibility) // pussywizard DestroyForNearbyPlayers(); // pussywizard: previous UpdateObjectVisibility() @@ -668,15 +668,15 @@ void Creature::Update(uint32 diff) switch (m_deathState) { - case JUST_RESPAWNED: + case DeathState::JustRespawned: // Must not be called, see Creature::setDeathState JUST_RESPAWNED -> ALIVE promoting. - LOG_ERROR("entities.unit", "Creature ({}) in wrong state: JUST_RESPAWNED (4)", GetGUID().ToString()); + LOG_ERROR("entities.unit", "Creature ({}) in wrong state: DeathState::JustRespawned (4)", GetGUID().ToString()); break; - case JUST_DIED: + case DeathState::JustDied: // Must not be called, see Creature::setDeathState JUST_DIED -> CORPSE promoting. - LOG_ERROR("entities.unit", "Creature ({}) in wrong state: JUST_DEAD (1)", GetGUID().ToString()); + LOG_ERROR("entities.unit", "Creature ({}) in wrong state: DeathState::JustDead (1)", GetGUID().ToString()); break; - case DEAD: + case DeathState::Dead: { time_t now = GameTime::GetGameTime().count(); if (m_respawnTime <= now) @@ -718,11 +718,11 @@ void Creature::Update(uint32 diff) } break; } - case CORPSE: + case DeathState::Corpse: { Unit::Update(diff); // deathstate changed on spells update, prevent problems - if (m_deathState != CORPSE) + if (m_deathState != DeathState::Corpse) break; if (m_groupLootTimer && lootingGroupLowGUID) @@ -747,7 +747,7 @@ void Creature::Update(uint32 diff) } break; } - case ALIVE: + case DeathState::Alive: { Unit::Update(diff); @@ -1784,12 +1784,12 @@ bool Creature::LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool ad m_wanderDistance = data->wander_distance; m_respawnDelay = data->spawntimesecs; - m_deathState = ALIVE; + m_deathState = DeathState::Alive; m_respawnTime = GetMap()->GetCreatureRespawnTime(m_spawnId); if (m_respawnTime) // respawn on Update { - m_deathState = DEAD; + m_deathState = DeathState::Dead; if (CanFly()) { float tz = map->GetHeight(GetPhaseMask(), data->posX, data->posY, data->posZ, true, MAX_FALL_DISTANCE); @@ -1819,7 +1819,7 @@ bool Creature::LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool ad SetPower(POWER_MANA, GetMaxPower(POWER_MANA)); } - SetHealth(m_deathState == ALIVE ? curhealth : 0); + SetHealth(m_deathState == DeathState::Alive ? curhealth : 0); // checked at creature_template loading m_defaultMovementType = MovementGeneratorType(data->movementType); @@ -2022,7 +2022,7 @@ void Creature::setDeathState(DeathState s, bool despawn) { Unit::setDeathState(s, despawn); - if (s == JUST_DIED) + if (s == DeathState::JustDied) { _lastDamagedTime.reset(); @@ -2066,9 +2066,9 @@ void Creature::setDeathState(DeathState s, bool despawn) if (needsFalling) GetMotionMaster()->MoveFall(0, true); - Unit::setDeathState(CORPSE, despawn); + Unit::setDeathState(DeathState::Corpse, despawn); } - else if (s == JUST_RESPAWNED) + else if (s == DeathState::JustRespawned) { //if (IsPet()) // setActive(true); @@ -2090,7 +2090,7 @@ void Creature::setDeathState(DeathState s, bool despawn) ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~(UNIT_STATE_IGNORE_PATHFINDING | UNIT_STATE_NO_ENVIRONMENT_UPD))); SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool)); - Unit::setDeathState(ALIVE, despawn); + Unit::setDeathState(DeathState::Alive, despawn); Motion_Initialize(); LoadCreaturesAddon(true); @@ -2106,14 +2106,14 @@ void Creature::Respawn(bool force) if (force) { if (IsAlive()) - setDeathState(JUST_DIED); - else if (getDeathState() != CORPSE) - setDeathState(CORPSE); + setDeathState(DeathState::JustDied); + else if (getDeathState() != DeathState::Corpse) + setDeathState(DeathState::Corpse); } RemoveCorpse(false, false); - if (getDeathState() == DEAD) + if (getDeathState() == DeathState::Dead) { if (m_spawnId) { @@ -2141,7 +2141,7 @@ void Creature::Respawn(bool force) loot.clear(); SelectLevel(); - setDeathState(JUST_RESPAWNED); + setDeathState(DeathState::JustRespawned); // MDic - Acidmanifesto // Do not override transform auras @@ -2188,7 +2188,7 @@ void Creature::ForcedDespawn(uint32 timeMSToDespawn, Seconds forceRespawnTimer) } if (IsAlive()) - setDeathState(JUST_DIED, true); + setDeathState(DeathState::JustDied, true); // Xinef: set new respawn time, ignore corpse decay time... RemoveCorpse(true); diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index 69bd080dd86166..673eedc92616ab 100644 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -67,7 +67,7 @@ void TempSummon::Update(uint32 diff) { Creature::Update(diff); - if (m_deathState == DEAD) + if (m_deathState == DeathState::Dead) { UnSummon(); return; @@ -107,7 +107,7 @@ void TempSummon::Update(uint32 diff) } case TEMPSUMMON_TIMED_DESPAWN_OOC_ALIVE: { - if (!IsInCombat() && m_deathState != CORPSE) + if (!IsInCombat() && m_deathState != DeathState::Corpse) { if (m_timer <= diff) { @@ -124,7 +124,7 @@ void TempSummon::Update(uint32 diff) } case TEMPSUMMON_CORPSE_TIMED_DESPAWN: { - if (m_deathState == CORPSE) + if (m_deathState == DeathState::Corpse) { if (m_timer <= diff) { @@ -139,7 +139,7 @@ void TempSummon::Update(uint32 diff) case TEMPSUMMON_CORPSE_DESPAWN: { // if m_deathState is DEAD, CORPSE was skipped - if (m_deathState == CORPSE) + if (m_deathState == DeathState::Corpse) { UnSummon(); return; @@ -154,7 +154,7 @@ void TempSummon::Update(uint32 diff) case TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN: { // if m_deathState is DEAD, CORPSE was skipped - if (m_deathState == CORPSE) + if (m_deathState == DeathState::Corpse) { UnSummon(); return; @@ -395,7 +395,7 @@ bool Minion::IsGuardianPet() const void Minion::setDeathState(DeathState s, bool despawn) { Creature::setDeathState(s, despawn); - if (s == JUST_DIED && IsGuardianPet()) + if (s == DeathState::JustDied && IsGuardianPet()) if (Unit* owner = GetOwner()) if (owner->GetTypeId() == TYPEID_PLAYER && owner->GetMinionGUID() == GetGUID()) for (Unit::ControlSet::const_iterator itr = owner->m_Controlled.begin(); itr != owner->m_Controlled.end(); ++itr) diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 36a770ac10a1ee..ba190698c3385a 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -472,7 +472,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c else { if (!curHealth && getPetType() == HUNTER_PET) - setDeathState(JUST_DIED); + setDeathState(DeathState::JustDied); else { SetHealth(curHealth > GetMaxHealth() ? GetMaxHealth() : curHealth); @@ -616,7 +616,7 @@ void Pet::DeleteFromDB(ObjectGuid::LowType guidlow) void Pet::setDeathState(DeathState s, bool /*despawn = false*/) // overwrite virtual Creature::setDeathState and Unit::setDeathState { Creature::setDeathState(s); - if (getDeathState() == CORPSE) + if (getDeathState() == DeathState::Corpse) { if (getPetType() == HUNTER_PET) { @@ -632,7 +632,7 @@ void Pet::setDeathState(DeathState s, bool /*despawn = false*/) //SetUnitFlag(UNIT_FLAG_STUNNED); } } - else if (getDeathState() == ALIVE) + else if (getDeathState() == DeathState::Alive) { //RemoveUnitFlag(UNIT_FLAG_STUNNED); CastPetAuras(true); @@ -651,7 +651,7 @@ void Pet::Update(uint32 diff) switch (m_deathState) { - case CORPSE: + case DeathState::Corpse: { if (getPetType() != HUNTER_PET || m_corpseRemoveTime <= GameTime::GetGameTime().count()) { @@ -660,7 +660,7 @@ void Pet::Update(uint32 diff) } break; } - case ALIVE: + case DeathState::Alive: { // unsummon pet that lost owner Player* owner = GetOwner(); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 96de0f8ab1d3c9..7a153cb85a2806 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -1025,7 +1025,7 @@ void Player::setDeathState(DeathState s, bool /*despawn = false*/) bool cur = IsAlive(); - if (s == JUST_DIED) + if (s == DeathState::JustDied) { if (!cur) { @@ -1040,7 +1040,7 @@ void Player::setDeathState(DeathState s, bool /*despawn = false*/) clearResurrectRequestData(); - //FIXME: is pet dismissed at dying or releasing spirit? if second, add setDeathState(DEAD) to HandleRepopRequestOpcode and define pet unsummon here with (s == DEAD) + //FIXME: is pet dismissed at dying or releasing spirit? if second, add setDeathState(DeathState::Dead) to HandleRepopRequestOpcode and define pet unsummon here with (s == DEAD) RemovePet(nullptr, PET_SAVE_NOT_IN_SLOT, true); // save value before aura remove in Unit::setDeathState @@ -1060,7 +1060,7 @@ void Player::setDeathState(DeathState s, bool /*despawn = false*/) ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_CONDITION_NO_DEATH, 0); } // xinef: enable passive area auras! - else if (s == ALIVE) + else if (s == DeathState::Alive) ClearUnitState(UNIT_STATE_ISOLATED); Unit::setDeathState(s); @@ -1069,7 +1069,7 @@ void Player::setDeathState(DeathState s, bool /*despawn = false*/) ArenaSpectator::SendCommand_UInt32Value(FindMap(), GetGUID(), "STA", IsAlive() ? 1 : 0); // restore resurrection spell id for player after aura remove - if (s == JUST_DIED && cur && ressSpellId) + if (s == DeathState::JustDied && cur && ressSpellId) SetUInt32Value(PLAYER_SELF_RES_SPELL, ressSpellId); if (IsAlive() && !cur) @@ -4714,7 +4714,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness) if (GetSession()->IsARecruiter() || (GetSession()->GetRecruiterId() != 0)) SetDynamicFlag(UNIT_DYNFLAG_REFER_A_FRIEND); - setDeathState(ALIVE); + setDeathState(DeathState::Alive); SetMovement(MOVE_LAND_WALK); SetMovement(MOVE_UNROOT); SetWaterWalking(false); @@ -4782,7 +4782,7 @@ void Player::KillPlayer() StopMirrorTimers(); //disable timers(bars) - setDeathState(CORPSE); + setDeathState(DeathState::Corpse); //SetUnitFlag(UNIT_FLAG_NOT_IN_PVP); ReplaceAllDynamicFlags(UNIT_DYNFLAG_NONE); diff --git a/src/server/game/Entities/Player/PlayerStorage.cpp b/src/server/game/Entities/Player/PlayerStorage.cpp index 060fb00f6c439b..3170a10e27415f 100644 --- a/src/server/game/Entities/Player/PlayerStorage.cpp +++ b/src/server/game/Entities/Player/PlayerStorage.cpp @@ -5508,7 +5508,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons // add ghost flag (must be after aura load: PLAYER_FLAGS_GHOST set in aura) if (HasPlayerFlag(PLAYER_FLAGS_GHOST)) { - m_deathState = DEAD; + m_deathState = DeathState::Dead; AddUnitState(UNIT_STATE_ISOLATED); } diff --git a/src/server/game/Entities/Player/PlayerUpdates.cpp b/src/server/game/Entities/Player/PlayerUpdates.cpp index e10be9b3bd2ac0..0c8bad9ae9f670 100644 --- a/src/server/game/Entities/Player/PlayerUpdates.cpp +++ b/src/server/game/Entities/Player/PlayerUpdates.cpp @@ -311,7 +311,7 @@ void Player::Update(uint32 p_time) RegenerateAll(); } - if (m_deathState == JUST_DIED) + if (m_deathState == DeathState::JustDied) KillPlayer(); if (m_nextSave) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 7e2353cda03711..50601e4500ed36 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -249,7 +249,7 @@ Unit::Unit(bool isWorldObject) : WorldObject(isWorldObject), m_rootTimes = 0; m_state = 0; - m_deathState = ALIVE; + m_deathState = DeathState::Alive; for (uint8 i = 0; i < CURRENT_MAX_SPELL; ++i) m_currentSpells[i] = nullptr; @@ -570,6 +570,13 @@ void Unit::UpdateSplineMovement(uint32 t_diff) // this code cant be placed inside EscortMovementGenerator, because we cant delete active MoveGen while it is updated SplineHandler handler(this); movespline->updateState(t_diff, handler); + // Xinef: Spline was cleared by StopMoving, return + if (!movespline->Initialized()) { + DisableSpline(); + return; + } + + bool arrived = movespline->Finalized(); if (movespline->isCyclic()) { @@ -585,8 +592,6 @@ void Unit::UpdateSplineMovement(uint32 t_diff) } } - bool arrived = movespline->Finalized(); - if (arrived) { DisableSpline(); @@ -4631,7 +4636,7 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator& i, AuraRemoveMode removeMo if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && IsTotem() && GetGUID() == aura->GetCasterGUID()) { if (ToTotem()->GetSpell() == aura->GetId() && ToTotem()->GetTotemType() == TOTEM_PASSIVE) - ToTotem()->setDeathState(JUST_DIED); + ToTotem()->setDeathState(DeathState::JustDied); } // Remove aurastates only if were not found @@ -14840,7 +14845,7 @@ void Unit::setDeathState(DeathState s, bool despawn) // death state needs to be updated before RemoveAllAurasOnDeath() calls HandleChannelDeathItem(..) so that // it can be used to check creation of death items (such as soul shards). - if (s != ALIVE && s != JUST_RESPAWNED) + if (s != DeathState::Alive && s != DeathState::JustRespawned) { CombatStop(); GetThreatMgr().ClearAllThreat(); @@ -14855,7 +14860,7 @@ void Unit::setDeathState(DeathState s, bool despawn) RemoveAllAurasOnDeath(); } - if (s == JUST_DIED) + if (s == DeathState::JustDied) { // remove aurastates allowing special moves ClearAllReactives(); @@ -14889,7 +14894,7 @@ void Unit::setDeathState(DeathState s, bool despawn) zoneScript->OnPlayerDeath(ToPlayer()); } } - else if (s == JUST_RESPAWNED) + else if (s == DeathState::JustRespawned) { RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); // clear skinnable for creature and player (at battleground) } @@ -15772,9 +15777,9 @@ void Unit::SetLevel(uint8 lvl, bool showLevelChange) void Unit::SetHealth(uint32 val) { - if (getDeathState() == JUST_DIED) + if (getDeathState() == DeathState::JustDied) val = 0; - else if (GetTypeId() == TYPEID_PLAYER && getDeathState() == DEAD) + else if (GetTypeId() == TYPEID_PLAYER && getDeathState() == DeathState::Dead) val = 1; else { @@ -18585,12 +18590,12 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp if (!spiritOfRedemption) { - LOG_DEBUG("entities.unit", "SET JUST_DIED"); - victim->setDeathState(JUST_DIED); + LOG_DEBUG("entities.unit", "SET DeathState::JustDied"); + victim->setDeathState(DeathState::JustDied); } // Inform pets (if any) when player kills target) - // MUST come after victim->setDeathState(JUST_DIED); or pet next target + // MUST come after victim->setDeathState(DeathState::JustDied); or pet next target // selection will get stuck on same target and break pet react state if (player) { @@ -20604,8 +20609,8 @@ void Unit::_ExitVehicle(Position const* exitPosition) if (HasUnitTypeMask(UNIT_MASK_ACCESSORY)) { // Vehicle just died, we die too - if (vehicleBase->getDeathState() == JUST_DIED) - setDeathState(JUST_DIED); + if (vehicleBase->getDeathState() == DeathState::JustDied) + setDeathState(DeathState::JustDied); // If for other reason we as minion are exiting the vehicle (ejected, master dismounted) - unsummon else { diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index a42974fd9d5f41..f7a860ed385251 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -312,13 +312,13 @@ enum BaseModType #define MOD_END (PCT_MOD+1) -enum DeathState +enum class DeathState : uint8 { - ALIVE = 0, - JUST_DIED = 1, - CORPSE = 2, - DEAD = 3, - JUST_RESPAWNED = 4, + Alive = 0, + JustDied = 1, + Corpse = 2, + Dead = 3, + JustRespawned = 4, }; enum UnitState @@ -1848,9 +1848,9 @@ class Unit : public WorldObject void BuildHeartBeatMsg(WorldPacket* data) const; - [[nodiscard]] bool IsAlive() const { return (m_deathState == ALIVE); }; - [[nodiscard]] bool isDying() const { return (m_deathState == JUST_DIED); }; - [[nodiscard]] bool isDead() const { return (m_deathState == DEAD || m_deathState == CORPSE); }; + [[nodiscard]] bool IsAlive() const { return (m_deathState == DeathState::Alive); }; + [[nodiscard]] bool isDying() const { return (m_deathState == DeathState::JustDied); }; + [[nodiscard]] bool isDead() const { return (m_deathState == DeathState::Dead || m_deathState == DeathState::Corpse); }; DeathState getDeathState() { return m_deathState; }; virtual void setDeathState(DeathState s, bool despawn = false); // overwrited in Creature/Player/Pet diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 08aa4f1be38a42..fcf5cb67926887 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -592,7 +592,7 @@ void ObjectMgr::LoadCreatureTemplates() "ctm.Ground, ctm.Swim, ctm.Flight, ctm.Rooted, ctm.Chase, ctm.Random, ctm.InteractionPauseTimer, HoverHeight, HealthModifier, ManaModifier, ArmorModifier, ExperienceModifier, " // 64 65 66 67 68 69 70 "RacialLeader, movementId, RegenHealth, mechanic_immune_mask, spell_school_immune_mask, flags_extra, ScriptName " - "FROM creature_template ct LEFT JOIN creature_template_movement ctm ON ct.entry = ctm.CreatureId;"); + "FROM creature_template ct LEFT JOIN creature_template_movement ctm ON ct.entry = ctm.CreatureId ORDER BY entry DESC;"); if (!result) { @@ -601,6 +601,7 @@ void ObjectMgr::LoadCreatureTemplates() } _creatureTemplateStore.rehash(result->GetRowCount()); + _creatureTemplateStoreFast.clear(); uint32 count = 0; do @@ -610,20 +611,7 @@ void ObjectMgr::LoadCreatureTemplates() ++count; } while (result->NextRow()); - // pussywizard: - { - uint32 max = 0; - for (CreatureTemplateContainer::const_iterator itr = _creatureTemplateStore.begin(); itr != _creatureTemplateStore.end(); ++itr) - if (itr->first > max) - max = itr->first; - if (max) - { - _creatureTemplateStoreFast.clear(); - _creatureTemplateStoreFast.resize(max + 1, nullptr); - for (CreatureTemplateContainer::iterator itr = _creatureTemplateStore.begin(); itr != _creatureTemplateStore.end(); ++itr) - _creatureTemplateStoreFast[itr->first] = &(itr->second); - } - } + sScriptMgr->OnAfterDatabaseLoadCreatureTemplates(_creatureTemplateStoreFast); LoadCreatureTemplateResistances(); LoadCreatureTemplateSpells(); @@ -639,12 +627,28 @@ void ObjectMgr::LoadCreatureTemplates() LOG_INFO("server.loading", " "); } -void ObjectMgr::LoadCreatureTemplate(Field* fields) +/** +* @brief Loads a creature template from a database result +* +* @param fields Database result +* @param triggerHook If true, will trigger the OnAfterDatabaseLoadCreatureTemplates hook. Useful if you are not calling the hook yourself. +*/ +void ObjectMgr::LoadCreatureTemplate(Field* fields, bool triggerHook) { uint32 entry = fields[0].Get(); CreatureTemplate& creatureTemplate = _creatureTemplateStore[entry]; + // enlarge the fast cache as necessary + if (_creatureTemplateStoreFast.size() < entry + 1) + { + _creatureTemplateStoreFast.resize(entry + 1, nullptr); + } + + // load a pointer to this creatureTemplate into the fast cache + _creatureTemplateStoreFast[entry] = &creatureTemplate; + + // build the creatureTemplate creatureTemplate.Entry = entry; for (uint8 i = 0; i < MAX_DIFFICULTY - 1; ++i) @@ -751,6 +755,13 @@ void ObjectMgr::LoadCreatureTemplate(Field* fields) creatureTemplate.SpellSchoolImmuneMask = fields[68].Get(); creatureTemplate.flags_extra = fields[69].Get(); creatureTemplate.ScriptID = GetScriptId(fields[70].Get()); + + // useful if the creature template load is being triggered from outside this class + if (triggerHook) + { + sScriptMgr->OnAfterDatabaseLoadCreatureTemplates(_creatureTemplateStoreFast); + } + } void ObjectMgr::LoadCreatureTemplateResistances() diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 177b1a10d461db..59a6bf33e29104 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -1063,7 +1063,7 @@ class ObjectMgr void LoadCreatureClassLevelStats(); void LoadCreatureLocales(); void LoadCreatureTemplates(); - void LoadCreatureTemplate(Field* fields); + void LoadCreatureTemplate(Field* fields, bool triggerHook = false); void LoadCreatureTemplateAddons(); void LoadCreatureTemplateResistances(); void LoadCreatureTemplateSpells(); diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 2c0dcec7f258d1..a7e538cb0f0434 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -945,7 +945,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder) pCurrChar->LoadCorpse(holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION)); // setting Ghost+speed if dead - if (pCurrChar->m_deathState != ALIVE) + if (pCurrChar->m_deathState != DeathState::Alive) { // not blizz like, we must correctly save and load player instead... if (pCurrChar->getRace() == RACE_NIGHTELF) diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 9cfad00e6272f3..51d78c57e74a63 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -69,7 +69,7 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket& recv_data) // creatures can kill players // so if the server is lagging enough the player can // release spirit after he's killed but before he is updated - if (GetPlayer()->getDeathState() == JUST_DIED) + if (GetPlayer()->getDeathState() == DeathState::JustDied) { LOG_DEBUG("network", "HandleRepopRequestOpcode: got request after player {} ({}) was killed and before he was updated", GetPlayer()->GetName(), GetPlayer()->GetGUID().ToString()); diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 102b2088cf3cf3..3d283f5ed5cc3b 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -301,7 +301,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe GetPlayer()->RemovePet(pet->ToPet(), PET_SAVE_AS_DELETED); else //dismissing a summoned pet is like killing them (this prevents returning a soulshard...) - pet->setDeathState(CORPSE); + pet->setDeathState(DeathState::Corpse); } else if (pet->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLABLE_GUARDIAN)) { diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index e58c36e568c485..e3a5e1007566d6 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -196,7 +196,8 @@ void Map::LoadMap(int gx, int gy, bool reload) return; // load grid map for base map - m_parentMap->EnsureGridCreated(GridCoord(63 - gx, 63 - gy)); + if (!m_parentMap->GridMaps[gx][gy]) + m_parentMap->EnsureGridCreated(GridCoord((MAX_NUMBER_OF_GRIDS - 1) - gx, (MAX_NUMBER_OF_GRIDS - 1) - gy)); ((MapInstanced*)(m_parentMap))->AddGridMapReference(GridCoord(gx, gy)); GridMaps[gx][gy] = m_parentMap->GridMaps[gx][gy]; @@ -463,7 +464,8 @@ void Map::EnsureGridCreated_i(const GridCoord& p) { LOG_DEBUG("maps", "Creating grid[{}, {}] for map {} instance {}", p.x_coord, p.y_coord, GetId(), i_InstanceId); - setNGrid(new NGridType(p.x_coord * MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry), p.x_coord, p.y_coord); + NGridType* ngrid = new NGridType(p.x_coord * MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld->getBoolConfig(CONFIG_GRID_UNLOAD)); + setNGrid(ngrid, p.x_coord, p.y_coord); // build a linkage between this map and NGridType buildNGridLinkage(getNGrid(p.x_coord, p.y_coord)); @@ -2406,11 +2408,11 @@ inline LiquidData const GridMap::GetLiquidData(float x, float y, float z, float GridMap* Map::GetGrid(float x, float y) { // half opt method - int gx = (int)(32 - x / SIZE_OF_GRIDS); //grid x - int gy = (int)(32 - y / SIZE_OF_GRIDS); //grid y + int gx = (int)(CENTER_GRID_ID - x / SIZE_OF_GRIDS); //grid x + int gy = (int)(CENTER_GRID_ID - y / SIZE_OF_GRIDS); //grid y // ensure GridMap is loaded - EnsureGridCreated(GridCoord(63 - gx, 63 - gy)); + EnsureGridCreated(GridCoord((MAX_NUMBER_OF_GRIDS - 1) - gx, (MAX_NUMBER_OF_GRIDS - 1) - gy)); return GridMaps[gx][gy]; } @@ -3138,7 +3140,7 @@ void Map::RemoveAllObjectsInRemoveList() //LOG_DEBUG("maps", "Object remover 1 check."); while (!i_objectsToRemove.empty()) { - std::unordered_set::iterator itr = i_objectsToRemove.begin(); + std::set::iterator itr = i_objectsToRemove.begin(); WorldObject* obj = *itr; switch (obj->GetTypeId()) diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 2a2635c78748ad..dddd6f50a08dfb 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -776,9 +776,9 @@ class Map : public GridRefMgr void ProcessRelocationNotifies(uint32 diff); bool i_scriptLock; - std::unordered_set i_objectsToRemove; + std::set i_objectsToRemove; std::map i_objectsToSwitch; - std::unordered_set i_worldObjects; + std::set i_worldObjects; typedef std::multimap ScriptScheduleMap; ScriptScheduleMap m_scriptSchedule; diff --git a/src/server/game/Maps/MapMgr.cpp b/src/server/game/Maps/MapMgr.cpp index 5c95475fb73375..96368486a943a8 100644 --- a/src/server/game/Maps/MapMgr.cpp +++ b/src/server/game/Maps/MapMgr.cpp @@ -303,8 +303,8 @@ bool MapMgr::ExistMapAndVMap(uint32 mapid, float x, float y) { GridCoord p = Acore::ComputeGridCoord(x, y); - int gx = 63 - p.x_coord; - int gy = 63 - p.y_coord; + int gx = (MAX_NUMBER_OF_GRIDS - 1) - p.x_coord; + int gy = (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord; return Map::ExistMap(mapid, gx, gy) && Map::ExistVMap(mapid, gx, gy); } diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h index afefffe6249b00..38dcd9293a2bd6 100644 --- a/src/server/game/Movement/Spline/Spline.h +++ b/src/server/game/Movement/Spline/Spline.h @@ -48,7 +48,7 @@ namespace Movement uint8 m_mode{UninitializedMode}; bool cyclic{false}; - float initialOrientation; + float initialOrientation{0.f}; enum { @@ -198,7 +198,12 @@ namespace Movement } /** Returns length of the whole spline. */ - [[nodiscard]] length_type length() const { return lengths[index_hi];} + [[nodiscard]] length_type length() const + { + if (lengths.empty()) + return 0; + return lengths[index_hi]; + } /** Returns length between given nodes. */ [[nodiscard]] length_type length(index_type first, index_type last) const { return lengths[last] - lengths[first];} [[nodiscard]] length_type length(index_type Idx) const { return lengths[Idx];} diff --git a/src/server/game/Movement/Waypoints/WaypointMgr.h b/src/server/game/Movement/Waypoints/WaypointMgr.h index 0d81e14cff19cb..a9df15129512d0 100644 --- a/src/server/game/Movement/Waypoints/WaypointMgr.h +++ b/src/server/game/Movement/Waypoints/WaypointMgr.h @@ -19,6 +19,7 @@ #define ACORE_WAYPOINTMANAGER_H #include "Common.h" +#include #include #include diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index bd31e8dcfa0601..2dfc18641ecb5b 100644 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -824,7 +824,7 @@ void Map::ScriptsProcess() LOG_ERROR("maps.script", "{} creature is already dead ({})", step.script->GetDebugInfo(), cSource->GetGUID().ToString()); else { - cSource->setDeathState(JUST_DIED); + cSource->setDeathState(DeathState::JustDied); if (step.script->Kill.RemoveCorpse == 1) cSource->RemoveCorpse(); } diff --git a/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp b/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp index b4debdf2f9c863..2bc860e0b39e71 100644 --- a/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp @@ -25,3 +25,11 @@ void ScriptMgr::OnAfterDatabasesLoaded(uint32 updateFlags) script->OnAfterDatabasesLoaded(updateFlags); }); } + +void ScriptMgr::OnAfterDatabaseLoadCreatureTemplates(std::vector creatureTemplates) +{ + ExecuteScript([&](DatabaseScript* script) + { + script->OnAfterDatabaseLoadCreatureTemplates(creatureTemplates); + }); +} diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 7920fe55b4211d..111d2b27614a5a 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -2040,7 +2040,20 @@ class DatabaseScript : public ScriptObject [[nodiscard]] bool IsDatabaseBound() const override { return false; } + /** + * @brief Called after all databases are loaded + * + * @param updateFlags Update flags from the loader + */ virtual void OnAfterDatabasesLoaded(uint32 /*updateFlags*/) { } + + /** + * @brief Called after all creature template data has been loaded from the database. This hook could be called multiple times, not just at server startup. + * + * @param creatureTemplates Pointer to a modifiable vector of creature templates. Indexed by Entry ID. + */ + virtual void OnAfterDatabaseLoadCreatureTemplates(std::vector /*creatureTemplates*/) { } + }; class WorldObjectScript : public ScriptObject @@ -2694,6 +2707,7 @@ class ScriptMgr public: /* DatabaseScript */ void OnAfterDatabasesLoaded(uint32 updateFlags); + void OnAfterDatabaseLoadCreatureTemplates(std::vector creatureTemplateStore); public: /* WorldObjectScript */ diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 97b36debeb78b8..11437b2d1a4de2 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1777,7 +1777,7 @@ void AuraEffect::HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 m // die at aura end else if (target->IsAlive()) // call functions which may have additional effects after chainging state of unit - target->setDeathState(JUST_DIED); + target->setDeathState(DeathState::JustDied); // xinef: damage immunity spell, not needed because of 93 aura (adds non_attackable state) // xinef: probably blizzard added it just in case in wotlk (id > 46000) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 0f1c652cac0a83..7e50cee5553501 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4530,7 +4530,7 @@ void Spell::finish(bool ok) if (spellInfo && spellInfo->SpellIconID == 2056) { LOG_DEBUG("spells.aura", "Statue {} is unsummoned in spell {} finish", m_caster->GetGUID().ToString(), m_spellInfo->Id); - m_caster->setDeathState(JUST_DIED); + m_caster->setDeathState(DeathState::JustDied); return; } } diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 137da05ea59fe9..2d5e79c3960acd 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3850,7 +3850,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) caster->RewardPlayerAndGroupAtEvent(18388, unitTarget); if (Creature* target = unitTarget->ToCreature()) { - target->setDeathState(CORPSE); + target->setDeathState(DeathState::Corpse); target->RemoveCorpse(); } } @@ -5268,7 +5268,7 @@ void Spell::EffectResurrectPet(SpellEffIndex /*effIndex*/) pet->Relocate(x, y, z, player->GetOrientation()); // This is needed so SaveStayPosition() will get the proper coords. pet->ReplaceAllDynamicFlags(UNIT_DYNFLAG_NONE); pet->RemoveUnitFlag(UNIT_FLAG_SKINNABLE); - pet->setDeathState(ALIVE); + pet->setDeathState(DeathState::Alive); pet->ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~(UNIT_STATE_POSSESSED))); // xinef: just in case pet->SetHealth(pet->CountPctFromMaxHealth(damage)); pet->SetDisplayId(pet->GetNativeDisplayId()); diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index d290ef9e24b7e2..d0d4ec56c274c0 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4584,6 +4584,24 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AuraInterruptFlags |= ( AURA_INTERRUPT_FLAG_MOUNT | AURA_INTERRUPT_FLAG_CAST ); }); + // Improved Mind Flay and Smite + ApplySpellFix({ 37571 }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_0].SpellClassMask[0] = 8388736; + }); + + // Improved Corruption and Immolate (Updated) + ApplySpellFix({ 61992 }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_1].Effect = SPELL_EFFECT_APPLY_AURA; + spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_ADD_PCT_MODIFIER; + spellInfo->Effects[EFFECT_1].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_CASTER); + spellInfo->Effects[EFFECT_1].BasePoints = 4; + spellInfo->Effects[EFFECT_1].DieSides = 1; + spellInfo->Effects[EFFECT_1].MiscValue = 22; + spellInfo->Effects[EFFECT_1].SpellClassMask[0] = 6; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; diff --git a/src/server/game/World/IWorld.h b/src/server/game/World/IWorld.h index 73eb05cc98ff40..cc8de5a23cac26 100644 --- a/src/server/game/World/IWorld.h +++ b/src/server/game/World/IWorld.h @@ -72,6 +72,7 @@ enum WorldBoolConfigs CONFIG_ADDON_CHANNEL, CONFIG_ALLOW_PLAYER_COMMANDS, CONFIG_CLEAN_CHARACTER_DB, + CONFIG_GRID_UNLOAD, CONFIG_STATS_SAVE_ONLY_ON_LOGOUT, CONFIG_ALLOW_TWO_SIDE_ACCOUNTS, CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR, diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index a53b09ac90662c..ef6ea6925fbdf8 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1466,8 +1466,16 @@ void World::LoadConfigSettings(bool reload) // Prevent players AFK from being logged out _int_configs[CONFIG_AFK_PREVENT_LOGOUT] = sConfigMgr->GetOption("PreventAFKLogout", 0); + // Unload grids to save memory. Can be disabled if enough memory is available to speed up moving players to new grids. + _bool_configs[CONFIG_GRID_UNLOAD] = sConfigMgr->GetOption("GridUnload", true); + // Preload all grids of all non-instanced maps _bool_configs[CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS] = sConfigMgr->GetOption("PreloadAllNonInstancedMapGrids", false); + if (_bool_configs[CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS] && _bool_configs[CONFIG_GRID_UNLOAD]) + { + LOG_ERROR("server.loading", "PreloadAllNonInstancedMapGrids enabled, but GridUnload also enabled. GridUnload must be disabled to enable base map pre-loading. Base map pre-loading disabled"); + _bool_configs[CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS] = false; + } // ICC buff override _int_configs[CONFIG_ICC_BUFF_HORDE] = sConfigMgr->GetOption("ICC.Buff.Horde", 73822); @@ -2219,21 +2227,14 @@ void World::SetInitialWorldSettings() { LOG_INFO("server.loading", "Loading All Grids For All Non-Instanced Maps..."); - for (uint32 i = 0; i < sMapStore.GetNumRows(); ++i) - { - MapEntry const* mapEntry = sMapStore.LookupEntry(i); - - if (mapEntry && !mapEntry->Instanceable()) + sMapMgr->DoForAllMaps([](Map* map) { - Map* map = sMapMgr->CreateBaseMap(mapEntry->MapID); - - if (map) + if (!map->Instanceable()) { LOG_INFO("server.loading", ">> Loading All Grids For Map {}", map->GetId()); map->LoadAllCells(); } - } - } + }); } uint32 startupDuration = GetMSTimeDiffToNow(startupBegin); diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 3db1a22fe73ef3..94ad998c659b90 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -768,7 +768,7 @@ class npc_commandscript : public CommandScript if (creature->IsAlive()) // dead creature will reset movement generator at respawn { - creature->setDeathState(JUST_DIED); + creature->setDeathState(DeathState::JustDied); creature->Respawn(); } } @@ -920,7 +920,7 @@ class npc_commandscript : public CommandScript if (creature->IsAlive()) // dead creature will reset movement generator at respawn { - creature->setDeathState(JUST_DIED); + creature->setDeathState(DeathState::JustDied); creature->Respawn(); } @@ -994,7 +994,7 @@ class npc_commandscript : public CommandScript if (creature->IsAlive()) // dead creature will reset movement generator at respawn { - creature->setDeathState(JUST_DIED); + creature->setDeathState(DeathState::JustDied); creature->Respawn(); } diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index dc672d5e72b58f..5830b015d04c8a 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -477,7 +477,7 @@ class reload_commandscript : public CommandScript Field* fields = result->Fetch(); - sObjectMgr->LoadCreatureTemplate(fields); + sObjectMgr->LoadCreatureTemplate(fields, true); sObjectMgr->CheckCreatureTemplate(cInfo); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp index 5f40a515591795..a7bfacc5c6caa3 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp @@ -506,7 +506,7 @@ struct npc_echo_of_medivh : public ScriptedAI piece->CombatStop(); piece->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - piece->setDeathState(JUST_RESPAWNED); + piece->setDeathState(DeathState::JustRespawned); piece->SetHealth(piece->GetMaxHealth()); break; } @@ -528,7 +528,7 @@ struct npc_echo_of_medivh : public ScriptedAI piece->CombatStop(); piece->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - piece->setDeathState(JUST_RESPAWNED); + piece->setDeathState(DeathState::JustRespawned); piece->SetHealth(piece->GetMaxHealth()); break; } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 55929ee7772581..f0509fafe6525a 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -503,12 +503,15 @@ class spell_flamewreath_aura : public AuraScript { if (Unit* target = GetTarget()) { - target->CastSpell(target, SPELL_FLAME_WREATH_RAN_THRU, true); + if (target->IsPlayer()) + { + target->CastSpell(target, SPELL_FLAME_WREATH_RAN_THRU, true); - target->m_Events.AddEventAtOffset([target] { - target->RemoveAurasDueToSpell(SPELL_FLAME_WREATH_RAN_THRU); - target->CastSpell(target, SPELL_FLAME_WREATH_EXPLOSION, true); - }, 1s); + target->m_Events.AddEventAtOffset([target] { + target->RemoveAurasDueToSpell(SPELL_FLAME_WREATH_RAN_THRU); + target->CastSpell(target, SPELL_FLAME_WREATH_EXPLOSION, true); + }, 1s); + } } } } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 5e595c568b3728..56f7de24cbd7e2 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -265,7 +265,7 @@ class instance_karazhan : public InstanceMapScript if (Creature* piece = instance->GetCreature(chessPieceGUID)) { piece->RemoveAllAuras(); - piece->setDeathState(JUST_RESPAWNED); + piece->setDeathState(DeathState::JustRespawned); piece->SetHealth(piece->GetMaxHealth()); float x, y, z, o; piece->GetHomePosition(x, y, z, o); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index f6381787881dd4..6ee4ac80dbbe45 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -741,7 +741,7 @@ class npc_a_special_surprise : public CreatureScript break; case 11: Talk(EMOTE_DIES); - me->setDeathState(JUST_DIED); + me->setDeathState(DeathState::JustDied); me->SetHealth(0); return; } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index af90c050c1504a..1253017b878215 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -360,7 +360,7 @@ class boss_hexlord_malacrass : public CreatureScript Creature* creature = (ObjectAccessor::GetCreature((*me), AddGUID[i])); if (!creature || !creature->IsAlive()) { - if (creature) creature->setDeathState(DEAD); + if (creature) creature->setDeathState(DeathState::Dead); creature = me->SummonCreature(AddEntry[i], Pos_X[i], POS_Y, POS_Z, ORIENT, TEMPSUMMON_DEAD_DESPAWN, 0); if (creature) AddGUID[i] = creature->GetGUID(); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index a305602783de67..0f464806c53252 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -285,7 +285,7 @@ class boss_zuljin : public CreatureScript if (Unit* temp = ObjectAccessor::GetUnit(*me, SpiritGUID[i])) { temp->SetVisible(false); - temp->setDeathState(DEAD); + temp->setDeathState(DeathState::Dead); } } SpiritGUID[i].Clear(); diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index 27cc04c2bf5c32..354c2bd97ed049 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -1300,7 +1300,7 @@ class npc_varian_wrynn : public CreatureScript { khanokGUID = temp->GetGUID(); if (Creature* khanok = ObjectAccessor::GetCreature(*me, khanokGUID)) - khanok->setDeathState(JUST_DIED); + khanok->setDeathState(DeathState::JustDied); } if (Unit* temp = me->SummonCreature(NPC_PUTRESS, AllianceSpawn[12].x, AllianceSpawn[12].y, AllianceSpawn[12].z, TEMPSUMMON_MANUAL_DESPAWN)) { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index ad49d80befcf9a..e349dedf04c612 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -238,7 +238,7 @@ class npc_towering_infernal : public CreatureScript Creature* boss = ObjectAccessor::GetCreature(*me, AnetheronGUID); if (!boss || boss->isDead()) { - me->setDeathState(JUST_DIED); + me->setDeathState(DeathState::JustDied); me->RemoveCorpse(); return; } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index f6f9ba85da3949..6fbdbaa2931e12 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -245,7 +245,7 @@ class npc_lesser_doomguard : public CreatureScript Creature* boss = ObjectAccessor::GetCreature(*me, AzgalorGUID); if (!boss || boss->isDead()) { - me->setDeathState(JUST_DIED); + me->setDeathState(DeathState::JustDied); me->RemoveCorpse(); return; } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index 23f49476ca80ff..51d059dd241961 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -584,7 +584,7 @@ class npc_abomination : public CreatureScript { if ((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21)) { - me->setDeathState(DEAD); + me->setDeathState(DeathState::Dead); me->RemoveCorpse(); } } @@ -685,7 +685,7 @@ class npc_ghoul : public CreatureScript me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK_UNARMED); if ((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21)) { - me->setDeathState(DEAD); + me->setDeathState(DeathState::Dead); me->RemoveCorpse(); } } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp index 55166324f2935e..001fbcb5af5de7 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp @@ -224,7 +224,7 @@ class instance_culling_of_stratholme : public InstanceMapScript if (!arthas->IsAlive()) { EnsureGridLoaded(); - arthas->setDeathState(DEAD); + arthas->setDeathState(DeathState::Dead); arthas->Respawn(); } else diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp index b771a3bce2f192..fdf579cc53cc6b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp @@ -264,7 +264,7 @@ class instance_old_hillsbrad : public InstanceMapScript EnsureGridLoaded(); thrall->SetVisible(false); Reposition(thrall); - thrall->setDeathState(DEAD); + thrall->setDeathState(DeathState::Dead); thrall->Respawn(); thrall->SetVisible(true); SaveToDB(); diff --git a/src/server/scripts/Kalimdor/zone_moonglade.cpp b/src/server/scripts/Kalimdor/zone_moonglade.cpp index e9b37b50931381..1afaa3e131863e 100644 --- a/src/server/scripts/Kalimdor/zone_moonglade.cpp +++ b/src/server/scripts/Kalimdor/zone_moonglade.cpp @@ -387,7 +387,7 @@ class npc_clintar_spirit : public CreatureScript if (!PlayerGUID) { - me->setDeathState(JUST_DIED); + me->setDeathState(DeathState::JustDied); return; } @@ -408,7 +408,7 @@ class npc_clintar_spirit : public CreatureScript Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID); if (!player || player->GetQuestStatus(10965) == QUEST_STATUS_NONE) { - me->setDeathState(JUST_DIED); + me->setDeathState(DeathState::JustDied); return; } @@ -532,7 +532,7 @@ class npc_clintar_spirit : public CreatureScript player->TalkedToCreature(me->GetEntry(), me->GetGUID()); PlayerGUID.Clear(); Reset(); - me->setDeathState(JUST_DIED); + me->setDeathState(DeathState::JustDied); break; } break; diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp index 405a4953f7e5e4..4ced79a81a3b8e 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp @@ -874,7 +874,7 @@ struct boss_sartharion_dragonAI : public BossAI Talk(SAY_TENEBRON_DEATH); if (!isCalledBySartharion || instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS) { - instance->SetBossState(DATA_SHADRON, DONE); + instance->SetBossState(DATA_TENEBRON, DONE); } break; } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp index 401179a6ae2a11..59880642b81422 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp @@ -46,17 +46,6 @@ class instance_obsidian_sanctum : public InstanceMapScript LoadBossBoundaries(boundaries); } - bool IsEncounterInProgress() const override - { - for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) - { - if (GetBossState(i) == IN_PROGRESS) - return true; - } - - return false; - } - void OnCreatureCreate(Creature* pCreature) override { switch(pCreature->GetEntry()) @@ -150,20 +139,6 @@ class instance_obsidian_sanctum : public InstanceMapScript return false; } - bool SetBossState(uint32 type, EncounterState state) override - { - if (InstanceScript::SetBossState(type, state)) - { - return false; - } - - if (state == DONE) - { - SaveToDB(); - } - return true; - } - void DoAction(int32 action) override { switch (action) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index d3536b906625ce..1c8a70b33018a2 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -646,7 +646,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript { deathbringer->CastSpell(me, SPELL_RIDE_VEHICLE, true); deathbringer->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - deathbringer->setDeathState(ALIVE); + deathbringer->setDeathState(DeathState::Alive); } _events.ScheduleEvent(EVENT_OUTRO_HORDE_4, 1000); _events.ScheduleEvent(EVENT_OUTRO_HORDE_5, 4000); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp index 3b73e10baa6162..2cf62db2bbb310 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp @@ -293,16 +293,12 @@ class boss_valithria_dreamwalker : public CreatureScript _instance(creature->GetInstanceScript()), _portalCount(RAID_MODE(3, 8, 3, 8)) { me->SetReactState(REACT_PASSIVE); - _spawnHealth = 1; // just in case if not set below - if (CreatureData const* data = sObjectMgr->GetCreatureData(me->GetSpawnId())) - if (data->curhealth) - _spawnHealth = data->curhealth; } void Reset() override { _events.Reset(); - me->SetHealth(_spawnHealth); + me->SetHealth(me->GetMaxHealth() * 0.5f); // starts at 50% health me->LoadCreaturesAddon(true); // immune to percent heals me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_OBS_MOD_HEALTH, true); @@ -440,8 +436,9 @@ class boss_valithria_dreamwalker : public CreatureScript // does not enter combat if (_instance->GetBossState(DATA_VALITHRIA_DREAMWALKER) == NOT_STARTED) { - if (me->GetHealth() != _spawnHealth) // healing when boss cannot be engaged (lower spire not finished, cheating) doesn't start the fight, prevent winning this way - me->SetHealth(_spawnHealth); + uint32 startingHealth = me->GetMaxHealth() * 0.5f; + if (me->GetHealth() != startingHealth) // healing when boss cannot be engaged (lower spire not finished, cheating) doesn't start the fight, prevent winning this way + me->SetHealth(startingHealth); return; } @@ -484,7 +481,6 @@ class boss_valithria_dreamwalker : public CreatureScript private: EventMap _events; InstanceScript* _instance; - uint32 _spawnHealth; uint32 const _portalCount; uint32 _missedPortals; bool _under25PercentTalkDone; @@ -756,7 +752,7 @@ class npc_risen_archmage : public CreatureScript if (!me->IsInCombat()) if (me->GetSpawnId()) if (!me->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) - me->CastSpell(me, SPELL_CORRUPTION, false); + me->CastSpell(me, SPELL_CORRUPTION, true); if (!UpdateVictim()) return; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index 251b2b31ee899d..d9ca0f99288403 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -1257,7 +1257,7 @@ struct npc_argent_captainAI : public ScriptedAI { if (spell->Id == SPELL_REVIVE_CHAMPION && !IsUndead) { - me->setDeathState(JUST_RESPAWNED); + me->setDeathState(DeathState::JustRespawned); uint32 newEntry = 0; switch (me->GetEntry()) { diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp index 81986bf23f398b..7c4215d816e6dd 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp @@ -153,7 +153,7 @@ class boss_sjonnir : public CreatureScript if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN))) { - brann->setDeathState(JUST_DIED); + brann->setDeathState(DeathState::JustDied); brann->Respawn(); brann->AI()->DoAction(5); } diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp index 708f58891b62c6..7c4f991f662a64 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp @@ -601,7 +601,7 @@ class brann_bronzebeard : public CreatureScript { if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN))) { - brann->setDeathState(JUST_DIED); + brann->setDeathState(DeathState::JustDied); brann->Respawn(); brann->AI()->DoAction(5); } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp index 1efdf49d32d2c3..f968a7f0ff0cdd 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp @@ -384,7 +384,7 @@ class npc_auriaya_feral_defender : public CreatureScript { if (param == ACTION_FERAL_RESPAWN) { - me->setDeathState(JUST_RESPAWNED); + me->setDeathState(DeathState::JustRespawned); if (Player* target = SelectTargetFromPlayerList(200)) AttackStart(target); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp index b135c2183bdb48..17920a8a55e828 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp @@ -1109,7 +1109,7 @@ class boss_freya_summons : public CreatureScript { if (_isTrio && param == ACTION_RESPAWN_TRIO) { - me->setDeathState(JUST_RESPAWNED); + me->setDeathState(DeathState::JustRespawned); Reset(); } } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index df114d77d7c954..1b73cc4250e394 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -316,7 +316,7 @@ class instance_ulduar : public InstanceMapScript { creature->SetDisableGravity(true); creature->SetPosition(creature->GetHomePosition()); - creature->setDeathState(JUST_DIED); + creature->setDeathState(DeathState::JustDied); creature->StopMovingOnCurrentPos(); } break; diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp index 255c4a4d5a59de..26ea9d7b3e5672 100644 --- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp +++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp @@ -158,7 +158,7 @@ class npc_emily : public CreatureScript if (Mrfloppy->isDead()) { me->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ()); - Mrfloppy->setDeathState(ALIVE); + Mrfloppy->setDeathState(DeathState::Alive); Mrfloppy->GetMotionMaster()->MoveFollow(me, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); Talk(SAY_VICTORY3); } diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp index 41473712e7a03f..51f44e54862714 100644 --- a/src/server/scripts/Northrend/zone_zuldrak.cpp +++ b/src/server/scripts/Northrend/zone_zuldrak.cpp @@ -686,7 +686,7 @@ class npc_drakuru_shackles : public CreatureScript me->DespawnOrUnsummon(); } else - me->setDeathState(JUST_DIED); + me->setDeathState(DeathState::JustDied); } } } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index b496d3e25f384b..1e43549874ce32 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -373,7 +373,7 @@ class npc_toxic_sporebat : public CreatureScript if (!Vashj || !Vashj->IsAlive() || CAST_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->ToCreature()->AI())->Phase != 3) { // remove - me->setDeathState(DEAD); + me->setDeathState(DeathState::Dead); me->RemoveCorpse(); me->SetFaction(FACTION_FRIENDLY); } diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index d5d4de468f4464..e02f2a244914c2 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -214,7 +214,7 @@ class boss_kaelthas : public CreatureScript if (summon->GetSpawnId()) { summon->SetReactState(REACT_PASSIVE); - summon->setDeathState(JUST_RESPAWNED); + summon->setDeathState(DeathState::JustRespawned); summon->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); } } diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp index a58dcd50b427fc..f43d1027d930bb 100644 --- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp @@ -325,7 +325,7 @@ class npc_nether_drake : public CreatureScript if (id == 0) { - me->setDeathState(JUST_DIED); + me->setDeathState(DeathState::JustDied); me->RemoveCorpse(); me->SetHealth(0); } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 547e9693a8c488..d471e2c3480930 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -5119,6 +5119,40 @@ class spell_gen_yehkinya_bramble : public SpellScript } }; +// 35244 - Choking Vines +enum ChokingVines +{ + SPELL_CHOKING_VINES = 35244, + SPELL_CHOKING_WOUND = 35247 +}; + +class spell_gen_choking_vines : public AuraScript +{ + PrepareAuraScript(spell_gen_choking_vines); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_CHOKING_VINES, SPELL_CHOKING_WOUND }); + } + + void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (Unit* target = GetTarget()) + { + if (GetStackAmount() == GetSpellInfo()->StackAmount) // 5 stacks + { + target->RemoveAurasDueToSpell(SPELL_CHOKING_VINES); + target->CastSpell(target, SPELL_CHOKING_WOUND, true); // Unknown if it's a self cast or casted by the source on 5th + } + } + } + + void Register() override + { + OnEffectApply += AuraEffectApplyFn(spell_gen_choking_vines::OnApply, EFFECT_0, SPELL_AURA_MOD_DECREASE_SPEED, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); + } +}; + void AddSC_generic_spell_scripts() { RegisterSpellScript(spell_silithyst); @@ -5271,4 +5305,5 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_planting_scourge_banner); RegisterSpellScript(spell_gen_jubling_cooldown); RegisterSpellScript(spell_gen_yehkinya_bramble); + RegisterSpellScript(spell_gen_choking_vines); } diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 584e389bb21856..41adace2988d3a 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1536,7 +1536,8 @@ class spell_item_defibrillate : public SpellScript enum DesperateDefense { - SPELL_DESPERATE_RAGE = 33898 + SPELL_DESPERATE_RAGE = 33898, + SPELL_SERVERSIDE_DESPERAT_DEFENSE = 33897 // Root and Pacify }; // 33896 - Desperate Defense @@ -1555,9 +1556,15 @@ class spell_item_desperate_defense : public AuraScript GetTarget()->CastSpell(GetTarget(), SPELL_DESPERATE_RAGE, true, nullptr, aurEff); } + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveAurasDueToSpell(SPELL_SERVERSIDE_DESPERAT_DEFENSE); + } + void Register() override { OnEffectProc += AuraEffectProcFn(spell_item_desperate_defense::HandleProc, EFFECT_2, SPELL_AURA_PROC_TRIGGER_SPELL); + OnEffectRemove += AuraEffectRemoveFn(spell_item_desperate_defense::OnRemove, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB, AURA_EFFECT_HANDLE_REAL); } }; @@ -2805,7 +2812,7 @@ class spell_item_shimmering_vessel : public SpellScript void HandleDummy(SpellEffIndex /* effIndex */) { if (Creature* target = GetHitCreature()) - target->setDeathState(JUST_RESPAWNED); + target->setDeathState(DeathState::JustRespawned); } void Register() override diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 9b745e24d1f366..b033b0600f507a 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -87,7 +87,11 @@ enum PaladinSpells SPELL_BLOOD_CORRUPTION = 53742, SPELL_GENERIC_ARENA_DAMPENING = 74410, - SPELL_GENERIC_BATTLEGROUND_DAMPENING = 74411 + SPELL_GENERIC_BATTLEGROUND_DAMPENING = 74411, + + // Crystalforge Raiment - Tier 5 Holy 2 Set + SPELL_IMPROVED_JUDGEMENT = 37188, + SPELL_IMPROVED_JUDGEMENT_ENERGIZE = 43838 }; enum PaladinSpellIcons @@ -878,6 +882,12 @@ class spell_pal_judgement : public SpellScript GetCaster()->CastSpell(GetHitUnit(), _spellId, true); GetCaster()->CastSpell(GetHitUnit(), spellId2, true); + // Tier 5 Holy - 2 Set + if (GetCaster()->HasAura(SPELL_IMPROVED_JUDGEMENT)) + { + GetCaster()->CastSpell(GetCaster(), SPELL_IMPROVED_JUDGEMENT_ENERGIZE, true); + } + // Judgement of the Just if (GetCaster()->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_PALADIN, 3015, 0)) { diff --git a/src/server/scripts/World/npc_stave_of_ancients.cpp b/src/server/scripts/World/npc_stave_of_ancients.cpp index 130d72b6a0cd83..4f01542af9bed2 100644 --- a/src/server/scripts/World/npc_stave_of_ancients.cpp +++ b/src/server/scripts/World/npc_stave_of_ancients.cpp @@ -577,7 +577,7 @@ class npc_simone : public CreatureScript Precious()->RemoveCorpse(false, false); Precious()->SetPosition(current); Precious()->SetHomePosition(current); - Precious()->setDeathState(JUST_RESPAWNED); + Precious()->setDeathState(DeathState::JustRespawned); Precious()->UpdateObjectVisibility(true); } diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 7a13b68815b37b..d6e223dd775571 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -1006,7 +1006,7 @@ class npc_doctor : public CreatureScript { if (guid != savedPatient->GetGUID()) // Don't kill the last guy we just saved if (Creature* patient = ObjectAccessor::GetCreature(*me, guid)) - patient->setDeathState(JUST_DIED); + patient->setDeathState(DeathState::JustDied); } } @@ -1155,7 +1155,7 @@ class npc_injured_patient : public CreatureScript { me->RemoveUnitFlag(UNIT_FLAG_IN_COMBAT); me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->setDeathState(JUST_DIED); + me->setDeathState(DeathState::JustDied); me->SetDynamicFlag(32); if (DoctorGUID)