diff --git a/sql/migrations/20240329131510_world.sql b/sql/migrations/20240329131510_world.sql new file mode 100644 index 00000000000..4ea72e2da66 --- /dev/null +++ b/sql/migrations/20240329131510_world.sql @@ -0,0 +1,19 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20240329131510'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20240329131510'); +-- Add your query below. + +-- Set QUEST_METHOD_DISABLED flag for 2358 Horns of Nez'ra +UPDATE `quest_template` SET `Method`=1 WHERE `entry`=2358 AND `patch`=0; + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241117202208_world.sql b/sql/migrations/20241117202208_world.sql new file mode 100644 index 00000000000..d72258bacd1 --- /dev/null +++ b/sql/migrations/20241117202208_world.sql @@ -0,0 +1,24 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241117202208'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241117202208'); +-- Add your query below. + +-- Golemagg - add missing auras +-- 13879 Magma Splash - Golemagg splashes magma at his attackers, dealing Fire damage over time and reducing their armor. This ability can stack. +-- 20556 Golemagg's Trust - Golemagg's Core Ragers will deal increased damage and have 50% increased attack speed if tanked too close to Golemagg. +-- 18943 Double Attack - Proc chance: 50%, 3s cooldown +UPDATE `creature_template` SET `auras` = "13879 20556 18943" WHERE `entry` = 11988; + +DELETE FROM `script_texts` WHERE `entry` = -1409002; -- %s refuses to die while its master is in trouble. (2) -> 7865 + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241208173715_world.sql b/sql/migrations/20241208173715_world.sql new file mode 100644 index 00000000000..71fb3d712a0 --- /dev/null +++ b/sql/migrations/20241208173715_world.sql @@ -0,0 +1,1021 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241208173715'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241208173715'); +-- Add your query below. + + +-- Pool Truesilver / Small Thorium Vein spawns in Silithus. +SET @OGUID = 85000; +SET @PTEMPLATE = 23003; + +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+1, 2047, 1, -8068.27, 684.527, 8.24523, -0.645772, 0, 0, 0.317305, -0.948324, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 23483 at 208.762939 yards. +(@OGUID+2, 2047, 1, -8078.43, 1377.69, 4.93745, 1.67552, 0, 0, 0.743145, 0.669131, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 23495 at 178.247742 yards. +(@OGUID+3, 2047, 1, -7567.15, 1733.04, 17.2376, -1.67552, 0, 0, 0.743145, -0.669131, 300, 300, 1, 100, 0, 10); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+1, 1, 'Truesilver Deposit / Small Thorium Vein - Silithus', 10), +(@PTEMPLATE+2, 1, 'Truesilver Deposit / Small Thorium Vein - Silithus', 10), +(@PTEMPLATE+3, 1, 'Truesilver Deposit / Small Thorium Vein - Silithus', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+1, @PTEMPLATE+1, 'Truesilver Deposit / Small Thorium Vein - Silithus', 10), +(@OGUID+2, @PTEMPLATE+2, 'Truesilver Deposit / Small Thorium Vein - Silithus', 10), +(@OGUID+3, @PTEMPLATE+3, 'Truesilver Deposit / Small Thorium Vein - Silithus', 10), +(23541, @PTEMPLATE+1, 'Truesilver Deposit / Small Thorium Vein - Silithus', 10), +(23560, @PTEMPLATE+2, 'Truesilver Deposit / Small Thorium Vein - Silithus', 10), +(23561, @PTEMPLATE+3, 'Truesilver Deposit / Small Thorium Vein - Silithus', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+1, 1219, 0, 'Silithus - Truesilver Deposit / Small Thorium Vein', 0), +(@PTEMPLATE+2, 1219, 0, 'Silithus - Truesilver Deposit / Small Thorium Vein', 0), +(@PTEMPLATE+3, 1219, 0, 'Silithus - Truesilver Deposit / Small Thorium Vein', 0); + +-- Pool Truesilver / Small Thorium Vein spawns in Winterspring. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+4, 2047, 1, 7320.12, -4313.58, 699.424, -1.79769, 0, 0, 0.782608, -0.622515, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 100311 at 243.589661 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+4, 1, 'Truesilver Deposit / Small Thorium Vein - Winterspring', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+4, @PTEMPLATE+4, 'Truesilver Deposit / Small Thorium Vein - Winterspring', 10), +(100341, @PTEMPLATE+4, 'Truesilver Deposit / Small Thorium Vein - Winterspring', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+4, 1233, 0, 'Winterspring - Truesilver Deposit / Small Thorium Vein', 0); +DELETE FROM `gameobject` WHERE `guid` = 3998690; + +-- Pool Truesilver / Small Thorium Vein spawns in Feralas. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+5, 2047, 1, -5561.75, 988.424, 16.2939, 1.29154, 0, 0, 0.601815, 0.798636, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 21144 at 77.410103 yards. +(@OGUID+6, 2047, 1, -5313.68, 2163.53, 17.5947, -1.36136, 0, 0, 0.629321, -0.777146, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 21143 at 296.426453 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+5, 1, 'Truesilver Deposit / Small Thorium Vein - Feralas', 10), +(@PTEMPLATE+6, 1, 'Truesilver Deposit / Small Thorium Vein - Feralas', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+5, @PTEMPLATE+5, 'Truesilver Deposit / Small Thorium Vein - Feralas', 10), +(@OGUID+6, @PTEMPLATE+6, 'Truesilver Deposit / Small Thorium Vein - Feralas', 10), +(21155, @PTEMPLATE+5, 'Truesilver Deposit / Small Thorium Vein - Feralas', 10), +(21156, @PTEMPLATE+6, 'Truesilver Deposit / Small Thorium Vein - Feralas', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+5, 985, 0, 'Feralas - Truesilver Deposit / Small Thorium Vein', 0), +(@PTEMPLATE+6, 985, 0, 'Feralas - Truesilver Deposit / Small Thorium Vein', 0); + +-- Pool Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein spawns in Searing Gorge. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+7, 2047, 0, -6737.71, -610.845, 241.217, 2.11185, 0, 0, 0.870356, 0.492424, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 29693 at 126.863914 yards. +(@OGUID+8, 1734, 0, -6737.71, -610.845, 241.217, 2.11185, 0, 0, 0.870356, 0.492424, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 29693 at 126.863914 yards. +(@OGUID+9, 2040, 0, -6737.71, -610.845, 241.217, 2.11185, 0, 0, 0.870356, 0.492424, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 29693 at 126.863914 yards. +(@OGUID+10, 165658, 0, -6737.71, -610.845, 241.217, 2.11185, 0, 0, 0.870356, 0.492424, 300, 300, 1, 100, 5, 10); -- Closest existing guid is 29693 at 126.863914 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+7, 1, 'Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+7, @PTEMPLATE+7, 'Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George', 10), +(@OGUID+8, @PTEMPLATE+7, 'Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George', 10), +(@OGUID+9, @PTEMPLATE+7, 'Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George', 10), +(@OGUID+10, @PTEMPLATE+7, 'Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George', 10), +(29701, @PTEMPLATE+7, 'Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+7, 4352, 0, 'Searing George - Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein', 0); +UPDATE `pool_gameobject` SET `patch_min` = 5 WHERE `guid` = @OGUID+10; + +-- Pool Mithril Deposit / Truesilver Deposit / Small Thorium Vein spawns in The Hinterlands. +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(16701, 17206, 'Mithril Deposit / Truesilver Deposit / Small Thorium Vein - Hinterlands', 10); +UPDATE `pool_gameobject` SET `description` = 'Mithril Deposit / Truesilver Deposit / Small Thorium Vein - Hinterlands' WHERE `guid` IN (427576, 427578); +UPDATE `pool_pool` SET `mother_pool` = 1070, `description`='Hinterlands - Mithril Deposit / Truesilver Deposit / Small Thorium Vein' WHERE `pool_id`=17206; +UPDATE `pool_gameobject` SET `chance`=10 WHERE `guid` IN (427578, 16701); + +-- Pool Truesilver / Small Thorium Vein spawns in Western Plaguelands. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+11, 2047, 0, 2282.94, -2285.57, 63.0433, 1.13446, 0, 0, 0.5373, 0.843391, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 261642 at 94.035774 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+8, 1, 'Truesilver Deposit / Small Thorium Vein - Western Plaguelands', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+11, @PTEMPLATE+8, 'Truesilver Deposit / Small Thorium Vein - Western Plaguelands', 10), +(261650, @PTEMPLATE+8, 'Truesilver Deposit / Small Thorium Vein - Western Plaguelands', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+8, 1331, 0, 'Western Plaguelands - Truesilver Deposit / Small Thorium Vein', 0); + +-- Pool Truesilver / Small Thorium Vein spawns in Blasted Lands. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+12, 2047, 0, -10805, -2666.73, 12.1114, 0.925024, 0, 0, 0.446198, 0.894934, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 27658 at 91.105774 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+9, 1, 'Truesilver Deposit / Small Thorium Vein - Blasted Lands', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+12, @PTEMPLATE+9, 'Truesilver Deposit / Small Thorium Vein - Blasted Lands', 10), +(27672, @PTEMPLATE+9, 'Truesilver Deposit / Small Thorium Vein - Blasted Lands', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+9, 1359, 0, 'Blasted Lands - Truesilver Deposit / Small Thorium Vein', 0); + +-- Pool Tin Vein / Silver Vein spawns in Stonetalon Mountains. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+13, 1733, 1, 928.468, -274.892, -0.162452, 3.08923, 0, 0, 0.731354, 0.681998, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 27222 at 24.629126 yards. +(@OGUID+14, 1733, 1, 1661.98, 122.839, 119.924, 1.50098, 0, 0, 0.681998, 0.731354, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 27235 at 193.096375 yards. +(@OGUID+15, 1733, 1, -42.6393, 371.164, 119.746, 2.0944, 0, 0, 0.819152, -0.573576, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 27210 at 40.276657 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+10, 1, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10), +(@PTEMPLATE+11, 1, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10), +(@PTEMPLATE+12, 1, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+13, @PTEMPLATE+10, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10), +(@OGUID+14, @PTEMPLATE+11, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10), +(@OGUID+15, @PTEMPLATE+12, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10), +(27303, @PTEMPLATE+10, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10), +(27304, @PTEMPLATE+11, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10), +(27305, @PTEMPLATE+12, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+10, 1090, 0, 'Stonetalon Mountains - Tin Vein / Silver Vein', 0), +(@PTEMPLATE+11, 1090, 0, 'Stonetalon Mountains - Tin Vein / Silver Vein', 0), +(@PTEMPLATE+12, 1090, 0, 'Stonetalon Mountains - Tin Vein / Silver Vein', 0); + +-- Pool Tin Vein / Silver Vein spawns in Westfall. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+16, 1733, 0, -11302.4, 1478.61, 91.7132, -1.72788, 0, 0, 0.760406, -0.649448, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 23371 at 108.026428 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+13, 1, 'Tin Vein / Silver Vein - Westfall', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+16, @PTEMPLATE+13, 'Tin Vein / Silver Vein - Westfall', 10), +(23540, @PTEMPLATE+13, 'Tin Vein / Silver Vein - Westfall', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+13, 1112, 0, 'Westfall - Tin Vein / Silver Vein', 0); + +-- Pool Tin Vein / Silver Vein spawns in Loch Modan. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+17, 1733, 0, -5787, -4132.4, 392.252, 1.29154, 0, 0, 0.601815, 0.798636, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 23210 at 95.130562 yards. +(@OGUID+18, 1733, 0, -4773.33, -3700.73, 314.729, 3.07178, 0, 0, 0.999391, 0.0348995, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 251644 at 69.460320 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+14, 1, 'Tin Vein / Silver Vein - Loch Modan', 10), +(@PTEMPLATE+15, 1, 'Tin Vein / Silver Vein - Loch Modan', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+17, @PTEMPLATE+14, 'Tin Vein / Silver Vein - Loch Modan', 10), +(@OGUID+18, @PTEMPLATE+15, 'Tin Vein / Silver Vein - Loch Modan', 10), +(23211, @PTEMPLATE+14, 'Tin Vein / Silver Vein - Loch Modan', 10), +(251654, @PTEMPLATE+15, 'Tin Vein / Silver Vein - Loch Modan', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+14, 1186, 0, 'Loch Modan - Tin Vein / Silver Vein', 0), +(@PTEMPLATE+15, 1186, 0, 'Loch Modan - Tin Vein / Silver Vein', 0); + +-- Pool Tin Vein / Silver Vein spawns in The Barrens. +DELETE FROM `pool_gameobject` WHERE `guid` = 34630; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+19, 1733, 1, -1660.13, -2293.41, 87.9985, -0.959931, 0, 0, 0.461749, -0.887011, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 34625 at 73.852585 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+16, 1, 'Tin Vein / Silver Vein - Barrens', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+19, @PTEMPLATE+16, 'Tin Vein / Silver Vein - Barrens', 10), +(34630, @PTEMPLATE+16, 'Tin Vein / Silver Vein - Barrens', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+16, 1033, 0, 'Barrens - Tin Vein / Silver Vein', 0); + +-- Pool Tin Vein / Silver Vein spawns in Wetlands. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+20, 1733, 0, -4318.25, -3030.73, 12.2277, -1.32645, 0, 0, 0.615661, -0.788011, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 22836 at 44.023846 yards. +(@OGUID+21, 1733, 0, -3556.3, -1769.77, 76.4529, -1.25664, 0, 0, 0.587785, -0.809017, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 22850 at 113.116913 yards. +(@OGUID+22, 1733, 0, -3061.29, -3257.71, 70.5456, -2.79253, 0, 0, 0.984808, -0.173648, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 22869 at 52.405243 yards. +(@OGUID+23, 1733, 0, -2659.07, -2014.63, 19.8238, -0.785398, 0, 0, 0.382683, -0.92388, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 22873 at 76.461021 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+17, 1, 'Tin Vein / Silver Vein - Wetlands', 10), +(@PTEMPLATE+18, 1, 'Tin Vein / Silver Vein - Wetlands', 10), +(@PTEMPLATE+19, 1, 'Tin Vein / Silver Vein - Wetlands', 10), +(@PTEMPLATE+20, 1, 'Tin Vein / Silver Vein - Wetlands', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+20, @PTEMPLATE+17, 'Tin Vein / Silver Vein - Wetlands', 10), +(@OGUID+21, @PTEMPLATE+18, 'Tin Vein / Silver Vein - Wetlands', 10), +(@OGUID+22, @PTEMPLATE+19, 'Tin Vein / Silver Vein - Wetlands', 10), +(@OGUID+23, @PTEMPLATE+20, 'Tin Vein / Silver Vein - Wetlands', 10), +(22914, @PTEMPLATE+17, 'Tin Vein / Silver Vein - Wetlands', 10), +(22915, @PTEMPLATE+18, 'Tin Vein / Silver Vein - Wetlands', 10), +(22916, @PTEMPLATE+19, 'Tin Vein / Silver Vein - Wetlands', 10), +(22917, @PTEMPLATE+20, 'Tin Vein / Silver Vein - Wetlands', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+17, 1348, 0, 'Wetlands - Tin Vein / Silver Vein', 0), +(@PTEMPLATE+18, 1348, 0, 'Wetlands - Tin Vein / Silver Vein', 0), +(@PTEMPLATE+19, 1348, 0, 'Wetlands - Tin Vein / Silver Vein', 0), +(@PTEMPLATE+20, 1348, 0, 'Wetlands - Tin Vein / Silver Vein', 0); + +-- Pool Tin Vein / Silver Vein spawns in Stonetalon Mountains. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+24, 1732, 1, 935.066, -262.797, 21.6798, -0.174533, 0, 0, 0.0871559, -0.996195, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 27268 at 29.385189 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+21, 1, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+24, @PTEMPLATE+21, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10), +(27302, @PTEMPLATE+21, 'Tin Vein / Silver Vein - Stonetalon Mountains', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+21, 1090, 0, 'Stonetalon Mountains - Tin Vein / Silver Vein', 0); + +-- pool Silver Vein / Gold Vein / Iron Deposit spawns in Feralas. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+25, 1734, 1, -4558.38, -139.326, 109.76, -0.418879, 0, 0, 0.207912, -0.978148, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 22780 at 412.805145 yards. +(@OGUID+26, 1735, 1, -4558.38, -139.326, 109.76, -0.418879, 0, 0, 0.207912, -0.978148, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 22780 at 412.805145 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+22, 1, 'Silver Vein / Gold Vein / Iron Deposit - Feralas', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+25, @PTEMPLATE+22, 'Silver Vein / Gold Vein / Iron Deposit - Feralas', 10), +(@OGUID+26, @PTEMPLATE+22, 'Silver Vein / Gold Vein / Iron Deposit - Feralas', 10), +(22814, @PTEMPLATE+22, 'Silver Vein / Gold Vein / Iron Deposit - Feralas', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+22, 1196, 0, 'Feralas - Silver Vein / Gold Vein / Iron Deposit', 0); + +-- Missing Silver Vein spawns in Alterac Mountains. +DELETE FROM `pool_gameobject` WHERE `guid` IN (427023, 427134); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+23, 1, 'Silver Vein / Iron Deposit - Alterac Mountains', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(427134, @PTEMPLATE+23, 'Silver Vein / Iron Deposit - Alterac Mountains', 10), +(427023, @PTEMPLATE+23, 'Silver Vein / Iron Deposit - Alterac Mountains', 10); + +-- Missing Silver Vein spawns in Stranglethorn Vale. +DELETE FROM `pool_gameobject` WHERE `guid` IN (31587, 251502); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+24, 1, 'Tin Vein / Silver Vein - Stranglethorn', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(31587, @PTEMPLATE+24, 'Tin Vein / Silver Vein - Stranglethorn', 10), +(251502, @PTEMPLATE+24, 'Tin Vein / Silver Vein - Stranglethorn', 10); + +-- Missing Gold Vein spawns in Desolace. +DELETE FROM `pool_gameobject` WHERE `guid` IN (34210, 20790); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+25, 1, 'Gold Vein / Iron Deposit - Desolace', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(34210, @PTEMPLATE+25, 'Gold Vein / Iron Deposit - Desolace', 10), +(20790, @PTEMPLATE+25, 'Gold Vein / Iron Deposit - Desolace', 10); + +-- Missing Silver Vein spawns in Thousand Needles. +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(3996274, 3206, 'Silver Vein / Gold Vein / Iron Deposit - Thousand Needles', 10); + +-- Pool Gold Vein / Mithril Deposit spawns in Feralas. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+27, 2040, 1, -5531.73, 3587.94, -12.624, 0.802851, 0, 0, 0.390731, 0.920505, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 21338 at 55.558098 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+26, 1, 'Gold Vein / Mithril Deposit - Feralas', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+27, @PTEMPLATE+26, 'Gold Vein / Mithril Deposit - Feralas', 10), +(21385, @PTEMPLATE+26, 'Gold Vein / Mithril Deposit - Feralas', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+26, 1357, 0, 'Feralas - Gold Vein / Mithril Deposit', 0); + +-- Pool Gold Vein / Mithril Deposit / Truesilver Deposit spawns in Azshara. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+28, 2040, 1, 5024.58, -7276.83, -4.43215, 1.16937, 0, 0, 0.551937, 0.833886, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 66353 at 284.685760 yards. +(@OGUID+29, 2047, 1, 5024.58, -7276.83, -4.43215, 1.16937, 0, 0, 0.551937, 0.833886, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 66353 at 284.685760 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+27, 1, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+28, @PTEMPLATE+27, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(@OGUID+29, @PTEMPLATE+27, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(66469, @PTEMPLATE+27, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+27, 2338, 0, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 0); + +-- Pool Mithril Deposit / Truesilver Deposit spawns in Silithus. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+30, 2047, 1, -7318.67, 377.435, 18.0047, 0.10472, 0, 0, 0.052336, 0.99863, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 427513 at 314.044739 yards. +(@OGUID+31, 2047, 1, -8009.26, 1984.93, 15.7425, -1.79769, 0, 0, 0.782608, -0.622515, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 16848 at 229.306900 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+28, 1, 'Mithril Deposit / Truesilver Deposit - Silithus', 10), +(@PTEMPLATE+29, 1, 'Mithril Deposit / Truesilver Deposit - Silithus', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+30, @PTEMPLATE+28, 'Mithril Deposit / Truesilver Deposit - Silithus', 10), +(@OGUID+31, @PTEMPLATE+29, 'Mithril Deposit / Truesilver Deposit - Silithus', 10), +(427523, @PTEMPLATE+28, 'Mithril Deposit / Truesilver Deposit - Silithus', 10), +(16899, @PTEMPLATE+29, 'Mithril Deposit / Truesilver Deposit - Silithus', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+28, 2338, 0, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 0), +(@PTEMPLATE+29, 2338, 0, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 0); + +-- Pool Gold Vein / Mithril Deposit / Truesilver Deposit spawns in Azshara. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+32, 1734, 1, 4293.85, -6170.96, 133.361, -2.19912, 0, 0, 0.891007, -0.45399, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 66377 at 164.510544 yards. +(@OGUID+33, 1734, 1, 4853.9, -6549.07, 118.069, -1.06465, 0, 0, 0.507538, -0.861629, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 66406 at 175.840027 yards. +(@OGUID+34, 1734, 1, 2002.13, -5895.49, -6.39748, -0.715585, 0, 0, 0.350207, -0.936672, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 66391 at 278.309875 yards. +(@OGUID+35, 2047, 1, 4293.85, -6170.96, 133.361, -2.19912, 0, 0, 0.891007, -0.45399, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 66377 at 164.510544 yards. +(@OGUID+36, 2047, 1, 4853.9, -6549.07, 118.069, -1.06465, 0, 0, 0.507538, -0.861629, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 66406 at 175.840027 yards. +(@OGUID+37, 2047, 1, 2002.13, -5895.49, -6.39748, -0.715585, 0, 0, 0.350207, -0.936672, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 66391 at 278.309875 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+30, 1, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(@PTEMPLATE+31, 1, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(@PTEMPLATE+32, 1, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+32, @PTEMPLATE+30, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(@OGUID+33, @PTEMPLATE+31, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(@OGUID+34, @PTEMPLATE+32, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(@OGUID+35, @PTEMPLATE+30, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(@OGUID+36, @PTEMPLATE+31, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(@OGUID+37, @PTEMPLATE+32, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(66455, @PTEMPLATE+30, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(66456, @PTEMPLATE+31, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10), +(66459, @PTEMPLATE+32, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+30, 326, 0, 'Silithus - Mithril Deposit / Truesilver Deposit', 0), +(@PTEMPLATE+31, 326, 0, 'Silithus - Mithril Deposit / Truesilver Deposit', 0), +(@PTEMPLATE+32, 326, 0, 'Silithus - Mithril Deposit / Truesilver Deposit', 0); + +-- Pool Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit spawns in Swamp of Sorrows. +DELETE FROM `gameobject` WHERE `guid` IN (26108, 26131, 26154); +DELETE FROM `pool_gameobject` WHERE `guid` IN (26108, 26131, 26154); +DELETE FROM `pool_template` WHERE `entry` = 21589; +DELETE FROM `pool_pool` WHERE `pool_id` = 21589; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+38, 1733, 0, -10992.9, -3674.35, 25.4381, -2.67035, 0, 0, 0.97237, -0.233445, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 23163 at 36.635441 yards. +(@OGUID+39, 1733, 0, -10375.5, -3730.17, -14.7175, -2.33874, 0, 0, 0.920505, -0.390731, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 23168 at 126.328918 yards. +(@OGUID+40, 1734, 0, -10992.9, -3674.35, 25.4381, -2.67035, 0, 0, 0.97237, -0.233445, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 23163 at 36.635441 yards. +(@OGUID+41, 1734, 0, -10375.5, -3730.17, -14.7175, -2.33874, 0, 0, 0.920505, -0.390731, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 23168 at 126.328918 yards. +(@OGUID+42, 1735, 0, -10992.9, -3674.35, 25.4381, -2.67035, 0, 0, 0.97237, -0.233445, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 23163 at 36.635441 yards. +(@OGUID+43, 1735, 0, -10375.5, -3730.17, -14.7175, -2.33874, 0, 0, 0.920505, -0.390731, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 23168 at 126.328918 yards. +(@OGUID+44, 2047, 0, -10992.9, -3674.35, 25.4381, -2.67035, 0, 0, 0.97237, -0.233445, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 23163 at 36.635441 yards. +(@OGUID+45, 2047, 0, -10375.5, -3730.17, -14.7175, -2.33874, 0, 0, 0.920505, -0.390731, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 23168 at 126.328918 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+33, 1, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10), +(@PTEMPLATE+34, 1, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+38, @PTEMPLATE+33, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10), +(@OGUID+39, @PTEMPLATE+34, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10), +(@OGUID+40, @PTEMPLATE+33, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10), +(@OGUID+41, @PTEMPLATE+34, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10), +(@OGUID+42, @PTEMPLATE+33, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10), +(@OGUID+43, @PTEMPLATE+34, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10), +(@OGUID+44, @PTEMPLATE+33, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10), +(@OGUID+45, @PTEMPLATE+34, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10), +(23189, @PTEMPLATE+33, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10), +(23190, @PTEMPLATE+34, 'Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+33, 1332, 0, 'Swamp of Sorrows - Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit', 0), +(@PTEMPLATE+34, 1332, 0, 'Swamp of Sorrows - Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit', 0); + +-- Pool Gold Vein / Mithril Deposit spawns in Feralas. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+46, 1734, 1, -5752.27, 3677.47, -8.37481, -0.750491, 0, 0, 0.366501, -0.930418, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 21364 at 197.964096 yards. +(@OGUID+47, 1734, 1, -5585.74, 3546.6, -2.5983, -2.56563, 0, 0, 0.95882, -0.284015, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 21365 at 70.341942 yards. +(@OGUID+48, 1734, 1, -5581.2, 3514.24, 19.1351, -2.49582, 0, 0, 0.948324, -0.317305, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 21365 at 49.433422 yards. +(@OGUID+49, 1734, 1, -3119.27, 2513.86, 72.785, 3.05433, 0, 0, 0.999048, 0.0436195, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 21379 at 363.617218 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+35, 1, 'Gold Vein / Mithril Deposit - Feralas', 10), +(@PTEMPLATE+36, 1, 'Gold Vein / Mithril Deposit - Feralas', 10), +(@PTEMPLATE+37, 1, 'Gold Vein / Mithril Deposit - Feralas', 10), +(@PTEMPLATE+38, 1, 'Gold Vein / Mithril Deposit - Feralas', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+46, @PTEMPLATE+35, 'Gold Vein / Mithril Deposit - Feralas', 10), +(@OGUID+47, @PTEMPLATE+36, 'Gold Vein / Mithril Deposit - Feralas', 10), +(@OGUID+48, @PTEMPLATE+37, 'Gold Vein / Mithril Deposit - Feralas', 10), +(@OGUID+49, @PTEMPLATE+38, 'Gold Vein / Mithril Deposit - Feralas', 10), +(21381, @PTEMPLATE+35, 'Gold Vein / Mithril Deposit - Feralas', 10), +(21382, @PTEMPLATE+36, 'Gold Vein / Mithril Deposit - Feralas', 10), +(21383, @PTEMPLATE+37, 'Gold Vein / Mithril Deposit - Feralas', 10), +(21384, @PTEMPLATE+38, 'Gold Vein / Mithril Deposit - Feralas', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+35, 1357, 0, 'Feralas - Gold Vein / Mithril Deposit', 0), +(@PTEMPLATE+36, 1357, 0, 'Feralas - Gold Vein / Mithril Deposit', 0), +(@PTEMPLATE+37, 1357, 0, 'Feralas - Gold Vein / Mithril Deposit', 0), +(@PTEMPLATE+38, 1357, 0, 'Feralas - Gold Vein / Mithril Deposit', 0); + +-- Pool Gold Vein / Mithril Deposit / Truesilver Deposit spawns in Tanaris. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+50, 1734, 1, -8783.8, -4489.43, 44.7562, 2.58309, 0, 0, 0.961262, 0.275637, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 427495 at 130.258896 yards. +(@OGUID+51, 1734, 1, -9300.68, -2166.02, 21.5652, 2.58309, 0, 0, 0.961262, 0.275637, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 22678 at 100.853592 yards. +(@OGUID+52, 1734, 1, -9526.4, -2399.89, 45.5343, -2.46091, 0, 0, 0.942641, -0.333807, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 22705 at 213.071808 yards. +(@OGUID+53, 2047, 1, -8783.8, -4489.43, 44.7562, 2.58309, 0, 0, 0.961262, 0.275637, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 427495 at 130.258896 yards. +(@OGUID+54, 2047, 1, -9300.68, -2166.02, 21.5652, 2.58309, 0, 0, 0.961262, 0.275637, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 22678 at 100.853592 yards. +(@OGUID+55, 2047, 1, -9526.4, -2399.89, 45.5343, -2.46091, 0, 0, 0.942641, -0.333807, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 22705 at 213.071808 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+39, 1, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10), +(@PTEMPLATE+40, 1, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10), +(@PTEMPLATE+41, 1, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+50, @PTEMPLATE+39, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10), +(@OGUID+51, @PTEMPLATE+40, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10), +(@OGUID+52, @PTEMPLATE+41, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10), +(@OGUID+53, @PTEMPLATE+39, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10), +(@OGUID+54, @PTEMPLATE+40, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10), +(@OGUID+55, @PTEMPLATE+41, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10), +(427512, @PTEMPLATE+39, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10), +(22772, @PTEMPLATE+40, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10), +(22773, @PTEMPLATE+41, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+39, 1203, 0, 'Tanaris - Gold Vein / Mithril Deposit / Truesilver Deposit', 0), +(@PTEMPLATE+40, 1203, 0, 'Tanaris - Gold Vein / Mithril Deposit / Truesilver Deposit', 0), +(@PTEMPLATE+41, 1203, 0, 'Tanaris - Gold Vein / Mithril Deposit / Truesilver Deposit', 0); + +-- Pool Tin Vein / Silver Vein / Gold Vein / Iron Deposit spawns in Duskwood. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+56, 1732, 0, -11080.6, -1109.6, 45.5113, -1.51844, 0, 0, 0.688354, -0.725374, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 25286 at 49.795357 yards. +(@OGUID+57, 1733, 0, -11080.6, -1109.6, 45.5113, -1.51844, 0, 0, 0.688354, -0.725374, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 25286 at 49.795357 yards. +(@OGUID+58, 1734, 0, -11080.6, -1109.6, 45.5113, -1.51844, 0, 0, 0.688354, -0.725374, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 25286 at 49.795357 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+42, 1, 'Tin Vein / Silver Vein / Gold Vein / Iron Deposit - Duskwood', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+56, @PTEMPLATE+42, 'Tin Vein / Silver Vein / Gold Vein / Iron Deposit - Duskwood', 10), +(@OGUID+57, @PTEMPLATE+42, 'Tin Vein / Silver Vein / Gold Vein / Iron Deposit - Duskwood', 10), +(@OGUID+58, @PTEMPLATE+42, 'Tin Vein / Silver Vein / Gold Vein / Iron Deposit - Duskwood', 10), +(25288, @PTEMPLATE+42, 'Tin Vein / Silver Vein / Gold Vein / Iron Deposit - Duskwood', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+42, 18830, 0, 'Duskwood - Tin Vein / Silver Vein / Gold Vein / Iron Deposit', 0); + +-- Missing Iron Deposit spawns in Dustwallow Marsh. +DELETE FROM `pool_gameobject` WHERE `guid` IN (220414, 56033); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+43, 1, 'Iron Deposit / Mithril Deposit - Dustwallow Marsh', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(220414, @PTEMPLATE+43, 'Iron Deposit / Mithril Deposit - Dustwallow Marsh', 10), +(56033, @PTEMPLATE+43, 'Iron Deposit / Mithril Deposit - Dustwallow Marsh', 10); + +-- Missing Iron Deposit spawns in Alterac Mountains. +DELETE FROM `pool_gameobject` WHERE `guid` IN (10254, 427055); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+44, 1, 'Gold Vein / Iron Deposit - Alterac Mountains', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `patch_min`, `patch_max`) VALUES +(10254, @PTEMPLATE+44, 0, 'Gold Vein / Iron Deposit - Alterac Mountains', 0, 10), +(427055, @PTEMPLATE+44, 0, 'Gold Vein / Iron Deposit - Alterac Mountains', 0, 10); + +-- Pool Silver Vein / Gold Vein / Iron Deposit in Thousand Needles. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+59, 1733, 1, -6222.05, -4367.97, -56.7603, -0.226893, 0, 0, 0.113203, -0.993572, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 27964 at 253.433441 yards. +(@OGUID+60, 1733, 1, -5086.62, -950.802, 1.68455, 0.191986, 0, 0, 0.0958458, 0.995396, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 427280 at 77.470131 yards. +(@OGUID+61, 1734, 1, -6222.05, -4367.97, -56.7603, -0.226893, 0, 0, 0.113203, -0.993572, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 27964 at 253.433441 yards. +(@OGUID+62, 1734, 1, -5086.62, -950.802, 1.68455, 0.191986, 0, 0, 0.0958458, 0.995396, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 427280 at 77.470131 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+45, 1, 'Silver Vein / Gold Vein / Iron Deposit - Thousand Needles', 10), +(@PTEMPLATE+46, 1, 'Silver Vein / Gold Vein / Iron Deposit - Thousand Needles', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+59, @PTEMPLATE+45, 'Silver Vein / Gold Vein / Iron Deposit - Thousand Needles', 10), +(@OGUID+60, @PTEMPLATE+46, 'Silver Vein / Gold Vein / Iron Deposit - Thousand Needles', 10), +(@OGUID+61, @PTEMPLATE+45, 'Silver Vein / Gold Vein / Iron Deposit - Thousand Needles', 10), +(@OGUID+62, @PTEMPLATE+46, 'Silver Vein / Gold Vein / Iron Deposit - Thousand Needles', 10), +(28021, @PTEMPLATE+45, 'Silver Vein / Gold Vein / Iron Deposit - Thousand Needles', 10), +(427294, @PTEMPLATE+46, 'Silver Vein / Gold Vein / Iron Deposit - Thousand Needles', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+45, 329, 0, 'Thousand Needles - Silver Vein / Gold Vein / Iron Deposit', 0), +(@PTEMPLATE+46, 329, 0, 'Thousand Needles - Silver Vein / Gold Vein / Iron Deposit', 0); + +-- Missing Mithril Deposit spawns in Badlands. +DELETE FROM `gameobject` WHERE `guid` = 25228; +UPDATE `gameobject` SET `id` = 2040 WHERE `guid` = 31736; +UPDATE `gameobject` SET `id` = 2047 WHERE `guid` = 31794; +UPDATE `pool_template` SET `description` = 'Gold Vein / Mithril Deposit / Truesilver Deposit - Badlands' WHERE `entry`=1756; +UPDATE `pool_gameobject` SET `description` = 'Gold Vein / Mithril Deposit / Truesilver Deposit - Badlands' WHERE `guid` IN (31736, 31794, 31852); +UPDATE `pool_pool` SET `description` = 'Badlands - Gold Vein / Mithril Deposit / Truesilver Deposit' WHERE `pool_id` IN (2186, 1756, 2197, 2212); +UPDATE `pool_pool` SET `mother_pool` = 1288 WHERE `pool_id` = 1756; + +-- Missing Mithril Deposit spawns in Badlands. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+63, 1734, 0, -6437.13, -4166.62, 293.283, -1.64061, 0, 0, 0.731354, -0.681998, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 25168 at 104.834045 yards. +(@OGUID+64, 2047, 0, -6437.13, -4166.62, 293.283, -1.64061, 0, 0, 0.731354, -0.681998, 300, 300, 1, 100, 0, 10); -- Closest existing guid is 25168 at 104.834045 yards. +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+47, 1, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Badlands', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+63, @PTEMPLATE+47, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Badlands', 10), +(@OGUID+64, @PTEMPLATE+47, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Badlands', 10), +(25229, @PTEMPLATE+47, 'Gold Vein / Mithril Deposit / Truesilver Deposit - Badlands', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+47, 1288, 0, 'Badlands - Gold Vein / Mithril Deposit / Truesilver Deposit', 0); + +-- Missing Iron Deposit spawns in Arathi Highlands. +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `patch_min`, `patch_max`) VALUES +(@OGUID+65, 1733, 0, -1937.67, -3216.95, 78.7885, -0.418879, 0, 0, 0.207912, -0.978148, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 34496 at 60.664383 yards. +(@OGUID+66, 1733, 0, -2060.62, -2789.07, 68.599, 1.15192, 0, 0, 0.544639, 0.838671, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 427227 at 15.839430 yards. +(@OGUID+67, 1733, 0, -570.907, -1973.91, 61.6349, 1.93732, 0, 0, 0.824126, 0.566406, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 427040 at 117.574150 yards. +(@OGUID+68, 1734, 0, -1937.67, -3216.95, 78.7885, -0.418879, 0, 0, 0.207912, -0.978148, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 34496 at 60.664383 yards. +(@OGUID+69, 1734, 0, -2060.62, -2789.07, 68.599, 1.15192, 0, 0, 0.544639, 0.838671, 300, 300, 1, 100, 0, 10), -- Closest existing guid is 427227 at 15.839430 yards. +(@OGUID+70, 1734, 0, -570.907, -1973.91, 61.6349, 1.93732, 0, 0, 0.824126, 0.566406, 300, 300, 1, 100, 0, 10); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+48, 1, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10), +(@PTEMPLATE+49, 1, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10), +(@PTEMPLATE+50, 1, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+65, @PTEMPLATE+48, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10), +(@OGUID+66, @PTEMPLATE+49, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10), +(@OGUID+67, @PTEMPLATE+50, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10), +(@OGUID+68, @PTEMPLATE+48, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10), +(@OGUID+69, @PTEMPLATE+49, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10), +(@OGUID+70, @PTEMPLATE+50, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10), +(34590, @PTEMPLATE+48, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10), +(427245, @PTEMPLATE+49, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10), +(427052, @PTEMPLATE+50, 'Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+48, 323, 0, 'Arathi Highlands - Silver Vein / Gold Vein / Iron Deposit', 0), +(@PTEMPLATE+49, 323, 0, 'Arathi Highlands - Silver Vein / Gold Vein / Iron Deposit', 0), +(@PTEMPLATE+50, 323, 0, 'Arathi Highlands - Silver Vein / Gold Vein / Iron Deposit', 0); + +-- Missing Silver Vein spawns in Arathi Highlands. +DELETE FROM `pool_gameobject` WHERE `guid` IN (25336, 25334); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+51, 1, 'Lesser Bloodstone Deposit / Silver Vein - Arathi Highlands', 10), +(@PTEMPLATE+52, 1, 'Lesser Bloodstone Deposit / Iron Deposit - Arathi Highlands', 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(427547, @PTEMPLATE+51, 'Lesser Bloodstone Deposit / Silver Vein - Arathi Highlands', 10), +(25334, @PTEMPLATE+51, 'Lesser Bloodstone Deposit / Silver Vein - Arathi Highlands', 10), +(427540, @PTEMPLATE+52, 'Lesser Bloodstone Deposit / Iron Deposit - Arathi Highlands', 10), +(25336, @PTEMPLATE+52, 'Lesser Bloodstone Deposit / Iron Deposit - Arathi Highlands', 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+51, 2222, 0, 'Arathi Highlands - Lesser Bloodstone Deposit / Silver Vein', 0), +(@PTEMPLATE+52, 2222, 0, 'Arathi Highlands - Lesser Bloodstone Deposit / Iron Deposit', 0); + +UPDATE `gameobject` SET `spawntimesecsmin` = 300, `spawntimesecsmax` = 300 WHERE `guid` IN (16701, 16899, 21155, 21156, 21381, 21382, 21383, 21384, 21385, 22772, 22773, 22814, 22914, 22915, 22916, 22917, 23189, 23190, 23211, 23540, 23541, 23560, 23561, 25228, 25229, 25288, 27302, 27303, 27304, 27305, 27672, 28021, 29701, 31587, 31588, 34210, 34590, 66455, 66456, 66459, 66469, 100341, 118820, 251654, 261650, 427052, 427245, 427294, 427512, 427523, 427540, 427547, 3996274); + +-- Master Pools For Alterac, STV, Desolace +-- Alterac +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `flags`, `instance`, `patch_min`, `patch_max`) VALUES +(@PTEMPLATE+53, 4, 'Alterac Mountains - Mining Nodes (Master Pool)', 0, 0, 0, 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(2916, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2917, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2918, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2919, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2920, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2921, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2922, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2923, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2924, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2925, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2926, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2927, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(9003, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2907, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2908, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2909, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2910, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2911, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2912, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2913, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2914, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2915, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2901, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2902, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2903, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2904, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2905, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2906, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(2928, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(18870, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(18871, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(23047, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0), +(@PTEMPLATE+23, @PTEMPLATE+53, 0, 'Alterac Mountains - Mining Nodes', 0); + +-- STV +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `flags`, `instance`, `patch_min`, `patch_max`) VALUES +(@PTEMPLATE+54, 4, 'Stranglethorn Vale - Mining Nodes (Master Pool)', 0, 0, 0, 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(2885, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2886, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2887, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2888, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2889, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2890, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2891, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2892, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2893, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2900, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2894, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2895, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2896, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2897, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2898, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2899, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2876, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2877, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2878, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2879, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2880, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2881, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2882, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2883, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(2884, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0), +(@PTEMPLATE+24, @PTEMPLATE+54, 0, 'Stranglethorn Vale - Mining Nodes', 0); + +-- Desolace +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `flags`, `instance`, `patch_min`, `patch_max`) VALUES +(@PTEMPLATE+55, 44, 'Desolace - Mining Nodes (Master Pool)', 0, 0, 0, 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(3663, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3664, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3665, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3666, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3667, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3668, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3669, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3670, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3671, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(2761, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3679, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3680, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3681, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3682, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3683, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3684, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3685, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3686, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3687, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3688, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3689, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3690, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3691, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(9004, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3672, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3673, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3674, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3675, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3676, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3677, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3678, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3661, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(3662, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0), +(@PTEMPLATE+25, @PTEMPLATE+55, 0, 'Desolace - Mining Nodes', 0); + +-- Update Chance +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Gold Vein / Mithril Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 60 WHERE `description` = "Gold Vein / Mithril Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2040); +UPDATE `pool_gameobject` SET `chance` = 30 WHERE `description` = "Gold Vein / Mithril Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 165658); + +UPDATE `pool_gameobject` SET `chance` = 5 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 50 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2040); +UPDATE `pool_gameobject` SET `chance` = 30 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 165658); +UPDATE `pool_gameobject` SET `chance` = 5 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1735); + +UPDATE `pool_gameobject` SET `chance` = 5 WHERE `description` = "Gold Vein / Mithril Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 50 WHERE `description` = "Gold Vein / Mithril Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2040); +UPDATE `pool_gameobject` SET `chance` = 25 WHERE `description` = "Gold Vein / Mithril Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 165658); +UPDATE `pool_gameobject` SET `chance` = 20 WHERE `description` = "Gold Vein / Mithril Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 324); + +UPDATE `pool_gameobject` SET `chance` = 15 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 50 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2040); +UPDATE `pool_gameobject` SET `chance` = 20 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 165658); +UPDATE `pool_gameobject` SET `chance` = 15 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2047); + +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 40 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2040); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 165658); +UPDATE `pool_gameobject` SET `chance` = 20 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2047); +UPDATE `pool_gameobject` SET `chance` = 20 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit / Dark Iron Deposit / Small Thorium Vein - Searing George" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 324); + +UPDATE `pool_gameobject` SET `chance` = 80 WHERE `description` = "Truesilver Deposit / Small Thorium Vein - Silithus" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 324); +UPDATE `pool_gameobject` SET `chance` = 20 WHERE `description` = "Truesilver Deposit / Small Thorium Vein - Silithus" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2047); + +UPDATE `pool_gameobject` SET `chance` = 90 WHERE `description` = "Truesilver Deposit / Small Thorium Vein - Winterspring" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 324); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Truesilver Deposit / Small Thorium Vein - Winterspring" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2047); + +UPDATE `pool_gameobject` SET `chance` = 90 WHERE `description` = "Truesilver Deposit / Small Thorium Vein - Feralas" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 324); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Truesilver Deposit / Small Thorium Vein - Feralas" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2047); + +UPDATE `pool_gameobject` SET `chance` = 90 WHERE `description` = "Truesilver Deposit / Small Thorium Vein - Western Plaguelands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 324); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Truesilver Deposit / Small Thorium Vein - Western Plaguelands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2047); + +UPDATE `pool_gameobject` SET `chance` = 90 WHERE `description` = "Truesilver Deposit / Small Thorium Vein - Blasted Lands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 324); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Truesilver Deposit / Small Thorium Vein - Blasted Lands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2047); + +UPDATE `pool_gameobject` SET `chance` = 90 WHERE `description` = "Tin Vein / Silver Vein - Stonetalon Mountains" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1732); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Tin Vein / Silver Vein - Stonetalon Mountains" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); + +UPDATE `pool_gameobject` SET `chance` = 90 WHERE `description` = "Tin Vein / Silver Vein - Westfall" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1732); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Tin Vein / Silver Vein - Westfall" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); + +UPDATE `pool_gameobject` SET `chance` = 90 WHERE `description` = "Tin Vein / Silver Vein - Loch Modan" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1732); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Tin Vein / Silver Vein - Loch Modan" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); + +UPDATE `pool_gameobject` SET `chance` = 90 WHERE `description` = "Tin Vein / Silver Vein - Barrens" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1732); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Tin Vein / Silver Vein - Barrens" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); + +UPDATE `pool_gameobject` SET `chance` = 90 WHERE `description` = "Tin Vein / Silver Vein - Wetlands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1732); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Tin Vein / Silver Vein - Wetlands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); + +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit - Feralas" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit - Feralas" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 80 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit - Feralas" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1735); + +UPDATE `pool_gameobject` SET `chance` = 20 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit - Thousand Needles" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit - Thousand Needles" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 70 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit - Thousand Needles" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1735); + +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Gold Vein / Mithril Deposit - Feralas" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 90 WHERE `description` = "Gold Vein / Mithril Deposit - Feralas" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2040); + +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2040); +UPDATE `pool_gameobject` SET `chance` = 80 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit - Azshara" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2047); + +UPDATE `pool_gameobject` SET `chance` = 60 WHERE `description` = "Mithril Deposit / Truesilver Deposit - Silithus" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2040); +UPDATE `pool_gameobject` SET `chance` = 40 WHERE `description` = "Mithril Deposit / Truesilver Deposit - Silithus" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2047); + +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 50 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1735); +UPDATE `pool_gameobject` SET `chance` = 20 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2040); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit / Mithril Deposit / Truesilver Deposit - Swamp of Sorrows" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2047); + +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 80 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2040); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Gold Vein / Mithril Deposit / Truesilver Deposit - Tanaris" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 2047); + +UPDATE `pool_gameobject` SET `chance` = 50 WHERE `description` = "Tin Vein / Silver Vein / Gold Vein / Iron Deposit - Duskwood" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1732); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Tin Vein / Silver Vein / Gold Vein / Iron Deposit - Duskwood" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Tin Vein / Silver Vein / Gold Vein / Iron Deposit - Duskwood" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 30 WHERE `description` = "Tin Vein / Silver Vein / Gold Vein / Iron Deposit - Duskwood" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1735); + +UPDATE `pool_gameobject` SET `chance` = 15 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); +UPDATE `pool_gameobject` SET `chance` = 15 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1734); +UPDATE `pool_gameobject` SET `chance` = 70 WHERE `description` = "Silver Vein / Gold Vein / Iron Deposit - Arathi Highlands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1735); + +-- Pool Tin Vein / Silver Vein / Incendicite Mineral Vein spawns in Wetlands +SET @OGUID = 58900; +SET @PTEMPLATE = 4600; + +DELETE FROM `gameobject` WHERE `guid` IN (24773, 24774, 24775, 24776, 24777, 24778, 24779, 24780, 24781, 24782, 24783, 24784, 24785, 24786, 24787, 24788, 24789, 24790, 24791, 24792, 24793, 24794, 24795, 24796, 24797, 24798, 24799, 24840, 112803, 112804, 118805, 118806, 118807, 118808, 118809, 118810, 118811, 118812, 118813, 118814, 118815, 118816, 118817, 118818, 118819, 118821, 371794, 371795, 371796, 371797, 371798, 371799, 371800, 371801, 371802, 371803); +DELETE FROM `pool_gameobject` WHERE `guid` IN (24773, 24774, 24775, 24776, 24777, 24778, 24779, 24780, 24781, 24782, 24783, 24784, 24785, 24786, 24787, 24788, 24789, 24790, 24791, 24792, 24793, 24794, 24795, 24796, 24797, 24798, 24799, 24840, 112803, 112804, 118805, 118806, 118807, 118808, 118809, 118810, 118811, 118812, 118813, 118814, 118815, 118816, 118817, 118818, 118819, 118821, 371794, 371795, 371796, 371797, 371798, 371799, 371800, 371801, 371802, 371803); +DELETE FROM `pool_template` WHERE `entry` IN (3660, 3655, 3655, 3655, 3655, 3655, 3655, 3655, 3655, 3655, 3655, 3655, 3655, 3655, 3655, 17009, 17009, 17009, 17010, 17010, 17010, 17011, 17011, 17011, 17012, 17012, 17012, 17013, 17013, 17013, 43527, 43527, 43527, 43528, 43528, 43528, 43529, 43529, 43529, 43530, 43530, 43530, 43531, 43531, 43531, 43532, 43532, 43532, 43533, 43533, 43533, 43534, 43534, 43534, 43535, 43535, 43535); +DELETE FROM `pool_pool` WHERE `mother_pool` = 3660; + +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `spawn_flags`, `visibility_mod`, `patch_min`, `patch_max`) VALUES +(@OGUID+1, 1610, 0, -3942.23, -2285.07, 17.1541, -0.2618, 0, 0, 0.130526, -0.991445, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+2, 1610, 0, -3929.86, -2318.63, 23.0019, 5.93412, 0, 0, -0.173648, 0.984808, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+3, 1610, 0, -3895.7, -2362.62, 22.8919, 0.994838, 0, 0, 0.477159, 0.878817, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+4, 1610, 0, -3886.07, -2401.82, 26.3338, 0.331613, 0, 0, 0.165048, 0.986286, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+5, 1610, 0, -3884.85, -2310.76, 25.4112, 2.89725, 0, 0, 0.992546, 0.121868, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+6, 1610, 0, -3880.72, -2459.3, 34.2359, 1.294, 0, 0, 0.602795, 0.797896, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+7, 1610, 0, -3877.42, -2484.44, 41.5919, 4.45059, 0, 0, -0.793353, 0.608762, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+8, 1610, 0, -3875.72, -2586.04, 44.1806, 2.74017, 0, 0, 0.979925, 0.199368, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+9, 1610, 0, -3870.25, -2383.63, 26.5792, 0.174532, 0, 0, 0.0871553, 0.996195, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+10, 1610, 0, -3864.54, -2323.02, 44.058, 1.0821, 0, 0, 0.515036, 0.857168, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+11, 1610, 0, -3863.12, -2476.62, 41.4935, -0.069813, 0, 0, -0.0348994, 0.999391, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+12, 1610, 0, -3837.11, -2527.33, 38.9886, -1.09956, 0, 0, -0.5225, 0.852639, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+13, 1610, 0, -3836.94, -2481.73, 35.6039, -0.069813, 0, 0, 0.034899, -0.999391, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+14, 1610, 0, -3833.58, -2299.88, 30.4736, 4.46804, 0, 0, -0.788011, 0.615662, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+15, 1610, 0, -3830.66, -2501.42, 38.5958, 2.51327, 0, 0, 0.951057, 0.309017, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+16, 1610, 0, -3830.57, -2431.7, 26.5262, 2.67035, 0, 0, 0.972369, 0.233447, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+17, 1610, 0, -3829.84, -2420.19, 27.287, 2.67035, 0, 0, 0.97237, 0.233445, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+18, 1610, 0, -3813.83, -2279.43, 33.753, -2.1293, 0, 0, -0.874619, 0.48481, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+19, 1610, 0, -3809.23, -2396.89, 28.0163, -1.81514, 0, 0, 0.788011, -0.615661, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+20, 1610, 0, -3805.75, -2471.3, 27.4686, -0.785398, 0, 0, -0.382683, 0.92388, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+21, 1610, 0, -3801.1, -2353.66, 33.2039, 0.034907, 0, 0, 0.017452, 0.999848, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+22, 1610, 0, -3799.52, -2390.45, 28.5253, 2.67035, 0, 0, 0.972369, 0.233448, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+23, 1610, 0, -3785.22, -2375.88, 30.6012, 3.31614, 0, 0, -0.996194, 0.087165, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+24, 1610, 0, -3779.64, -2485.89, 26.3598, 3.624, 0, 0, 0.971051, -0.238872, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+25, 1610, 0, -3758.25, -2456.14, 28.3123, 4.17134, 0, 0, -0.870356, 0.492424, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+26, 1610, 0, -3756.49, -2480.01, 32.6535, 1.09956, 0, 0, 0.522499, 0.85264, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+27, 1610, 0, -3874.11, -2340.36, 22.3002, -0.349066, 0, 0, 0.173648, -0.984808, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+28, 1667, 0, -3942.23, -2285.07, 17.1541, -0.2618, 0, 0, 0.130526, -0.991445, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+29, 1667, 0, -3929.86, -2318.63, 23.0019, 5.93412, 0, 0, -0.173648, 0.984808, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+30, 1667, 0, -3895.7, -2362.62, 22.8919, 0.994838, 0, 0, 0.477159, 0.878817, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+31, 1667, 0, -3886.07, -2401.82, 26.3338, 0.331613, 0, 0, 0.165048, 0.986286, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+32, 1667, 0, -3884.85, -2310.76, 25.4112, 2.89725, 0, 0, 0.992546, 0.121868, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+33, 1667, 0, -3880.72, -2459.3, 34.2359, 1.294, 0, 0, 0.602795, 0.797896, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+34, 1667, 0, -3877.42, -2484.44, 41.5919, 4.45059, 0, 0, -0.793353, 0.608762, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+35, 1667, 0, -3875.72, -2586.04, 44.1806, 2.74017, 0, 0, 0.979925, 0.199368, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+36, 1667, 0, -3870.25, -2383.63, 26.5792, 0.174532, 0, 0, 0.0871553, 0.996195, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+37, 1667, 0, -3864.54, -2323.02, 44.058, 1.0821, 0, 0, 0.515036, 0.857168, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+38, 1667, 0, -3863.12, -2476.62, 41.4935, -0.069813, 0, 0, -0.0348994, 0.999391, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+39, 1667, 0, -3837.11, -2527.33, 38.9886, -1.09956, 0, 0, -0.5225, 0.852639, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+40, 1667, 0, -3836.94, -2481.73, 35.6039, -0.069813, 0, 0, 0.034899, -0.999391, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+41, 1667, 0, -3833.58, -2299.88, 30.4736, 4.46804, 0, 0, -0.788011, 0.615662, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+42, 1667, 0, -3830.66, -2501.42, 38.5958, 2.51327, 0, 0, 0.951057, 0.309017, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+43, 1667, 0, -3830.57, -2431.7, 26.5262, 2.67035, 0, 0, 0.972369, 0.233447, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+44, 1667, 0, -3829.84, -2420.19, 27.287, 2.67035, 0, 0, 0.97237, 0.233445, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+45, 1667, 0, -3813.83, -2279.43, 33.753, -2.1293, 0, 0, -0.874619, 0.48481, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+46, 1667, 0, -3809.23, -2396.89, 28.0163, -1.81514, 0, 0, 0.788011, -0.615661, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+47, 1667, 0, -3805.75, -2471.3, 27.4686, -0.785398, 0, 0, -0.382683, 0.92388, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+48, 1667, 0, -3801.1, -2353.66, 33.2039, 0.034907, 0, 0, 0.017452, 0.999848, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+49, 1667, 0, -3799.52, -2390.45, 28.5253, 2.67035, 0, 0, 0.972369, 0.233448, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+50, 1667, 0, -3785.22, -2375.88, 30.6012, 3.31614, 0, 0, -0.996194, 0.087165, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+51, 1667, 0, -3779.64, -2485.89, 26.3598, 3.624, 0, 0, 0.971051, -0.238872, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+52, 1667, 0, -3758.25, -2456.14, 28.3123, 4.17134, 0, 0, -0.870356, 0.492424, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+53, 1667, 0, -3756.49, -2480.01, 32.6535, 1.09956, 0, 0, 0.522499, 0.85264, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+54, 1667, 0, -3874.11, -2340.36, 22.3002, -0.349066, 0, 0, 0.173648, -0.984808, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+55, 1732, 0, -3942.23, -2285.07, 17.1541, -0.2618, 0, 0, 0.130526, -0.991445, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+56, 1732, 0, -3929.86, -2318.63, 23.0019, 5.93412, 0, 0, -0.173648, 0.984808, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+57, 1732, 0, -3895.7, -2362.62, 22.8919, 0.994838, 0, 0, 0.477159, 0.878817, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+58, 1732, 0, -3886.07, -2401.82, 26.3338, 0.331613, 0, 0, 0.165048, 0.986286, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+59, 1732, 0, -3884.85, -2310.76, 25.4112, 2.89725, 0, 0, 0.992546, 0.121868, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+60, 1732, 0, -3880.72, -2459.3, 34.2359, 1.294, 0, 0, 0.602795, 0.797896, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+61, 1732, 0, -3877.42, -2484.44, 41.5919, 4.45059, 0, 0, -0.793353, 0.608762, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+62, 1732, 0, -3875.72, -2586.04, 44.1806, 2.74017, 0, 0, 0.979925, 0.199368, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+63, 1732, 0, -3870.25, -2383.63, 26.5792, 0.174532, 0, 0, 0.0871553, 0.996195, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+64, 1732, 0, -3864.54, -2323.02, 44.058, 1.0821, 0, 0, 0.515036, 0.857168, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+65, 1732, 0, -3863.12, -2476.62, 41.4935, -0.069813, 0, 0, -0.0348994, 0.999391, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+66, 1732, 0, -3837.11, -2527.33, 38.9886, -1.09956, 0, 0, -0.5225, 0.852639, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+67, 1732, 0, -3836.94, -2481.73, 35.6039, -0.069813, 0, 0, 0.034899, -0.999391, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+68, 1732, 0, -3833.58, -2299.88, 30.4736, 4.46804, 0, 0, -0.788011, 0.615662, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+69, 1732, 0, -3830.66, -2501.42, 38.5958, 2.51327, 0, 0, 0.951057, 0.309017, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+70, 1732, 0, -3830.57, -2431.7, 26.5262, 2.67035, 0, 0, 0.972369, 0.233447, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+71, 1732, 0, -3829.84, -2420.19, 27.287, 2.67035, 0, 0, 0.97237, 0.233445, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+72, 1732, 0, -3813.83, -2279.43, 33.753, -2.1293, 0, 0, -0.874619, 0.48481, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+73, 1732, 0, -3809.23, -2396.89, 28.0163, -1.81514, 0, 0, 0.788011, -0.615661, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+74, 1732, 0, -3805.75, -2471.3, 27.4686, -0.785398, 0, 0, -0.382683, 0.92388, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+75, 1732, 0, -3801.1, -2353.66, 33.2039, 0.034907, 0, 0, 0.017452, 0.999848, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+76, 1732, 0, -3799.52, -2390.45, 28.5253, 2.67035, 0, 0, 0.972369, 0.233448, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+77, 1732, 0, -3785.22, -2375.88, 30.6012, 3.31614, 0, 0, -0.996194, 0.087165, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+78, 1732, 0, -3779.64, -2485.89, 26.3598, 3.624, 0, 0, 0.971051, -0.238872, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+79, 1732, 0, -3758.25, -2456.14, 28.3123, 4.17134, 0, 0, -0.870356, 0.492424, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+80, 1732, 0, -3756.49, -2480.01, 32.6535, 1.09956, 0, 0, 0.522499, 0.85264, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+81, 1732, 0, -3874.11, -2340.36, 22.3002, -0.349066, 0, 0, 0.173648, -0.984808, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+82, 1733, 0, -3942.23, -2285.07, 17.1541, -0.2618, 0, 0, 0.130526, -0.991445, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+83, 1733, 0, -3929.86, -2318.63, 23.0019, 5.93412, 0, 0, -0.173648, 0.984808, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+84, 1733, 0, -3895.7, -2362.62, 22.8919, 0.994838, 0, 0, 0.477159, 0.878817, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+85, 1733, 0, -3886.07, -2401.82, 26.3338, 0.331613, 0, 0, 0.165048, 0.986286, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+86, 1733, 0, -3884.85, -2310.76, 25.4112, 2.89725, 0, 0, 0.992546, 0.121868, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+87, 1733, 0, -3880.72, -2459.3, 34.2359, 1.294, 0, 0, 0.602795, 0.797896, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+88, 1733, 0, -3877.42, -2484.44, 41.5919, 4.45059, 0, 0, -0.793353, 0.608762, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+89, 1733, 0, -3875.72, -2586.04, 44.1806, 2.74017, 0, 0, 0.979925, 0.199368, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+90, 1733, 0, -3870.25, -2383.63, 26.5792, 0.174532, 0, 0, 0.0871553, 0.996195, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+91, 1733, 0, -3864.54, -2323.02, 44.058, 1.0821, 0, 0, 0.515036, 0.857168, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+92, 1733, 0, -3863.12, -2476.62, 41.4935, -0.069813, 0, 0, -0.0348994, 0.999391, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+93, 1733, 0, -3837.11, -2527.33, 38.9886, -1.09956, 0, 0, -0.5225, 0.852639, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+94, 1733, 0, -3836.94, -2481.73, 35.6039, -0.069813, 0, 0, 0.034899, -0.999391, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+95, 1733, 0, -3833.58, -2299.88, 30.4736, 4.46804, 0, 0, -0.788011, 0.615662, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+96, 1733, 0, -3830.66, -2501.42, 38.5958, 2.51327, 0, 0, 0.951057, 0.309017, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+97, 1733, 0, -3830.57, -2431.7, 26.5262, 2.67035, 0, 0, 0.972369, 0.233447, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+98, 1733, 0, -3829.84, -2420.19, 27.287, 2.67035, 0, 0, 0.97237, 0.233445, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+99, 1733, 0, -3813.83, -2279.43, 33.753, -2.1293, 0, 0, -0.874619, 0.48481, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+100, 1733, 0, -3809.23, -2396.89, 28.0163, -1.81514, 0, 0, 0.788011, -0.615661, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+101, 1733, 0, -3805.75, -2471.3, 27.4686, -0.785398, 0, 0, -0.382683, 0.92388, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+102, 1733, 0, -3801.1, -2353.66, 33.2039, 0.034907, 0, 0, 0.017452, 0.999848, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+103, 1733, 0, -3799.52, -2390.45, 28.5253, 2.67035, 0, 0, 0.972369, 0.233448, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+104, 1733, 0, -3785.22, -2375.88, 30.6012, 3.31614, 0, 0, -0.996194, 0.087165, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+105, 1733, 0, -3779.64, -2485.89, 26.3598, 3.624, 0, 0, 0.971051, -0.238872, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+106, 1733, 0, -3758.25, -2456.14, 28.3123, 4.17134, 0, 0, -0.870356, 0.492424, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+107, 1733, 0, -3756.49, -2480.01, 32.6535, 1.09956, 0, 0, 0.522499, 0.85264, 300, 300, 100, 1, 0, 0, 0, 10), +(@OGUID+108, 1733, 0, -3874.11, -2340.36, 22.3002, -0.349066, 0, 0, 0.173648, -0.984808, 300, 300, 100, 1, 0, 0, 0, 10); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `patch_max`) VALUES +(@PTEMPLATE+1, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+2, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+3, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+4, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+5, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+6, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+7, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+8, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+9, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+10, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+11, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+12, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+13, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+14, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+15, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+16, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+17, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+18, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+19, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+20, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+21, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+22, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+23, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+24, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+25, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+26, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@PTEMPLATE+27, 1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10); + +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `description`, `patch_max`) VALUES +(@OGUID+1, @PTEMPLATE+1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+2, @PTEMPLATE+2, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+3, @PTEMPLATE+3, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+4, @PTEMPLATE+4, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+5, @PTEMPLATE+5, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+6, @PTEMPLATE+6, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+7, @PTEMPLATE+7, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+8, @PTEMPLATE+8, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+9, @PTEMPLATE+9, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+10, @PTEMPLATE+10, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+11, @PTEMPLATE+11, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+12, @PTEMPLATE+12, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+13, @PTEMPLATE+13, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+14, @PTEMPLATE+14, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+15, @PTEMPLATE+15, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+16, @PTEMPLATE+16, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+17, @PTEMPLATE+17, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+18, @PTEMPLATE+18, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+19, @PTEMPLATE+19, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+20, @PTEMPLATE+20, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+21, @PTEMPLATE+21, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+22, @PTEMPLATE+22, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+23, @PTEMPLATE+23, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+24, @PTEMPLATE+24, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+25, @PTEMPLATE+25, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+26, @PTEMPLATE+26, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+27, @PTEMPLATE+27, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+28, @PTEMPLATE+1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+29, @PTEMPLATE+2, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+30, @PTEMPLATE+3, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+31, @PTEMPLATE+4, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+32, @PTEMPLATE+5, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+33, @PTEMPLATE+6, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+34, @PTEMPLATE+7, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+35, @PTEMPLATE+8, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+36, @PTEMPLATE+9, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+37, @PTEMPLATE+10, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+38, @PTEMPLATE+11, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+39, @PTEMPLATE+12, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+40, @PTEMPLATE+13, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+41, @PTEMPLATE+14, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+42, @PTEMPLATE+15, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+43, @PTEMPLATE+16, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+44, @PTEMPLATE+17, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+45, @PTEMPLATE+18, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+46, @PTEMPLATE+19, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+47, @PTEMPLATE+20, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+48, @PTEMPLATE+21, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+49, @PTEMPLATE+22, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+50, @PTEMPLATE+23, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+51, @PTEMPLATE+24, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+52, @PTEMPLATE+25, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+53, @PTEMPLATE+26, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+54, @PTEMPLATE+27, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+55, @PTEMPLATE+1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+56, @PTEMPLATE+2, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+57, @PTEMPLATE+3, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+58, @PTEMPLATE+4, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+59, @PTEMPLATE+5, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+60, @PTEMPLATE+6, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+61, @PTEMPLATE+7, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+62, @PTEMPLATE+8, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+63, @PTEMPLATE+9, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+64, @PTEMPLATE+10, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+65, @PTEMPLATE+11, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+66, @PTEMPLATE+12, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+67, @PTEMPLATE+13, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+68, @PTEMPLATE+14, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+69, @PTEMPLATE+15, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+70, @PTEMPLATE+16, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+71, @PTEMPLATE+17, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+72, @PTEMPLATE+18, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+73, @PTEMPLATE+19, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+74, @PTEMPLATE+20, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+75, @PTEMPLATE+21, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+76, @PTEMPLATE+22, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+77, @PTEMPLATE+23, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+78, @PTEMPLATE+24, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+79, @PTEMPLATE+25, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+80, @PTEMPLATE+26, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+81, @PTEMPLATE+27, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+82, @PTEMPLATE+1, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+83, @PTEMPLATE+2, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+84, @PTEMPLATE+3, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+85, @PTEMPLATE+4, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+86, @PTEMPLATE+5, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+87, @PTEMPLATE+6, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+88, @PTEMPLATE+7, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+89, @PTEMPLATE+8, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+90, @PTEMPLATE+9, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+91, @PTEMPLATE+10, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+92, @PTEMPLATE+11, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+93, @PTEMPLATE+12, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+94, @PTEMPLATE+13, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+95, @PTEMPLATE+14, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+96, @PTEMPLATE+15, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+97, @PTEMPLATE+16, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+98, @PTEMPLATE+17, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+99, @PTEMPLATE+18, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+100, @PTEMPLATE+19, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+101, @PTEMPLATE+20, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+102, @PTEMPLATE+21, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+103, @PTEMPLATE+22, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+104, @PTEMPLATE+23, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+105, @PTEMPLATE+24, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+106, @PTEMPLATE+25, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+107, @PTEMPLATE+26, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10), +(@OGUID+108, @PTEMPLATE+27, 'Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands', 10); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `flags`, `instance`, `patch_min`, `patch_max`) VALUES +(3660, 4, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein (Master Pool)', 0, 0, 0, 10); +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`, `flags`) VALUES +(@PTEMPLATE+1, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+2, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+3, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+4, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+5, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+6, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+7, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+8, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+9, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+10, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+11, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+12, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+13, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+14, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+15, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+16, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+17, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+18, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+19, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+20, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+21, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+22, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+23, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+24, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+25, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+26, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0), +(@PTEMPLATE+27, 3660, 0, 'Wetlands - Tin Vein / Silver Vein / Incendicite Mineral Vein', 0); + +-- Chance +UPDATE `pool_gameobject` SET `chance` = 50 WHERE `description` = "Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1732); +UPDATE `pool_gameobject` SET `chance` = 10 WHERE `description` = "Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1733); +UPDATE `pool_gameobject` SET `chance` = 20 WHERE `description` = "Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1610); +UPDATE `pool_gameobject` SET `chance` = 20 WHERE `description` = "Tin Vein / Silver Vein / Incendicite Mineral Vein - Wetlands" && `guid` IN (SELECT `guid` FROM `gameobject` WHERE `id` = 1667); + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241211105148_world.sql b/sql/migrations/20241211105148_world.sql new file mode 100644 index 00000000000..390c534aa89 --- /dev/null +++ b/sql/migrations/20241211105148_world.sql @@ -0,0 +1,137 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241211105148'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241211105148'); +-- Add your query below. + + +-- Doodad_RuinedSign06 +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2078, 175654, 0, 3477.52, -3359.29, 151.06, 4.71239, 0, 0, -0.707107, 0.707107, 180, 180, 100, 1, 0, 10), -- Stratholme +(2079, 175654, 533, 3477.52, -3359.29, 151.06, 4.71239, 0, 0, -0.707107, 0.707107, 180, 180, 100, 1, 0, 10); -- Naxxramas + +-- Doodad_RuinedSign07 +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2080, 175655, 0, 3473.01, -3294.13, 147.507, 5.14872, 0, 0, -0.5373, 0.843391, 180, 180, 100, 1, 0, 10), -- Stratholme +(2082, 175655, 533, 3473.01, -3294.13, 147.507, 5.14872, 0, 0, -0.5373, 0.843391, 180, 180, 100, 1, 0, 10); -- Naxxramas + +-- Doodad_WoodSignPointerNice10 +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2084, 175656, 533, 3446.54, -3370.09, 140.956, 1.65806, 0, 0, 0.737277, 0.675591, 180, 180, 100, 1, 0, 10); -- Naxxramas + +-- Doodad_WoodSignPointerNice11 +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2086, 175657, 533, 3447.17, -3369.94, 140.925, 4.79442, -0.117315, 0.128027, -0.665326, 0.726077, 180, 180, 100, 1, 0, 10); -- Naxxramas + +-- Doodad_GnomeSign_Engineer01 +UPDATE `gameobject` SET `position_x`=146.94, `position_y`=-6.10418, `position_z`=-3.15419, `orientation`=2.41291, `rotation0`=0, `rotation1`=0, `rotation2`=0.93436, `rotation3`=0.356332 WHERE `guid`=18511; + +-- Doodad_DwarfSign_Alchemist01 +REPLACE INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(14232, 175664, 369, 146.438, 27.883, -0.142696, 3.879, 0, 0, -0.932796, 0.360406, 180, 180, 100, 1, 0, 10); -- Deeprun Tram + +-- Doodad_DwarvenBrazier196 +REPLACE INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(14110, 175666, 369, 109.351, 16.2142, -4.29443, 0.850847, 0, 0, 0.412706, 0.910864, 180, 180, 100, 1, 0, 10); -- Deeprun Tram + +-- Doodad_DwarvenBrazier195 +REPLACE INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(14063, 175667, 369, 109.847, 4.7277, -4.29443, 0.850847, 0, 0, 0.412706, 0.910864, 180, 180, 100, 1, 0, 10); -- Deeprun Tram + +-- Doodad_PostBoxGnome01 +UPDATE `gameobject` SET `position_x`=112.364, `position_y`=5.07913, `position_z`=-4.35765, `orientation`=0.850847, `rotation0`=0, `rotation1`=0, `rotation2`=0.412706, `rotation3`=0.910864 WHERE `guid`=18513; + +-- Rend Head Event Timer +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2095, 175789, 1, 1920.27, -4134.9, 8.82368, 1.72787, 0, 0, 0.760406, 0.649449, -10800, -10800, 100, 1, 0, 10); -- Orgrimmar +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(4974, 0, 0, 9, 2095, 10800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'For The Horde: Thrall - Respawn Rend Head Event Timer'); + +-- Horde Bell +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2098, 175885, 529, 692.502, 672.742, -6.67027, 3.3685, 0, 0, -0.993571, 0.113208, 180, 180, 100, 1, 0, 10); -- Arathi Basin + +-- Roughshod Pike +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2099, 175886, 229, -37.7856, -589.639, 30.9964, 3.194, 0, 0, -0.999657, 0.0262016, 25, 25, 100, 1, 0, 10), -- Blackrock Spire +(2103, 175886, 229, -37.1093, -589.641, 30.9548, 1.29154, 0, 0, 0.601814, 0.798636, 25, 25, 100, 1, 0, 10), -- Blackrock Spire +(2104, 175886, 229, -35.6387, -589.632, 30.9825, 4.31097, 0, 0, -0.833885, 0.551938, 25, 25, 100, 1, 0, 10), -- Blackrock Spire +(2105, 175886, 229, -34.5386, -589.635, 30.9964, 5.68977, 0, 0, -0.292372, 0.956305, 25, 25, 100, 1, 0, 10), -- Blackrock Spire +(2106, 175886, 229, -36.2977, -589.617, 31.0103, 1.09956, 0, 0, 0.522498, 0.85264, 25, 25, 100, 1, 0, 10), -- Blackrock Spire +(2107, 175886, 229, -34.7324, -589.615, 30.9339, 1.62316, 0, 0, 0.725374, 0.688355, 25, 25, 100, 1, 0, 10); -- Blackrock Spire +DELETE FROM `gameobject` WHERE `guid`=321191; + +-- Fifth Mosh'aru Tablet +UPDATE `gameobject` SET `position_x`=-128.234, `position_y`=-482.381, `position_z`=25.4535, `orientation`=6.26573, `rotation0`=0, `rotation1`=0, `rotation2`=-0.00872612, `rotation3`=0.999962 WHERE `guid`=30277; + +-- Sixth Mosh'aru Tablet +UPDATE `gameobject` SET `position_x`=-11.1345, `position_y`=-466.205, `position_z`=-16.8553, `orientation`=4.72984, `rotation0`=0, `rotation1`=0, `rotation2`=-0.700909, `rotation3`=0.713251 WHERE `guid`=350470; + +-- Skin of Shadow +UPDATE `gameobject` SET `position_x`=257.26, `position_y`=-5.07736, `position_z`=75.8889, `orientation`=0.209439, `rotation0`=0, `rotation1`=0, `rotation2`=0.104528, `rotation3`=0.994522 WHERE `guid`=397022; + +-- Frostwhisper's Embalming Fluid +UPDATE `gameobject` SET `position_x`=-17.8299, `position_y`=124.581, `position_z`=84.8528, `orientation`=1.53589, `rotation0`=0, `rotation1`=0, `rotation2`=0.694658, `rotation3`=0.71934 WHERE `guid`=43205; + +-- Blood of Heroes +-- Pool 38: Eastern Plaguelands - Blood of Heroes +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2122, 176213, 0, 1870, -3988.17, 118.568, 0.174532, 0, 0, 0.0871553, 0.996195, 7200, 7200, 100, 1, 0, 10); -- Eastern Plaguelands +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES +(2122, 38, 0, 'Blood of Heroes', 0, 0, 10); + +-- Archive Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2135, 176295, 329, 3462.58, -3101.21, 136.546, 3.52557, 0, 0, -0.981627, 0.190812, -86400, -86400, 100, 1, 0, 10), -- Stratholme (SPAWN) +(2136, 176295, 329, 3450.44, -3103.39, 136.546, 3.4383, 0, 0, -0.989016, 0.147811, -86400, -86400, 100, 1, 0, 10), -- Stratholme (SPAWN) +(2137, 176295, 329, 3458.97, -3105.15, 136.546, 0.541051, 0, 0, 0.267238, 0.963631, -86400, -86400, 100, 1, 0, 10), -- Stratholme (SPAWN) +(2138, 176295, 329, 3459.59, -3110.38, 136.546, 1.18682, 0, 0, 0.559193, 0.829038, -86400, -86400, 100, 1, 0, 10), -- Stratholme (SPAWN) +(2139, 176295, 329, 3452.87, -3108.56, 136.546, 0.418879, 0, 0, 0.207911, 0.978148, -86400, -86400, 100, 1, 0, 10), -- Stratholme (SPAWN) +(2141, 176295, 329, 3465.55, -3105.72, 136.587, 2.89725, 0, 0, 0.992546, 0.12187, -86400, -86400, 100, 1, 0, 10), -- Stratholme (SPAWN) +(2142, 176295, 329, 3459.45, -3097.48, 136.546, 4.88692, 0, 0, -0.642787, 0.766045, -86400, -86400, 100, 1, 0, 10), -- Stratholme (SPAWN) +(2143, 176295, 329, 3456.64, -3112.31, 136.546, 2.75761, 0, 0, 0.981627, 0.190812, -86400, -86400, 100, 1, 0, 10); -- Stratholme (SPAWN) +DELETE FROM `event_scripts` WHERE `id`=5258; +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(5258, 0, 9, 2135, 86400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Archive: Respawn GameObject Archive Fire'), +(5258, 0, 9, 2136, 86400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Archive: Respawn GameObject Archive Fire'), +(5258, 0, 9, 2137, 86400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Archive: Respawn GameObject Archive Fire'), +(5258, 0, 9, 2138, 86400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Archive: Respawn GameObject Archive Fire'), +(5258, 0, 9, 2139, 86400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Archive: Respawn GameObject Archive Fire'), +(5258, 0, 9, 2141, 86400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Archive: Respawn GameObject Archive Fire'), +(5258, 0, 9, 2142, 86400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Archive: Respawn GameObject Archive Fire'), +(5258, 0, 9, 2143, 86400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Archive: Respawn GameObject Archive Fire'); + +-- Postbox Parcel +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2455, 176360, 329, 3564.43, -3352.55, 131.89, 2.30383, 0, 0, 0.913545, 0.406738, -3600, -3600, 100, 1, 0, 10), -- Stratholme (SPAWN) +(2459, 176360, 329, 3690.1, -3404.56, 133.962, 1.36136, 0, 0, 0.62932, 0.777146, -3600, -3600, 100, 1, 0, 10), -- Stratholme (SPAWN) +(2461, 176360, 329, 3659.45, -3477.42, 139.558, 4.11898, 0, 0, -0.882947, 0.469473, -3600, -3600, 100, 1, 0, 10), -- Stratholme (SPAWN) +(2462, 176360, 329, 3473.96, -3294.85, 133.178, 5.34071, 0, 0, -0.45399, 0.891007, -3600, -3600, 100, 1, 0, 10), -- Stratholme (SPAWN) +(2463, 176360, 329, 3639.37, -3640.66, 139.679, 1.88495, 0, 0, 0.809016, 0.587786, -3600, -3600, 100, 1, 0, 10); -- Stratholme (SPAWN) +DELETE FROM `gameobject_scripts` WHERE `id`=47276; +INSERT INTO `gameobject_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(47276, 0, 0, 9, 2455, 3600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'King\'s Square Postbox - Respawn Postbox Parcel'); +DELETE FROM `gameobject_scripts` WHERE `id`=45220; +INSERT INTO `gameobject_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(45220, 0, 0, 9, 2459, 3600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Market Row Postbox - Respawn Postbox Parcel'); +DELETE FROM `gameobject_scripts` WHERE `id`=47274; +INSERT INTO `gameobject_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(47274, 0, 0, 9, 2461, 3600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Festival Lane Postbox - Respawn Postbox Parcel'); +DELETE FROM `gameobject_scripts` WHERE `id`=47277; +INSERT INTO `gameobject_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(47277, 0, 0, 9, 2462, 3600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fras Siabi\'s Postbox - Respawn Postbox Parcel'); +DELETE FROM `gameobject_scripts` WHERE `id`=47275; +INSERT INTO `gameobject_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(47275, 0, 0, 9, 2463, 3600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Elders\' Square Postbox - Respawn Postbox Parcel'); + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241211112353_world.sql b/sql/migrations/20241211112353_world.sql new file mode 100644 index 00000000000..5360bb0cd68 --- /dev/null +++ b/sql/migrations/20241211112353_world.sql @@ -0,0 +1,23 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241211112353'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241211112353'); +-- Add your query below. + + +-- Baristolth of the Shifting Sands was a stable master before 1.9. +DELETE FROM `creature_template` WHERE `entry`=15180; +INSERT INTO `creature_template` (`entry`, `patch`, `name`, `subname`, `level_min`, `level_max`, `faction`, `npc_flags`, `gossip_menu_id`, `display_id1`, `display_id2`, `display_id3`, `display_id4`, `display_scale1`, `display_scale2`, `display_scale3`, `display_scale4`, `display_probability1`, `display_probability2`, `display_probability3`, `display_probability4`, `display_total_probability`, `mount_display_id`, `speed_walk`, `speed_run`, `detection_range`, `call_for_help_range`, `leash_range`, `type`, `pet_family`, `rank`, `unit_class`, `xp_multiplier`, `health_multiplier`, `mana_multiplier`, `armor_multiplier`, `damage_multiplier`, `damage_variance`, `damage_school`, `base_attack_time`, `ranged_attack_time`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `loot_id`, `pickpocket_loot_id`, `skinning_loot_id`, `gold_min`, `gold_max`, `spell_id1`, `spell_id2`, `spell_id3`, `spell_id4`, `spell_list_id`, `pet_spell_list_id`, `spawn_spell_id`, `auras`, `ai_name`, `movement_type`, `inhabit_type`, `civilian`, `racial_leader`, `equipment_id`, `trainer_id`, `vendor_id`, `mechanic_immune_mask`, `school_immune_mask`, `immunity_flags`, `static_flags1`, `static_flags2`, `flags_extra`, `script_name`) VALUES (15180, 6, 'Baristolth of the Shifting Sands', 'Stable Master', 60, 60, 994, 8195, 6529, 15311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1.14286, 18, 5, 0, 7, 0, 0, 1, 1, 1, 1, 1, 1, 0.14, 0, 2000, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, '', 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 6, 0, 2, ''); +INSERT INTO `creature_template` (`entry`, `patch`, `name`, `subname`, `level_min`, `level_max`, `faction`, `npc_flags`, `gossip_menu_id`, `display_id1`, `display_id2`, `display_id3`, `display_id4`, `display_scale1`, `display_scale2`, `display_scale3`, `display_scale4`, `display_probability1`, `display_probability2`, `display_probability3`, `display_probability4`, `display_total_probability`, `mount_display_id`, `speed_walk`, `speed_run`, `detection_range`, `call_for_help_range`, `leash_range`, `type`, `pet_family`, `rank`, `unit_class`, `xp_multiplier`, `health_multiplier`, `mana_multiplier`, `armor_multiplier`, `damage_multiplier`, `damage_variance`, `damage_school`, `base_attack_time`, `ranged_attack_time`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `loot_id`, `pickpocket_loot_id`, `skinning_loot_id`, `gold_min`, `gold_max`, `spell_id1`, `spell_id2`, `spell_id3`, `spell_id4`, `spell_list_id`, `pet_spell_list_id`, `spawn_spell_id`, `auras`, `ai_name`, `movement_type`, `inhabit_type`, `civilian`, `racial_leader`, `equipment_id`, `trainer_id`, `vendor_id`, `mechanic_immune_mask`, `school_immune_mask`, `immunity_flags`, `static_flags1`, `static_flags2`, `flags_extra`, `script_name`) VALUES (15180, 7, 'Baristolth of the Shifting Sands', NULL, 60, 60, 994, 3, 6529, 15311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1.14286, 18, 5, 0, 7, 0, 0, 1, 1, 1, 1, 1, 1, 0.14, 0, 2000, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, '', 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 6, 0, 2, ''); + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241212104611_world.sql b/sql/migrations/20241212104611_world.sql new file mode 100644 index 00000000000..5f7475c707c --- /dev/null +++ b/sql/migrations/20241212104611_world.sql @@ -0,0 +1,346 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241212104611'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241212104611'); +-- Add your query below. + + +-- Remove wrong Campfire spawns. +DELETE FROM `gameobject` WHERE `guid` IN (3998307, 3998308, 3998309, 3998310); + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2402, 176428, 229, -63.2568, -581.483, 29.2934, 3.14169, 0.0295649, -0.0015707, -0.999561, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2403, 176429, 229, -37.6863, -551.822, 16.2163, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2409, 176430, 229, -25.3349, -478.438, 17.2504, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2410, 176431, 229, -46.3865, -448.61, -18.5644, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2411, 176432, 229, -2.64242, -579.144, -18.7609, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2412, 176433, 229, 26.982, -583.365, -18.5153, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2413, 176434, 229, 35.6424, -550.73, -18.411, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2414, 176435, 229, 33.1643, -471.047, -18.5059, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Bonfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2417, 176436, 229, 31.9839, -495.349, -18.8984, 3.14444, 0.00822973, -0.0190172, -0.999784, 0.00126859, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2418, 176437, 229, -39.3852, -424.878, -18.8471, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Bonfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2419, 176439, 229, -76.0975, -418.801, -18.9234, 4.45059, 0, 0, -0.793352, 0.608763, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2421, 176440, 229, -59.9712, -409.641, -18.8443, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2423, 176441, 229, -79.5309, -453.927, -18.8332, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Bonfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2424, 176442, 229, -15.4378, -368.781, 49.4936, 3.14085, -0.0333757, -0.0110826, 0.999381, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2425, 176443, 229, -121.137, -296.445, 71.0397, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Bonfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2426, 176444, 229, -137.264, -305.605, 70.9606, 4.45059, 0, 0, -0.793352, 0.608763, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Bonfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2427, 176445, 229, -59.1198, -339.829, 70.9606, 4.45059, 0, 0, -0.793352, 0.608763, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2429, 176446, 229, -87.3357, -348.37, 71.0397, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Meat Rack +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2430, 176456, 229, -60.6476, -584.383, 29.1115, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Fire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2431, 176457, 229, -115.273, -428.518, -18.701, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Meat Rack +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2433, 176458, 229, -114.982, -421.897, -18.9179, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Blackrock Spire + +-- Eva Remains Ablaze +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2643, 176546, 289, 196.846, -73.9371, 85.2284, 2.56563, 0, 0, 0.958819, 0.284016, -18, -18, 100, 1, 0, 10); -- Scholomance (SPAWN) +DELETE FROM `event_scripts` WHERE `id`=5439; +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(5439, 0, 9, 2643, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Remains of Eva Sarkhoff: Respawn GameObject Eva Remains Ablaze'); + +-- Lucien Remains Ablaze +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2644, 176547, 289, 165.337, -81.144, 85.2284, 3.03684, 0, 0, 0.998629, 0.0523532, -18, -18, 100, 1, 0, 10); -- Scholomance (SPAWN) +DELETE FROM `event_scripts` WHERE `id`=5438; +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(5438, 0, 9, 2644, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Remains of Lucien Sarkhoff: Respawn GameObject Lucien Remains Ablaze'); + +-- Alliance Bell +-- Event 78: Hourly Bells +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2648, 176573, 529, 1307.12, 1320.6, -2.68807, 0.785397, 0, 0, 0.382683, 0.92388, 180, 180, 100, 1, 0, 10); -- Arathi Basin +UPDATE `gameobject` SET `position_x`=-8585.28, `position_y`=808.048, `position_z`=106.519, `orientation`=3.73501, `rotation0`=0, `rotation1`=0, `rotation2`=-0.956305, `rotation3`=0.292372 WHERE `guid`=18901; +UPDATE `gameobject` SET `position_x`=-8760.2, `position_y`=1117.5, `position_z`=110.842, `orientation`=2.47837, `rotation0`=0, `rotation1`=0, `rotation2`=0.945518, `rotation3`=0.325568 WHERE `guid`=42905; + +-- Dreamfoil +-- Pool 4291: Herbs in Dire Maul +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2650, 176584, 429, -36.5852, -319.271, -51.7758, 0.244346, 0, 0, 0.121869, 0.992546, 604800, 604800, 100, 1, 1, 10), -- Dire Maul +(2651, 176584, 429, -76.5402, -246.546, -56.9004, 4.7473, 0, 0, -0.694658, 0.71934, 604800, 604800, 100, 1, 1, 10); -- Dire Maul +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES +(2650, 4291, 0, 'Dreamfoil', 0, 1, 10), +(2651, 4291, 0, 'Dreamfoil', 0, 1, 10); + +-- Smoldering Brazier +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2671, 176905, 429, -21.1058, -392.466, -58.1027, 5.12254, 0, 0, -0.548293, 0.836286, 180, 180, 100, 1, 0, 10); -- Dire Maul +DELETE FROM `gameobject` WHERE `guid`=3997173; + +-- Smoldering Brazier +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2672, 176906, 429, 4.30648, -441.621, -37.9976, 3.5692, 0, 0, -0.977231, 0.212178, 180, 180, 100, 1, 0, 10); -- Dire Maul + +-- Door +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2673, 177211, 429, -41.8254, 159.874, -3.44834, 0, 0, 0, 0, 1, 25, 25, 100, 1, 1, 10); -- Dire Maul + +-- Door +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2675, 177212, 429, 10.7216, 159.459, -3.44834, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Dire Maul + +-- Door +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2676, 177213, 429, 10.5911, -154.998, -2.69379, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Dire Maul + +-- Door +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2677, 177215, 429, 255.408, 10.3791, -2.69381, 1.5708, 0, 0, 0.707107, 0.707107, 180, 180, 100, 1, 0, 10); -- Dire Maul + +-- Gordok Inner Door +UPDATE `gameobject` SET `position_x`=491.204, `position_y`=515.133, `position_z`=29.4675, `orientation`=1.5708, `rotation0`=0, `rotation1`=0, `rotation2`=0.707107, `rotation3`=0.707107 WHERE `guid`=240540; + +-- Gordok Courtyard Door +UPDATE `gameobject` SET `position_x`=385.327, `position_y`=374.232, `position_z`=-1.34314, `orientation`=1.5708, `rotation0`=0, `rotation1`=0, `rotation2`=0.707107, `rotation3`=0.707107 WHERE `guid`=240359; + +-- Door +UPDATE `gameobject` SET `id`=177221, `position_x`=50.5863, `position_y`=501.94, `position_z`=-23.1499, `orientation`=4.71239, `rotation0`=0, `rotation1`=0, `rotation2`=-0.707107, `rotation3`=0.707107 WHERE `guid`=397125; + +-- Troll Drum Sound Object +UPDATE `gameobject` SET `position_x`=7313.22, `position_y`=-1490.33, `position_z`=155.965, `orientation`=5.49779, `rotation0`=0, `rotation1`=0, `rotation2`=-0.382683, `rotation3`=0.92388 WHERE `guid`=50453; + +-- Remove custom spawns of Arcane Aberration and Mana Remnant and replace with spawns from sniffs. +DELETE FROM `creature` WHERE `id` IN (11480, 11483); +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `wander_distance`, `movement_type`, `spawntimesecsmin`, `spawntimesecsmax`, `patch_min`, `patch_max`) VALUES +(84210, 11483, 429, 13.3353, 265.504, -7.47873, 4.85202, 0, 0, 7200, 7200, 1, 10), +(84211, 11483, 429, 0.18435, 277.584, -8.35593, 3.03687, 0, 0, 7200, 7200, 1, 10), +(84212, 11480, 429, 4.51283, 268.919, -8.03384, 3.83972, 0, 0, 7200, 7200, 1, 10), +(84213, 11480, 429, 22.2903, 268.93, -7.75637, 5.61996, 0, 0, 7200, 7200, 1, 10), +(84214, 11483, 429, 24.4087, 277.987, -8.40844, 6.0912, 0, 0, 7200, 7200, 1, 10), +(84215, 11483, 429, 22.2632, 286.032, -8.67728, 0.855211, 0, 0, 7200, 7200, 1, 10), +(84216, 11483, 429, 13.7393, 290.024, -8.81422, 1.43117, 0, 0, 7200, 7200, 1, 10), +(84218, 11480, 429, 4.86775, 286.17, -8.49644, 2.51327, 0, 0, 7200, 7200, 1, 10), +(84219, 11483, 429, 116.572, 441.026, 28.6844, 1.90241, 0, 0, 7200, 7200, 1, 10), +(84220, 11480, 429, 109.187, 432.731, 28.6844, 2.93215, 0, 0, 7200, 7200, 1, 10), +(84221, 11483, 429, 109.499, 423.1, 28.6844, 3.31613, 0, 0, 7200, 7200, 1, 10), +(84222, 11480, 429, 116.239, 417.468, 28.6844, 4.41568, 0, 0, 7200, 7200, 1, 10), +(84223, 11483, 429, -86.7868, 430.229, 28.6855, 4.83456, 0, 0, 7200, 7200, 1, 10), +(84224, 11480, 429, -79.4082, 437.517, 28.6859, 5.61996, 0, 0, 7200, 7200, 1, 10), +(84225, 11483, 429, -79.6795, 447.35, 28.6859, 0.401426, 0, 0, 7200, 7200, 1, 10), +(84227, 11480, 429, -86.4111, 454.612, 28.6864, 1.18682, 0, 0, 7200, 7200, 1, 10), +(84230, 11483, 429, -97.6146, 454.302, 28.6873, 2.21657, 0, 0, 7200, 7200, 1, 10), +(84231, 11483, 429, -104.249, 447.252, 28.6878, 2.75762, 0, 0, 7200, 7200, 1, 10), +(84234, 11483, 429, -104.42, 436.883, 28.6865, 3.36849, 0, 0, 7200, 7200, 1, 10), +(84235, 11480, 429, -98.4999, 429.365, 28.6854, 4.20624, 0, 0, 7200, 7200, 1, 10), +(84239, 11483, 429, 126.092, 416.945, 28.6844, 4.99164, 0, 0, 7200, 7200, 1, 10), +(84240, 11483, 429, 133.068, 423.411, 28.6844, 5.93412, 0, 0, 7200, 7200, 1, 10), +(84241, 11480, 429, 126.612, 440.825, 28.6844, 1.18682, 0, 0, 7200, 7200, 1, 10), +(84242, 11483, 429, 133.537, 434.405, 28.6844, 0.471239, 0, 0, 7200, 7200, 1, 10), +(84245, 11483, 429, 78.1069, 724.323, -24.4956, 4.67748, 0, 0, 7200, 7200, 1, 10), +(84246, 11480, 429, 87.2501, 727.643, -24.497, 5.16617, 0, 0, 7200, 7200, 1, 10), +(84247, 11483, 429, 91.785, 737.786, -24.497, 0, 0, 0, 7200, 7200, 1, 10), +(84257, 11480, 429, 89.8462, 745.194, -24.497, 0.715585, 0, 0, 7200, 7200, 1, 10), +(84258, 11483, 429, 78.097, 749.842, -24.497, 1.41372, 0, 0, 7200, 7200, 1, 10), +(84259, 11483, 429, 68.7335, 747.766, -24.497, 2.33874, 0, 0, 7200, 7200, 1, 10), +(84260, 11483, 429, 64.6404, 736.824, -24.497, 3.33358, 0, 0, 7200, 7200, 1, 10), +(84261, 11480, 429, 68.4746, 728.471, -24.4956, 3.9619, 0, 0, 7200, 7200, 1, 10), +(84262, 11480, 429, -154.641, 721.118, -24.4952, 4.64258, 0, 0, 7200, 7200, 1, 10), +(84264, 11483, 429, -146.109, 724.521, -24.4951, 5.48033, 0, 0, 7200, 7200, 1, 10), +(84265, 11483, 429, -140.277, 734.367, -24.4966, 6.07375, 0, 0, 7200, 7200, 1, 10), +(84266, 11480, 429, -142.956, 743.886, -24.497, 0.715585, 0, 0, 7200, 7200, 1, 10), +(84267, 11483, 429, -164.966, 724.302, -24.4968, 3.78736, 0, 0, 7200, 7200, 1, 10); + +-- Doodad_DireMaulCrystalGenerator02 +UPDATE `gameobject` SET `position_x`=-92.3456, `position_y`=442.67, `position_z`=28.547, `orientation`=0.418879, `rotation0`=0, `rotation1`=0, `rotation2`=0.207911, `rotation3`=0.978148 WHERE `guid`=261762; + +-- Doodad_DireMaulCrystalGenerator03 +UPDATE `gameobject` SET `position_x`=121.222, `position_y`=429.092, `position_z`=28.4548, `orientation`=0.418879, `rotation0`=0, `rotation1`=0, `rotation2`=0.207911, `rotation3`=0.978148 WHERE `guid`=262113; + +-- Doodad_DireMaulCrystalGenerator01 +UPDATE `gameobject` SET `position_x`=12.9414, `position_y`=277.931, `position_z`=-8.93289, `orientation`=0, `rotation0`=0, `rotation1`=0, `rotation2`=0, `rotation3`=1 WHERE `guid`=261760; + +-- Moonwell +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2690, 177278, 1, 9554.63, 1655.24, 1298.83, 2.53945, 0, 0, 0.95502, 0.296542, 900, 900, 100, 1, 0, 10); -- Teldrassil + +-- Campfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2691, 177324, 30, -375.018, -523.71, 84.0771, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Alterac Valley + +-- Campfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2694, 177325, 30, -413.51, -521.414, 84.0771, 2.05949, 0, 0, 0.857167, 0.515038, 180, 180, 100, 1, 0, 10); -- Alterac Valley + +-- Campfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2695, 177326, 30, -487.402, -526.486, 82.5708, 5.47161, 0, 0, -0.394744, 0.918791, 180, 180, 100, 1, 0, 10); -- Alterac Valley + +-- Campfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2696, 177327, 30, -251.556, -562.061, 68.1725, 6.11738, 0, 0, -0.0828075, 0.996566, 180, 180, 100, 1, 0, 10); -- Alterac Valley + +-- Demon Portal +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(32664, 177367, 1, -2002.06, 1866.33, 52.4633, 3.194, 0, 0, -0.999657, 0.0262016, 900, 900, 100, 1, 0, 10), -- Desolace (SPAWN) +(32665, 177368, 1, -2067.9, 1844.89, 60.4518, 2.87979, 0, 0, 0.991445, 0.130528, 900, 900, 100, 1, 0, 10); -- Desolace (SPAWN) +UPDATE `gameobject_template` SET `data5`=0, `data10`=0 WHERE `entry` IN (177367, 177368); +INSERT INTO `gameobject_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(32664, 900, 82, 32664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Demon Portal - Load to Map'), +(32664, 2, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Demon Portal - Delete Self on Use'), +(32664, 0, 10, 11937, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 'Demon Portal - Summon Demon Portal Guardian'), +(32665, 900, 82, 32665, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Demon Portal - Load to Map'), +(32665, 2, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Demon Portal - Delete Self on Use'), +(32665, 0, 10, 11937, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 'Demon Portal - Summon Demon Portal Guardian'); + +-- Cauldron +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2700, 177396, 30, 12.8251, -120.211, 41.6669, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Alterac Valley + +-- Campfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2734, 177425, 30, -353.118, 37.0957, 65.8904, 3.14159, 0, 0, -1, 0, 180, 180, 100, 1, 0, 10); -- Alterac Valley + +-- Atal'ai Statue +UPDATE `gameobject` SET `position_x`=-491.396, `position_y`=53.5787, `position_z`=-148.74, `orientation`=5.81195, `rotation0`=0, `rotation1`=0, `rotation2`=-0.233445, `rotation3`=0.97237 WHERE `guid`=315030; +UPDATE `gameobject` SET `position_x`=-490.969, `position_y`=135.714, `position_z`=-148.74, `orientation`=0.226892, `rotation0`=0, `rotation1`=0, `rotation2`=0.113203, `rotation3`=0.993572 WHERE `guid`=315027; +UPDATE `gameobject` SET `position_x`=-515.046, `position_y`=95.1471, `position_z`=-148.74, `orientation`=2.74016, `rotation0`=0, `rotation1`=0, `rotation2`=0.979924, `rotation3`=0.19937 WHERE `guid`=315021; +UPDATE `gameobject` SET `position_x`=-420.155, `position_y`=94.3731, `position_z`=-148.74, `orientation`=3.9619, `rotation0`=0, `rotation1`=0, `rotation2`=-0.91706, `rotation3`=0.39875 WHERE `guid`=315024; +UPDATE `gameobject` SET `position_x`=-444.448, `position_y`=136.106, `position_z`=-148.74, `orientation`=0.331611, `rotation0`=0, `rotation1`=0, `rotation2`=0.165047, `rotation3`=0.986286 WHERE `guid`=315033; +UPDATE `gameobject` SET `position_x`=-443.55, `position_y`=53.9243, `position_z`=-148.74, `orientation`=0.90757, `rotation0`=0, `rotation1`=0, `rotation2`=0.438371, `rotation3`=0.898794 WHERE `guid`=315036; + +-- Atal'ai Statue +UPDATE `gameobject` SET `position_x`=-444.448, `position_y`=136.106, `position_z`=-148.74, `orientation`=0.331611, `rotation0`=0, `rotation1`=0, `rotation2`=0.165047, `rotation3`=0.986286 WHERE `guid`=315034; +UPDATE `gameobject` SET `position_x`=-443.55, `position_y`=53.9243, `position_z`=-148.74, `orientation`=0.90757, `rotation0`=0, `rotation1`=0, `rotation2`=0.438371, `rotation3`=0.898794 WHERE `guid`=315037; +UPDATE `gameobject` SET `position_x`=-491.396, `position_y`=53.5787, `position_z`=-148.74, `orientation`=5.81195, `rotation0`=0, `rotation1`=0, `rotation2`=-0.233445, `rotation3`=0.97237 WHERE `guid`=315031; +UPDATE `gameobject` SET `position_x`=-490.969, `position_y`=135.714, `position_z`=-148.74, `orientation`=0.226892, `rotation0`=0, `rotation1`=0, `rotation2`=0.113203, `rotation3`=0.993572 WHERE `guid`=315028; +UPDATE `gameobject` SET `position_x`=-515.046, `position_y`=95.1471, `position_z`=-148.74, `orientation`=2.74016, `rotation0`=0, `rotation1`=0, `rotation2`=0.979924, `rotation3`=0.19937 WHERE `guid`=315022; +UPDATE `gameobject` SET `position_x`=-420.155, `position_y`=94.3731, `position_z`=-148.74, `orientation`=3.9619, `rotation0`=0, `rotation1`=0, `rotation2`=-0.91706, `rotation3`=0.39875 WHERE `guid`=315025; + +-- Moonkin Stone Aura +UPDATE `gameobject` SET `spawntimesecsmin`=-120, `spawntimesecsmax`=-120 WHERE `guid`=15727; +-- Script when using item 15710 spell 19138. +DELETE FROM `event_scripts` WHERE `id`=6028; +INSERT INTO `event_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(6028, 0, 0, 9, 15727, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Cenarion Lunardust: Respawn GameObject Moonkin Stone Aura'), +(6028, 0, 0, 10, 12138, 120000, 0, 0, 0, 0, 0, 0, 1, 1213801, -1, 1, -2445.6, -1646.02, 92.8553, 1.11701, 0, 'Cenarion Lunardust: Summon Creature Lunaclaw'); +DELETE FROM `generic_scripts` WHERE `id`=1213801; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(1213801, 0, 0, 60, 3, 0, 1000, 0, 0, 0, 0, 0, 0, 1213801, 0, 0, 0, 0, 0, 0, 0, 'Cenarion Lunardust: Lunaclaw - Start Waypoints'); +INSERT INTO `creature_movement_special` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES +(1213801, 1, -2444.711914, -1642.662109, 92.690582, 100.000000, 0, 0.000000, 0), +(1213801, 2, -2446.711914, -1631.662109, 92.190582, 100.000000, 0, 0.000000, 0), +(1213801, 3, -2452.721924, -1625.327637, 92.110733, 100.000000, 0, 0.000000, 0), +(1213801, 4, -2472.471924, -1628.077637, 91.860733, 100.000000, 0, 0.000000, 0), +(1213801, 5, -2498.009033, -1631.718384, 91.791679, 100.000000, 0, 0.000000, 0), +(1213801, 6, -2497.068115, -1631.025391, 91.791679, 100.000000, 4000, 0.000000, 0), +(1213801, 7, -2497.068115, -1631.025391, 91.791679, 100.000000, 0, 0.000000, 2); + +-- Moonkin Stone Aura +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(15742, 177644, 1, 6326.01, 92.7007, 21.9577, 4.08407, 0, 0, -0.891006, 0.453991, -120, -120, 100, 1, 0, 10); -- Darkshore +-- Script when using item 15208 spell 18974. +DELETE FROM `event_scripts` WHERE `id`=5991; +INSERT INTO `event_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(5991, 0, 0, 10, 12138, 120000, 0, 0, 0, 0, 0, 0, 1, 1213802, -1, 1, 6366.34, 140.382, 24.2587, 3.68264, 0, 'Cenarion Moondust: Summon Creature Lunaclaw'), +(5991, 1, 0, 9, 15742, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Cenarion Moondust: Respawn GameObject Moonkin Stone Aura'); +DELETE FROM `generic_scripts` WHERE `id`=1213802; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(1213802, 0, 0, 60, 3, 0, 1000, 0, 0, 0, 0, 0, 0, 1213802, 0, 0, 0, 0, 0, 0, 0, 'Cenarion Moondust: Lunaclaw - Start Waypoints'); +INSERT INTO `creature_movement_special` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES +(1213802, 1, 6365.421875, 139.798553, 24.188501, 100.000000, 0, 0.000000, 0), +(1213802, 2, 6356.171875, 133.298553, 22.938501, 100.000000, 0, 0.000000, 0), +(1213802, 3, 6349.310059, 125.077438, 22.138916, 100.000000, 0, 0.000000, 0), +(1213802, 4, 6345.013184, 122.000290, 22.793526, 100.000000, 0, 0.000000, 0), +(1213802, 5, 6341.763184, 117.250290, 22.793526, 100.000000, 0, 0.000000, 0), +(1213802, 6, 6339.005859, 113.137695, 21.242620, 100.000000, 0, 0.000000, 0), +(1213802, 7, 6335.020020, 107.050438, 21.803505, 100.000000, 0, 0.000000, 0), +(1213802, 8, 6333.560059, 104.820793, 22.023548, 100.000000, 0, 0.000000, 0), +(1213802, 9, 6330.335938, 100.653168, 21.263285, 100.000000, 0, 0.000000, 0), +(1213802, 10, 6325.043945, 94.151260, 22.016369, 100.000000, 0, 0.000000, 0), +(1213802, 11, 6323.289551, 93.937569, 22.318190, 100.000000, 0, 0.000000, 2); +UPDATE `creature_template` SET `spawn_spell_id`=10389 WHERE `entry`=12138; + +-- Plaguewood Fire (Small) +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2780, 177669, 0, 2797.07, -3756.1, 146.486, 4.88692, 0, 0, -0.642787, 0.766045, -12, -12, 100, 1, 0, 10), -- Eastern Plaguelands +(2781, 177669, 0, 2821.02, -3767.79, 126.122, 5.60251, 0, 0, -0.333807, 0.942641, -12, -12, 100, 1, 0, 10), -- Eastern Plaguelands +(2782, 177669, 0, 2790.2, -3772.12, 125.424, 1.37881, 0, 0, 0.636078, 0.771625, -12, -12, 100, 1, 0, 10); -- Eastern Plaguelands + +-- Plaguewood Fire (Large) +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2783, 177670, 0, 2814.97, -3755.91, 146.494, 0.942477, 0, 0, 0.45399, 0.891007, -12, -12, 100, 1, 0, 10), -- Eastern Plaguelands +(2784, 177670, 0, 2779.1, -3769.18, 133.583, 5.91667, 0, 0, -0.182235, 0.983255, -12, -12, 100, 1, 0, 10), -- Eastern Plaguelands +(2787, 177670, 0, 2796.34, -3778.98, 125.424, 3.12412, 0, 0, 0.999962, 0.00873464, -12, -12, 100, 1, 0, 10), -- Eastern Plaguelands +(2790, 177670, 0, 2816.53, -3774.73, 125.424, 3.78737, 0, 0, -0.948323, 0.317306, -12, -12, 100, 1, 0, 10); -- Eastern Plaguelands + +-- Plaguewood Smoke +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2791, 177671, 0, 2803.39, -3750.83, 150.657, 4.81711, 0, 0, -0.66913, 0.743145, -12, -12, 100, 1, 0, 10), -- Eastern Plaguelands +(2792, 177671, 0, 2823.36, -3754.3, 130.373, 0.506145, 0, 0, 0.25038, 0.968148, -12, -12, 100, 1, 0, 10), -- Eastern Plaguelands +(2793, 177671, 0, 2779.57, -3773.03, 125.424, 3.03684, 0, 0, 0.998629, 0.0523532, -12, -12, 100, 1, 0, 10); -- Eastern Plaguelands + +-- Shallow Grave +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2796, 177677, 0, 3377.68, -4896.83, 159.627, 2.19911, 0, 0, 0.891006, 0.453991, 900, 900, 100, 1, 0, 10); -- Eastern Plaguelands + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241212120656_world.sql b/sql/migrations/20241212120656_world.sql new file mode 100644 index 00000000000..be76c7f60c2 --- /dev/null +++ b/sql/migrations/20241212120656_world.sql @@ -0,0 +1,271 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241212120656'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241212120656'); +-- Add your query below. + + +-- Replace all gameobject spawns in Onyxia's Lair with data from sniffs. +DELETE FROM `gameobject` WHERE `map`=249; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`) VALUES +(39402, 176511, 249, -95.5697, -189.903, -93.5909, 5.67232, 0, 0, -0.300705, 0.953717, 30, 30, 1, 100), +(39403, 176511, 249, -106.774, -227.096, -94.1074, 6.21337, 0, 0, -0.0348988, 0.999391, 30, 30, 1, 100), +(39404, 176511, 249, -113.011, -239.265, -92.5883, 4.72984, 0, 0, -0.700909, 0.713251, 30, 30, 1, 100), +(39405, 176511, 249, -99.0315, -232.903, -93.8821, 0.575957, 0, 0, 0.284015, 0.95882, 30, 30, 1, 100), +(39406, 176511, 249, -106.704, -235.043, -94.3291, 3.38594, 0, 0, -0.992546, 0.12187, 30, 30, 1, 100), +(39407, 176511, 249, -112.76, -232.204, -92.7439, 1.20428, 0, 0, 0.566406, 0.824126, 30, 30, 1, 100), +(39408, 176511, 249, -111.68, -241.218, -92.8957, 1.46608, 0, 0, 0.66913, 0.743145, 30, 30, 1, 100), +(39409, 176511, 249, -99.4653, -231.539, -93.7484, 5.60251, 0, 0, -0.333807, 0.942641, 30, 30, 1, 100), +(39410, 176511, 249, -111.575, -243.442, -92.8365, 4.95674, 0, 0, -0.615661, 0.788011, 30, 30, 1, 100), +(39411, 176511, 249, -99.1198, -235.404, -93.9986, 3.68265, 0, 0, -0.96363, 0.267241, 30, 30, 1, 100), +(39412, 176511, 249, -111.415, -246.122, -92.7656, 1.50098, 0, 0, 0.681998, 0.731354, 30, 30, 1, 100), +(39413, 176511, 249, -108.456, -243.108, -93.6305, 4.97419, 0, 0, -0.608761, 0.793354, 30, 30, 1, 100), +(39414, 176511, 249, -103.341, -249.645, -93.7727, 1.72787, 0, 0, 0.760406, 0.649449, 30, 30, 1, 100), +(39415, 176511, 249, -106.301, -253.522, -92.4453, 0.715585, 0, 0, 0.350207, 0.936672, 30, 30, 1, 100), +(39416, 176511, 249, -103.507, -254.765, -92.4439, 3.01941, 0, 0, 0.998135, 0.0610518, 30, 30, 1, 100), +(39417, 176511, 249, -107.174, -221.764, -95.0417, 4.83456, 0, 0, -0.66262, 0.748956, 30, 30, 1, 100), +(39418, 176511, 249, -104.51, -218.292, -95.9924, 0.95993, 0, 0, 0.461748, 0.887011, 30, 30, 1, 100), +(39419, 176511, 249, -96.2669, -191.546, -93.7112, 1.46608, 0, 0, 0.66913, 0.743145, 30, 30, 1, 100), +(39420, 176511, 249, -109.3, -192.893, -93.648, 1.62316, 0, 0, 0.725374, 0.688355, 30, 30, 1, 100), +(39421, 176511, 249, -98.9627, -192.996, -93.9977, 4.38078, 0, 0, -0.814116, 0.580703, 30, 30, 1, 100), +(39422, 176511, 249, -103.471, -199.919, -93.8398, 5.20108, 0, 0, -0.515038, 0.857168, 30, 30, 1, 100), +(39423, 176511, 249, -111.548, -199.276, -92.7356, 2.56563, 0, 0, 0.958819, 0.284016, 30, 30, 1, 100), +(39424, 176511, 249, -114.866, -197.405, -92.714, 3.17653, 0, 0, -0.999847, 0.0174693, 30, 30, 1, 100), +(39425, 176511, 249, -113.549, -198.287, -92.5772, 3.68265, 0, 0, -0.96363, 0.267241, 30, 30, 1, 100), +(39426, 176511, 249, -111.047, -201.01, -92.6798, 1.5708, 0, 0, 0.707107, 0.707107, 30, 30, 1, 100), +(39427, 176511, 249, -104.578, -211.165, -96.1757, 3.28124, 0, 0, -0.997563, 0.0697661, 30, 30, 1, 100), +(39428, 176511, 249, -112.989, -208.054, -93.2037, 5.96903, 0, 0, -0.156434, 0.987688, 30, 30, 1, 100), +(39429, 176511, 249, -107.68, -206.48, -94.6221, 5.42797, 0, 0, -0.414693, 0.909961, 30, 30, 1, 100), +(39430, 176511, 249, -110.463, -210.574, -95.0231, 3.76991, 0, 0, -0.951056, 0.309017, 30, 30, 1, 100), +(39431, 176511, 249, -106.747, -213.256, -96.4219, 3.73501, 0, 0, -0.956305, 0.292372, 30, 30, 1, 100), +(39432, 176511, 249, -110.212, -220.17, -94.5324, 1.79769, 0, 0, 0.782608, 0.622515, 30, 30, 1, 100), +(39433, 176511, 249, -98.7962, -246.976, -93.9981, 0.855211, 0, 0, 0.414693, 0.909961, 30, 30, 1, 100), +(39434, 176511, 249, -107.777, -253.579, -92.3206, 3.927, 0, 0, -0.923879, 0.382686, 30, 30, 1, 100), +(39435, 176511, 249, -95.9989, -256.291, -92.8816, 1.01229, 0, 0, 0.484809, 0.87462, 30, 30, 1, 100), +(39436, 176511, 249, -63.397, -270.089, -93.9065, 4.39823, 0, 0, -0.809016, 0.587786, 30, 30, 1, 100), +(39437, 176511, 249, -54.0655, -265.427, -93.939, 1.43117, 0, 0, 0.656058, 0.75471, 30, 30, 1, 100), +(39438, 176511, 249, -61.4536, -273.77, -93.5671, 5.25344, 0, 0, -0.492423, 0.870356, 30, 30, 1, 100), +(39439, 176511, 249, -44.6409, -262.822, -91.7046, 0.366518, 0, 0, 0.182235, 0.983255, 30, 30, 1, 100), +(39440, 176511, 249, -50.3012, -263.668, -92.9696, 3.90954, 0, 0, -0.927183, 0.374608, 30, 30, 1, 100), +(39441, 176511, 249, -38.6821, -274.131, -91.449, 5.09636, 0, 0, -0.559193, 0.829038, 30, 30, 1, 100), +(39442, 176511, 249, -45.5103, -274.021, -92.4277, 5.67232, 0, 0, -0.300705, 0.953717, 30, 30, 1, 100), +(39443, 176511, 249, -50.0996, -276.138, -92.8722, 0.104719, 0, 0, 0.0523357, 0.99863, 30, 30, 1, 100), +(39444, 176511, 249, -42.0689, -275.035, -91.5219, 5.95157, 0, 0, -0.165047, 0.986286, 30, 30, 1, 100), +(39445, 176511, 249, -40.6709, -271.109, -91.7795, 4.97419, 0, 0, -0.608761, 0.793354, 30, 30, 1, 100), +(39446, 176511, 249, -45.6929, -276.807, -92.1201, 3.31614, 0, 0, -0.996194, 0.087165, 30, 30, 1, 100), +(39447, 176511, 249, -44.0785, -267.144, -92.2422, 1.15192, 0, 0, 0.544639, 0.838671, 30, 30, 1, 100), +(39448, 176511, 249, -35.4725, -267.161, -91.1384, 1.55334, 0, 0, 0.700909, 0.713251, 30, 30, 1, 100), +(39449, 176511, 249, -30.9589, -271.528, -90.776, 3.50812, 0, 0, -0.983254, 0.182238, 30, 30, 1, 100), +(39450, 176511, 249, -59.5468, -274.641, -93.5779, 3.47321, 0, 0, -0.986285, 0.16505, 30, 30, 1, 100), +(39451, 176511, 249, -52.4708, -263.242, -93.5507, 0.90757, 0, 0, 0.438371, 0.898794, 30, 30, 1, 100), +(39452, 176511, 249, -88.6535, -248.14, -93.9176, 1.65806, 0, 0, 0.737277, 0.675591, 30, 30, 1, 100), +(39453, 176511, 249, -87.5961, -249.819, -93.9075, 5.02655, 0, 0, -0.587785, 0.809017, 30, 30, 1, 100), +(39454, 176511, 249, -86.038, -247.12, -93.7162, 3.64774, 0, 0, -0.968147, 0.250381, 30, 30, 1, 100), +(39455, 176511, 249, -86.2324, -253.441, -93.8641, 3.50812, 0, 0, -0.983254, 0.182238, 30, 30, 1, 100), +(39456, 176511, 249, -87.3717, -262.375, -93.468, 1.309, 0, 0, 0.608761, 0.793354, 30, 30, 1, 100), +(39457, 176511, 249, -91.717, -267.4, -92.7929, 2.91469, 0, 0, 0.993571, 0.113208, 30, 30, 1, 100), +(39458, 176511, 249, -87.8552, -269.151, -92.4986, 0.226892, 0, 0, 0.113203, 0.993572, 30, 30, 1, 100), +(39459, 176511, 249, -90.3045, -268.137, -92.6464, 5.48033, 0, 0, -0.390731, 0.920505, 30, 30, 1, 100), +(39460, 176511, 249, -80.2411, -267.274, -93.4431, 4.31097, 0, 0, -0.833885, 0.551938, 30, 30, 1, 100), +(39461, 176511, 249, -74.6337, -262.796, -94.4129, 4.38078, 0, 0, -0.814116, 0.580703, 30, 30, 1, 100), +(39462, 176511, 249, -67.8154, -260.002, -94.4454, 5.53269, 0, 0, -0.366501, 0.930418, 30, 30, 1, 100), +(39463, 176511, 249, -64.9187, -264.948, -94.5168, 2.53072, 0, 0, 0.953716, 0.300708, 30, 30, 1, 100), +(39464, 176511, 249, -66.8605, -262.532, -94.4959, 0.925024, 0, 0, 0.446198, 0.894935, 30, 30, 1, 100), +(39465, 176511, 249, -54.8459, -262.636, -93.696, 6.14356, 0, 0, -0.0697556, 0.997564, 30, 30, 1, 100), +(39466, 176511, 249, -35.6781, -274.806, -91.542, 2.05949, 0, 0, 0.857167, 0.515038, 30, 30, 1, 100), +(39467, 176511, 249, -98.2849, -191.193, -93.9694, 5.34071, 0, 0, -0.45399, 0.891007, 30, 30, 1, 100), +(39468, 176511, 249, -47.5397, -152.736, -92.5478, 4.76475, 0, 0, -0.688354, 0.725374, 30, 30, 1, 100), +(39469, 176511, 249, -29.779, -158.272, -90.436, 5.2709, 0, 0, -0.484809, 0.87462, 30, 30, 1, 100), +(39470, 176511, 249, -51.2772, -165.257, -93.2615, 2.35619, 0, 0, 0.92388, 0.382683, 30, 30, 1, 100), +(39471, 176511, 249, -59.6926, -155.839, -93.7256, 3.194, 0, 0, -0.999657, 0.0262016, 30, 30, 1, 100), +(39472, 176511, 249, -54.7384, -158.798, -94.216, 1.23918, 0, 0, 0.580703, 0.814116, 30, 30, 1, 100), +(39473, 176511, 249, -53.8375, -150.039, -92.7003, 3.56047, 0, 0, -0.978148, 0.207912, 30, 30, 1, 100), +(39474, 176511, 249, -115.037, -181.69, -92.3133, 3.15906, 0, 0, -0.999962, 0.00873464, 30, 30, 1, 100), +(39475, 176511, 249, -59.2068, -166.133, -94.0845, 0.715585, 0, 0, 0.350207, 0.936672, 30, 30, 1, 100), +(39476, 176511, 249, -43.3735, -165.818, -91.6861, 6.17847, 0, 0, -0.0523357, 0.99863, 30, 30, 1, 100), +(39477, 176511, 249, -85.6779, -161.272, -92.7821, 1.309, 0, 0, 0.608761, 0.793354, 30, 30, 1, 100), +(39478, 176511, 249, -68.2031, -161.518, -93.9692, 4.08407, 0, 0, -0.891006, 0.453991, 30, 30, 1, 100), +(39479, 176511, 249, -74.5684, -166.841, -94.4562, 2.9496, 0, 0, 0.995396, 0.0958512, 30, 30, 1, 100), +(39480, 176511, 249, -71.0221, -162.055, -93.7708, 5.42797, 0, 0, -0.414693, 0.909961, 30, 30, 1, 100), +(39481, 176511, 249, -79.7331, -165.826, -94.2637, 0.872664, 0, 0, 0.422618, 0.906308, 30, 30, 1, 100), +(39482, 176511, 249, -37.8847, -153.093, -91.4679, 3.21142, 0, 0, -0.999391, 0.0349061, 30, 30, 1, 100), +(39483, 176511, 249, -50.4296, -165.573, -92.9916, 1.83259, 0, 0, 0.793353, 0.608762, 30, 30, 1, 100), +(39484, 176511, 249, -45.7571, -151.807, -92.0807, 5.8294, 0, 0, -0.224951, 0.97437, 30, 30, 1, 100), +(39485, 176511, 249, -53.4205, -157.888, -94.0279, 3.85718, 0, 0, -0.936671, 0.35021, 30, 30, 1, 100), +(39486, 176511, 249, -50.1314, -157.125, -93.4149, 2.9845, 0, 0, 0.996917, 0.0784664, 30, 30, 1, 100), +(39487, 176511, 249, -29.4053, -162.407, -89.9302, 5.2709, 0, 0, -0.484809, 0.87462, 30, 30, 1, 100), +(39488, 176511, 249, -67.1603, -160.194, -93.5402, 0.331611, 0, 0, 0.165047, 0.986286, 30, 30, 1, 100), +(39489, 176511, 249, -65.2628, -157.384, -93.6179, 0.191985, 0, 0, 0.0958452, 0.995396, 30, 30, 1, 100), +(39490, 176511, 249, -37.4504, -159.241, -91.3623, 6.14356, 0, 0, -0.0697556, 0.997564, 30, 30, 1, 100), +(39491, 176511, 249, -44.8102, -159.351, -92.5613, 6.19592, 0, 0, -0.0436192, 0.999048, 30, 30, 1, 100), +(39492, 176511, 249, -49.5906, -150.509, -92.4396, 0.925024, 0, 0, 0.446198, 0.894935, 30, 30, 1, 100), +(39493, 176511, 249, -51.989, -149.852, -92.4877, 4.10153, 0, 0, -0.887011, 0.461749, 30, 30, 1, 100), +(39494, 176511, 249, -47.6633, -165.894, -91.9484, 0.506145, 0, 0, 0.25038, 0.968148, 30, 30, 1, 100), +(39495, 176511, 249, -37.4862, -169.345, -90.3578, 1.15192, 0, 0, 0.544639, 0.838671, 30, 30, 1, 100), +(39496, 176511, 249, -39.5905, -153.217, -91.394, 2.05949, 0, 0, 0.857167, 0.515038, 30, 30, 1, 100), +(39497, 176511, 249, -45.7833, -165.022, -91.9364, 5.51524, 0, 0, -0.374606, 0.927184, 30, 30, 1, 100), +(39498, 176511, 249, -87.0724, -164.259, -93.194, 1.23918, 0, 0, 0.580703, 0.814116, 30, 30, 1, 100), +(39499, 176511, 249, -70.196, -171.583, -94.1259, 0.95993, 0, 0, 0.461748, 0.887011, 30, 30, 1, 100), +(39500, 176511, 249, -106.513, -181.398, -93.8598, 2.86234, 0, 0, 0.990268, 0.139175, 30, 30, 1, 100), +(39501, 176511, 249, -111.482, -182.822, -92.7533, 4.2237, 0, 0, -0.857167, 0.515038, 30, 30, 1, 100), +(39502, 176511, 249, -113.473, -181.242, -92.5385, 2.14675, 0, 0, 0.878817, 0.47716, 30, 30, 1, 100), +(39503, 176511, 249, -101.612, -178.335, -93.7528, 2.53072, 0, 0, 0.953716, 0.300708, 30, 30, 1, 100), +(39504, 176511, 249, -109.672, -176.396, -92.3824, 3.22886, 0, 0, -0.999048, 0.0436193, 30, 30, 1, 100), +(39505, 176511, 249, -95.201, -182.384, -93.6637, 5.25344, 0, 0, -0.492423, 0.870356, 30, 30, 1, 100), +(39506, 176511, 249, -104.113, -179.037, -93.7109, 0.785397, 0, 0, 0.382683, 0.92388, 30, 30, 1, 100), +(39507, 176511, 249, -93.1516, -180.838, -93.7367, 0.680677, 0, 0, 0.333806, 0.942642, 30, 30, 1, 100), +(39508, 176511, 249, -90.6963, -181.785, -93.9151, 0.209439, 0, 0, 0.104528, 0.994522, 30, 30, 1, 100), +(39509, 176511, 249, -88.0213, -181.019, -93.8623, 0.890117, 0, 0, 0.430511, 0.902586, 30, 30, 1, 100), +(39510, 176511, 249, -94.0342, -181.739, -93.6615, 0.820303, 0, 0, 0.398748, 0.91706, 30, 30, 1, 100), +(39511, 176511, 249, -103.253, -185.857, -94.1001, 5.2709, 0, 0, -0.484809, 0.87462, 30, 30, 1, 100), +(39512, 176511, 249, -91.3062, -179.959, -93.8679, 6.23083, 0, 0, -0.0261765, 0.999657, 30, 30, 1, 100), +(39513, 176511, 249, -100.31, -179.594, -94.0001, 6.21337, 0, 0, -0.0348988, 0.999391, 30, 30, 1, 100), +(39514, 176511, 249, -83.4607, -171.184, -94.2168, 4.41568, 0, 0, -0.803857, 0.594823, 30, 30, 1, 100), +(39515, 176511, 249, -86.5817, -162.188, -92.9143, 1.37881, 0, 0, 0.636078, 0.771625, 30, 30, 1, 100), +(39516, 176511, 249, -114.179, -189.911, -92.3961, 5.70723, 0, 0, -0.284015, 0.95882, 30, 30, 1, 100), +(39517, 176511, 249, -94.0791, -166.547, -93.3145, 3.33359, 0, 0, -0.995396, 0.0958512, 30, 30, 1, 100), +(39518, 176511, 249, -106.513, -179.027, -93.3376, 5.63741, 0, 0, -0.317305, 0.948324, 30, 30, 1, 100), +(39519, 176511, 249, -92.7397, -173.777, -93.7896, 3.26377, 0, 0, -0.998135, 0.0610518, 30, 30, 1, 100), +(39520, 176511, 249, -85.7268, -166.618, -93.7028, 4.2237, 0, 0, -0.857167, 0.515038, 30, 30, 1, 100), +(39521, 176513, 249, 24.2333, -235.508, -84.9566, 3.75246, 0, 0, -0.953716, 0.300708, 180, 180, 1, 100), +(39522, 176514, 249, 14.4175, -233.453, -86.0326, 5.84685, 0, 0, -0.216439, 0.976296, 180, 180, 1, 100), +(39523, 176515, 249, 17.3921, -245.044, -86.1595, 1.309, 0, 0, 0.608761, 0.793354, 180, 180, 1, 100), +(39524, 176809, 249, 16.8415, -225.106, -86.2168, 2.61799, 0, 0, 0.965925, 0.258821, 180, 180, 1, 100), +(39525, 176810, 249, -28.1006, -190.667, -89.6964, 6.19592, 0, 0, -0.0436182, 0.999048, 180, 180, 1, 100), +(39526, 176811, 249, -26.3963, -199.616, -88.82, 1.83259, 0, 0, 0.793353, 0.608762, 180, 180, 1, 100), +(39527, 176812, 249, 8.23697, -253.584, -86.6082, 3.92699, 0, 0, -0.92388, 0.382683, 180, 180, 1, 100), +(39528, 176813, 249, 7.06976, -243.991, -86.9945, 3.57793, 0, 0, -0.976295, 0.216442, 180, 180, 1, 100), +(39529, 176814, 249, -3.98491, -248.954, -85.9318, 0.95993, 0, 0, 0.461748, 0.887011, 180, 180, 1, 100), +(39530, 176815, 249, -0.638085, -239.839, -87.3523, 1.39626, 0, 0, 0.642788, 0.766044, 180, 180, 1, 100), +(39531, 176816, 249, -15.3872, -232.509, -89.0988, 5.23599, 0, 0, -0.499999, 0.866026, 180, 180, 1, 100), +(39532, 176817, 249, -12.8884, -245.332, -87.9905, 6.19592, 0, 0, -0.0436182, 0.999048, 180, 180, 1, 100), +(39533, 176818, 249, -20.9761, -254.701, -87.7823, 3.6652, 0, 0, -0.965925, 0.258821, 180, 180, 1, 100), +(39534, 176819, 249, 3.20326, -230.379, -87.0469, 4.79966, 0, 0, -0.67559, 0.737278, 180, 180, 1, 100), +(39535, 176820, 249, -37.4064, -244.92, -89.0483, 3.05433, 0, 0, 0.999048, 0.0436193, 180, 180, 1, 100), +(39536, 176821, 249, -26.0913, -229.619, -88.82, 4.45059, 0, 0, -0.793353, 0.608762, 180, 180, 1, 100), +(39537, 176822, 249, -28.124, -238.209, -89.6964, 0.0872641, 0, 0, 0.0436182, 0.999048, 180, 180, 1, 100), +(39538, 176823, 249, 29.1885, -206.772, -84.5641, 0.785399, 0, 0, 0.382684, 0.923879, 180, 180, 1, 100), +(39539, 176824, 249, 31.1672, -218.99, -83.8272, 4.53786, 0, 0, -0.766044, 0.642789, 180, 180, 1, 100), +(39540, 176825, 249, 13.1918, -214.436, -86.484, 0.872664, 0, 0, 0.422618, 0.906308, 180, 180, 1, 100), +(39541, 176826, 249, -37.3837, -184.484, -89.0483, 3.22886, 0, 0, -0.999048, 0.0436193, 180, 180, 1, 100), +(39542, 176827, 249, -1.66729, -217.144, -85.672, 0.785397, 0, 0, 0.382683, 0.92388, 180, 180, 1, 100), +(39543, 176828, 249, -9.80653, -212.031, -88.1401, 6.02139, 0, 0, -0.130526, 0.991445, 180, 180, 1, 100), +(39544, 176829, 249, -19.3983, -219.854, -88.4829, 3.49067, 0, 0, -0.984807, 0.173652, 180, 180, 1, 100), +(39545, 176830, 249, -19.6951, -209.639, -88.5545, 5.84686, 0, 0, -0.216438, 0.976296, 180, 180, 1, 100), +(39546, 176831, 249, 24.0513, -193.897, -84.9566, 2.53072, 0, 0, 0.953716, 0.300708, 180, 180, 1, 100), +(39547, 176832, 249, 14.2998, -195.44, -86.0326, 0.436332, 0, 0, 0.216439, 0.976296, 180, 180, 1, 100), +(39548, 176833, 249, 17.0001, -204.313, -86.2168, 3.6652, 0, 0, -0.965925, 0.258821, 180, 180, 1, 100), +(39549, 176834, 249, 17.6418, -184.034, -86.1595, 4.97419, 0, 0, -0.608761, 0.793354, 180, 180, 1, 100), +(39550, 176835, 249, 2.9536, -198.744, -87.0469, 1.48353, 0, 0, 0.67559, 0.737278, 180, 180, 1, 100), +(39551, 176836, 249, -0.404226, -189.264, -87.3524, 4.88692, 0, 0, -0.642787, 0.766045, 180, 180, 1, 100), +(39552, 176837, 249, 6.95027, -185.41, -86.9946, 2.70526, 0, 0, 0.976295, 0.216442, 180, 180, 1, 100), +(39553, 176838, 249, 8.01259, -175.786, -86.6082, 2.35619, 0, 0, 0.92388, 0.382683, 180, 180, 1, 100), +(39554, 176839, 249, -3.72498, -180.009, -85.9318, 5.32326, 0, 0, -0.461748, 0.887011, 180, 180, 1, 100), +(39555, 176840, 249, -12.9119, -183.545, -87.9905, 0.087266, 0, 0, 0.0436192, 0.999048, 180, 180, 1, 100), +(39556, 176841, 249, -21.129, -174.709, -87.7823, 2.61799, 0, 0, 0.965925, 0.258821, 180, 180, 1, 100), +(39557, 176842, 249, -15.6717, -196.472, -89.0988, 1.0472, 0, 0, 0.5, 0.866025, 180, 180, 1, 100), +(39558, 176843, 249, -51.6297, -214.403, -7.16564, 3.57793, 0, 0, -0.976295, 0.216442, 180, 180, 1, 100), +(39559, 176844, 249, -43.8754, -238.325, -14.7946, 2.70526, 0, 0, 0.976295, 0.216442, 180, 180, 1, 100), +(39560, 176845, 249, -2.48133, -249.761, -17.7952, 2.61799, 0, 0, 0.965925, 0.258821, 180, 180, 1, 100), +(39561, 176846, 249, 27.5426, -247.756, -23.0949, 4.01426, 0, 0, -0.906307, 0.422619, 180, 180, 1, 100), +(39562, 176847, 249, 13.0761, -225.391, -19.2567, 3.49067, 0, 0, -0.984807, 0.173652, 180, 180, 1, 100), +(39563, 176848, 249, -5.14033, -214.414, -11.1815, 3.14159, 0, 0, -1, 0, 180, 180, 1, 100), +(39564, 176849, 249, -3.17108, -189.864, -15.1422, 2.09439, 0, 0, 0.866025, 0.500001, 180, 180, 1, 100), +(39565, 176850, 249, -29.1501, -173.658, -23.2926, 3.75246, 0, 0, -0.953716, 0.300708, 180, 180, 1, 100), +(39566, 176851, 249, 16.0041, -177.041, -21.1756, 3.57793, 0, 0, -0.976295, 0.216442, 180, 180, 1, 100), +(39567, 176852, 249, -33.7261, -200.163, -10.4158, 2.26893, 0, 0, 0.906307, 0.422619, 180, 180, 1, 100), +(39568, 176853, 249, 21.8353, -202.084, -17.2387, 2.53072, 0, 0, 0.953716, 0.300708, 180, 180, 1, 100), +(39569, 176854, 249, 37.2406, -214.403, -19.6757, 2.18166, 0, 0, 0.887011, 0.461749, 180, 180, 1, 100), +(39570, 176855, 249, -18.973, -232.403, -15.5299, 2.44346, 0, 0, 0.939692, 0.34202, 180, 180, 1, 100), +(39571, 176908, 249, -47.9515, -193.888, -86.0046, 5.67232, 0, 0, -0.300706, 0.953717, 180, 180, 1, 100), +(39572, 176909, 249, -54.9718, -199.119, -85.4988, 1.5708, 0, 0, 0.707107, 0.707107, 180, 180, 1, 100), +(39573, 176910, 249, -64.1589, -196.123, -85.1125, 1.91986, 0, 0, 0.819151, 0.573578, 180, 180, 1, 100), +(39574, 176911, 249, -54.7977, -187.003, -85.6277, 5.23599, 0, 0, -0.5, 0.866025, 180, 180, 1, 100), +(39575, 176912, 249, -62.8772, -213.235, -85.1575, 2.00712, 0, 0, 0.84339, 0.537301, 180, 180, 1, 100), +(39576, 176913, 249, -51.6644, -214.436, -86.1782, 3.75246, 0, 0, -0.953716, 0.300708, 180, 180, 1, 100), +(39577, 176914, 249, -45.1242, -220.161, -86.5697, 0.698129, 0, 0, 0.342019, 0.939693, 180, 180, 1, 100), +(39578, 176915, 249, -39.1131, -212.133, -87.1607, 4.88692, 0, 0, -0.642788, 0.766044, 180, 180, 1, 100), +(39579, 176916, 249, -78.5539, -210.417, -83.4326, 2.87979, 0, 0, 0.991445, 0.130528, 180, 180, 1, 100), +(39580, 176917, 249, -72.938, -201.879, -83.6438, 5.23599, 0, 0, -0.5, 0.866025, 180, 180, 1, 100), +(39581, 176918, 249, -75.138, -224.652, -83.4944, 0.436332, 0, 0, 0.216439, 0.976296, 180, 180, 1, 100), +(39582, 176919, 249, -54.6915, -229.819, -85.889, 4.71239, 0, 0, -0.707107, 0.707107, 180, 180, 1, 100), +(39583, 176920, 249, -48.0902, -234.856, -86.2826, 0.610865, 0, 0, 0.300706, 0.953717, 180, 180, 1, 100), +(39584, 176921, 249, -55.075, -241.777, -85.3179, 1.0472, 0, 0, 0.5, 0.866025, 180, 180, 1, 100), +(39585, 176922, 249, -63.8632, -232.924, -85.1124, 4.36332, 0, 0, -0.819152, 0.573577, 180, 180, 1, 100), +(39586, 177984, 249, 16.8415, -225.106, -86.2168, 2.61799, 0, 0, 0.965925, 0.258821, 180, 180, 1, 100), +(39587, 177985, 249, -28.1006, -190.667, -89.6964, 6.19592, 0, 0, -0.0436182, 0.999048, 180, 180, 1, 100), +(39588, 177986, 249, -26.3963, -199.616, -88.82, 1.83259, 0, 0, 0.793353, 0.608762, 180, 180, 1, 100), +(39589, 177987, 249, 24.2333, -235.508, -84.9566, 3.75246, 0, 0, -0.953716, 0.300708, 180, 180, 1, 100), +(39590, 177988, 249, 14.4175, -233.453, -86.0326, 5.84685, 0, 0, -0.216439, 0.976296, 180, 180, 1, 100), +(39591, 177989, 249, 17.3921, -245.044, -86.1595, 1.309, 0, 0, 0.608761, 0.793354, 180, 180, 1, 100), +(39592, 177990, 249, 8.23697, -253.584, -86.6082, 3.92699, 0, 0, -0.92388, 0.382683, 180, 180, 1, 100), +(39593, 177991, 249, 7.06976, -243.991, -86.9945, 3.57793, 0, 0, -0.976295, 0.216442, 180, 180, 1, 100), +(39594, 177992, 249, -3.98491, -248.954, -85.9318, 0.95993, 0, 0, 0.461748, 0.887011, 180, 180, 1, 100), +(39595, 177993, 249, -0.638085, -239.839, -87.3523, 1.39626, 0, 0, 0.642788, 0.766044, 180, 180, 1, 100), +(39596, 177994, 249, -15.3872, -232.509, -89.0988, 5.23599, 0, 0, -0.499999, 0.866026, 180, 180, 1, 100), +(39597, 177995, 249, -12.8884, -245.332, -87.9905, 6.19592, 0, 0, -0.0436182, 0.999048, 180, 180, 1, 100), +(39598, 177996, 249, -20.9761, -254.701, -87.7823, 3.6652, 0, 0, -0.965925, 0.258821, 180, 180, 1, 100), +(39599, 177997, 249, 3.20326, -230.379, -87.0469, 4.79966, 0, 0, -0.67559, 0.737278, 180, 180, 1, 100), +(39600, 177998, 249, -37.4064, -244.92, -89.0483, 3.05433, 0, 0, 0.999048, 0.0436193, 180, 180, 1, 100), +(39601, 177999, 249, -26.0913, -229.619, -88.82, 4.45059, 0, 0, -0.793353, 0.608762, 180, 180, 1, 100), +(39602, 178000, 249, -28.124, -238.209, -89.6964, 0.0872641, 0, 0, 0.0436182, 0.999048, 180, 180, 1, 100), +(39603, 178001, 249, 29.1885, -206.772, -84.5641, 0.785399, 0, 0, 0.382684, 0.923879, 180, 180, 1, 100), +(39604, 178002, 249, 31.1672, -218.99, -83.8272, 4.53786, 0, 0, -0.766044, 0.642789, 180, 180, 1, 100), +(39605, 178003, 249, 13.1918, -214.436, -86.484, 0.872664, 0, 0, 0.422618, 0.906308, 180, 180, 1, 100), +(39606, 178004, 249, -37.3837, -184.484, -89.0483, 3.22886, 0, 0, -0.999048, 0.0436193, 180, 180, 1, 100), +(39607, 178005, 249, -1.66729, -217.144, -85.672, 0.785397, 0, 0, 0.382683, 0.92388, 180, 180, 1, 100), +(39608, 178006, 249, -9.80653, -212.031, -88.1401, 6.02139, 0, 0, -0.130526, 0.991445, 180, 180, 1, 100), +(39609, 178007, 249, -19.3983, -219.854, -88.4829, 3.49067, 0, 0, -0.984807, 0.173652, 180, 180, 1, 100), +(39610, 178008, 249, -19.6951, -209.639, -88.5545, 5.84686, 0, 0, -0.216438, 0.976296, 180, 180, 1, 100), +(39611, 178009, 249, 24.0513, -193.897, -84.9566, 2.53072, 0, 0, 0.953716, 0.300708, 180, 180, 1, 100), +(39612, 178010, 249, 14.2998, -195.44, -86.0326, 0.436332, 0, 0, 0.216439, 0.976296, 180, 180, 1, 100), +(39613, 178011, 249, 17.0001, -204.313, -86.2168, 3.6652, 0, 0, -0.965925, 0.258821, 180, 180, 1, 100), +(39614, 178012, 249, 17.6418, -184.034, -86.1595, 4.97419, 0, 0, -0.608761, 0.793354, 180, 180, 1, 100), +(39615, 178013, 249, 2.9536, -198.744, -87.0469, 1.48353, 0, 0, 0.67559, 0.737278, 180, 180, 1, 100), +(39616, 178014, 249, -0.404226, -189.264, -87.3524, 4.88692, 0, 0, -0.642787, 0.766045, 180, 180, 1, 100), +(39617, 178015, 249, 6.95027, -185.41, -86.9946, 2.70526, 0, 0, 0.976295, 0.216442, 180, 180, 1, 100), +(39618, 178016, 249, 8.01259, -175.786, -86.6082, 2.35619, 0, 0, 0.92388, 0.382683, 180, 180, 1, 100), +(39619, 178017, 249, -3.72498, -180.009, -85.9318, 5.32326, 0, 0, -0.461748, 0.887011, 180, 180, 1, 100), +(39620, 178018, 249, -12.9119, -183.545, -87.9905, 0.087266, 0, 0, 0.0436192, 0.999048, 180, 180, 1, 100), +(39621, 178019, 249, -21.129, -174.709, -87.7823, 2.61799, 0, 0, 0.965925, 0.258821, 180, 180, 1, 100), +(39622, 178020, 249, -15.6717, -196.472, -89.0988, 1.0472, 0, 0, 0.5, 0.866025, 180, 180, 1, 100), +(39623, 178021, 249, -51.6297, -214.403, -7.16564, 3.57793, 0, 0, -0.976295, 0.216442, 180, 180, 1, 100), +(39624, 178022, 249, -43.8754, -238.325, -14.7946, 2.70526, 0, 0, 0.976295, 0.216442, 180, 180, 1, 100), +(39625, 178023, 249, -2.48133, -249.761, -17.7952, 2.61799, 0, 0, 0.965925, 0.258821, 180, 180, 1, 100), +(39626, 178024, 249, 27.5426, -247.756, -23.0949, 4.01426, 0, 0, -0.906307, 0.422619, 180, 180, 1, 100), +(39627, 178025, 249, 13.0761, -225.391, -19.2567, 3.49067, 0, 0, -0.984807, 0.173652, 180, 180, 1, 100), +(39628, 178026, 249, -5.14033, -214.414, -11.1815, 3.14159, 0, 0, -1, 0, 180, 180, 1, 100), +(39629, 178027, 249, -3.17108, -189.864, -15.1422, 2.09439, 0, 0, 0.866025, 0.500001, 180, 180, 1, 100), +(39630, 178028, 249, -29.1501, -173.658, -23.2926, 3.75246, 0, 0, -0.953716, 0.300708, 180, 180, 1, 100), +(39631, 178029, 249, 16.0041, -177.041, -21.1756, 3.57793, 0, 0, -0.976295, 0.216442, 180, 180, 1, 100), +(39632, 178030, 249, -33.7261, -200.163, -10.4158, 2.26893, 0, 0, 0.906307, 0.422619, 180, 180, 1, 100), +(39633, 178031, 249, 21.8353, -202.084, -17.2387, 2.53072, 0, 0, 0.953716, 0.300708, 180, 180, 1, 100), +(39634, 178032, 249, 37.2406, -214.403, -19.6757, 2.18166, 0, 0, 0.887011, 0.461749, 180, 180, 1, 100), +(39635, 178033, 249, -18.973, -232.403, -15.5299, 2.44346, 0, 0, 0.939692, 0.34202, 180, 180, 1, 100), +(39636, 178034, 249, -47.9515, -193.888, -86.0046, 5.67232, 0, 0, -0.300706, 0.953717, 180, 180, 1, 100), +(39637, 178035, 249, -54.9718, -199.119, -85.4988, 1.5708, 0, 0, 0.707107, 0.707107, 180, 180, 1, 100), +(39638, 178036, 249, -64.1589, -196.123, -85.1125, 1.91986, 0, 0, 0.819151, 0.573578, 180, 180, 1, 100), +(39639, 178037, 249, -54.7977, -187.003, -85.6277, 5.23599, 0, 0, -0.5, 0.866025, 180, 180, 1, 100), +(39640, 178038, 249, -62.8772, -213.235, -85.1575, 2.00712, 0, 0, 0.84339, 0.537301, 180, 180, 1, 100), +(39641, 178039, 249, -51.6644, -214.436, -86.1782, 3.75246, 0, 0, -0.953716, 0.300708, 180, 180, 1, 100), +(39642, 178040, 249, -45.1242, -220.161, -86.5697, 0.698129, 0, 0, 0.342019, 0.939693, 180, 180, 1, 100), +(39643, 178041, 249, -39.1131, -212.133, -87.1607, 4.88692, 0, 0, -0.642788, 0.766044, 180, 180, 1, 100), +(39644, 178042, 249, -78.5539, -210.417, -83.4326, 2.87979, 0, 0, 0.991445, 0.130528, 180, 180, 1, 100), +(39645, 178043, 249, -72.938, -201.879, -83.6438, 5.23599, 0, 0, -0.5, 0.866025, 180, 180, 1, 100), +(39646, 178044, 249, -75.138, -224.652, -83.4944, 0.436332, 0, 0, 0.216439, 0.976296, 180, 180, 1, 100), +(39647, 178045, 249, -54.6915, -229.819, -85.889, 4.71239, 0, 0, -0.707107, 0.707107, 180, 180, 1, 100), +(39648, 178046, 249, -48.0902, -234.856, -86.2826, 0.610865, 0, 0, 0.300706, 0.953717, 180, 180, 1, 100), +(39649, 178047, 249, -55.075, -241.777, -85.3179, 1.0472, 0, 0, 0.5, 0.866025, 180, 180, 1, 100), +(39650, 178048, 249, -63.8632, -232.924, -85.1124, 4.36332, 0, 0, -0.819152, 0.573577, 180, 180, 1, 100); + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241212123308_world.sql b/sql/migrations/20241212123308_world.sql new file mode 100644 index 00000000000..9db6d53296c --- /dev/null +++ b/sql/migrations/20241212123308_world.sql @@ -0,0 +1,293 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241212123308'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241212123308'); +-- Add your query below. + + +-- Remove custom spawned Rookery Eggs and replace with data from sniffs. +DELETE FROM `gameobject` WHERE `id`=175124; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`) VALUES +(44227, 175124, 229, 84.5061, -248.377, 91.4676, 1.78023, 0, 0, 0.777145, 0.629321, 60, 300, 1, 100), +(44228, 175124, 229, 82.9601, -249.989, 91.4709, 4.64258, 0, 0, -0.731354, 0.681998, 60, 300, 1, 100), +(44229, 175124, 229, 88.3432, -248.339, 91.4596, 2.28638, 0, 0, 0.909961, 0.414694, 60, 300, 1, 100), +(44230, 175124, 229, 83.6532, -252.415, 91.4694, 1.95477, 0, 0, 0.829038, 0.559193, 60, 300, 1, 100), +(44231, 175124, 229, 80.7881, -253.589, 91.4755, 4.13643, 0, 0, -0.878817, 0.47716, 60, 300, 1, 100), +(44232, 175124, 229, 87.2261, -252.472, 91.4619, 5.34071, 0, 0, -0.45399, 0.891007, 60, 300, 1, 100), +(44233, 175124, 229, 85.257, -253.145, 91.466, 1.64061, 0, 0, 0.731353, 0.681999, 60, 300, 1, 100), +(44234, 175124, 229, 87.2811, -254.392, 91.4618, 0.0349062, 0, 0, 0.0174522, 0.999848, 60, 300, 1, 100), +(44235, 175124, 229, 77.2751, -262.143, 91.4799, 5.02655, 0, 0, -0.587785, 0.809017, 60, 300, 1, 100), +(44236, 175124, 229, 79.2062, -262.497, 91.4758, 4.15388, 0, 0, -0.874619, 0.48481, 60, 300, 1, 100), +(44237, 175124, 229, 81.0104, -264.958, 91.4705, 2.75761, 0, 0, 0.981627, 0.190812, 60, 300, 1, 100), +(44238, 175124, 229, 79.7089, -266.052, 91.4724, 5.61996, 0, 0, -0.325567, 0.945519, 60, 300, 1, 100), +(44239, 175124, 229, 77.3179, -266.196, 91.4775, 5.11382, 0, 0, -0.551936, 0.833886, 60, 300, 1, 100), +(44240, 175124, 229, 55.3531, -249.984, 97.0487, 3.63029, 0, 0, -0.970295, 0.241925, 60, 300, 1, 100), +(44241, 175124, 229, 78.59, -266.496, 91.4746, 2.00713, 0, 0, 0.843391, 0.5373, 60, 300, 1, 100), +(44242, 175124, 229, 58.1175, -253.946, 96.881, 0.506145, 0, 0, 0.25038, 0.968148, 60, 300, 1, 100), +(44243, 175124, 229, 82.7643, -267.748, 91.4651, 3.26377, 0, 0, -0.998135, 0.0610518, 60, 300, 1, 100), +(44244, 175124, 229, 56.876, -255.377, 96.9689, 0.261798, 0, 0, 0.130526, 0.991445, 60, 300, 1, 100), +(44245, 175124, 229, 57.8603, -256.662, 96.7394, 5.2709, 0, 0, -0.484809, 0.87462, 60, 300, 1, 100), +(44246, 175124, 229, 55.442, -254.351, 97.1978, 0.541051, 0, 0, 0.267238, 0.963631, 60, 300, 1, 100), +(44247, 175124, 229, 52.6492, -254.144, 97.3261, 4.46804, 0, 0, -0.788011, 0.615662, 60, 300, 1, 100), +(44248, 175124, 229, 65.2965, -267.93, 93.0764, 0.349065, 0, 0, 0.173648, 0.984808, 60, 300, 1, 100), +(44249, 175124, 229, 64.204, -268.474, 93.2454, 4.71239, 0, 0, -0.707107, 0.707107, 60, 300, 1, 100), +(44250, 175124, 229, 60.665, -268.136, 93.6019, 2.35619, 0, 0, 0.92388, 0.382683, 60, 300, 1, 100), +(44251, 175124, 229, 74.2068, -273.591, 91.6428, 4.88692, 0, 0, -0.642787, 0.766045, 60, 300, 1, 100), +(44252, 175124, 229, 61.9452, -270.148, 93.5453, 5.11382, 0, 0, -0.551936, 0.833886, 60, 300, 1, 100), +(44253, 175124, 229, 79.2805, -275.593, 91.4728, 3.07177, 0, 0, 0.999391, 0.0349061, 60, 300, 1, 100), +(44254, 175124, 229, 76.8647, -275.632, 91.4778, 2.32129, 0, 0, 0.91706, 0.39875, 60, 300, 1, 100), +(44255, 175124, 229, 60.1851, -270.196, 93.6818, 4.01426, 0, 0, -0.906307, 0.422619, 60, 300, 1, 100), +(44256, 175124, 229, 74.7522, -275.849, 91.6503, 0.95993, 0, 0, 0.461748, 0.887011, 60, 300, 1, 100), +(44257, 175124, 229, 56.7882, -269.273, 93.7193, 5.28835, 0, 0, -0.477159, 0.878817, 60, 300, 1, 100), +(44258, 175124, 229, 59.0256, -271.14, 93.6363, 3.78737, 0, 0, -0.948323, 0.317306, 60, 300, 1, 100), +(44259, 175124, 229, 76.2422, -277.381, 91.4738, 5.49779, 0, 0, -0.382683, 0.92388, 60, 300, 1, 100), +(44260, 175124, 229, 86.6694, -276.929, 91.4556, 0.628317, 0, 0, 0.309016, 0.951057, 60, 300, 1, 100), +(44261, 175124, 229, 72.069, -276.632, 92.2983, 2.61799, 0, 0, 0.965925, 0.258821, 60, 300, 1, 100), +(44262, 175124, 229, 55.9426, -270.506, 93.6582, 0.488691, 0, 0, 0.241921, 0.970296, 60, 300, 1, 100), +(44263, 175124, 229, 76.5418, -278.914, 91.4689, 4.04917, 0, 0, -0.898793, 0.438373, 60, 300, 1, 100), +(44264, 175124, 229, 71.7949, -278.165, 92.4567, 2.23402, 0, 0, 0.898793, 0.438373, 60, 300, 1, 100), +(44265, 175124, 229, 87.9231, -280.001, 91.4471, 3.57793, 0, 0, -0.976295, 0.216442, 60, 300, 1, 100), +(44266, 175124, 229, 92.1251, -279.851, 91.4455, 4.60767, 0, 0, -0.743144, 0.669131, 60, 300, 1, 100), +(44267, 175124, 229, 90.4836, -280.375, 91.4457, 6.19592, 0, 0, -0.0436192, 0.999048, 60, 300, 1, 100), +(44268, 175124, 229, 96.3418, -280.518, 91.4455, 0.139624, 0, 0, 0.0697556, 0.997564, 60, 300, 1, 100), +(44269, 175124, 229, 94.5641, -281.093, 91.4455, 2.51327, 0, 0, 0.951056, 0.309017, 60, 300, 1, 100), +(44270, 175124, 229, 98.4621, -280.87, 91.4455, 3.80482, 0, 0, -0.945518, 0.325568, 60, 300, 1, 100), +(44271, 175124, 229, 97.1258, -281.949, 91.4455, 5.00909, 0, 0, -0.594823, 0.803857, 60, 300, 1, 100), +(44272, 175124, 229, 72.141, -285.906, 91.9452, 5.2709, 0, 0, -0.484809, 0.87462, 60, 300, 1, 100), +(44273, 175124, 229, 74.0389, -287.331, 91.4488, 5.2709, 0, 0, -0.484809, 0.87462, 60, 300, 1, 100), +(44274, 175124, 229, 106.42, -281.429, 91.5051, 5.68977, 0, 0, -0.292372, 0.956305, 60, 300, 1, 100), +(44275, 175124, 229, 107.419, -282.512, 91.5196, 4.08407, 0, 0, -0.891006, 0.453991, 60, 300, 1, 100), +(44276, 175124, 229, 87.8955, -288.976, 91.4468, 5.14872, 0, 0, -0.537299, 0.843392, 60, 300, 1, 100), +(44277, 175124, 229, 92.6002, -288.176, 91.4455, 0.436332, 0, 0, 0.216439, 0.976296, 60, 300, 1, 100), +(44278, 175124, 229, 96.0628, -287.47, 91.4455, 1.71042, 0, 0, 0.754709, 0.656059, 60, 300, 1, 100), +(44279, 175124, 229, 93.8904, -288.281, 91.4455, 2.35619, 0, 0, 0.92388, 0.382683, 60, 300, 1, 100), +(44280, 175124, 229, 73.6566, -290.045, 91.4427, 3.01941, 0, 0, 0.998135, 0.0610518, 60, 300, 1, 100), +(44281, 175124, 229, 106.604, -283.776, 91.5078, 1.95477, 0, 0, 0.829038, 0.559193, 60, 300, 1, 100), +(44282, 175124, 229, 86.8536, -289.913, 91.4473, 3.78737, 0, 0, -0.948323, 0.317306, 60, 300, 1, 100), +(44283, 175124, 229, 94.9171, -288.644, 91.4455, 2.96704, 0, 0, 0.996194, 0.087165, 60, 300, 1, 100), +(44284, 175124, 229, 105.543, -284.794, 91.4924, 4.04917, 0, 0, -0.898793, 0.438373, 60, 300, 1, 100), +(44285, 175124, 229, 79.5689, -291.474, 91.4493, 6.10865, 0, 0, -0.0871553, 0.996195, 60, 300, 1, 100), +(44286, 175124, 229, 74.1004, -291.837, 91.442, 5.88176, 0, 0, -0.199368, 0.979925, 60, 300, 1, 100), +(44287, 175124, 229, 90.2851, -290.926, 91.4458, 0.610863, 0, 0, 0.300705, 0.953717, 60, 300, 1, 100), +(44288, 175124, 229, 91.8307, -291.349, 91.4455, 3.194, 0, 0, -0.999657, 0.0262016, 60, 300, 1, 100), +(44289, 175124, 229, 106.015, -287.215, 91.4993, 3.73501, 0, 0, -0.956305, 0.292372, 60, 300, 1, 100), +(44290, 175124, 229, 85.5635, -293.523, 91.4479, 1.309, 0, 0, 0.608761, 0.793354, 60, 300, 1, 100), +(44291, 175124, 229, 77.7013, -295.117, 91.4437, 5.16618, 0, 0, -0.529919, 0.848048, 60, 300, 1, 100), +(44292, 175124, 229, 102.871, -296.658, 91.4538, 4.66003, 0, 0, -0.725374, 0.688355, 60, 300, 1, 100), +(44293, 175124, 229, 88.6913, -301.07, 91.4447, 0.366518, 0, 0, 0.182235, 0.983255, 60, 300, 1, 100), +(44294, 175124, 229, 84.6573, -301.761, 91.4432, 0.157079, 0, 0, 0.0784588, 0.996917, 60, 300, 1, 100), +(44295, 175124, 229, 89.9268, -301.831, 91.4451, 0.541051, 0, 0, 0.267238, 0.963631, 60, 300, 1, 100), +(44296, 175124, 229, 107.871, -297.008, 91.5257, 3.05433, 0, 0, 0.999048, 0.0436193, 60, 300, 1, 100), +(44297, 175124, 229, 68.1218, -302.416, 91.4389, 3.12412, 0, 0, 0.999962, 0.00873464, 60, 300, 1, 100), +(44298, 175124, 229, 66.8018, -302.481, 91.4515, 3.14159, 0, 0, -1, 0, 60, 300, 1, 100), +(44299, 175124, 229, 84.008, -303.277, 91.443, 0.0174525, 0, 0, 0.00872612, 0.999962, 60, 300, 1, 100), +(44300, 175124, 229, 87.8612, -303.152, 91.4444, 4.4855, 0, 0, -0.782608, 0.622515, 60, 300, 1, 100), +(44301, 175124, 229, 104.404, -299.438, 91.4757, 0.680677, 0, 0, 0.333806, 0.942642, 60, 300, 1, 100), +(44302, 175124, 229, 69.4599, -303.627, 91.438, 4.88692, 0, 0, -0.642787, 0.766045, 60, 300, 1, 100), +(44303, 175124, 229, 103.109, -300.247, 91.4571, 2.54818, 0, 0, 0.956305, 0.292372, 60, 300, 1, 100), +(44304, 175124, 229, 65.9878, -303.634, 91.4694, 3.6652, 0, 0, -0.965925, 0.258821, 60, 300, 1, 100), +(44305, 175124, 229, 106.199, -299.793, 91.5014, 5.07891, 0, 0, -0.566406, 0.824126, 60, 300, 1, 100), +(44306, 175124, 229, 70.9291, -304.97, 91.4315, 3.03684, 0, 0, 0.998629, 0.0523532, 60, 300, 1, 100), +(44307, 175124, 229, 105.029, -300.911, 91.4845, 1.5708, 0, 0, 0.707107, 0.707107, 60, 300, 1, 100), +(44308, 175124, 229, 107.928, -299.948, 91.5265, 2.00713, 0, 0, 0.843391, 0.5373, 60, 300, 1, 100), +(44309, 175124, 229, 92.6442, -304.447, 91.4455, 2.44346, 0, 0, 0.939692, 0.34202, 60, 300, 1, 100), +(44310, 175124, 229, 65.5835, -305.105, 91.4853, 1.09956, 0, 0, 0.522498, 0.85264, 60, 300, 1, 100), +(44311, 175124, 229, 73.1332, -306.736, 91.4127, 5.63741, 0, 0, -0.317305, 0.948324, 60, 300, 1, 100), +(44312, 175124, 229, 93.8115, -305.536, 91.4455, 1.02974, 0, 0, 0.492423, 0.870356, 60, 300, 1, 100), +(44313, 175124, 229, 104.316, -302.841, 91.4741, 3.07177, 0, 0, 0.999391, 0.0349061, 60, 300, 1, 100), +(44314, 175124, 229, 74.4491, -307.403, 91.4144, 5.55015, 0, 0, -0.358368, 0.93358, 60, 300, 1, 100), +(44315, 175124, 229, 68.7284, -307.073, 91.4505, 0.994837, 0, 0, 0.477159, 0.878817, 60, 300, 1, 100), +(44316, 175124, 229, 102.414, -304.376, 91.4466, 0.0174525, 0, 0, 0.00872612, 0.999962, 60, 300, 1, 100), +(44317, 175124, 229, 75.9302, -308.203, 91.4164, 4.53786, 0, 0, -0.766044, 0.642789, 60, 300, 1, 100), +(44318, 175124, 229, 59.7561, -310.905, 91.5367, 5.51524, 0, 0, -0.374606, 0.927184, 60, 300, 1, 100), +(44319, 175124, 229, 95.5179, -311.558, 91.4455, 5.21854, 0, 0, -0.507538, 0.861629, 60, 300, 1, 100), +(44320, 175124, 229, 60.3514, -312.297, 91.5221, 1.13446, 0, 0, 0.537299, 0.843392, 60, 300, 1, 100), +(44321, 175124, 229, 106.956, -310.151, 91.5121, 2.74016, 0, 0, 0.979924, 0.19937, 60, 300, 1, 100), +(44322, 175124, 229, 95.4615, -313.584, 91.4455, 0.855211, 0, 0, 0.414693, 0.909961, 60, 300, 1, 100), +(44323, 175124, 229, 100.58, -312.489, 91.4455, 0.122173, 0, 0, 0.0610485, 0.998135, 60, 300, 1, 100), +(44324, 175124, 229, 68.2518, -314.875, 91.4335, 1.36136, 0, 0, 0.62932, 0.777146, 60, 300, 1, 100), +(44325, 175124, 229, 61.0567, -313.922, 91.505, 5.60251, 0, 0, -0.333807, 0.942641, 60, 300, 1, 100), +(44326, 175124, 229, 82.5312, -315.925, 91.4361, 1.71042, 0, 0, 0.754709, 0.656059, 60, 300, 1, 100), +(44327, 175124, 229, 66.4828, -315.487, 91.4474, 3.927, 0, 0, -0.923879, 0.382686, 60, 300, 1, 100), +(44328, 175124, 229, 80.4842, -316.636, 91.438, 5.42797, 0, 0, -0.414693, 0.909961, 60, 300, 1, 100), +(44329, 175124, 229, 88.8089, -316.134, 91.4447, 5.58505, 0, 0, -0.34202, 0.939693, 60, 300, 1, 100), +(44330, 175124, 229, 86.6006, -316.457, 91.4375, 5.39307, 0, 0, -0.430511, 0.902586, 60, 300, 1, 100), +(44331, 175124, 229, 61.0127, -315.653, 91.4848, 0.733038, 0, 0, 0.358368, 0.93358, 60, 300, 1, 100), +(44332, 175124, 229, 81.8175, -317.4, 91.4399, 0.174532, 0, 0, 0.0871553, 0.996195, 60, 300, 1, 100), +(44333, 175124, 229, 86.3671, -246.965, 91.4637, 1.81514, 0, 0, 0.788011, 0.615662, 60, 300, 1, 100), +(44334, 175124, 229, 85.9751, -250.81, 91.4645, 3.35105, 0, 0, -0.994521, 0.104536, 60, 300, 1, 100), +(44335, 175124, 229, 89.0041, -251.208, 91.4582, 2.9496, 0, 0, 0.995396, 0.0958512, 60, 300, 1, 100), +(44336, 175124, 229, 76.6499, -263.575, 91.4803, 0.767944, 0, 0, 0.374606, 0.927184, 60, 300, 1, 100), +(44337, 175124, 229, 82.8732, -266.102, 91.4659, 0.820303, 0, 0, 0.398748, 0.91706, 60, 300, 1, 100), +(44338, 175124, 229, 56.8515, -253.343, 96.9626, 6.19592, 0, 0, -0.0436192, 0.999048, 60, 300, 1, 100), +(44339, 175124, 229, 55.4223, -252.576, 97.0544, 1.37881, 0, 0, 0.636078, 0.771625, 60, 300, 1, 100), +(44340, 175124, 229, 54.2656, -255.435, 96.8589, 1.3439, 0, 0, 0.622514, 0.782609, 60, 300, 1, 100), +(44341, 175124, 229, 53.6084, -256.727, 96.1586, 4.55531, 0, 0, -0.760406, 0.649449, 60, 300, 1, 100), +(44342, 175124, 229, 63.2343, -269.357, 93.3948, 3.03684, 0, 0, 0.998629, 0.0523532, 60, 300, 1, 100), +(44343, 175124, 229, 73.3118, -275.095, 91.9131, 0.994837, 0, 0, 0.477159, 0.878817, 60, 300, 1, 100), +(44344, 175124, 229, 61.3216, -272.013, 93.6009, 5.13127, 0, 0, -0.544639, 0.838671, 60, 300, 1, 100), +(44345, 175124, 229, 89.4339, -279.589, 91.4462, 5.25344, 0, 0, -0.492423, 0.870356, 60, 300, 1, 100), +(44346, 175124, 229, 84.5943, -291.008, 91.4483, 4.06662, 0, 0, -0.894934, 0.446199, 60, 300, 1, 100), +(44347, 175124, 229, 93.6733, -290.12, 91.4455, 5.53269, 0, 0, -0.366501, 0.930418, 60, 300, 1, 100), +(44348, 175124, 229, 104.602, -287.997, 91.4788, 4.31097, 0, 0, -0.833885, 0.551938, 60, 300, 1, 100), +(44349, 175124, 229, 104.213, -289.411, 91.4732, 1.50098, 0, 0, 0.681998, 0.731354, 60, 300, 1, 100), +(44350, 175124, 229, 105.491, -297.968, 91.4915, 3.21142, 0, 0, -0.999391, 0.0349061, 60, 300, 1, 100), +(44351, 175124, 229, 91.8609, -301.935, 91.4455, 0.733038, 0, 0, 0.358368, 0.93358, 60, 300, 1, 100), +(44352, 175124, 229, 93.8824, -303.264, 91.4455, 3.64774, 0, 0, -0.968147, 0.250381, 60, 300, 1, 100), +(44353, 175124, 229, 90.9577, -303.899, 91.4455, 0.122173, 0, 0, 0.0610485, 0.998135, 60, 300, 1, 100), +(44354, 175124, 229, 71.7115, -306.066, 91.4182, 4.76475, 0, 0, -0.688354, 0.725374, 60, 300, 1, 100), +(44355, 175124, 229, 85.6677, -314.024, 91.436, 4.20625, 0, 0, -0.861629, 0.507539, 60, 300, 1, 100), +(44356, 175124, 229, 101.517, -311.471, 91.4455, 4.69494, 0, 0, -0.71325, 0.70091, 60, 300, 1, 100), +(44357, 175124, 229, 87.8127, -314.716, 91.4443, 3.01941, 0, 0, 0.998135, 0.0610518, 60, 300, 1, 100), +(44358, 175124, 229, 98.8559, -313.049, 91.4455, 5.2709, 0, 0, -0.484809, 0.87462, 60, 300, 1, 100), +(44359, 175124, 229, 97.3405, -313.43, 91.4455, 2.67035, 0, 0, 0.972369, 0.233448, 60, 300, 1, 100), +(44360, 175124, 229, 104.377, -312.261, 91.4739, 1.90241, 0, 0, 0.814116, 0.580703, 60, 300, 1, 100), +(44361, 175124, 229, 105.655, -314.233, 91.4928, 3.05433, 0, 0, 0.999048, 0.0436193, 60, 300, 1, 100), +(44362, 175124, 229, 64.926, -317.059, 91.461, 1.78023, 0, 0, 0.777145, 0.629321, 60, 300, 1, 100), +(44363, 175124, 229, 63.3079, -317.114, 91.4715, 3.194, 0, 0, -0.999657, 0.0262016, 60, 300, 1, 100), +(44364, 175124, 229, 90.5754, -320.019, 91.4455, 1.20428, 0, 0, 0.566406, 0.824126, 60, 300, 1, 100), +(44365, 175124, 229, 59.1922, -317.294, 91.4801, 6.0912, 0, 0, -0.0958452, 0.995396, 60, 300, 1, 100), +(44366, 175124, 229, 60.8484, -318.053, 91.4709, 1.48353, 0, 0, 0.67559, 0.737278, 60, 300, 1, 100), +(44367, 175124, 229, 51.5754, -315.042, 91.5225, 2.14675, 0, 0, 0.878817, 0.47716, 60, 300, 1, 100), +(44368, 175124, 229, 49.5659, -314.368, 91.5337, 3.927, 0, 0, -0.923879, 0.382686, 60, 300, 1, 100), +(44369, 175124, 229, 51.8635, -316.614, 91.5209, 5.68977, 0, 0, -0.292372, 0.956305, 60, 300, 1, 100), +(44370, 175124, 229, 73.5452, -324.156, 91.4481, 0.453785, 0, 0, 0.224951, 0.97437, 60, 300, 1, 100), +(44371, 175124, 229, 83.9509, -325.865, 91.4455, 3.31614, 0, 0, -0.996194, 0.087165, 60, 300, 1, 100), +(44372, 175124, 229, 79.7866, -325.953, 91.4456, 1.6057, 0, 0, 0.719339, 0.694659, 60, 300, 1, 100), +(44373, 175124, 229, 81.7656, -326.14, 91.4455, 2.46091, 0, 0, 0.942641, 0.333808, 60, 300, 1, 100), +(44374, 175124, 229, 72.0531, -325.809, 91.4542, 1.43117, 0, 0, 0.656058, 0.75471, 60, 300, 1, 100), +(44375, 175124, 229, 69.9306, -326.64, 91.4588, 2.89725, 0, 0, 0.992546, 0.12187, 60, 300, 1, 100), +(44376, 175124, 229, 83.2161, -327.69, 91.4462, 5.98648, 0, 0, -0.147809, 0.989016, 60, 300, 1, 100), +(44377, 175124, 229, 79.072, -328.433, 91.4529, 5.74214, 0, 0, -0.267238, 0.963631, 60, 300, 1, 100), +(44378, 175124, 229, 80.9162, -328.544, 91.4511, 4.18879, 0, 0, -0.866025, 0.500001, 60, 300, 1, 100), +(44379, 175124, 229, 72.0026, -328.392, 91.461, 4.85202, 0, 0, -0.656058, 0.75471, 60, 300, 1, 100), +(44380, 175124, 229, 81.0718, -330.129, 91.4551, 5.25344, 0, 0, -0.492423, 0.870356, 60, 300, 1, 100), +(44381, 175124, 229, 69.9912, -329.339, 91.4658, 5.88176, 0, 0, -0.199368, 0.979925, 60, 300, 1, 100), +(44382, 175124, 229, 82.9415, -330.608, 91.4542, 0.698131, 0, 0, 0.34202, 0.939693, 60, 300, 1, 100), +(44383, 175124, 229, 79.0012, -331.653, 91.471, 3.94445, 0, 0, -0.920505, 0.390732, 60, 300, 1, 100), +(44384, 175124, 229, 72.026, -331.225, 91.4723, 3.59538, 0, 0, -0.97437, 0.224951, 60, 300, 1, 100), +(44385, 175124, 229, 81.0063, -332.454, 91.4814, 3.76991, 0, 0, -0.951056, 0.309017, 60, 300, 1, 100), +(44386, 175124, 229, 90.3071, -332.646, 91.4737, 2.61799, 0, 0, 0.965925, 0.258821, 60, 300, 1, 100), +(44387, 175124, 229, 83.0306, -333.103, 91.4893, 6.07375, 0, 0, -0.104528, 0.994522, 60, 300, 1, 100), +(44388, 175124, 229, 69.6914, -332.161, 91.4867, 1.13446, 0, 0, 0.537299, 0.843392, 60, 300, 1, 100), +(44389, 175124, 229, 88.0984, -333.163, 91.4844, 1.43117, 0, 0, 0.656058, 0.75471, 60, 300, 1, 100), +(44390, 175124, 229, 70.5072, -334.149, 91.5052, 0.610863, 0, 0, 0.300705, 0.953717, 60, 300, 1, 100), +(44391, 175124, 229, 59.331, -332.23, 91.4729, 4.64258, 0, 0, -0.731354, 0.681998, 60, 300, 1, 100), +(44392, 175124, 229, 89.6925, -335.3, 91.5159, 1.95477, 0, 0, 0.829038, 0.559193, 60, 300, 1, 100), +(44393, 175124, 229, 81.9745, -335.984, 91.5223, 4.7822, 0, 0, -0.681998, 0.731354, 60, 300, 1, 100), +(44394, 175124, 229, 56.7615, -332.325, 91.4652, 5.21854, 0, 0, -0.507538, 0.861629, 60, 300, 1, 100), +(44395, 175124, 229, 62.4955, -334.331, 91.5069, 5.93412, 0, 0, -0.173648, 0.984808, 60, 300, 1, 100), +(44396, 175124, 229, 58.8178, -334.107, 91.5048, 0.977383, 0, 0, 0.469471, 0.882948, 60, 300, 1, 100), +(44397, 175124, 229, 63.5717, -336.638, 91.5284, 0.0698117, 0, 0, 0.0348988, 0.999391, 60, 300, 1, 100), +(44398, 175124, 229, 53.2813, -334.795, 91.4969, 2.75761, 0, 0, 0.981627, 0.190812, 60, 300, 1, 100), +(44399, 175124, 229, 59.4191, -337.406, 91.5356, 5.81195, 0, 0, -0.233445, 0.97237, 60, 300, 1, 100), +(44400, 175124, 229, 54.5722, -336.735, 91.5293, 5.14872, 0, 0, -0.537299, 0.843392, 60, 300, 1, 100), +(44401, 175124, 229, 51.2665, -338.088, 91.5419, 4.29351, 0, 0, -0.83867, 0.54464, 60, 300, 1, 100), +(44402, 175124, 229, 115.411, -389.923, 110.863, 5.44543, 0, 0, -0.406736, 0.913546, 60, 300, 1, 100), +(44403, 175124, 229, 112.297, -390.178, 110.863, 6.16101, 0, 0, -0.0610485, 0.998135, 60, 300, 1, 100), +(44404, 175124, 229, 113.93, -389.215, 110.863, 5.49779, 0, 0, -0.382683, 0.92388, 60, 300, 1, 100), +(44405, 175124, 229, 113.018, -451.804, 110.863, 2.82743, 0, 0, 0.987688, 0.156436, 60, 300, 1, 100), +(44406, 175124, 229, 114.806, -450.286, 110.863, 0.767944, 0, 0, 0.374606, 0.927184, 60, 300, 1, 100), +(44407, 175124, 229, 115.812, -453.057, 110.863, 4.29351, 0, 0, -0.83867, 0.54464, 60, 300, 1, 100), +(44408, 175124, 229, 59.1689, -255.103, 96.8158, 1.0821, 0, 0, 0.515038, 0.857168, 60, 300, 1, 100), +(44409, 175124, 229, 76.1338, -273.126, 91.4802, 0.925024, 0, 0, 0.446198, 0.894935, 60, 300, 1, 100), +(44410, 175124, 229, 92.6068, -281.835, 91.4455, 3.29869, 0, 0, -0.996917, 0.0784664, 60, 300, 1, 100), +(44411, 175124, 229, 105.027, -280.601, 91.485, 4.03171, 0, 0, -0.902585, 0.430512, 60, 300, 1, 100), +(44412, 175124, 229, 77.4822, -292.28, 91.447, 6.19592, 0, 0, -0.0436192, 0.999048, 60, 300, 1, 100), +(44413, 175124, 229, 85.834, -295.414, 91.4477, 2.77507, 0, 0, 0.983254, 0.182238, 60, 300, 1, 100), +(44414, 175124, 229, 86.1129, -302.506, 91.4437, 0.767944, 0, 0, 0.374606, 0.927184, 60, 300, 1, 100), +(44415, 175124, 229, 97.1963, -310.891, 91.4455, 3.24635, 0, 0, -0.998629, 0.0523532, 60, 300, 1, 100), +(44416, 175124, 229, 89.9589, -318.159, 91.4443, 5.41052, 0, 0, -0.422618, 0.906308, 60, 300, 1, 100), +(44417, 175124, 229, 50.1711, -316.652, 91.5303, 3.85718, 0, 0, -0.936671, 0.35021, 60, 300, 1, 100), +(44418, 175124, 229, 92.1155, -334.861, 91.5066, 0.453785, 0, 0, 0.224951, 0.97437, 60, 300, 1, 100), +(44419, 175124, 229, 54.2926, -333.032, 91.4815, 0.628317, 0, 0, 0.309016, 0.951057, 60, 300, 1, 100), +(44420, 175124, 229, 57.859, -336.093, 91.5233, 4.04917, 0, 0, -0.898793, 0.438373, 60, 300, 1, 100), +(44421, 175124, 229, 76.0065, -264.973, 91.4807, 1.64061, 0, 0, 0.731353, 0.681999, 60, 300, 1, 100), +(44422, 175124, 229, 89.0992, -290.133, 91.4463, 1.53589, 0, 0, 0.694658, 0.71934, 60, 300, 1, 100), +(44423, 175124, 229, 104.927, -286.138, 91.4835, 1.44862, 0, 0, 0.66262, 0.748956, 60, 300, 1, 100), +(44424, 175124, 229, 75.1779, -292.906, 91.4446, 1.98967, 0, 0, 0.83867, 0.54464, 60, 300, 1, 100), +(44425, 175124, 229, 83.9541, -315.109, 91.4341, 5.74214, 0, 0, -0.267238, 0.963631, 60, 300, 1, 100), +(44426, 175124, 229, 48.8127, -337.076, 91.5302, 2.26893, 0, 0, 0.906307, 0.422619, 60, 300, 1, 100), +(44427, 175124, 229, 186.987, -389.476, 110.863, 4.7473, 0, 0, -0.694658, 0.71934, 60, 300, 1, 100), +(44428, 175124, 229, 189.08, -388.611, 110.863, 5.98648, 0, 0, -0.147809, 0.989016, 60, 300, 1, 100), +(44429, 175124, 229, 187.741, -387.874, 110.863, 1.13446, 0, 0, 0.537299, 0.843392, 60, 300, 1, 100), +(44430, 175124, 229, 202.572, -392.328, 111.154, 4.92183, 0, 0, -0.62932, 0.777146, 60, 300, 1, 100), +(44431, 175124, 229, 209.286, -391.27, 111.149, 3.33359, 0, 0, -0.995396, 0.0958512, 60, 300, 1, 100), +(44432, 175124, 229, 204.115, -393.598, 111.142, 5.63741, 0, 0, -0.317305, 0.948324, 60, 300, 1, 100), +(44433, 175124, 229, 210.654, -391.83, 111.142, 1.91986, 0, 0, 0.819152, 0.573577, 60, 300, 1, 100), +(44434, 175124, 229, 202.891, -394.925, 111.134, 3.47321, 0, 0, -0.986285, 0.16505, 60, 300, 1, 100), +(44435, 175124, 229, 212.067, -392.173, 111.137, 5.72468, 0, 0, -0.275637, 0.961262, 60, 300, 1, 100), +(44436, 175124, 229, 204.39, -395.495, 111.127, 4.99164, 0, 0, -0.601814, 0.798636, 60, 300, 1, 100), +(44437, 175124, 229, 210.485, -393.288, 111.132, 6.16101, 0, 0, -0.0610485, 0.998135, 60, 300, 1, 100), +(44438, 175124, 229, 217.875, -392.087, 111.127, 0.90757, 0, 0, 0.438371, 0.898794, 60, 300, 1, 100), +(44439, 175124, 229, 203.281, -398.872, 111.105, 2.86234, 0, 0, 0.990268, 0.139175, 60, 300, 1, 100), +(44440, 175124, 229, 220.173, -391.63, 111.126, 1.36136, 0, 0, 0.62932, 0.777146, 60, 300, 1, 100), +(44441, 175124, 229, 218.954, -392.579, 111.121, 1.91986, 0, 0, 0.819152, 0.573577, 60, 300, 1, 100), +(44442, 175124, 229, 219.679, -393.405, 111.114, 4.29351, 0, 0, -0.83867, 0.54464, 60, 300, 1, 100), +(44443, 175124, 229, 204.402, -400.307, 111.092, 4.08407, 0, 0, -0.891006, 0.453991, 60, 300, 1, 100), +(44444, 175124, 229, 203.082, -401.453, 111.087, 5.21854, 0, 0, -0.507538, 0.861629, 60, 300, 1, 100), +(44445, 175124, 229, 220.836, -393.649, 111.11, 4.31097, 0, 0, -0.833885, 0.551938, 60, 300, 1, 100), +(44446, 175124, 229, 205.199, -401.573, 111.082, 0.261798, 0, 0, 0.130526, 0.991445, 60, 300, 1, 100), +(44447, 175124, 229, 203.856, -403.369, 111.071, 5.13127, 0, 0, -0.544639, 0.838671, 60, 300, 1, 100), +(44448, 175124, 229, 220.824, -398.357, 111.076, 1.98967, 0, 0, 0.83867, 0.54464, 60, 300, 1, 100), +(44449, 175124, 229, 219.995, -399.617, 111.068, 3.6652, 0, 0, -0.965925, 0.258821, 60, 300, 1, 100), +(44450, 175124, 229, 197.826, -407.93, 110.885, 4.11898, 0, 0, -0.882947, 0.469473, 60, 300, 1, 100), +(44451, 175124, 229, 200.125, -407.846, 110.885, 2.87979, 0, 0, 0.991445, 0.130528, 60, 300, 1, 100), +(44452, 175124, 229, 221.281, -400.066, 111.063, 0.977383, 0, 0, 0.469471, 0.882948, 60, 300, 1, 100), +(44453, 175124, 229, 197.889, -409.417, 110.885, 4.76475, 0, 0, -0.688354, 0.725374, 60, 300, 1, 100), +(44454, 175124, 229, 220.181, -401.405, 111.055, 4.29351, 0, 0, -0.83867, 0.54464, 60, 300, 1, 100), +(44455, 175124, 229, 200.743, -409.406, 110.885, 4.90438, 0, 0, -0.636078, 0.771625, 60, 300, 1, 100), +(44456, 175124, 229, 199.616, -410.272, 110.886, 3.35105, 0, 0, -0.994521, 0.104536, 60, 300, 1, 100), +(44457, 175124, 229, 214.32, -408.951, 110.968, 2.96704, 0, 0, 0.996194, 0.087165, 60, 300, 1, 100), +(44458, 175124, 229, 213.311, -410.503, 110.963, 2.14675, 0, 0, 0.878817, 0.47716, 60, 300, 1, 100), +(44459, 175124, 229, 221.348, -409.122, 111.003, 4.20625, 0, 0, -0.861629, 0.507539, 60, 300, 1, 100), +(44460, 175124, 229, 222.152, -411.776, 110.992, 3.21142, 0, 0, -0.999391, 0.0349061, 60, 300, 1, 100), +(44461, 175124, 229, 222.736, -410.477, 110.998, 5.07891, 0, 0, -0.566406, 0.824126, 60, 300, 1, 100), +(44462, 175124, 229, 220.87, -411.346, 110.993, 3.80482, 0, 0, -0.945518, 0.325568, 60, 300, 1, 100), +(44463, 175124, 229, 206.904, -419.79, 110.925, 5.53269, 0, 0, -0.366501, 0.930418, 60, 300, 1, 100), +(44464, 175124, 229, 208.166, -418.361, 110.933, 2.21657, 0, 0, 0.894934, 0.446199, 60, 300, 1, 100), +(44465, 175124, 229, 207.935, -420.02, 110.93, 6.10865, 0, 0, -0.0871553, 0.996195, 60, 300, 1, 100), +(44466, 175124, 229, 209.563, -419.84, 110.939, 5.74214, 0, 0, -0.267238, 0.963631, 60, 300, 1, 100), +(44467, 175124, 229, 208.006, -422.069, 110.929, 4.76475, 0, 0, -0.688354, 0.725374, 60, 300, 1, 100), +(44468, 175124, 229, 199.281, -431.434, 110.885, 3.83973, 0, 0, -0.939692, 0.34202, 60, 300, 1, 100), +(44469, 175124, 229, 198.346, -432.692, 110.885, 4.2237, 0, 0, -0.857167, 0.515038, 60, 300, 1, 100), +(44470, 175124, 229, 212.459, -418.521, 110.953, 2.9845, 0, 0, 0.996917, 0.0784664, 60, 300, 1, 100), +(44471, 175124, 229, 200.72, -431.708, 110.885, 1.78023, 0, 0, 0.777145, 0.629321, 60, 300, 1, 100), +(44472, 175124, 229, 211.907, -420.136, 110.945, 1.93731, 0, 0, 0.824125, 0.566408, 60, 300, 1, 100), +(44473, 175124, 229, 199.588, -433.807, 110.885, 1.11701, 0, 0, 0.529919, 0.848048, 60, 300, 1, 100), +(44474, 175124, 229, 213.577, -419.533, 110.95, 0.628317, 0, 0, 0.309016, 0.951057, 60, 300, 1, 100), +(44475, 175124, 229, 201.847, -432.209, 110.885, 1.44862, 0, 0, 0.66262, 0.748956, 60, 300, 1, 100), +(44476, 175124, 229, 224.213, -412.157, 110.991, 1.58825, 0, 0, 0.71325, 0.70091, 60, 300, 1, 100), +(44477, 175124, 229, 220.602, -418.447, 110.961, 5.06146, 0, 0, -0.573576, 0.819152, 60, 300, 1, 100), +(44478, 175124, 229, 207.267, -434.716, 110.887, 0.226892, 0, 0, 0.113203, 0.993572, 60, 300, 1, 100), +(44479, 175124, 229, 212.636, -432.306, 110.892, 6.10865, 0, 0, -0.0871553, 0.996195, 60, 300, 1, 100), +(44480, 175124, 229, 221.701, -420.444, 110.953, 1.64061, 0, 0, 0.731353, 0.681999, 60, 300, 1, 100), +(44481, 175124, 229, 188.126, -450.82, 110.863, 1.48353, 0, 0, 0.67559, 0.737278, 60, 300, 1, 100), +(44482, 175124, 229, 209.072, -435.188, 110.885, 3.33359, 0, 0, -0.995396, 0.0958512, 60, 300, 1, 100), +(44483, 175124, 229, 220.162, -421.225, 110.948, 4.5204, 0, 0, -0.771625, 0.636078, 60, 300, 1, 100), +(44484, 175124, 229, 208.798, -433.633, 110.888, 3.45576, 0, 0, -0.987688, 0.156436, 60, 300, 1, 100), +(44485, 175124, 229, 189.834, -451.31, 110.863, 3.42085, 0, 0, -0.990268, 0.139175, 60, 300, 1, 100), +(44486, 175124, 229, 223.579, -419.323, 110.959, 4.39823, 0, 0, -0.809016, 0.587786, 60, 300, 1, 100), +(44487, 175124, 229, 188.003, -452.538, 110.863, 1.3439, 0, 0, 0.622514, 0.782609, 60, 300, 1, 100), +(44488, 175124, 229, 211.617, -434.677, 110.888, 4.72984, 0, 0, -0.700909, 0.713251, 60, 300, 1, 100), +(44489, 175124, 229, 222.816, -430.971, 110.907, 6.02139, 0, 0, -0.130526, 0.991445, 60, 300, 1, 100), +(44490, 175124, 229, 222.093, -432.25, 110.901, 0, 0, 0, 0, 1, 60, 300, 1, 100), +(44491, 175124, 229, 223.817, -429.41, 110.914, 6.10865, 0, 0, -0.0871553, 0.996195, 60, 300, 1, 100), +(44492, 175124, 229, 222.219, -428.908, 110.916, 2.79252, 0, 0, 0.984807, 0.173652, 60, 300, 1, 100), +(44493, 175124, 229, 223.978, -432.85, 110.899, 1.88495, 0, 0, 0.809016, 0.587786, 60, 300, 1, 100), +(44494, 175124, 229, 107.189, -287.66, 91.5163, 0.750491, 0, 0, 0.366501, 0.930418, 60, 300, 1, 100), +(44495, 175124, 229, 84.112, -268.795, 91.4617, 3.4034, 0, 0, -0.991445, 0.130528, 60, 300, 1, 100), +(44496, 175124, 229, 87.411, -278.121, 91.4532, 3.71755, 0, 0, -0.958819, 0.284016, 60, 300, 1, 100), +(44497, 175124, 229, 82.0751, -251.81, 91.4727, 4.59022, 0, 0, -0.748956, 0.66262, 60, 300, 1, 100); + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241213073447_world.sql b/sql/migrations/20241213073447_world.sql new file mode 100644 index 00000000000..794c45beec4 --- /dev/null +++ b/sql/migrations/20241213073447_world.sql @@ -0,0 +1,64 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241213073447'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241213073447'); +-- Add your query below. + + +-- Rspawn Spire Spider Egg (175606) +SET @OGUID = 74000; +DELETE FROM `gameobject` WHERE `id` = 175606; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `spawn_flags`, `visibility_mod`, `patch_min`, `patch_max`) VALUES +(@OGUID+1, 175606, 229, -154.889, -570.339, 10.0172, 2.47837, 0, 0, 0.945518, 0.325568, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+2, 175606, 229, -154.77, -541.317, 9.02217, 6.17847, 0, 0, -0.0523357, 0.99863, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+3, 175606, 229, -154.592, -525.219, 8.16182, 2.04204, 0, 0, 0.85264, 0.522499, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+4, 175606, 229, -154.378, -552.234, 9.91885, 4.2237, 0, 0, -0.857167, 0.515038, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+5, 175606, 229, -154.15, -576.464, 11.8097, 0.314158, 0, 0, 0.156434, 0.987688, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+6, 175606, 229, -153.788, -515.227, -15.9504, 5.32326, 0, 0, -0.461748, 0.887011, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+7, 175606, 229, -151.329, -472.323, 14.0097, 2.09439, 0, 0, 0.866025, 0.500001, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+8, 175606, 229, -150.541, -525.868, 7.43845, 3.85718, 0, 0, -0.936671, 0.35021, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+9, 175606, 229, -150.525, -484.228, 11.3473, 4.45059, 0, 0, -0.793353, 0.608762, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+10, 175606, 229, -150.104, -470.008, 16.2278, 1.76278, 0, 0, 0.771625, 0.636078, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+11, 175606, 229, -149.205, -458.286, 16.8712, 3.4034, 0, 0, -0.991445, 0.130528, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+12, 175606, 229, -147.881, -448.549, 20.0911, 1.32645, 0, 0, 0.615661, 0.788011, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+13, 175606, 229, -146.907, -441.463, 22.4744, 5.48033, 0, 0, -0.390731, 0.920505, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+14, 175606, 229, -144.505, -441.603, 23.1016, 0.331611, 0, 0, 0.165047, 0.986286, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+15, 175606, 229, -139.523, -525.879, 6.36398, 3.85718, 0, 0, -0.936671, 0.35021, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+16, 175606, 229, -139.153, -434.738, 23.1123, 3.54302, 0, 0, -0.979924, 0.19937, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+17, 175606, 229, -138.894, -439.497, 24.8088, 1.76278, 0, 0, 0.771625, 0.636078, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+18, 175606, 229, -138.669, -555.321, 14.5388, 1.6057, 0, 0, 0.719339, 0.694659, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+19, 175606, 229, -132.404, -514.961, -15.9374, 4.4855, 0, 0, -0.782608, 0.622515, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+20, 175606, 229, -132.261, -474.848, 9.82244, 3.45576, 0, 0, -0.987688, 0.156436, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+21, 175606, 229, -131.805, -526.784, 6.55651, 3.99681, 0, 0, -0.909961, 0.414694, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+22, 175606, 229, -131.633, -460.694, 17.0553, 3.17653, 0, 0, -0.999847, 0.0174693, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+23, 175606, 229, -131.57, -439.602, 22.8934, 5.14872, 0, 0, -0.537299, 0.843392, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+24, 175606, 229, -130.184, -420.555, 28.1423, 2.21657, 0, 0, 0.894934, 0.446199, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+25, 175606, 229, -129.514, -441.7, 24.4328, 0.977383, 0, 0, 0.469471, 0.882948, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+26, 175606, 229, -128.213, -399.329, 30.4635, 0.59341, 0, 0, 0.292371, 0.956305, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+27, 175606, 229, -126.746, -514.164, -12.147, 3.10665, 0, 0, 0.999847, 0.0174693, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+28, 175606, 229, -125.794, -490.418, 11.9901, 5.61996, 0, 0, -0.325567, 0.945519, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+29, 175606, 229, -125.354, -491.7, 11.9901, 3.54302, 0, 0, -0.979924, 0.19937, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+30, 175606, 229, -125.229, -576.664, 13.7726, 5.98648, 0, 0, -0.147809, 0.989016, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+31, 175606, 229, -124.179, -576.163, 13.9393, 4.08407, 0, 0, -0.891006, 0.453991, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+32, 175606, 229, -123.203, -576.224, 14.1865, 1.37881, 0, 0, 0.636078, 0.771625, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+33, 175606, 229, -121.45, -519.638, -10.1789, 4.20625, 0, 0, -0.861629, 0.507539, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+34, 175606, 229, -120.866, -523.033, 11.1616, 3.38594, 0, 0, -0.992546, 0.12187, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+35, 175606, 229, -112.21, -569.506, 10.1992, 2.18166, 0, 0, 0.887011, 0.461749, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+36, 175606, 229, -102.465, -575.651, 9.90089, 2.47837, 0, 0, 0.945518, 0.325568, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+37, 175606, 229, -101.886, -521.985, -7.84199, 6.24828, 0, 0, -0.0174522, 0.999848, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+38, 175606, 229, -100.325, -523.847, 10.7029, 2.11185, 0, 0, 0.870356, 0.492424, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+39, 175606, 229, -100.23, -529.537, -5.77381, 5.84685, 0, 0, -0.216439, 0.976296, 180, 180, 100, 1, 0, 0, 0, 10), +(@OGUID+40, 175606, 229, -99.9989, -517.764, 10.6956, 5.68977, 0, 0, -0.292372, 0.956305, 180, 180, 100, 1, 0, 0, 0, 10); +UPDATE `gameobject` SET `spawntimesecsmin` = 604800, `spawntimesecsmax` = 604800 WHERE `id` = 175606; + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241217175923_world.sql b/sql/migrations/20241217175923_world.sql new file mode 100644 index 00000000000..33622d502bf --- /dev/null +++ b/sql/migrations/20241217175923_world.sql @@ -0,0 +1,669 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241217175923'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241217175923'); +-- Add your query below. + + +-- Anchor +UPDATE `gameobject` SET `position_x`=-10169.2, `position_y`=2317.47, `position_z`=-49.5841, `orientation`=0.663223, `rotation0`=0, `rotation1`=0, `rotation2`=0.325567, `rotation3`=0.945519 WHERE `guid`=16879; + +-- Gaea Dirt Mound +UPDATE `gameobject` SET `position_x`=917.972, `position_y`=1715.87, `position_z`=-14.7383, `orientation`=1.16937, `rotation0`=0, `rotation1`=0, `rotation2`=0.551936, `rotation3`=0.833886 WHERE `guid`=20684; +UPDATE `gameobject` SET `position_x`=703.858, `position_y`=1485.01, `position_z`=-15.65, `orientation`=5.67232, `rotation0`=0, `rotation1`=0, `rotation2`=-0.300705, `rotation3`=0.953717 WHERE `guid`=20676; +UPDATE `gameobject` SET `position_x`=637.28, `position_y`=1493.22, `position_z`=-12.2789, `orientation`=0.872664, `rotation0`=0, `rotation1`=0, `rotation2`=0.422618, `rotation3`=0.906308 WHERE `guid`=20697; +UPDATE `gameobject` SET `position_x`=667.014, `position_y`=1562.03, `position_z`=-19.2776, `orientation`=4.36332, `rotation0`=0, `rotation1`=0, `rotation2`=-0.819152, `rotation3`=0.573577 WHERE `guid`=20704; +UPDATE `gameobject` SET `position_x`=563.785, `position_y`=1551.61, `position_z`=-9.38759, `orientation`=1.74533, `rotation0`=0, `rotation1`=0, `rotation2`=0.766044, `rotation3`=0.642789 WHERE `guid`=20706; +UPDATE `gameobject` SET `position_x`=541.104, `position_y`=1600.31, `position_z`=-3.84041, `orientation`=3.22886, `rotation0`=0, `rotation1`=0, `rotation2`=-0.999048, `rotation3`=0.0436193 WHERE `guid`=20694; +UPDATE `gameobject` SET `position_x`=761.091, `position_y`=1399.94, `position_z`=-15.806, `orientation`=3.47321, `rotation0`=0, `rotation1`=0, `rotation2`=-0.986285, `rotation3`=0.16505 WHERE `guid`=20678; +UPDATE `gameobject` SET `position_x`=749.38, `position_y`=1741.49, `position_z`=-20.6867, `orientation`=0.488691, `rotation0`=0, `rotation1`=0, `rotation2`=0.241921, `rotation3`=0.970296 WHERE `guid`=20703; +UPDATE `gameobject` SET `position_x`=824.819, `position_y`=1688.19, `position_z`=-25.2748, `orientation`=2.77507, `rotation0`=0, `rotation1`=0, `rotation2`=0.983254, `rotation3`=0.182238 WHERE `guid`=20696; +UPDATE `gameobject` SET `position_x`=611.429, `position_y`=1756.65, `position_z`=-11.6971, `orientation`=6.07375, `rotation0`=0, `rotation1`=0, `rotation2`=-0.104528, `rotation3`=0.994522 WHERE `guid`=20702; +UPDATE `gameobject` SET `position_x`=593.536, `position_y`=1799.24, `position_z`=-7.52801, `orientation`=5.95157, `rotation0`=0, `rotation1`=0, `rotation2`=-0.165047, `rotation3`=0.986286 WHERE `guid`=20695; +UPDATE `gameobject` SET `position_x`=734.333, `position_y`=1602.32, `position_z`=-23.6011, `orientation`=6.24828, `rotation0`=0, `rotation1`=0, `rotation2`=-0.0174522, `rotation3`=0.999848 WHERE `guid`=20693; +UPDATE `gameobject` SET `position_x`=792.721, `position_y`=1487.82, `position_z`=-18.3508, `orientation`=1.02974, `rotation0`=0, `rotation1`=0, `rotation2`=0.492423, `rotation3`=0.870356 WHERE `guid`=20708; +UPDATE `gameobject` SET `position_x`=841.456, `position_y`=1526.23, `position_z`=-18.7355, `orientation`=4.45059, `rotation0`=0, `rotation1`=0, `rotation2`=-0.793353, `rotation3`=0.608762 WHERE `guid`=20685; +UPDATE `gameobject` SET `position_x`=609.719, `position_y`=1602.23, `position_z`=-11.1704, `orientation`=4.97419, `rotation0`=0, `rotation1`=0, `rotation2`=-0.608761, `rotation3`=0.793354 WHERE `guid`=20692; +UPDATE `gameobject` SET `position_x`=674.535, `position_y`=1826.9, `position_z`=-12.1548, `orientation`=6.07375, `rotation0`=0, `rotation1`=0, `rotation2`=-0.104528, `rotation3`=0.994522 WHERE `guid`=20690; + +-- Hot Coal +UPDATE `gameobject` SET `position_x`=736.653, `position_y`=-1176.32, `position_z`=-118.097, `orientation`=5.60251, `rotation0`=0, `rotation1`=0, `rotation2`=-0.333807, `rotation3`=0.942641 WHERE `guid`=361786; + +-- Lava Crack +UPDATE `gameobject` SET `position_x`=765.562, `position_y`=-995.398, `position_z`=-197.221, `orientation`=2.19911, `rotation0`=0, `rotation1`=0, `rotation2`=0.891006, `rotation3`=0.453991 WHERE `guid`=3998297; + +-- Dire Pool +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(1936, 178224, 1, -4033.24, 1345.66, 159.614, 3.14159, 0, 0, -1, 0, 900, 900, 100, 1, 0, 10); -- Feralas + +-- Aurora's Aura +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(1944, 178230, 0, 3235.85, -4263.02, 100.385, 3.99681, 0, 0, -0.909961, 0.414694, -12, -12, 100, 1, 0, 10); -- Eastern Plaguelands (SPAWN) +DELETE FROM `quest_end_scripts` WHERE `id`=5247; +INSERT INTO `quest_end_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(5247, 0, 3, 0, 1788, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3234.29, -4260.34, 98.4239, 0, 0, 'Fragments of the Past: Aurora Skycaller - Move'), +(5247, 0, 4, 147, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora Skycaller - Remove Npc Flags'), +(5247, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8332, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora Skycaller - Say Text'), +(5247, 4, 9, 88, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Respawn GameObject Aurora\'s Book'), +(5247, 7, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 8, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 9, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 10, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8333, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora Skycaller - Say Text'), +(5247, 11, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 12, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 13, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 14, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 15, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 16, 9, 1944, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Respawn GameObject Aurora\'s Aura'), +(5247, 16, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 17, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 18, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 18, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3234.29, -4260.34, 98.4239, 0, 0, 'Fragments of the Past: Aurora Skycaller - Move'), +(5247, 18, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5.33522, 0, 'Fragments of the Past: Aurora Skycaller - Set Orientation'), +(5247, 18, 15, 18953, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora Skycaller - Cast Spell Ranshalla Waiting'), +(5247, 19, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 20, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 21, 14, 18953, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Aurora Skycaller - Remove Aura Ranshalla Waiting'), +(5247, 21, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 22, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 23, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 24, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 25, 89, 0, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 25, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 26, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 27, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 28, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 29, 89, 1, 0, 0, 0, 88, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora\'s Book - Activate Object'), +(5247, 31, 3, 0, 2763, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3232.28, -4256.48, 98.1997, 0, 0, 'Fragments of the Past: Aurora Skycaller - Move'), +(5247, 34, 35, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.78736, 0, 'Fragments of the Past: Aurora Skycaller - Set Orientation'), +(5247, 36, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora Skycaller - Emote OneShotBow'), +(5247, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8338, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora Skycaller - Say Text'), +(5247, 39, 4, 147, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Fragments of the Past: Aurora Skycaller - Add Npc Flags'); + +-- Box o' Squirrels +UPDATE `gameobject` SET `position_x`=-22.5045, `position_y`=44.4364, `position_z`=-4.29736, `orientation`=1.29154, `rotation0`=0, `rotation1`=0, `rotation2`=0.601814, `rotation3`=0.798636 WHERE `guid`=20739; +UPDATE `gameobject` SET `position_x`=-16.7718, `position_y`=44.478, `position_z`=-4.29736, `orientation`=1.83259, `rotation0`=0, `rotation1`=0, `rotation2`=0.793353, `rotation3`=0.608762 WHERE `guid`=20740; +UPDATE `gameobject` SET `position_x`=-19.6636, `position_y`=44.2562, `position_z`=-4.29736, `orientation`=5.2709, `rotation0`=0, `rotation1`=0, `rotation2`=-0.484809, `rotation3`=0.87462 WHERE `guid`=20738; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=-202.623, `position_y`=-112.551, `position_z`=78.4902, `orientation`=5.02655, `rotation0`=0, `rotation1`=0, `rotation2`=-0.587785, `rotation3`=0.809017 WHERE `guid`=90374; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=669.317, `position_y`=-294.055, `position_z`=30.2897, `orientation`=5.91667, `rotation0`=0, `rotation1`=0, `rotation2`=-0.182235, `rotation3`=0.983255 WHERE `guid`=90370; + +-- Alliance Banner +UPDATE `gameobject` SET `position_x`=669.007, `position_y`=-294.078, `position_z`=30.2909, `orientation`=2.77507, `rotation0`=0, `rotation1`=0, `rotation2`=0.983254, `rotation3`=0.182238 WHERE `guid`=90356; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=-1082.53, `position_y`=-346.567, `position_z`=54.9771, `orientation`=4.72984, `rotation0`=0, `rotation1`=0, `rotation2`=-0.700909, `rotation3`=0.713251 WHERE `guid`=90378; + +-- Alliance Banner +UPDATE `gameobject` SET `position_x`=-1082.43, `position_y`=-346.792, `position_z`=54.9265, `orientation`=4.76475, `rotation0`=0, `rotation1`=0, `rotation2`=-0.688354, `rotation3`=0.725374 WHERE `guid`=90364; + +-- Christmas Tree (Large) +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(1959, 178425, 0, -8747.58, 1075.01, 90.5513, 4.95674, 0, 0, -0.615661, 0.788011, 180, 180, 100, 1, 0, 10); -- Stormwind City +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1959, 2); + +-- XMasTreeLargeHorde01 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(1961, 178426, 1, -1056.73, -303.276, 159.03, 1.58825, 0, 0, 0.71325, 0.70091, 180, 180, 100, 1, 0, 10); -- Thunder Bluff +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1961, 2); +UPDATE `gameobject` SET `position_x`=-1258.46, `position_y`=63.6343, `position_z`=127.893, `orientation`=1.88495, `rotation0`=0, `rotation1`=0, `rotation2`=0.809016, `rotation3`=0.587786 WHERE `guid`=41824; +UPDATE `gameobject` SET `position_x`=2276.44, `position_y`=265.839, `position_z`=36.538, `orientation`=2.63544, `rotation0`=0, `rotation1`=0, `rotation2`=0.968147, `rotation3`=0.250381 WHERE `guid`=41859; + +-- XMasGift01 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(1972, 178428, 0, -8748.77, 1075.06, 90.6098, 2.07694, 0, 0, 0.861629, 0.507539, 180, 180, 100, 1, 0, 10), -- Stormwind City +(1974, 178428, 0, -8746.23, 1073.4, 90.4405, 1.36136, 0, 0, 0.62932, 0.777146, 180, 180, 100, 1, 0, 10), -- Stormwind City +(1977, 178428, 1, -1058.07, -305.139, 159.03, 3.33359, 0, 0, -0.995396, 0.0958512, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(1978, 178428, 1, -1055.67, -301.665, 159.364, 0.314158, 0, 0, 0.156434, 0.987688, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(1979, 178428, 1, -1057.02, -305.2, 159.03, 4.50295, 0, 0, -0.777145, 0.629321, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(1980, 178428, 1, -1057.47, -302.564, 159.03, 2.18166, 0, 0, 0.887011, 0.461749, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(1981, 178428, 1, -1058.82, -302.106, 159.03, 1.69297, 0, 0, 0.748956, 0.66262, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(1983, 178428, 1, -1054.92, -305.088, 159.03, 6.05629, 0, 0, -0.113203, 0.993572, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(1988, 178428, 1, -1257.07, 64.9708, 127.775, 0.314158, 0, 0, 0.156434, 0.987688, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(1989, 178428, 1, -1257.22, 62.377, 127.852, 3.64774, 0, 0, -0.968147, 0.250381, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(1991, 178428, 1, -1258.5, 65.8874, 127.696, 1.3439, 0, 0, 0.622514, 0.782609, 180, 180, 100, 1, 0, 10); -- Thunder Bluff +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1972, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1974, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1977, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1978, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1979, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1980, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1981, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1983, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1988, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1989, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (1991, 2); +UPDATE `gameobject` SET `position_x`=2274.7, `position_y`=267.536, `position_z`=36.9303, `orientation`=2.32129, `rotation0`=0, `rotation1`=0, `rotation2`=0.91706, `rotation3`=0.39875 WHERE `guid`=41389; +UPDATE `gameobject` SET `position_x`=2275.88, `position_y`=267.832, `position_z`=36.6364, `orientation`=1.93731, `rotation0`=0, `rotation1`=0, `rotation2`=0.824125, `rotation3`=0.566408 WHERE `guid`=41386; +UPDATE `gameobject` SET `position_x`=2276.27, `position_y`=264.194, `position_z`=36.4091, `orientation`=4.97419, `rotation0`=0, `rotation1`=0, `rotation2`=-0.608761, `rotation3`=0.793354 WHERE `guid`=41380; +UPDATE `gameobject` SET `position_x`=-1056.64, `position_y`=-301.032, `position_z`=159.03, `orientation`=0.610863, `rotation0`=0, `rotation1`=0, `rotation2`=0.300705, `rotation3`=0.953717 WHERE `guid`=41323; +UPDATE `gameobject` SET `position_x`=-1260.46, `position_y`=63.5066, `position_z`=127.678, `orientation`=3.29869, `rotation0`=0, `rotation1`=0, `rotation2`=-0.996917, `rotation3`=0.0784664 WHERE `guid`=41311; + +-- XMasGift02 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2001, 178429, 0, -8749.29, 1075.9, 90.6969, 5.3058, 0, 0, -0.469471, 0.882948, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2003, 178429, 0, -8745.95, 1075.42, 90.6242, 5.34071, 0, 0, -0.45399, 0.891007, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2004, 178429, 0, -8747.26, 1073.27, 90.4057, 0.0174525, 0, 0, 0.00872612, 0.999962, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2006, 178429, 1, -1058.28, -302.983, 159.03, 3.24635, 0, 0, -0.998629, 0.0523532, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2007, 178429, 1, -1055.44, -304.288, 159.03, 1.0821, 0, 0, 0.515038, 0.857168, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2016, 178429, 1, -1259.14, 65.0697, 127.72, 4.5204, 0, 0, -0.771625, 0.636078, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2017, 178429, 1, -1257.63, 64.2302, 127.844, 0.331611, 0, 0, 0.165047, 0.986286, 180, 180, 100, 1, 0, 10); -- Thunder Bluff +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2001, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2003, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2004, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2006, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2007, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2016, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2017, 2); +UPDATE `gameobject` SET `position_x`=2274.87, `position_y`=266.014, `position_z`=36.5332, `orientation`=2.11185, `rotation0`=0, `rotation1`=0, `rotation2`=0.870356, `rotation3`=0.492424 WHERE `guid`=41623; +UPDATE `gameobject` SET `position_x`=2262.02, `position_y`=274.943, `position_z`=38.5493, `orientation`=2.80998, `rotation0`=0, `rotation1`=0, `rotation2`=0.986285, `rotation3`=0.16505 WHERE `guid`=41627; +UPDATE `gameobject` SET `position_x`=2275.43, `position_y`=267.01, `position_z`=36.606, `orientation`=6.07375, `rotation0`=0, `rotation1`=0, `rotation2`=-0.104528, `rotation3`=0.994522 WHERE `guid`=41629; +UPDATE `gameobject` SET `position_x`=2277.24, `position_y`=265.913, `position_z`=36.5408, `orientation`=0.226892, `rotation0`=0, `rotation1`=0, `rotation2`=0.113203, `rotation3`=0.993572 WHERE `guid`=41624; +UPDATE `gameobject` SET `position_x`=-1056.54, `position_y`=-302.14, `position_z`=159.03, `orientation`=1.37881, `rotation0`=0, `rotation1`=0, `rotation2`=0.636078, `rotation3`=0.771625 WHERE `guid`=41619; +UPDATE `gameobject` SET `position_x`=-1258.81, `position_y`=63.1073, `position_z`=127.913, `orientation`=4.27606, `rotation0`=0, `rotation1`=0, `rotation2`=-0.843391, `rotation3`=0.5373 WHERE `guid`=41614; + +-- XMasGift03 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2021, 178430, 0, 2278.27, 265.41, 36.8502, 2.60054, 0, 0, 0.96363, 0.267241, 180, 180, 100, 1, 0, 10), -- Tirisfal Glades +(2022, 178430, 0, -8746.57, 1076.75, 90.7267, 4.29351, 0, 0, -0.83867, 0.54464, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2023, 178430, 0, -8748.49, 1073.93, 90.5135, 0.645772, 0, 0, 0.317305, 0.948324, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2027, 178430, 1, -1056.35, -303.894, 159.03, 5.14872, 0, 0, -0.537299, 0.843392, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2028, 178430, 1, -1057.69, -301.574, 159.03, 1.53589, 0, 0, 0.694658, 0.71934, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2030, 178430, 1, -1259.53, 62.3401, 127.802, 4.72984, 0, 0, -0.700909, 0.713251, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2031, 178430, 1, -1256.87, 63.8088, 127.856, 5.74214, 0, 0, -0.267238, 0.963631, 180, 180, 100, 1, 0, 10); -- Thunder Bluff +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2021, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2022, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2023, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2027, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2028, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2030, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2031, 2); +UPDATE `gameobject` SET `position_x`=2274.62, `position_y`=267.351, `position_z`=36.6077, `orientation`=3.00195, `rotation0`=0, `rotation1`=0, `rotation2`=0.997563, `rotation3`=0.0697661 WHERE `guid`=41628; +UPDATE `gameobject` SET `position_x`=2278.55, `position_y`=266.297, `position_z`=36.5609, `orientation`=0.226892, `rotation0`=0, `rotation1`=0, `rotation2`=0.113203, `rotation3`=0.993572 WHERE `guid`=41622; +UPDATE `gameobject` SET `position_x`=2277.76, `position_y`=264.943, `position_z`=36.4706, `orientation`=5.53269, `rotation0`=0, `rotation1`=0, `rotation2`=-0.366501, `rotation3`=0.930418 WHERE `guid`=41625; +UPDATE `gameobject` SET `position_x`=-1055.51, `position_y`=-301.717, `position_z`=159.03, `orientation`=0.698131, `rotation0`=0, `rotation1`=0, `rotation2`=0.34202, `rotation3`=0.939693 WHERE `guid`=41617; +UPDATE `gameobject` SET `position_x`=-1260.03, `position_y`=64.7919, `position_z`=127.68, `orientation`=3.01941, `rotation0`=0, `rotation1`=0, `rotation2`=0.998135, `rotation3`=0.0610518 WHERE `guid`=41615; +DELETE FROM `gameobject` WHERE `guid`=41626; +DELETE FROM `game_event_gameobject` WHERE `guid`=41626; + +-- XMasGift04 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2042, 178431, 0, -8745.3, 1074.13, 90.5256, 1.36136, 0, 0, 0.62932, 0.777146, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2043, 178431, 0, -8749.71, 1074.41, 90.6102, 3.6652, 0, 0, -0.965925, 0.258821, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2045, 178431, 0, -8747.01, 1075.65, 90.6204, 5.67232, 0, 0, -0.300705, 0.953717, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2048, 178431, 1, -1259.65, 63.336, 127.798, 3.61284, 0, 0, -0.972369, 0.233448, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2050, 178431, 1, -1257.42, 65.9227, 127.69, 4.08407, 0, 0, -0.891006, 0.453991, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2051, 178431, 1, -1259.36, 65.8987, 127.636, 6.03884, 0, 0, -0.121869, 0.992546, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2058, 178431, 1, -1257.15, 63.444, 128.18, 0.488691, 0, 0, 0.241921, 0.970296, 180, 180, 100, 1, 0, 10); -- Thunder Bluff +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2042, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2043, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2045, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2048, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2050, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2051, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2058, 2); +UPDATE `gameobject` SET `position_x`=2261.46, `position_y`=274.158, `position_z`=38.5348, `orientation`=1.91986, `rotation0`=0, `rotation1`=0, `rotation2`=0.819152, `rotation3`=0.573577 WHERE `guid`=41382; +UPDATE `gameobject` SET `position_x`=2273.98, `position_y`=266.189, `position_z`=36.5466, `orientation`=0, `rotation0`=0, `rotation1`=0, `rotation2`=0, `rotation3`=1 WHERE `guid`=41377; +UPDATE `gameobject` SET `position_x`=2276.46, `position_y`=264.965, `position_z`=36.4797, `orientation`=4.92183, `rotation0`=0, `rotation1`=0, `rotation2`=-0.62932, `rotation3`=0.777146 WHERE `guid`=41379; +UPDATE `gameobject` SET `position_x`=2276.95, `position_y`=268.002, `position_z`=36.65, `orientation`=4.03171, `rotation0`=0, `rotation1`=0, `rotation2`=-0.902585, `rotation3`=0.430512 WHERE `guid`=41387; +UPDATE `gameobject` SET `position_x`=-1055.11, `position_y`=-303.312, `position_z`=159.03, `orientation`=0.383971, `rotation0`=0, `rotation1`=0, `rotation2`=0.190808, `rotation3`=0.981627 WHERE `guid`=41314; + +-- XMasGift05 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2063, 178432, 0, -8747.97, 1076.02, 90.6388, 0.890117, 0, 0, 0.430511, 0.902586, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2064, 178432, 0, -8749.36, 1073.35, 90.5155, 5.02655, 0, 0, -0.587785, 0.809017, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2066, 178432, 0, -8746.39, 1074.22, 90.5091, 0.191985, 0, 0, 0.0958452, 0.995396, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2088, 178432, 1, -1057.46, -303.54, 159.03, 3.73501, 0, 0, -0.956305, 0.292372, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2089, 178432, 1, -1056.04, -304.756, 159.03, 4.06662, 0, 0, -0.894934, 0.446199, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2092, 178432, 1, -1259.31, 64.1051, 127.791, 2.72271, 0, 0, 0.978148, 0.207912, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2093, 178432, 1, -1258.29, 64.979, 127.786, 5.48033, 0, 0, -0.390731, 0.920505, 180, 180, 100, 1, 0, 10); -- Thunder Bluff +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2063, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2064, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2066, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2088, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2089, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2092, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2093, 2); +UPDATE `gameobject` SET `position_x`=2261.01, `position_y`=273.208, `position_z`=38.5199, `orientation`=5.39307, `rotation0`=0, `rotation1`=0, `rotation2`=-0.430511, `rotation3`=0.902586 WHERE `guid`=41384; +UPDATE `gameobject` SET `position_x`=2276.62, `position_y`=267.17, `position_z`=36.6111, `orientation`=5.46288, `rotation0`=0, `rotation1`=0, `rotation2`=-0.398748, `rotation3`=0.91706 WHERE `guid`=41388; +UPDATE `gameobject` SET `position_x`=2275.39, `position_y`=265.181, `position_z`=36.4726, `orientation`=5.70723, `rotation0`=0, `rotation1`=0, `rotation2`=-0.284015, `rotation3`=0.95882 WHERE `guid`=41378; +UPDATE `gameobject` SET `position_x`=-1055.76, `position_y`=-302.703, `position_z`=159.03, `orientation`=0.767944, `rotation0`=0, `rotation1`=0, `rotation2`=0.374606, `rotation3`=0.927184 WHERE `guid`=41313; +UPDATE `gameobject` SET `position_x`=-1257.77, `position_y`=63.0375, `position_z`=127.946, `orientation`=5.32326, `rotation0`=0, `rotation1`=0, `rotation2`=-0.461748, `rotation3`=0.887011 WHERE `guid`=41316; + +-- XMasGift06 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2110, 178433, 0, -8747.76, 1077.12, 90.7324, 3.75246, 0, 0, -0.953716, 0.300708, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2112, 178433, 0, -8745, 1074.98, 90.6064, 4.20625, 0, 0, -0.861629, 0.507539, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2113, 178433, 0, -8748, 1072.67, 90.3978, 3.21142, 0, 0, -0.999391, 0.0349061, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2117, 178433, 1, -1057.49, -302.52, 159.44, 6.12611, 0, 0, -0.0784588, 0.996917, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2118, 178433, 1, -1057.93, -301.668, 159.357, 2.68781, 0, 0, 0.97437, 0.224951, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2123, 178433, 1, -1258.25, 62.2292, 127.94, 4.36332, 0, 0, -0.819152, 0.573577, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2124, 178433, 1, -1256.56, 62.7944, 127.795, 5.39307, 0, 0, -0.430511, 0.902586, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2125, 178433, 1, -1258.26, 64.931, 128.651, 3.4383, 0, 0, -0.989016, 0.147811, 180, 180, 100, 1, 0, 10); -- Thunder Bluff +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2110, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2112, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2113, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2117, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2118, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2123, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2124, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2125, 2); +UPDATE `gameobject` SET `position_x`=2274.38, `position_y`=265.108, `position_z`=36.4497, `orientation`=0.645772, `rotation0`=0, `rotation1`=0, `rotation2`=0.317305, `rotation3`=0.948324 WHERE `guid`=41375; +UPDATE `gameobject` SET `position_x`=2277.77, `position_y`=267.151, `position_z`=36.6077, `orientation`=2.77507, `rotation0`=0, `rotation1`=0, `rotation2`=0.983254, `rotation3`=0.182238 WHERE `guid`=41385; +UPDATE `gameobject` SET `position_x`=-1056.72, `position_y`=-304.123, `position_z`=159.357, `orientation`=0.0349062, `rotation0`=0, `rotation1`=0, `rotation2`=0.0174522, `rotation3`=0.999848 WHERE `guid`=41312; +UPDATE `gameobject` SET `position_x`=-1260.04, `position_y`=65.2465, `position_z`=127.997, `orientation`=3.52557, `rotation0`=0, `rotation1`=0, `rotation2`=-0.981627, `rotation3`=0.190812 WHERE `guid`=41324; + +-- XMasStocking01 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2127, 178434, 0, -9082.4, 823.71, 114.636, 0.349065, 0, 0, 0.173648, 0.984808, 180, 180, 100, 1, 6, 10), -- Stormwind City +(2128, 178434, 0, -9084.7, 829.405, 114.636, 0.244346, 0, 0, 0.121869, 0.992546, 180, 180, 100, 1, 6, 10), -- Stormwind City +(2130, 178434, 0, -8452.43, 494.524, 105.99, 2.18166, 0, 0, 0.887011, 0.461749, 180, 180, 100, 1, 6, 10), -- Stormwind City +(2131, 178434, 0, -8457.67, 490.354, 105.984, 2.05949, 0, 0, 0.857167, 0.515038, 180, 180, 100, 1, 6, 10), -- Stormwind City +(2133, 178434, 0, -8609.81, 382.833, 109.131, 2.14675, 0, 0, 0.878817, 0.47716, 180, 180, 100, 1, 6, 10), -- Stormwind City +(2134, 178434, 0, -8604.94, 386.712, 109.104, 2.16421, 0, 0, 0.882947, 0.469473, 180, 180, 100, 1, 6, 10); -- Stormwind City +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2127, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2128, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2130, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2131, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2133, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2134, 2); +UPDATE `gameobject` SET `position_x`=2262.5, `position_y`=276.512, `position_z`=38.3189, `orientation`=2.60054, `rotation0`=0, `rotation1`=0, `rotation2`=0.96363, `rotation3`=0.267241 WHERE `guid`=41381; + +-- XMasStocking02 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2144, 178435, 0, -9082.83, 824.757, 114.607, 0.279252, 0, 0, 0.139173, 0.990268, 180, 180, 100, 1, 6, 10), -- Stormwind City +(2145, 178435, 0, -8453.9, 493.354, 105.965, 1.85005, 0, 0, 0.798635, 0.601815, 180, 180, 100, 1, 6, 10), -- Stormwind City +(2146, 178435, 0, -8612.25, 380.898, 109.1, 2.1293, 0, 0, 0.874619, 0.48481, 180, 180, 100, 1, 6, 10), -- Stormwind City +(2147, 178435, 0, -8605.94, 385.918, 109.113, 2.23402, 0, 0, 0.898793, 0.438373, 180, 180, 100, 1, 6, 10); -- Stormwind City +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2144, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2145, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2146, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2147, 2); + +-- XMasStocking03 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2150, 178436, 0, -9083.24, 825.79, 114.625, 0.401425, 0, 0, 0.199368, 0.979925, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2151, 178436, 0, -9085.09, 830.368, 114.61, 0.366518, 0, 0, 0.182235, 0.983255, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2152, 178436, 0, -8456.85, 491.01, 105.977, 2.19911, 0, 0, 0.891006, 0.453991, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2153, 178436, 0, -8610.99, 381.894, 109.13, 2.16421, 0, 0, 0.882947, 0.469473, 180, 180, 100, 1, 0, 10); -- Stormwind City +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2150, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2151, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2152, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2153, 2); + +-- Wreath +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2156, 178437, 0, -8541.71, 459.22, 122.253, 2.23402, 0, 0, 0.898793, 0.438373, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2158, 178437, 0, -8712.76, 465.377, 111.004, 5.32326, 0, 0, -0.461748, 0.887011, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2159, 178437, 0, -8399.86, 677.258, 110.759, 3.78737, 0, 0, -0.948323, 0.317306, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2160, 178437, 1, -1181.29, -91.9861, 172.979, 2.53072, 0, 0, 0.953716, 0.300708, 180, 180, 100, 1, 0, 10), -- Thunder Bluff +(2161, 178437, 1, -1235.7, -89.83, 173.237, 0.488691, 0, 0, 0.241921, 0.970296, 180, 180, 100, 1, 0, 10); -- Thunder Bluff +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2156, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2158, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2159, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2160, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2161, 2); +UPDATE `gameobject` SET `position_x`=-8861.46, `position_y`=576.599, `position_z`=109.647, `orientation`=2.35619, `rotation0`=0, `rotation1`=0, `rotation2`=0.92388, `rotation3`=0.382683 WHERE `guid`=41660; + +-- Lights +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2166, 178438, 0, -9055.89, 831.778, 119.272, 3.50812, 0, 0, -0.983254, 0.182238, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2167, 178438, 0, -9057.16, 835.097, 119.412, 3.49067, 0, 0, -0.984807, 0.173652, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2168, 178438, 0, -8951.18, 981.333, 137.118, 5.48033, 0, 0, -0.390731, 0.920505, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2170, 178438, 0, -8948.97, 983.89, 136.965, 5.39307, 0, 0, -0.430511, 0.902586, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2171, 178438, 0, -8946.24, 985.972, 137.093, 5.39307, 0, 0, -0.430511, 0.902586, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2172, 178438, 0, -8936.93, 993.13, 136.422, 5.23599, 0, 0, -0.5, 0.866025, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2173, 178438, 0, -8939.55, 990.909, 136.777, 5.28835, 0, 0, -0.477159, 0.878817, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2174, 178438, 0, -8933.98, 994.652, 136.309, 5.21854, 0, 0, -0.507538, 0.861629, 180, 180, 100, 1, 0, 10); -- Stormwind City +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2166, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2167, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2168, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2170, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2171, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2172, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2173, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2174, 2); +UPDATE `gameobject` SET `position_x`=2262.82, `position_y`=320.481, `position_z`=40.2215, `orientation`=5.60251, `rotation0`=0, `rotation1`=0, `rotation2`=-0.333807, `rotation3`=0.942641 WHERE `guid`=41390; +UPDATE `gameobject` SET `position_x`=-8849.09, `position_y`=622.721, `position_z`=101.087, `orientation`=0.349065, `rotation0`=0, `rotation1`=0, `rotation2`=0.173648, `rotation3`=0.984808 WHERE `guid`=40916; + +-- Small Forge Flame +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2208, 178443, 30, -1250.52, -310.399, 64.3139, 3.03684, 0, 0, 0.998629, 0.0523532, 180, 180, 100, 1, 0, 10), -- Alterac Valley +(2209, 178443, 30, 649.387, -59.0312, 43.1722, 5.20108, 0, 0, -0.515038, 0.857168, 180, 180, 100, 1, 0, 10); -- Alterac Valley + +-- Lights, Broken +-- Event 2: Feast of Winter Veil +UPDATE `gameobject` SET `position_x`=2261.01, `position_y`=271.304, `position_z`=39.4948, `orientation`=4.17134, `rotation0`=0, `rotation1`=0, `rotation2`=-0.870356, `rotation3`=0.492424 WHERE `guid`=41865; +UPDATE `gameobject` SET `position_x`=2221.76, `position_y`=321.288, `position_z`=47.043, `orientation`=2.54818, `rotation0`=0, `rotation1`=0, `rotation2`=0.956305, `rotation3`=0.292372 WHERE `guid`=41863; +UPDATE `gameobject` SET `position_x`=2273.73, `position_y`=233.259, `position_z`=44.797, `orientation`=3.00195, `rotation0`=0, `rotation1`=0, `rotation2`=0.997563, `rotation3`=0.0697661 WHERE `guid`=41857; +UPDATE `gameobject` SET `position_x`=2263.9, `position_y`=275.988, `position_z`=39.689, `orientation`=1.02974, `rotation0`=0, `rotation1`=0, `rotation2`=0.492423, `rotation3`=0.870356 WHERE `guid`=41864; +UPDATE `gameobject` SET `position_x`=2260.42, `position_y`=317.753, `position_z`=40.3087, `orientation`=2.47837, `rotation0`=0, `rotation1`=0, `rotation2`=0.945518, `rotation3`=0.325568 WHERE `guid`=41870; +UPDATE `gameobject` SET `position_x`=2293.55, `position_y`=243.373, `position_z`=44.9905, `orientation`=6.12611, `rotation0`=0, `rotation1`=0, `rotation2`=-0.0784588, `rotation3`=0.996917 WHERE `guid`=41858; +UPDATE `gameobject` SET `position_x`=2296.19, `position_y`=301.094, `position_z`=81.4187, `orientation`=4.46804, `rotation0`=0, `rotation1`=0, `rotation2`=-0.788011, `rotation3`=0.615662 WHERE `guid`=41880; +UPDATE `gameobject` SET `position_x`=2318.83, `position_y`=266.076, `position_z`=46.8268, `orientation`=2.87979, `rotation0`=0, `rotation1`=0, `rotation2`=0.991445, `rotation3`=0.130528 WHERE `guid`=41869; +UPDATE `gameobject` SET `position_x`=2265.32, `position_y`=352.37, `position_z`=44.8938, `orientation`=1.16937, `rotation0`=0, `rotation1`=0, `rotation2`=0.551936, `rotation3`=0.833886 WHERE `guid`=41871; + +-- Mistletoe +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2232, 178554, 1, -1244.14, -94.2062, 169.519, 1.65806, 0, 0, 0.737277, 0.675591, 180, 180, 100, 1, 0, 10); -- Thunder Bluff +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2232, 2); + +-- Wreath scale 1.20 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2233, 178556, 0, -4869.01, -1018.85, 518.948, 5.39307, 0, 0, -0.430511, 0.902586, 180, 180, 100, 1, 0, 10), -- Ironforge +(2234, 178556, 0, -4832.99, -1062.69, 528.278, 5.39307, 0, 0, -0.430511, 0.902586, 180, 180, 100, 1, 0, 10), -- Ironforge +(2238, 178556, 1, -1420.32, -111.116, 181.054, 5.67232, 0, 0, -0.300705, 0.953717, 180, 180, 100, 1, 0, 10); -- Thunder Bluff +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2233, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2234, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2238, 2); + +-- Christmas Tree (Large Snowy) +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2240, 178558, 0, -5617.38, -507.915, 403.614, 1.11701, 0, 0, 0.529919, 0.848048, 180, 180, 100, 1, 0, 10); -- Dun Morogh +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2240, 2); + +-- Holiday Snow +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2241, 178609, 0, 512.145, -92.2018, 144.56, 4.5204, 0, 0, -0.771625, 0.636078, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2242, 178609, 0, 551.264, -149.821, 144.644, 3.12412, 0, 0, 0.999962, 0.00873464, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2244, 178609, 0, 608.174, -126.985, 136.969, 2.3911, 0, 0, 0.930417, 0.366502, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2245, 178609, 0, 543.742, -210.844, 146.87, 3.22886, 0, 0, -0.999048, 0.0436193, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2246, 178609, 0, 591.574, -207.003, 143.265, 0.785397, 0, 0, 0.382683, 0.92388, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2249, 178609, 0, 562.808, -362.746, 155.566, 4.59022, 0, 0, -0.748956, 0.66262, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2250, 178609, 0, 533.492, -354.658, 160.894, 2.11185, 0, 0, 0.870356, 0.492424, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2252, 178609, 0, 482.378, -338.249, 166.936, 1.85005, 0, 0, 0.798635, 0.601815, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2253, 178609, 0, 445.085, -323.741, 163.664, 4.29351, 0, 0, -0.83867, 0.54464, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2255, 178609, 0, 457.061, -268.043, 157.343, 4.15388, 0, 0, -0.874619, 0.48481, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2261, 178609, 0, 603.466, -510.643, 175.66, 4.50295, 0, 0, -0.777145, 0.629321, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2263, 178609, 0, 194.935, -240.891, 147.536, 0.383971, 0, 0, 0.190808, 0.981627, 60, 60, 100, 1, 0, 10), -- Alterac Mountains +(2264, 178609, 0, 405.5, -255.171, 159.547, 5.14872, 0, 0, -0.537299, 0.843392, 60, 60, 100, 1, 0, 10); -- Alterac Mountains +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2241, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2242, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2244, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2245, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2246, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2249, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2250, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2252, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2253, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2255, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2261, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2263, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2264, 2); +UPDATE `gameobject` SET `position_x`=815.21, `position_y`=-450.838, `position_z`=133.941, `orientation`=3.194, `rotation0`=0, `rotation1`=0, `rotation2`=-0.999657, `rotation3`=0.0262016 WHERE `guid`=42100; +UPDATE `gameobject` SET `position_x`=719.856, `position_y`=-560.284, `position_z`=163.868, `orientation`=0.279252, `rotation0`=0, `rotation1`=0, `rotation2`=0.139173, `rotation3`=0.990268 WHERE `guid`=42095; +UPDATE `gameobject` SET `position_x`=658.658, `position_y`=-557.698, `position_z`=171.221, `orientation`=4.53786, `rotation0`=0, `rotation1`=0, `rotation2`=-0.766044, `rotation3`=0.642789 WHERE `guid`=42102; +UPDATE `gameobject` SET `position_x`=754.528, `position_y`=-648.61, `position_z`=149.558, `orientation`=1.98967, `rotation0`=0, `rotation1`=0, `rotation2`=0.83867, `rotation3`=0.54464 WHERE `guid`=42096; +UPDATE `gameobject` SET `position_x`=822.365, `position_y`=-508.823, `position_z`=141.376, `orientation`=5.39307, `rotation0`=0, `rotation1`=0, `rotation2`=-0.430511, `rotation3`=0.902586 WHERE `guid`=42099; +UPDATE `gameobject` SET `position_x`=881.534, `position_y`=-507.152, `position_z`=134.907, `orientation`=1.25664, `rotation0`=0, `rotation1`=0, `rotation2`=0.587785, `rotation3`=0.809017 WHERE `guid`=42101; + +-- Lights x3 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2266, 178645, 0, -9060.05, 841.657, 119.352, 3.54302, 0, 0, -0.979924, 0.19937, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2267, 178645, 0, -9085.32, 827.946, 119.368, 0.383971, 0, 0, 0.190808, 0.981627, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2268, 178645, 0, -8705.73, 851.331, 103.491, 5.39307, 0, 0, -0.430511, 0.902586, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2270, 178645, 0, -8563.6, 604.25, 109.357, 5.37562, 0, 0, -0.438371, 0.898794, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2271, 178645, 0, -8647.99, 443.477, 109.039, 2.25147, 0, 0, 0.902585, 0.430512, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2272, 178645, 0, -8668.04, 396.925, 109.293, 5.35816, 0, 0, -0.446198, 0.894935, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2273, 178645, 0, -8463.01, 509.91, 110.471, 5.39307, 0, 0, -0.430511, 0.902586, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2274, 178645, 0, -8456.9, 501.865, 110.473, 5.37562, 0, 0, -0.438371, 0.898794, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2275, 178645, 0, -8455.49, 490.953, 110.563, 5.37562, 0, 0, -0.438371, 0.898794, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2276, 178645, 0, -8466.47, 494.299, 110.526, 5.39307, 0, 0, -0.430511, 0.902586, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2277, 178645, 0, -8472.49, 502.288, 110.509, 5.41052, 0, 0, -0.422618, 0.906308, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2279, 178645, 0, -8608.75, 382.625, 113.878, 2.21657, 0, 0, 0.894934, 0.446199, 180, 180, 100, 1, 0, 10); -- Stormwind City +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2266, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2267, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2268, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2270, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2271, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2272, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2273, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2274, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2275, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2276, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2277, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2279, 2); + +-- Wreath scale 0.75 +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2280, 178649, 0, -8851.83, 850.705, 111.139, 5.41052, 0, 0, -0.422618, 0.906308, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2281, 178649, 0, -8942.75, 987.955, 133.911, 5.34071, 0, 0, -0.45399, 0.891007, 180, 180, 100, 1, 0, 10); -- Stormwind City +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2280, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2281, 2); + +-- Christmas Tree (Medium) +-- Event 2: Feast of Winter Veil +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2285, 178667, 0, -8934.1, 972.866, 117.238, 5.02655, 0, 0, -0.587785, 0.809017, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2287, 178667, 0, -8459.27, 504.501, 99.7773, 1.15192, 0, 0, 0.544639, 0.838671, 180, 180, 100, 1, 0, 10); -- Stormwind City +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2285, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2287, 2); + +-- Christmas Tree (Medium) +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2289, 178668, 0, -8872.71, 680.677, 104.949, 6.24828, 0, 0, -0.0174522, 0.999848, 180, 180, 100, 1, 0, 10); -- Stormwind City +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2289, 2); + +-- Alliance Blacksmith Smoke +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2290, 178722, 30, 649.382, -58.908, 47.1585, 3.73501, 0, 0, -0.956305, 0.292372, 180, 180, 100, 1, 0, 10); -- Alterac Valley + +-- Lights x3, Broken +-- Event 2: Feast of Winter Veil +UPDATE `gameobject` SET `position_x`=2285.62, `position_y`=272.123, `position_z`=46.343, `orientation`=1.309, `rotation0`=0, `rotation1`=0, `rotation2`=0.608761, `rotation3`=0.793354 WHERE `guid`=41866; +UPDATE `gameobject` SET `position_x`=2291.17, `position_y`=264.637, `position_z`=48.2484, `orientation`=6.16101, `rotation0`=0, `rotation1`=0, `rotation2`=-0.0610485, `rotation3`=0.998135 WHERE `guid`=41855; +UPDATE `gameobject` SET `position_x`=2289.63, `position_y`=289.637, `position_z`=48.1491, `orientation`=1.309, `rotation0`=0, `rotation1`=0, `rotation2`=0.608761, `rotation3`=0.793354 WHERE `guid`=41888; +UPDATE `gameobject` SET `position_x`=2301.56, `position_y`=304.113, `position_z`=46.9621, `orientation`=5.95157, `rotation0`=0, `rotation1`=0, `rotation2`=-0.165047, `rotation3`=0.986286 WHERE `guid`=41889; +UPDATE `gameobject` SET `position_x`=2317.04, `position_y`=258.637, `position_z`=47.4621, `orientation`=2.89725, `rotation0`=0, `rotation1`=0, `rotation2`=0.992546, `rotation3`=0.12187 WHERE `guid`=41868; +UPDATE `gameobject` SET `position_x`=2269.3, `position_y`=342.007, `position_z`=41.7659, `orientation`=2.70526, `rotation0`=0, `rotation1`=0, `rotation2`=0.976295, `rotation3`=0.216442 WHERE `guid`=41881; +UPDATE `gameobject` SET `position_x`=2328.21, `position_y`=277.215, `position_z`=44.2984, `orientation`=6.03884, `rotation0`=0, `rotation1`=0, `rotation2`=-0.121869, `rotation3`=0.992546 WHERE `guid`=41885; + +-- Smokywood Pastures +-- Event 2: Feast of Winter Veil +UPDATE `gameobject` SET `position_x`=-1261.01, `position_y`=59.4097, `position_z`=127.041, `orientation`=4.20625, `rotation0`=0, `rotation1`=0, `rotation2`=-0.861629, `rotation3`=0.507539 WHERE `guid`=41701; + +-- Lights +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2318, 178924, 0, -9003.21, 943.705, 122.143, 2.70526, 0, 0, 0.976295, 0.216442, 180, 180, 100, 1, 0, 10), -- Stormwind City +(2326, 178924, 0, -9004.31, 940.953, 122.217, 2.74016, 0, 0, 0.979924, 0.19937, 180, 180, 100, 1, 0, 10); -- Stormwind City +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2318, 2); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (2326, 2); + +-- [PH] Alliance A1 Tower Banner BIG +UPDATE `gameobject` SET `position_x`=557.227, `position_y`=-86.8521, `position_z`=62.1767, `orientation`=6.03884, `rotation0`=0, `rotation1`=0, `rotation2`=-0.121869, `rotation3`=0.992546 WHERE `guid`=90322; + +-- Alliance Banner +UPDATE `gameobject` SET `position_x`=203.238, `position_y`=-360.264, `position_z`=56.3862, `orientation`=5.41052, `rotation0`=0, `rotation1`=0, `rotation2`=-0.422618, `rotation3`=0.906308 WHERE `guid`=90308; + +-- Alliance Banner +UPDATE `gameobject` SET `position_x`=-152.434, `position_y`=-441.615, `position_z`=40.3971, `orientation`=4.34587, `rotation0`=0, `rotation1`=0, `rotation2`=-0.824126, `rotation3`=0.566406 WHERE `guid`=90309; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=-1297.72, `position_y`=-266.741, `position_z`=114.151, `orientation`=3.31614, `rotation0`=0, `rotation1`=0, `rotation2`=-0.996194, `rotation3`=0.087165 WHERE `guid`=90313; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=-1302.87, `position_y`=-316.968, `position_z`=113.867, `orientation`=2.00713, `rotation0`=0, `rotation1`=0, `rotation2`=0.843391, `rotation3`=0.5373 WHERE `guid`=90312; + +-- Celebras Blue Aura +UPDATE `gameobject` SET `position_x`=650.848, `position_y`=74.0184, `position_z`=-86.8285, `orientation`=6.26573, `rotation0`=0, `rotation1`=0, `rotation2`=-0.00872612, `rotation3`=0.999962 WHERE `guid`=1262070; + +-- Bauble Aura +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2354, 178984, 1, 7713.5, -2534.34, 398.51, 5.84685, 0, 0, -0.216439, 0.976296, 900, 900, 100, 1, 0, 10), -- Moonglade +(2355, 178984, 1, 7592.7, -2779.52, 401.488, 1.27409, 0, 0, 0.594822, 0.803857, 900, 900, 100, 1, 0, 10), -- Moonglade +(2356, 178984, 1, 7666.62, -2584.24, 400.925, 2.67035, 0, 0, 0.972369, 0.233448, 900, 900, 100, 1, 0, 10), -- Moonglade +(2357, 178984, 1, 7666.5, -2679.52, 392.206, 0, 0, 0, 0, 1, 900, 900, 100, 1, 0, 10), -- Moonglade +(2358, 178984, 1, 7769.78, -2487.91, 417.833, 5.044, 0, 0, -0.580703, 0.814116, 900, 900, 100, 1, 0, 10); -- Moonglade + +-- Stormpike Banner +UPDATE `gameobject` SET `position_x`=63.2712, `position_y`=5.83762, `position_z`=-4.09622, `orientation`=2.21657, `rotation0`=0, `rotation1`=0, `rotation2`=0.894934, `rotation3`=0.446199 WHERE `guid`=90202; + +-- Frostwolf Banner +UPDATE `gameobject` SET `position_x`=-1551.88, `position_y`=-364.188, `position_z`=65.5934, `orientation`=4.32842, `rotation0`=0, `rotation1`=0, `rotation2`=-0.829037, `rotation3`=0.559194 WHERE `guid`=90203; + +-- [PH] Alliance Graveyard Mid Banner BIG +UPDATE `gameobject` SET `position_x`=-216.212, `position_y`=-90.7064, `position_z`=79.8071, `orientation`=1.16937, `rotation0`=0, `rotation1`=0, `rotation2`=0.551936, `rotation3`=0.833886 WHERE `guid`=90412; +UPDATE `gameobject` SET `position_x`=-201.284, `position_y`=-134.57, `position_z`=78.8485, `orientation`=5.46288, `rotation0`=0, `rotation1`=0, `rotation2`=-0.398748, `rotation3`=0.91706 WHERE `guid`=90411; +UPDATE `gameobject` SET `position_x`=-191.017, `position_y`=-129.963, `position_z`=78.8642, `orientation`=5.23599, `rotation0`=0, `rotation1`=0, `rotation2`=-0.5, `rotation3`=0.866025 WHERE `guid`=90410; + +-- [PH] Horde Graveyard Mid Banner BIG +UPDATE `gameobject` SET `position_x`=-190.941, `position_y`=-129.869, `position_z`=78.9326, `orientation`=5.21854, `rotation0`=0, `rotation1`=0, `rotation2`=-0.507538, `rotation3`=0.861629 WHERE `guid`=90418; +UPDATE `gameobject` SET `position_x`=-201.444, `position_y`=-134.444, `position_z`=78.9321, `orientation`=5.42797, `rotation0`=0, `rotation1`=0, `rotation2`=-0.414693, `rotation3`=0.909961 WHERE `guid`=90419; +UPDATE `gameobject` SET `position_x`=-215.741, `position_y`=-90.9973, `position_z`=80.0894, `orientation`=1.16937, `rotation0`=0, `rotation1`=0, `rotation2`=0.551936, `rotation3`=0.833886 WHERE `guid`=90420; + +-- Campfire +UPDATE `gameobject` SET `position_x`=-2693.04, `position_y`=-4278.89, `position_z`=3.84184, `orientation`=3.93572, `rotation0`=0, `rotation1`=0, `rotation2`=-0.9222, `rotation3`=0.386713 WHERE `guid`=6608; + +-- Campfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2521, 179145, 30, 386.595, 244.761, 15.5951, 3.06303, 0.032527, 0.0510731, 0.997457, 0.0376024, 180, 180, 100, 1, 0, 10); -- Alterac Valley + +-- Campfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2522, 179146, 30, 430.327, 276.169, 10.7601, 3.1412, -0.0435858, 0.0392218, 0.998278, 0.0019068, 180, 180, 100, 1, 0, 10); -- Alterac Valley + +-- Giant Clam +UPDATE `gameobject` SET `position_x`=-79.3033, `position_y`=1211.73, `position_z`=-122.818, `orientation`=0.401425, `rotation0`=0, `rotation1`=0, `rotation2`=0.199368, `rotation3`=0.979925 WHERE `guid`=20772; + +-- Alliance Banner +UPDATE `gameobject` SET `position_x`=77.5044, `position_y`=-404.587, `position_z`=46.8242, `orientation`=2.28638, `rotation0`=0, `rotation1`=0, `rotation2`=0.909961, `rotation3`=0.414694 WHERE `guid`=90358; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=77.7979, `position_y`=-404.696, `position_z`=46.9128, `orientation`=5.42797, `rotation0`=0, `rotation1`=0, `rotation2`=-0.414693, `rotation3`=0.909961 WHERE `guid`=90372; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=669.295, `position_y`=-294.038, `position_z`=30.2897, `orientation`=5.91667, `rotation0`=0, `rotation1`=0, `rotation2`=-0.182235, `rotation3`=0.983255 WHERE `guid`=90398; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=-202.394, `position_y`=-113.033, `position_z`=78.4825, `orientation`=5.02655, `rotation0`=0, `rotation1`=0, `rotation2`=-0.587785, `rotation3`=0.809017 WHERE `guid`=90388; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=-202.613, `position_y`=-112.59, `position_z`=78.4896, `orientation`=5.02655, `rotation0`=0, `rotation1`=0, `rotation2`=-0.587785, `rotation3`=0.809017 WHERE `guid`=90388; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=77.8013, `position_y`=-404.7, `position_z`=46.9147, `orientation`=5.41052, `rotation0`=0, `rotation1`=0, `rotation2`=-0.422618, `rotation3`=0.906308 WHERE `guid`=90386; + +-- Deeprun Chest +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2548, 179345, 369, 57.4358, 1206.98, -121.589, 3.63029, 0, 0, -0.970295, 0.241925, 180, 180, 100, 1, 0, 10); -- Deeprun Tram + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=553.822, `position_y`=-78.7675, `position_z`=51.9387, `orientation`=5.21854, `rotation0`=0, `rotation1`=0, `rotation2`=-0.507538, `rotation3`=0.861629 WHERE `guid`=90318; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=674.047, `position_y`=-143.156, `position_z`=63.6614, `orientation`=0.994837, `rotation0`=0, `rotation1`=0, `rotation2`=0.477159, `rotation3`=0.878817 WHERE `guid`=90319; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=-1297.69, `position_y`=-266.73, `position_z`=114.151, `orientation`=3.35105, `rotation0`=0, `rotation1`=0, `rotation2`=-0.994521, `rotation3`=0.104536 WHERE `guid`=90317; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=638.606, `position_y`=-32.1506, `position_z`=46.0993, `orientation`=4.67748, `rotation0`=0, `rotation1`=0, `rotation2`=-0.719339, `rotation3`=0.694659 WHERE `guid`=90368; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=638.657, `position_y`=-32.2294, `position_z`=46.0904, `orientation`=4.66003, `rotation0`=0, `rotation1`=0, `rotation2`=-0.725374, `rotation3`=0.688355 WHERE `guid`=90382; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=-1402.28, `position_y`=-307.38, `position_z`=89.442, `orientation`=0.191985, `rotation0`=0, `rotation1`=0, `rotation2`=0.0958452, `rotation3`=0.995396 WHERE `guid`=90394; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=-1402.19, `position_y`=-307.467, `position_z`=89.4419, `orientation`=0.191985, `rotation0`=0, `rotation1`=0, `rotation2`=0.0958452, `rotation3`=0.995396 WHERE `guid`=90380; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=-611.523, `position_y`=-396.819, `position_z`=60.8584, `orientation`=6.24828, `rotation0`=0, `rotation1`=0, `rotation2`=-0.0174522, `rotation3`=0.999848 WHERE `guid`=90390; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=-612.672, `position_y`=-396.693, `position_z`=60.8584, `orientation`=3.08918, `rotation0`=0, `rotation1`=0, `rotation2`=0.999657, `rotation3`=0.0262016 WHERE `guid`=90376; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=-612.661, `position_y`=-396.699, `position_z`=60.8584, `orientation`=6.24828, `rotation0`=0, `rotation1`=0, `rotation2`=-0.0174522, `rotation3`=0.999848 WHERE `guid`=90390; + +-- Broken Trap +UPDATE `gameobject` SET `position_x`=558.806, `position_y`=550.065, `position_z`=-25.4008, `orientation`=3.14159, `rotation0`=0, `rotation1`=0, `rotation2`=-1, `rotation3`=0 WHERE `guid`=396405; + +-- Ogre Tannin Basket +UPDATE `gameobject` SET `position_x`=599.299, `position_y`=605.798, `position_z`=-4.7527, `orientation`=0.191985, `rotation0`=0, `rotation1`=0, `rotation2`=0.0958452, `rotation3`=0.995396 WHERE `guid`=44740; + +-- Doodad_CorruptedCrystalVine01 +UPDATE `gameobject` SET `position_x`=277.695, `position_y`=-423.25, `position_z`=-120.04, `orientation`=3.35977, `rotation0`=0, `rotation1`=0, `rotation2`=-0.994056, `rotation3`=0.108872 WHERE `guid`=397167; + +-- Doodad_DireMaulBossForceField01 +UPDATE `gameobject` SET `position_x`=-38.965, `position_y`=813.709, `position_z`=-27.3178, `orientation`=0, `rotation0`=0, `rotation1`=0, `rotation2`=0, `rotation3`=1 WHERE `guid`=264399; + +-- Doodad_DireMaulCrystalGenerator04 +UPDATE `gameobject` SET `position_x`=78.1388, `position_y`=737.402, `position_z`=-24.6216, `orientation`=0, `rotation0`=0, `rotation1`=0, `rotation2`=0, `rotation3`=1 WHERE `guid`=262115; + +-- Doodad_DireMaulCrystalGenerator05 +UPDATE `gameobject` SET `position_x`=-155.433, `position_y`=734.166, `position_z`=-24.6216, `orientation`=0, `rotation0`=0, `rotation1`=0, `rotation2`=0, `rotation3`=1 WHERE `guid`=262117; + +-- Doodad_DiremaulMagicVortex01 +UPDATE `gameobject` SET `position_x`=-38.7563, `position_y`=812.587, `position_z`=-3.8761, `orientation`=0, `rotation0`=0, `rotation1`=0, `rotation2`=0, `rotation3`=1 WHERE `guid`=397151; + +-- Knot's Ball and Chain +UPDATE `gameobject` SET `position_x`=581.241, `position_y`=524.321, `position_z`=-25.4027, `orientation`=3.49067, `rotation0`=0, `rotation1`=0, `rotation2`=-0.984807, `rotation3`=0.173652 WHERE `guid`=396421; + +-- Fengus's Chest +UPDATE `gameobject` SET `position_x`=380.615, `position_y`=260.057, `position_z`=11.4395, `orientation`=5.2709, `rotation0`=0, `rotation1`=0, `rotation2`=-0.484809, `rotation3`=0.87462 WHERE `guid`=35832; + +-- Treasure of the Shen'dralar +UPDATE `gameobject` SET `position_x`=129.481, `position_y`=544.967, `position_z`=-48.4663, `orientation`=1.62316, `rotation0`=0, `rotation1`=0, `rotation2`=0.725374, `rotation3`=0.688355 WHERE `guid`=11921; + +-- Skeletal Remains of Kariel Winthalus +UPDATE `gameobject` SET `position_x`=163.038, `position_y`=530.182, `position_z`=-48.467, `orientation`=5.02655, `rotation0`=0, `rotation1`=0, `rotation2`=-0.587785, `rotation3`=0.809017 WHERE `guid`=44739; + +-- The Prince's Chest +UPDATE `gameobject` SET `position_x`=116.135, `position_y`=638.836, `position_z`=-48.467, `orientation`=5.49779, `rotation0`=0, `rotation1`=0, `rotation2`=-0.382683, `rotation3`=0.92388 WHERE `guid`=396408; + +-- A Dusty Tome +UPDATE `gameobject` SET `position_x`=118.018, `position_y`=-261.472, `position_z`=-4.14639, `orientation`=0.087266, `rotation0`=0, `rotation1`=0, `rotation2`=0.0436192, `rotation3`=0.999048 WHERE `guid`=100107; +UPDATE `gameobject` SET `position_x`=512.784, `position_y`=588.036, `position_z`=-25.4023, `orientation`=3.28124, `rotation0`=0, `rotation1`=0, `rotation2`=-0.997563, `rotation3`=0.0697661 WHERE `guid`=100109; + +-- Door +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2902, 179550, 429, 83.2552, 630.546, -24.6315, 5.64614, 0, 0, -0.313164, 0.949699, 180, 180, 100, 1, 0, 10); -- Dire Maul + +-- Schematic: Field Repair Bot 74A +UPDATE `gameobject` SET `position_x`=841.297, `position_y`=10.7487, `position_z`=-53.7327, `orientation`=1.71042, `rotation0`=0, `rotation1`=0, `rotation2`=0.754709, `rotation3`=0.656059 WHERE `guid`=563; + +-- Core Fragment +UPDATE `gameobject` SET `position_x`=1128.01, `position_y`=-471.763, `position_z`=-104.032, `orientation`=3.01941, `rotation0`=0, `rotation1`=0, `rotation2`=0.998135, `rotation3`=0.0610518 WHERE `guid`=234739; + +-- Prince's Chest Aura +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2912, 179563, 429, 116.105, 638.89, -48.467, 4.5204, 0, 0, -0.771625, 0.636078, 180, 180, 100, 1, 0, 10); -- Dire Maul + +-- Gordok Tribute +UPDATE `gameobject` SET `position_x`=808.37, `position_y`=482.128, `position_z`=37.3182, `orientation`=3.194, `rotation0`=0, `rotation1`=0, `rotation2`=-0.999657, `rotation3`=0.0262016 WHERE `guid`=396409; + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241219150854_world.sql b/sql/migrations/20241219150854_world.sql new file mode 100644 index 00000000000..1dec5561ea0 --- /dev/null +++ b/sql/migrations/20241219150854_world.sql @@ -0,0 +1,22 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241219150854'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241219150854'); +-- Add your query below. + + +-- Remove Double Mail Vest from Mithril Lockbox. +DELETE FROM `reference_loot_template` WHERE `entry`=2061; +DELETE FROM `item_loot_template` WHERE `item`=2061; + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241226150330_world.sql b/sql/migrations/20241226150330_world.sql new file mode 100644 index 00000000000..5e5b77c7ede --- /dev/null +++ b/sql/migrations/20241226150330_world.sql @@ -0,0 +1,582 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241226150330'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241226150330'); +-- Add your query below. + + +-- Earth Elemental Rift +-- Event 70: Elemental Invasion: Earth (Azshara) +DELETE FROM `gameobject` WHERE `id`=179664; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(399355, 179664, 1, 4531.51, -7096.53, 102.136, 4.46804, 0, 0, -0.788011, 0.615662, 25, 25, 100, 1, 2, 10), +(399356, 179664, 1, 4609.79, -7151.82, 115.72, 5.75959, 0, 0, -0.258819, 0.965926, 25, 25, 100, 1, 2, 10), +(399357, 179664, 1, 4688.51, -7310.85, 87.5106, 0.401425, 0, 0, 0.199368, 0.979925, 25, 25, 100, 1, 2, 10), +(399358, 179664, 1, 4714.12, -7420.39, 73.3744, 0.314158, 0, 0, 0.156434, 0.987688, 25, 25, 100, 1, 2, 10), +(399359, 179664, 1, 4606.7, -7423.01, 89.4339, 2.42601, 0, 0, 0.936672, 0.350207, 25, 25, 100, 1, 2, 10), +(399360, 179664, 1, 4515.68, -7416.42, 82.5434, 4.97419, 0, 0, -0.608761, 0.793354, 25, 25, 100, 1, 2, 10), +(399361, 179664, 1, 4553.76, -7269.88, 112.396, 3.29869, 0, 0, -0.996917, 0.0784664, 25, 25, 100, 1, 2, 10), +(399362, 179664, 1, 4751.65, -7079.59, 92.7444, 2.30383, 0, 0, 0.913545, 0.406738, 25, 25, 100, 1, 2, 10); +DELETE FROM `game_event_gameobject` WHERE `guid` IN (399363, 399364); + +-- Fire Elemental Rift +-- Event 68: Elemental Invasion: Fire (Un'goro Crater) +DELETE FROM `gameobject` WHERE `id`=179666; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(399354, 179666, 1, -7347.25, -1334.56, -263.032, 3.3685, 0, 0, -0.993571, 0.113208, 25, 25, 100, 1, 2, 10), +(399353, 179666, 1, -7340.23, -1488.26, -257.98, 0.663223, 0, 0, 0.325567, 0.945519, 25, 25, 100, 1, 2, 10), +(399352, 179666, 1, -7331.47, -1196.34, -265.41, 2.58308, 0, 0, 0.961261, 0.27564, 25, 25, 100, 1, 2, 10), +(399351, 179666, 1, -7185.73, -1108.07, -271.805, 0.471238, 0, 0, 0.233445, 0.97237, 25, 25, 100, 1, 2, 10), +(399350, 179666, 1, -7105.06, -1550.73, -272.101, 0, 0, 0, 0, 1, 25, 25, 100, 1, 2, 10), +(399349, 179666, 1, -7076.77, -1235.5, -261.146, 6.17847, 0, 0, -0.0523357, 0.99863, 25, 25, 100, 1, 2, 10), +(399348, 179666, 1, -7007.57, -1393.05, -262.891, 2.67035, 0, 0, 0.972369, 0.233448, 25, 25, 100, 1, 2, 10); +DELETE FROM `game_event_gameobject` WHERE `guid` IN (399347, 399346, 399345, 399344, 399343, 399342, 399341, 399340); + +-- Warlock Mount Ritual Circle +UPDATE `gameobject` SET `position_x`=-38.5911, `position_y`=812.632, `position_z`=-29.5358, `orientation`=0.401425, `rotation0`=0, `rotation1`=0, `rotation2`=0.199368, `rotation3`=0.979925 WHERE `guid`=99784; + +-- Warlock Mount Quest Symbol 1 +UPDATE `gameobject` SET `position_x`=-57.1792, `position_y`=812.96, `position_z`=-29.5358, `orientation`=4.27606, `rotation0`=0, `rotation1`=0, `rotation2`=-0.843391, `rotation3`=0.5373 WHERE `guid`=99779; +UPDATE `gameobject` SET `position_x`=-28.8647, `position_y`=828.021, `position_z`=-29.5358, `orientation`=4.27606, `rotation0`=0, `rotation1`=0, `rotation2`=-0.843391, `rotation3`=0.5373 WHERE `guid`=99776; +UPDATE `gameobject` SET `position_x`=-25.8848, `position_y`=798.921, `position_z`=-29.5358, `orientation`=4.27606, `rotation0`=0, `rotation1`=0, `rotation2`=-0.843391, `rotation3`=0.5373 WHERE `guid`=99782; + +-- Warlock Mount Quest Symbol 2 +UPDATE `gameobject` SET `position_x`=-50.8857, `position_y`=826.376, `position_z`=-29.5358, `orientation`=4.27606, `rotation0`=0, `rotation1`=0, `rotation2`=-0.843391, `rotation3`=0.5373 WHERE `guid`=99781; +UPDATE `gameobject` SET `position_x`=-21.8534, `position_y`=820.043, `position_z`=-29.5358, `orientation`=4.27606, `rotation0`=0, `rotation1`=0, `rotation2`=-0.843391, `rotation3`=0.5373 WHERE `guid`=99778; +UPDATE `gameobject` SET `position_x`=-37.3899, `position_y`=793.225, `position_z`=-29.5358, `orientation`=4.27606, `rotation0`=0, `rotation1`=0, `rotation2`=-0.843391, `rotation3`=0.5373 WHERE `guid`=99775; + +-- Warlock Mount Quest Symbol 3 +UPDATE `gameobject` SET `position_x`=-38.9241, `position_y`=831.486, `position_z`=-29.5358, `orientation`=4.27606, `rotation0`=0, `rotation1`=0, `rotation2`=-0.843391, `rotation3`=0.5373 WHERE `guid`=99777; +UPDATE `gameobject` SET `position_x`=-20.693, `position_y`=807.962, `position_z`=-29.5358, `orientation`=4.27606, `rotation0`=0, `rotation1`=0, `rotation2`=-0.843391, `rotation3`=0.5373 WHERE `guid`=99774; +UPDATE `gameobject` SET `position_x`=-53.5593, `position_y`=801.216, `position_z`=-29.5358, `orientation`=4.27606, `rotation0`=0, `rotation1`=0, `rotation2`=-0.843391, `rotation3`=0.5373 WHERE `guid`=99780; + +-- Wheel of the Black March +UPDATE `gameobject` SET `position_x`=-46.7888, `position_y`=822.351, `position_z`=-29.5358, `orientation`=5.42797, `rotation0`=0, `rotation1`=0, `rotation2`=-0.414693, `rotation3`=0.909961 WHERE `guid`=99786; + +-- Doomsday Candle +UPDATE `gameobject` SET `position_x`=-43.4643, `position_y`=800.206, `position_z`=-29.5358, `orientation`=0.698131, `rotation0`=0, `rotation1`=0, `rotation2`=0.34202, `rotation3`=0.939693 WHERE `guid`=99785; + +-- Bell of Dethmoora +UPDATE `gameobject` SET `position_x`=-26.4932, `position_y`=814.841, `position_z`=-29.5358, `orientation`=0.59341, `rotation0`=0, `rotation1`=0, `rotation2`=0.292371, `rotation3`=0.956305 WHERE `guid`=99787; + +-- Cauldron +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2832, 179700, 0, -11548.4, -1247.55, 78.2675, 2.522, 0, 0, 0.952395, 0.304865, 180, 180, 100, 1, 0, 10); -- Stranglethorn Vale + +-- Cache of the Firelord +UPDATE `gameobject` SET `position_x`=756.897, `position_y`=-1180.7, `position_z`=-118.596, `orientation`=2.91469, `rotation0`=0, `rotation1`=0, `rotation2`=0.993571, `rotation3`=0.113208 WHERE `guid`=362148; + +-- Campfire +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2839, 179945, 30, -1070.53, -617.908, 51.3249, 5.83813, 0, 0, -0.220697, 0.975342, 180, 180, 100, 1, 3, 10); -- Alterac Valley + +-- Spider Egg +UPDATE `gameobject` SET `position_x`=-12284.4, `position_y`=-1636.02, `position_z`=134.073, `orientation`=4.03171, `rotation0`=0, `rotation1`=0, `rotation2`=-0.902585, `rotation3`=0.430512 WHERE `guid`=28696; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=977.05, `position_y`=1046.52, `position_z`=-44.8254, `orientation`=0.541051, `rotation0`=0, `rotation1`=0, `rotation2`=0.267238, `rotation3`=0.963631 WHERE `guid`=90025; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=977.01, `position_y`=1046.62, `position_z`=-44.8172, `orientation`=0.523598, `rotation0`=0, `rotation1`=0, `rotation2`=0.258819, `rotation3`=0.965926 WHERE `guid`=90024; + +-- Alliance Banner +UPDATE `gameobject` SET `position_x`=806.187, `position_y`=874.256, `position_z`=-55.9836, `orientation`=0.837757, `rotation0`=0, `rotation1`=0, `rotation2`=0.406736, `rotation3`=0.913546 WHERE `guid`=90030; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=806.201, `position_y`=874.248, `position_z`=-55.9825, `orientation`=0.837757, `rotation0`=0, `rotation1`=0, `rotation2`=0.406736, `rotation3`=0.913546 WHERE `guid`=90033; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=806.248, `position_y`=874.217, `position_z`=-55.9937, `orientation`=0.837757, `rotation0`=0, `rotation1`=0, `rotation2`=0.406736, `rotation3`=0.913546 WHERE `guid`=90032; + +-- Alliance Banner +UPDATE `gameobject` SET `position_x`=1146.93, `position_y`=848.185, `position_z`=-110.914, `orientation`=5.5676, `rotation0`=0, `rotation1`=0, `rotation2`=-0.350207, `rotation3`=0.936672 WHERE `guid`=90046; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=1146.93, `position_y`=848.185, `position_z`=-110.916, `orientation`=2.42601, `rotation0`=0, `rotation1`=0, `rotation2`=0.936672, `rotation3`=0.350207 WHERE `guid`=90047; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=1146.93, `position_y`=848.189, `position_z`=-110.918, `orientation`=5.55015, `rotation0`=0, `rotation1`=0, `rotation2`=-0.358368, `rotation3`=0.93358 WHERE `guid`=90048; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=856.157, `position_y`=1148.91, `position_z`=11.2085, `orientation`=3.97935, `rotation0`=0, `rotation1`=0, `rotation2`=-0.913545, `rotation3`=0.406738 WHERE `guid`=90039; + +-- Alliance Banner +UPDATE `gameobject` SET `position_x`=856.15, `position_y`=1148.92, `position_z`=11.1892, `orientation`=3.97935, `rotation0`=0, `rotation1`=0, `rotation2`=-0.913545, `rotation3`=0.406738 WHERE `guid`=90038; + +-- Horde Banner +UPDATE `gameobject` SET `position_x`=856.166, `position_y`=1148.91, `position_z`=11.2066, `orientation`=3.97935, `rotation0`=0, `rotation1`=0, `rotation2`=-0.913545, `rotation3`=0.406738 WHERE `guid`=90040; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=1166.77, `position_y`=1200.15, `position_z`=-56.701, `orientation`=4.03171, `rotation0`=0, `rotation1`=0, `rotation2`=-0.902585, `rotation3`=0.430512 WHERE `guid`=90017; + +-- Blacksmith Banner +UPDATE `gameobject` SET `position_x`=977.08, `position_y`=1046.54, `position_z`=-44.8303, `orientation`=3.6652, `rotation0`=0, `rotation1`=0, `rotation2`=-0.965925, `rotation3`=0.258821 WHERE `guid`=90029; + +-- Sungrass +-- Pool 1035: Herbs in Zul'Gurub +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2955, 180164, 309, -12156, -1466.72, 131.101, 4.88692, 0, 0, -0.642787, 0.766045, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2956, 180164, 309, -12352.3, -1672.73, 131.178, 2.75761, 0, 0, 0.981627, 0.190812, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2958, 180164, 309, -11615, -1846.41, 41.4148, 3.07177, 0, 0, 0.999391, 0.0349061, 604800, 604800, 100, 1, 5, 10); -- Zul'Gurub +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2955, 1035, 0, 'Sungrass', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2956, 1035, 0, 'Sungrass', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2958, 1035, 0, 'Sungrass', 0, 5, 10); + +-- Purple Lotus +-- Pool 1035: Herbs in Zul'Gurub +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2959, 180165, 309, -11657.7, -1565.71, 41.4168, 4.15388, 0, 0, -0.874619, 0.48481, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2961, 180165, 309, -11995.2, -1621.96, 33.2566, 4.32842, 0, 0, -0.829037, 0.559194, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2962, 180165, 309, -11972.8, -1553, 40.8403, 4.67748, 0, 0, -0.719339, 0.694659, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2963, 180165, 309, -11944.6, -1760.67, 53.5194, 4.39823, 0, 0, -0.809016, 0.587786, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2965, 180165, 309, -11688.1, -1941.78, 56.86, 4.36332, 0, 0, -0.819152, 0.573577, 604800, 604800, 100, 1, 5, 10); -- Zul'Gurub +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2959, 1035, 0, 'Purple Lotus', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2961, 1035, 0, 'Purple Lotus', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2962, 1035, 0, 'Purple Lotus', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2963, 1035, 0, 'Purple Lotus', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2965, 1035, 0, 'Purple Lotus', 0, 5, 10); + +-- Mountain Silversage +-- Pool 1035: Herbs in Zul'Gurub +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2967, 180166, 309, -12062.2, -1433.83, 130.23, 3.49067, 0, 0, -0.984807, 0.173652, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2968, 180166, 309, -12255.3, -1963.61, 136.048, 0.610863, 0, 0, 0.300705, 0.953717, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2971, 180166, 309, -12346.8, -1965, 133.195, 0.453785, 0, 0, 0.224951, 0.97437, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2973, 180166, 309, -11561.3, -1805.51, 62.4128, 3.28124, 0, 0, -0.997563, 0.0697661, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2974, 180166, 309, -11657, -1457.02, 61.0002, 4.53786, 0, 0, -0.766044, 0.642789, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2975, 180166, 309, -11526.8, -1493.28, 80.0608, 2.54818, 0, 0, 0.956305, 0.292372, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2976, 180166, 309, -11804.4, -1902, 50.6509, 5.93412, 0, 0, -0.173648, 0.984808, 604800, 604800, 100, 1, 5, 10); -- Zul'Gurub +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2967, 1035, 0, 'Mountain Silversage', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2968, 1035, 0, 'Mountain Silversage', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2971, 1035, 0, 'Mountain Silversage', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2974, 1035, 0, 'Mountain Silversage', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2975, 1035, 0, 'Mountain Silversage', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2976, 1035, 0, 'Mountain Silversage', 0, 5, 10); + +-- Golden Sansam +-- Pool 1035: Herbs in Zul'Gurub +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2977, 180167, 309, -11656.2, -1572.16, 39.8062, 3.94445, 0, 0, -0.920505, 0.390732, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2979, 180167, 309, -11985.6, -1717.95, 32.2836, 5.53269, 0, 0, -0.366501, 0.930418, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2980, 180167, 309, -11558.2, -1739.45, 38.6247, 5.75959, 0, 0, -0.258819, 0.965926, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2981, 180167, 309, -12002.8, -1489.2, 80.3559, 0.331611, 0, 0, 0.165047, 0.986286, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2982, 180167, 309, -12288.3, -1625.12, 130.261, 1.309, 0, 0, 0.608761, 0.793354, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2983, 180167, 309, -12197.3, -1983.1, 132.6, 4.83456, 0, 0, -0.66262, 0.748956, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2984, 180167, 309, -11583.7, -1663.03, 50.6409, 5.21854, 0, 0, -0.507538, 0.861629, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2985, 180167, 309, -11786.7, -1896.81, 48.9827, 3.31614, 0, 0, -0.996194, 0.087165, 604800, 604800, 100, 1, 5, 10); -- Zul'Gurub +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2977, 1035, 0, 'Golden Sansam', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2979, 1035, 0, 'Golden Sansam', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2980, 1035, 0, 'Golden Sansam', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2981, 1035, 0, 'Golden Sansam', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2982, 1035, 0, 'Golden Sansam', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2983, 1035, 0, 'Golden Sansam', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2984, 1035, 0, 'Golden Sansam', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2985, 1035, 0, 'Golden Sansam', 0, 5, 10); + +-- Dreamfoil +-- Pool 1035: Herbs in Zul'Gurub +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(2986, 180168, 309, -12236.5, -1472.11, 130.657, 4.50295, 0, 0, -0.777145, 0.629321, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(2987, 180168, 309, -12159.4, -1956.99, 134.077, 6.16101, 0, 0, -0.0610485, 0.998135, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(3005, 180168, 309, -11650, -1890.45, 57.2409, 5.46288, 0, 0, -0.398748, 0.91706, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(3006, 180168, 309, -11543.5, -1548.46, 51.7261, 5.02655, 0, 0, -0.587785, 0.809017, 604800, 604800, 100, 1, 5, 10), -- Zul'Gurub +(3007, 180168, 309, -11595.5, -1227.25, 78.2645, 0.453785, 0, 0, 0.224951, 0.97437, 604800, 604800, 100, 1, 5, 10); -- Zul'Gurub +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2986, 1035, 0, 'Dreamfoil', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (2987, 1035, 0, 'Dreamfoil', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (3005, 1035, 0, 'Dreamfoil', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (3006, 1035, 0, 'Dreamfoil', 0, 5, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES (3007, 1035, 0, 'Dreamfoil', 0, 5, 10); + +-- Jinxed Hoodoo Pile +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(3053, 180228, 309, -11526.3, -1479.74, 78.0266, 5.13127, 0, 0, -0.544639, 0.838671, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3055, 180228, 309, -11974.8, -1474.54, 79.9835, 2.93214, 0, 0, 0.994521, 0.104536, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3056, 180228, 309, -12357.9, -1836.31, 130.865, 0.453785, 0, 0, 0.224951, 0.97437, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3057, 180228, 309, -11638.4, -1882.91, 57.3159, 3.85718, 0, 0, -0.936671, 0.35021, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3058, 180228, 309, -11742.3, -1930.5, 56.9127, 1.62316, 0, 0, 0.725374, 0.688355, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3060, 180228, 309, -11452.9, -1613.94, 49.0348, 2.53072, 0, 0, 0.953716, 0.300708, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3061, 180228, 309, -11594.7, -1216.66, 81.3685, 0.331611, 0, 0, 0.165047, 0.986286, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3063, 180228, 309, -11539.9, -1247.64, 78.5177, 3.00195, 0, 0, 0.997563, 0.0697661, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3064, 180228, 309, -11781.9, -1621.91, 21.149, 3.15906, 0, 0, -0.999962, 0.00873464, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3065, 180228, 309, -11810.1, -1882.4, 46.0745, 3.83973, 0, 0, -0.939692, 0.34202, 7200, 7200, 100, 1, 5, 10); -- Zul'Gurub + +-- Jinxed Hoodoo Pile +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(3066, 180229, 309, -12376.2, -1661.07, 132.864, 1.43117, 0, 0, 0.656058, 0.75471, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3067, 180229, 309, -12382.4, -1919.37, 131.553, 3.4383, 0, 0, -0.989016, 0.147811, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3068, 180229, 309, -12358.3, -1939.73, 132.353, 0.104719, 0, 0, 0.0523357, 0.99863, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3069, 180229, 309, -12155.9, -1960.37, 133.111, 3.64774, 0, 0, -0.968147, 0.250381, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3070, 180229, 309, -11518.2, -1693.06, 52.485, 1.02974, 0, 0, 0.492423, 0.870356, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3071, 180229, 309, -11542.7, -1544.95, 51.7792, 5.49779, 0, 0, -0.382683, 0.92388, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3072, 180229, 309, -11556, -1725.95, 39.7283, 0.942477, 0, 0, 0.45399, 0.891007, 7200, 7200, 100, 1, 5, 10); -- Zul'Gurub + +-- Jinxed Hoodoo Pile +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(3073, 180244, 309, -11742.3, -1930.5, 56.9127, 1.62316, 0, 0, 0.725374, 0.688355, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3075, 180244, 309, -11526.3, -1479.74, 78.0266, 5.13127, 0, 0, -0.544639, 0.838671, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3076, 180244, 309, -11974.8, -1474.54, 79.9835, 2.93214, 0, 0, 0.994521, 0.104536, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3078, 180244, 309, -12376.2, -1661.07, 132.864, 1.43117, 0, 0, 0.656058, 0.75471, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3081, 180244, 309, -12357.9, -1836.31, 130.865, 0.453785, 0, 0, 0.224951, 0.97437, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3082, 180244, 309, -12382.4, -1919.37, 131.553, 3.4383, 0, 0, -0.989016, 0.147811, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3083, 180244, 309, -12358.3, -1939.73, 132.353, 0.104719, 0, 0, 0.0523357, 0.99863, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3084, 180244, 309, -12155.9, -1960.37, 133.111, 3.64774, 0, 0, -0.968147, 0.250381, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3085, 180244, 309, -11638.4, -1882.91, 57.3159, 3.85718, 0, 0, -0.936671, 0.35021, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3086, 180244, 309, -11452.9, -1613.94, 49.0348, 2.53072, 0, 0, 0.953716, 0.300708, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3087, 180244, 309, -11518.2, -1693.06, 52.485, 1.02974, 0, 0, 0.492423, 0.870356, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3088, 180244, 309, -11542.7, -1544.95, 51.7792, 5.49779, 0, 0, -0.382683, 0.92388, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3089, 180244, 309, -11556, -1725.95, 39.7283, 0.942477, 0, 0, 0.45399, 0.891007, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3090, 180244, 309, -11539.9, -1247.64, 78.5177, 3.00195, 0, 0, 0.997563, 0.0697661, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3092, 180244, 309, -11594.7, -1216.66, 81.3685, 0.331611, 0, 0, 0.165047, 0.986286, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3093, 180244, 309, -11781.9, -1621.91, 21.149, 3.15906, 0, 0, -0.999962, 0.00873464, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3094, 180244, 309, -11810.1, -1882.4, 46.0745, 3.83973, 0, 0, -0.939692, 0.34202, 7200, 7200, 100, 1, 5, 10); -- Zul'Gurub + +-- Jinxed Hoodoo Pile +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(3095, 180247, 309, -11526.3, -1479.74, 78.0266, 5.13127, 0, 0, -0.544639, 0.838671, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3096, 180247, 309, -11542.7, -1544.95, 51.7792, 5.49779, 0, 0, -0.382683, 0.92388, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3097, 180247, 309, -11556, -1725.95, 39.7283, 0.942477, 0, 0, 0.45399, 0.891007, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3099, 180247, 309, -11974.8, -1474.54, 79.9835, 2.93214, 0, 0, 0.994521, 0.104536, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3100, 180247, 309, -12376.2, -1661.07, 132.864, 1.43117, 0, 0, 0.656058, 0.75471, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3101, 180247, 309, -12357.9, -1836.31, 130.865, 0.453785, 0, 0, 0.224951, 0.97437, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3102, 180247, 309, -12382.4, -1919.37, 131.553, 3.4383, 0, 0, -0.989016, 0.147811, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3103, 180247, 309, -12358.3, -1939.73, 132.353, 0.104719, 0, 0, 0.0523357, 0.99863, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3104, 180247, 309, -12155.9, -1960.37, 133.111, 3.64774, 0, 0, -0.968147, 0.250381, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3105, 180247, 309, -11638.4, -1882.91, 57.3159, 3.85718, 0, 0, -0.936671, 0.35021, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3106, 180247, 309, -11742.3, -1930.5, 56.9127, 1.62316, 0, 0, 0.725374, 0.688355, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3107, 180247, 309, -11518.2, -1693.06, 52.485, 1.02974, 0, 0, 0.492423, 0.870356, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3108, 180247, 309, -11452.9, -1613.94, 49.0348, 2.53072, 0, 0, 0.953716, 0.300708, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3109, 180247, 309, -11594.7, -1216.66, 81.3685, 0.331611, 0, 0, 0.165047, 0.986286, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3111, 180247, 309, -11539.9, -1247.64, 78.5177, 3.00195, 0, 0, 0.997563, 0.0697661, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3112, 180247, 309, -11781.9, -1621.91, 21.149, 3.15906, 0, 0, -0.999962, 0.00873464, 7200, 7200, 100, 1, 5, 10), -- Zul'Gurub +(3113, 180247, 309, -11810.1, -1882.4, 46.0745, 3.83973, 0, 0, -0.939692, 0.34202, 7200, 7200, 100, 1, 5, 10); -- Zul'Gurub + +-- HORDE DOOR +UPDATE `gameobject` SET `position_x`=708.09, `position_y`=708.448, `position_z`=-17.3899, `orientation`=3.89209, `rotation0`=-0.0502906, `rotation1`=-0.0151262, `rotation2`=-0.929216, `rotation3`=0.365785 WHERE `guid`=90055; + +-- Soapbox +-- Event 40: Stranglethorn Fishing Extravaganza: The Crew +-- These are all custom, added during classic to block people from climbing on top of buildings. +/* +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(3148, 180403, 0, -11061.4, 1559.99, 48.4474, 0, 0, 0, 0, 1, 0, 0, 100, 1, 5, 10), -- Westfall +(3152, 180403, 30, 669.139, 7.92188, 68.7291, 0, 0, 0, 0, 1, 180, 180, 100, 1, 5, 10), -- Alterac Valley +(3153, 180403, 489, 916.391, 1438.56, 359.832, 0, -1, 0, 0, 0, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3154, 180403, 489, 961.181, 1443.28, 370.236, 2.08869, 0, 0, 0.864594, 0.50247, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3155, 180403, 489, 919.524, 1442.24, 363.677, 1.0472, 0.224144, 0.129409, 0.482963, 0.836517, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3157, 180403, 489, 918.427, 1430.84, 361.458, 0.872664, -0.906308, -0.422618, 0, 0, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3158, 180403, 489, 919.5, 1442, 364.177, 0.523597, 0.369644, 0.0990458, 0.239117, 0.892399, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3159, 180403, 489, 919.524, 1442.24, 365.177, 1.0472, 0.296198, 0.17101, 0.469846, 0.813798, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3160, 180403, 489, 919.524, 1442.24, 362.677, 1.0472, 0.224144, 0.129409, 0.482963, 0.836517, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3161, 180403, 489, 959.444, 1442.2, 370.236, 2.47112, 0, 0, 0.944332, 0.328994, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3162, 180403, 489, 1001.41, 1299.16, 346.076, 0.715774, 0, 0, 0.350296, 0.936639, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3163, 180403, 489, 919.5, 1442, 362.677, 0.523597, 0.369644, 0.0990458, 0.239117, 0.892399, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3164, 180403, 489, 975.889, 1480.86, 345.164, 1.55936, 0.240457, -0.243224, 0.660651, 0.668253, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3165, 180403, 489, 984.967, 1479.36, 346.542, 4.71239, -0.696364, 0.696363, 0.122787, 0.122794, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3167, 180403, 489, 983.738, 1479.41, 346.683, 4.71239, -0.696364, 0.696363, 0.122787, 0.122794, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3168, 180403, 489, 976.316, 1480.87, 345.299, 1.74533, 0.282907, -0.128879, 0.744656, 0.590628, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3169, 180403, 489, 980.755, 1479.3, 346.934, 5.41052, -0.862561, 0.427108, 0.198098, 0.185268, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3170, 180403, 489, 982.016, 1479.59, 346.934, 4.71239, -0.690345, 0.690345, 0.153046, 0.15305, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3171, 180403, 489, 974.115, 1477.57, 348.466, 4.71239, -0.664463, 0.664463, 0.241844, 0.241845, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3172, 180403, 489, 1471.6, 1453.61, 376.997, 1.58093, 0, 0, 0.71068, 0.703515, 180, 180, 100, 1, 5, 10), -- Warsong Gulch +(3174, 180403, 529, 988.517, 986.033, -34.673, 0.334983, 0.0637965, -0.377328, 0.154019, 0.910951, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3175, 180403, 529, 988.061, 986.906, -34.673, 0.030376, 0.00581217, -0.382639, 0.0140314, 0.923773, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3176, 180403, 529, 989.071, 984.741, -34.673, 0.526701, 0.0996189, -0.36949, 0.240501, 0.892027, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3177, 180403, 529, 988.842, 983.075, -35.5109, 0.526701, 0.0996189, -0.36949, 0.240501, 0.892027, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3178, 180403, 529, 991.399, 982.604, -34.9582, 0.526701, 0.0996189, -0.36949, 0.240501, 0.892027, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3179, 180403, 529, 985.705, 990.163, -37.079, 4.57076, 0, 0, -0.755367, 0.655302, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3181, 180403, 529, 1189.63, 1174.47, -56.8299, 5.62235, 0, 0, -0.324437, 0.945907, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3183, 180403, 529, 1190.2, 1175.19, -56.8604, 5.58755, 0, 0, -0.340847, 0.940119, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3184, 180403, 529, 823.677, 842.67, -59.5554, 3.18587, 0, 0, -0.999755, 0.0221389, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3185, 180403, 529, 644.281, 696.366, -12.9313, 4.41691, 0, 0, -0.803493, 0.595315, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3186, 180403, 529, 987.955, 988.846, -34.673, 0.030376, 0.00581217, -0.382639, 0.0140314, 0.923773, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3188, 180403, 529, 1184.93, 1173.48, -51.1228, 5.54172, 0.153114, 0.393906, -0.328355, 0.844735, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3189, 180403, 529, 1196.89, 1185.76, -51.2965, 5.54172, 0.153114, 0.393906, -0.328355, 0.844735, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3190, 180403, 529, 1188.05, 1197.31, -56.6357, 0, 0, 0, 0, 1, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3191, 180403, 529, 1196.79, 1187.79, -51.2965, 5.54172, 0, 0, -0.362299, 0.932062, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3193, 180403, 529, 1189.02, 1197.14, -56.6357, 0, 0, 0, 0, 1, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3194, 180403, 529, 1196.64, 1186.86, -50.3518, 5.54172, 0.138646, 0.356684, -0.334721, 0.861113, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3195, 180403, 529, 809.802, 849.658, -51.7905, 4.68077, 0.117182, -0.35545, -0.623305, 0.686596, 180, 180, 100, 1, 5, 10), -- Arathi Basin +(3196, 180403, 531, -8342.56, 2021.07, 123.736, 0, 0, 0, 0, 1, 180, 180, 100, 1, 7, 10); -- Ahn'Qiraj +*/ + +-- G_Pumpkin_02 +-- Event 12: Hallow's End +UPDATE `gameobject` SET `position_x`=-14476.1, `position_y`=461.171, `position_z`=36.5471, `orientation`=2.86234, `rotation0`=0, `rotation1`=0, `rotation2`=0.990268, `rotation3`=0.139175 WHERE `guid`=330613; + +-- G_Pumpkin_03 +-- Event 12: Hallow's End +UPDATE `gameobject` SET `position_x`=-10464.6, `position_y`=-1183.71, `position_z`=27.5535, `orientation`=2.35619, `rotation0`=0, `rotation1`=0, `rotation2`=0.92388, `rotation3`=0.382683 WHERE `guid`=330833; +UPDATE `gameobject` SET `position_x`=-10491.6, `position_y`=1002.19, `position_z`=67.1605, `orientation`=0.785397, `rotation0`=0, `rotation1`=0, `rotation2`=0.382683, `rotation3`=0.92388 WHERE `guid`=330991; + +-- G_HangingSkeleton_01 +-- Event 12: Hallow's End +UPDATE `gameobject` SET `position_x`=-10537.4, `position_y`=-1217.96, `position_z`=33.7167, `orientation`=1.62316, `rotation0`=0, `rotation1`=0, `rotation2`=0.725374, `rotation3`=0.688355 WHERE `guid`=331055; + +-- CandleBlack01 +-- Event 12: Hallow's End +UPDATE `gameobject` SET `position_x`=-14469.6, `position_y`=483.56, `position_z`=16.4822, `orientation`=3.14159, `rotation0`=0, `rotation1`=0, `rotation2`=-1, `rotation3`=0 WHERE `guid`=331291; + +-- Contested Banner +UPDATE `gameobject` SET `position_x`=-202.652, `position_y`=-112.807, `position_z`=78.4871, `orientation`=5.18363, `rotation0`=0, `rotation1`=0, `rotation2`=-0.522498, `rotation3`=0.85264 WHERE `guid`=90402; + +-- Alliance Banner Aura, Large +UPDATE `gameobject` SET `position_x`=557.227, `position_y`=-86.8521, `position_z`=62.1767, `orientation`=6.03884, `rotation0`=0, `rotation1`=0, `rotation2`=-0.121869, `rotation3`=0.992546 WHERE `guid`=90323; +UPDATE `gameobject` SET `position_x`=-156.47, `position_y`=-449.953, `position_z`=50.6682, `orientation`=6.03884, `rotation0`=0, `rotation1`=0, `rotation2`=-0.121869, `rotation3`=0.992546 WHERE `guid`=90329; + +-- Horde Banner Aura, Large +UPDATE `gameobject` SET `position_x`=-1302.73, `position_y`=-316.63, `position_z`=127.503, `orientation`=0.122173, `rotation0`=0, `rotation1`=0, `rotation2`=0.0610485, `rotation3`=0.998135 WHERE `guid`=90335; + +-- Neutral Banner Aura, Large +UPDATE `gameobject` SET `position_x`=677.592, `position_y`=-139.034, `position_z`=76.2196, `orientation`=4.29351, `rotation0`=0, `rotation1`=0, `rotation2`=-0.83867, `rotation3`=0.54464 WHERE `guid`=90349; +UPDATE `gameobject` SET `position_x`=202.541, `position_y`=-361.858, `position_z`=67.7371, `orientation`=0.610863, `rotation0`=0, `rotation1`=0, `rotation2`=0.300705, `rotation3`=0.953717 WHERE `guid`=90351; +UPDATE `gameobject` SET `position_x`=-572.205, `position_y`=-262.476, `position_z`=88.6647, `orientation`=5.68977, `rotation0`=0, `rotation1`=0, `rotation2`=-0.292372, `rotation3`=0.956305 WHERE `guid`=90339; + +-- Alterac Valley Gate +UPDATE `gameobject` SET `position_x`=-870.944, `position_y`=-558.578, `position_z`=57.2628, `orientation`=2.16421, `rotation0`=0, `rotation1`=0, `rotation2`=0.882947, `rotation3`=0.469473 WHERE `guid`=90226; +UPDATE `gameobject` SET `position_x`=794.643, `position_y`=-493.475, `position_z`=99.7779, `orientation`=6.16101, `rotation0`=0, `rotation1`=0, `rotation2`=-0.0610485, `rotation3`=0.998135 WHERE `guid`=90225; + +-- Bat01 +-- Event 12: Hallow's End +UPDATE `gameobject` SET `position_x`=-10561.9, `position_y`=-1170.68, `position_z`=42.7257, `orientation`=2.00713, `rotation0`=0, `rotation1`=0, `rotation2`=0.843391, `rotation3`=0.5373 WHERE `guid`=331634; + +-- Bat02 +-- Event 12: Hallow's End +UPDATE `gameobject` SET `position_x`=-10565.1, `position_y`=-1169.65, `position_z`=46.188, `orientation`=2.60054, `rotation0`=0, `rotation1`=0, `rotation2`=0.96363, `rotation3`=0.267241 WHERE `guid`=331906; + +-- Wickerman Ember +-- We temp summon those from script. +/* +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(3232, 180437, 0, 1731.56, 514.596, 39.3475, 5.70723, 0, 0, -0.284015, 0.95882, 180, 180, 100, 1, 6, 10), -- Undercity +(3233, 180437, 0, 1741.12, 505.333, 41.3979, 4.64258, 0, 0, -0.731354, 0.681998, 180, 180, 100, 1, 6, 10), -- Undercity +(3234, 180437, 0, 1731.58, 500.123, 42.5049, 4.50295, 0, 0, -0.777145, 0.629321, 180, 180, 100, 1, 6, 10), -- Undercity +(3235, 180437, 0, 1722.22, 512.332, 39.1567, 0.209439, 0, 0, 0.104528, 0.994522, 180, 180, 100, 1, 6, 10), -- Undercity +(3236, 180437, 0, 1738.43, 512.016, 39.8172, 4.60767, 0, 0, -0.743144, 0.669131, 180, 180, 100, 1, 6, 10), -- Undercity +(3237, 180437, 0, 1721.45, 505.141, 40.8856, 4.95674, 0, 0, -0.615661, 0.788011, 180, 180, 100, 1, 6, 10); -- Undercity +*/ + +-- Glyphed Crystal Prism +-- We temp spawn those in core. +/* +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(3238, 180514, 1, -6825.29, 809.125, 51.8699, 0.349065, 0, 0, 0.173648, 0.984808, 180, 180, 100, 0, 6, 10), -- Silithus +(3239, 180514, 1, -6822.21, 808.584, 51.5885, 2.77507, 0, 0, 0.983254, 0.182238, 180, 180, 100, 0, 6, 10), -- Silithus +(3240, 180514, 1, -6823.57, 811.977, 51.4426, 4.41568, 0, 0, -0.803857, 0.594823, 180, 180, 100, 0, 6, 10); -- Silithus +*/ +DELETE FROM `gameobject_template` WHERE `entry`=210342; +DELETE FROM `locales_gameobject` WHERE `entry`=210342; + +-- Merithra's Wake +-- We temp spawn those in core. +/* +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(3243, 180604, 1, -8096.71, 1485.86, 2.60941, 6.24828, 0, 0, -0.0174522, 0.999848, 180, 180, 100, 1, 7, 10), -- Silithus (SPAWN) +(3250, 180604, 1, -8080.9, 1523.92, 2.60941, 1.32645, 0, 0, 0.615661, 0.788011, 180, 180, 100, 1, 7, 10), -- Silithus (SPAWN) +(3251, 180604, 1, -8079.38, 1540.47, 2.6094, 1.41372, 0, 0, 0.649447, 0.760406, 180, 180, 100, 1, 7, 10), -- Silithus (SPAWN) +(3252, 180604, 1, -8104.83, 1541.22, 3.80065, 5.84685, 0, 0, -0.216439, 0.976296, 180, 180, 100, 1, 7, 10), -- Silithus (SPAWN) +(3253, 180604, 1, -8104.63, 1504.55, 2.61155, 4.59022, 0, 0, -0.748956, 0.66262, 180, 180, 100, 1, 7, 10), -- Silithus (SPAWN) +(3254, 180604, 1, -8085.88, 1552.12, 3.30995, 2.28638, 0, 0, 0.909961, 0.414694, 180, 180, 100, 1, 7, 10), -- Silithus (SPAWN) +(3255, 180604, 1, -8090.99, 1472.81, 2.6521, 5.95157, 0, 0, -0.165047, 0.986286, 180, 180, 100, 1, 7, 10), -- Silithus (SPAWN) +(3256, 180604, 1, -8099.57, 1526.5, 2.83107, 1.83259, 0, 0, 0.793353, 0.608762, 180, 180, 100, 1, 7, 10), -- Silithus (SPAWN) +(3258, 180604, 1, -8094.15, 1540.47, 2.69067, 3.28124, 0, 0, -0.997563, 0.0697661, 180, 180, 100, 1, 7, 10), -- Silithus (SPAWN) +(3259, 180604, 1, -8090.24, 1508.85, 3.16068, 2.65289, 0, 0, 0.970295, 0.241925, 180, 180, 100, 1, 7, 10); -- Silithus (SPAWN) +*/ + +-- IronForgeSteamTank +-- Event 54: AQ War Troop Silithus (NPC & GO) DAY 1 +-- Event 55: AQ War Troop Silithus (NPC & GO) DAY 2 +-- Event 57: AQ War Troop Silithus (NPC & GO) DAY 4 +UPDATE `gameobject` SET `position_x`=-6947.34, `position_y`=962.631, `position_z`=14.3632, `orientation`=3.68265, `rotation0`=0, `rotation1`=0, `rotation2`=-0.96363, `rotation3`=0.267241 WHERE `guid`=220202; +UPDATE `gameobject` SET `position_x`=-6786.53, `position_y`=570.164, `position_z`=4.13154, `orientation`=3.71755, `rotation0`=0, `rotation1`=0, `rotation2`=-0.958819, `rotation3`=0.284016 WHERE `guid`=220203; + +-- AQWar - Resource, Bandages, Alliance, Tier 1 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4968.33, `position_y`=-1152.89, `position_z`=501.925, `orientation`=2.26893, `rotation0`=0, `rotation1`=0, `rotation2`=0.906307, `rotation3`=0.422619 WHERE `guid`=220141; + +-- AQWar - Resource, Bandages, Alliance, Tier 2 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4969.21, `position_y`=-1143.84, `position_z`=509.251, `orientation`=2.28638, `rotation0`=0, `rotation1`=0, `rotation2`=0.909961, `rotation3`=0.414694 WHERE `guid`=220142; + +-- AQWar - Resource, Bandages, Alliance, Tier 3 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4983, `position_y`=-1136.22, `position_z`=501.659, `orientation`=2.30383, `rotation0`=0, `rotation1`=0, `rotation2`=0.913545, `rotation3`=0.406738 WHERE `guid`=220143; + +-- AQWar - Resource, Bandages, Alliance, Tier 4 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4975.6, `position_y`=-1147.33, `position_z`=509.25, `orientation`=2.26893, `rotation0`=0, `rotation1`=0, `rotation2`=0.906307, `rotation3`=0.422619 WHERE `guid`=220144; + +-- AQWar - Resource, Bandages, Alliance, Tier 5 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4974.11, `position_y`=-1148.4, `position_z`=510.848, `orientation`=2.26893, `rotation0`=0, `rotation1`=0, `rotation2`=0.906307, `rotation3`=0.422619 WHERE `guid`=220145; + +-- Scarab Coffer +-- Pool 42904: scarab coffers spawn in AQ20 +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(47469, 180691, 509, -8713.44, 1543.34, 32.2034, 0.767944, 0, 0, 0.374606, 0.927184, 604800, 604800, 100, 1, 7, 10), +(47470, 180691, 509, -9090.66, 1500.96, 24.4341, 0.977383, 0, 0, 0.469471, 0.882948, 604800, 604800, 100, 1, 7, 10), +(47471, 180691, 509, -9344.26, 1191.31, 22.0217, 1.309, 0, 0, 0.608761, 0.793354, 604800, 604800, 100, 1, 7, 10), +(47472, 180691, 509, -9006.97, 1988.6, 32.2369, 6.16101, 0, 0, -0.0610485, 0.998135, 604800, 604800, 100, 1, 7, 10), +(47473, 180691, 509, -8938.36, 1860.11, 3.23041, 3.75246, 0, 0, -0.953716, 0.300708, 604800, 604800, 100, 1, 7, 10), +(47474, 180691, 509, -8772.14, 2003.6, 21.907, 2.91469, 0, 0, 0.993571, 0.113208, 604800, 604800, 100, 1, 7, 10), +(47475, 180691, 509, -9121.05, 2180.52, 24.8621, 0.90757, 0, 0, 0.438371, 0.898794, 604800, 604800, 100, 1, 7, 10), +(47476, 180691, 509, -9541.15, 1585.01, 26.5581, 4.04917, 0, 0, -0.898793, 0.438373, 604800, 604800, 100, 1, 7, 10), +(47477, 180691, 509, -9694.64, 1653.44, 22.4991, 5.86431, 0, 0, -0.207911, 0.978148, 604800, 604800, 100, 1, 7, 10), +(47478, 180691, 509, -9519.04, 2003.01, 109.034, 2.42601, 0, 0, 0.936672, 0.350207, 604800, 604800, 100, 1, 7, 10); +DELETE FROM `gameobject` WHERE `guid` IN (3996293, 3996292, 3996291, 3996290, 3996289, 3996288, 3996287); +DELETE FROM `pool_gameobject` WHERE `guid` IN (3996293, 3996292, 3996291, 3996290, 3996289, 3996288, 3996287); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES +(47469, 42904, 0, 'Scarab Coffer', 0, 7, 10), +(47470, 42904, 0, 'Scarab Coffer', 0, 7, 10), +(47471, 42904, 0, 'Scarab Coffer', 0, 7, 10), +(47472, 42904, 0, 'Scarab Coffer', 0, 7, 10), +(47473, 42904, 0, 'Scarab Coffer', 0, 7, 10), +(47474, 42904, 0, 'Scarab Coffer', 0, 7, 10), +(47475, 42904, 0, 'Scarab Coffer', 0, 7, 10), +(47476, 42904, 0, 'Scarab Coffer', 0, 7, 10), +(47477, 42904, 0, 'Scarab Coffer', 0, 7, 10), +(47478, 42904, 0, 'Scarab Coffer', 0, 7, 10); + +-- Festive Keg +-- Event 34: New Year's Eve +-- Event 38: Chinese New Year +UPDATE `gameobject` SET `position_x`=-14415.9, `position_y`=420.981, `position_z`=22.1447, `orientation`=1.0821, `rotation0`=0, `rotation1`=0, `rotation2`=0.515038, `rotation3`=0.857168 WHERE `guid`=375072; + +-- CrateAllianceFirstAid01 +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(4082, 180714, 0, -4972.81, -1145.83, 501.65, 3.61284, 0, 0, -0.972369, 0.233448, 180, 180, 100, 1, 7, 10), -- Dun Morogh +(4083, 180714, 0, -4972.44, -1153.13, 510.493, 5.25344, 0, 0, -0.492423, 0.870356, 180, 180, 100, 1, 7, 10), -- Ironforge +(4084, 180714, 0, -4974.84, -1156.88, 503.524, 6.00393, 0, 0, -0.139173, 0.990268, 180, 180, 100, 1, 7, 10), -- Ironforge +(4085, 180714, 0, -4972.67, -1152.66, 509.25, 0.331611, 0, 0, 0.165047, 0.986286, 180, 180, 100, 1, 7, 10), -- Ironforge +(4087, 180714, 0, -4971.91, -1153.99, 509.25, 5.23599, 0, 0, -0.5, 0.866025, 180, 180, 100, 1, 7, 10), -- Ironforge +(4088, 180714, 0, -4978.42, -1159.34, 501.644, 3.03684, 0, 0, 0.998629, 0.0523532, 180, 180, 100, 1, 7, 10), -- Ironforge +(4089, 180714, 0, -4968.47, -1149.96, 501.925, 5.02655, 0, 0, -0.587785, 0.809017, 180, 180, 100, 1, 7, 10), -- Ironforge +(4090, 180714, 0, -4968.39, -1150.03, 503.168, 0.366518, 0, 0, 0.182235, 0.983255, 180, 180, 100, 1, 7, 10), -- Ironforge +(4091, 180714, 0, -4976.95, -1158.3, 502.889, 4.15388, 0, 0, -0.874619, 0.48481, 180, 180, 100, 1, 7, 10), -- Ironforge +(4092, 180714, 0, -4972.68, -1136.95, 509.777, 4.38078, 0, 0, -0.814116, 0.580703, 180, 180, 100, 1, 7, 10), -- Ironforge +(4093, 180714, 0, -4985.94, -1135.93, 501.659, 3.15906, 0, 0, -0.999962, 0.00873464, 180, 180, 100, 1, 7, 10), -- Ironforge +(4094, 180714, 0, -4979.77, -1139.91, 504.139, 5.98648, 0, 0, -0.147809, 0.989016, 180, 180, 100, 1, 7, 10), -- Ironforge +(4095, 180714, 0, -4979.91, -1139.91, 502.902, 1.48353, 0, 0, 0.67559, 0.737278, 180, 180, 100, 1, 7, 10), -- Ironforge +(4097, 180714, 0, -4984.32, -1135.76, 504.875, 3.63029, 0, 0, -0.970295, 0.241925, 180, 180, 100, 1, 7, 10), -- Ironforge +(4098, 180714, 0, -4986.02, -1136.78, 502.902, 3.194, 0, 0, -0.999657, 0.0262016, 180, 180, 100, 1, 7, 10), -- Ironforge +(4099, 180714, 0, -4979.8, -1146.88, 502.891, 3.71755, 0, 0, -0.958819, 0.284016, 180, 180, 100, 1, 7, 10), -- Ironforge +(4100, 180714, 0, -4972.92, -1145.82, 504.129, 1.76278, 0, 0, 0.771625, 0.636078, 180, 180, 100, 1, 7, 10), -- Ironforge +(4101, 180714, 0, -4977.45, -1157.94, 501.649, 3.927, 0, 0, -0.923879, 0.382686, 180, 180, 100, 1, 7, 10), -- Ironforge +(4102, 180714, 0, -4976.29, -1158.75, 501.643, 0.855211, 0, 0, 0.414693, 0.909961, 180, 180, 100, 1, 7, 10), -- Ironforge +(4104, 180714, 0, -4979.93, -1139.91, 501.659, 1.36136, 0, 0, 0.62932, 0.777146, 180, 180, 100, 1, 7, 10), -- Ironforge +(4106, 180714, 0, -4972.86, -1145.85, 502.893, 2.19911, 0, 0, 0.891006, 0.453991, 180, 180, 100, 1, 7, 10), -- Ironforge +(4107, 180714, 0, -4985.74, -1137.55, 501.659, 3.54302, 0, 0, -0.979924, 0.19937, 180, 180, 100, 1, 7, 10), -- Ironforge +(4109, 180714, 0, -4979.97, -1146.89, 501.655, 4.20625, 0, 0, -0.861629, 0.507539, 180, 180, 100, 1, 7, 10); -- Ironforge +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES +(4082, 58), +(4083, 58), +(4084, 58), +(4085, 58), +(4087, 58), +(4088, 58), +(4089, 58), +(4090, 58), +(4091, 58), +(4092, 58), +(4093, 58), +(4094, 58), +(4095, 58), +(4097, 58), +(4098, 58), +(4099, 58), +(4100, 58), +(4101, 58), +(4102, 58), +(4104, 58), +(4106, 58), +(4107, 58), +(4109, 58); + +-- Holly Preserver +-- Event 2: Feast of Winter Veil +UPDATE `gameobject` SET `position_x`=-4929.1, `position_y`=-990.27, `position_z`=501.448, `orientation`=2.51327, `rotation0`=0, `rotation1`=0, `rotation2`=0.951056, `rotation3`=0.309017 WHERE `guid`=41673; +UPDATE `gameobject` SET `position_x`=-1256.43, `position_y`=68.1925, `position_z`=127.471, `orientation`=4.62512, `rotation0`=0, `rotation1`=0, `rotation2`=-0.737277, `rotation3`=0.675591 WHERE `guid`=41700; + +-- Metzen's Stable +-- Event 2: Feast of Winter Veil +UPDATE `gameobject` SET `position_x`=-8088.34, `position_y`=-5275.29, `position_z`=0.875843, `orientation`=1.81514, `rotation0`=0, `rotation1`=0, `rotation2`=0.788011, `rotation3`=0.615662 WHERE `guid`=151750; + +-- Metzen's Fencing +-- Event 2: Feast of Winter Veil +UPDATE `gameobject` SET `position_x`=-6611.56, `position_y`=-1854.63, `position_z`=244.189, `orientation`=3.14159, `rotation0`=0, `rotation1`=0, `rotation2`=-1, `rotation3`=0 WHERE `guid`=151755; +UPDATE `gameobject` SET `position_x`=-6608.53, `position_y`=-1860.06, `position_z`=244.353, `orientation`=4.79966, `rotation0`=0, `rotation1`=0, `rotation2`=-0.67559, `rotation3`=0.737278 WHERE `guid`=151758; +UPDATE `gameobject` SET `position_x`=-6611.56, `position_y`=-1857.47, `position_z`=244.22, `orientation`=3.17653, `rotation0`=0, `rotation1`=0, `rotation2`=-0.999847, `rotation3`=0.0174693 WHERE `guid`=151756; +UPDATE `gameobject` SET `position_x`=-6611.44, `position_y`=-1860.28, `position_z`=244.26, `orientation`=4.76475, `rotation0`=0, `rotation1`=0, `rotation2`=-0.688354, `rotation3`=0.725374 WHERE `guid`=151757; +UPDATE `gameobject` SET `position_x`=-6605.92, `position_y`=-1854.22, `position_z`=244.303, `orientation`=1.62316, `rotation0`=0, `rotation1`=0, `rotation2`=0.725374, `rotation3`=0.688355 WHERE `guid`=151754; +UPDATE `gameobject` SET `position_x`=-6605.74, `position_y`=-1856.93, `position_z`=244.379, `orientation`=0.0523589, `rotation0`=0, `rotation1`=0, `rotation2`=0.0261765, `rotation3`=0.999657 WHERE `guid`=151752; +UPDATE `gameobject` SET `position_x`=-6608.76, `position_y`=-1854.42, `position_z`=244.239, `orientation`=1.62316, `rotation0`=0, `rotation1`=0, `rotation2`=0.725374, `rotation3`=0.688355 WHERE `guid`=151753; +UPDATE `gameobject` SET `position_x`=-6605.64, `position_y`=-1859.81, `position_z`=244.461, `orientation`=0.0349062, `rotation0`=0, `rotation1`=0, `rotation2`=0.0174522, `rotation3`=0.999848 WHERE `guid`=151751; + +-- Carefully Wrapped Present +-- Event 21: Feast of Winter Veil: Gifts +UPDATE `gameobject` SET `position_x`=-4916.04, `position_y`=-981.171, `position_z`=501.848, `orientation`=0.087266, `rotation0`=0, `rotation1`=0, `rotation2`=0.0436192, `rotation3`=0.999048 WHERE `guid`=151767; +UPDATE `gameobject` SET `position_x`=1628.53, `position_y`=-4413.28, `position_z`=15.7934, `orientation`=6.0912, `rotation0`=0, `rotation1`=0, `rotation2`=-0.0958452, `rotation3`=0.995396 WHERE `guid`=151768; + +-- Catapult +-- Event 56: AQ War Troop Silithus (NPC & GO) DAY 3 +-- Event 57: AQ War Troop Silithus (NPC & GO) DAY 4 +-- Event 58: AQ War Troop Silithus (NPC & GO) DAY 5 +DELETE FROM `gameobject` WHERE `id`=180744; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(8152, 180744, 1, -6978.79, 919.586, 9.75189, 0.558504, 0, 0, 0.275637, 0.961262, 25, 25, 100, 1, 7, 10), -- Silithus +(8153, 180744, 1, -6826.49, 560.815, -1.27602, 0.314158, 0, 0, 0.156434, 0.987688, 25, 25, 100, 1, 7, 10), -- Silithus +(8154, 180744, 1, -6828.89, 576.458, -1.265, 5.63741, 0, 0, -0.317305, 0.948324, 25, 25, 100, 1, 7, 10), -- Silithus +(8155, 180744, 1, -6823.92, 551.499, -1.26005, 6.16101, 0, 0, -0.0610485, 0.998135, 25, 25, 100, 1, 7, 10); -- Silithus +UPDATE `game_event_gameobject` SET `guid`=8152 WHERE `guid`=220204; +UPDATE `game_event_gameobject` SET `guid`=8153 WHERE `guid`=220206; +UPDATE `game_event_gameobject` SET `guid`=8154 WHERE `guid`=220205; +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (8155, 55); + +-- Gently Shaken Gift +-- Event 21: Feast of Winter Veil: Gifts +UPDATE `gameobject` SET `position_x`=1625.37, `position_y`=-4410.19, `position_z`=15.0052, `orientation`=6.24828, `rotation0`=0, `rotation1`=0, `rotation2`=-0.0174522, `rotation3`=0.999848 WHERE `guid`=151770; + +-- Gaily Wrapped Present +-- Event 21: Feast of Winter Veil: Gifts +UPDATE `gameobject` SET `position_x`=-4919.12, `position_y`=-980.604, `position_z`=501.456, `orientation`=1.5708, `rotation0`=0, `rotation1`=0, `rotation2`=0.707107, `rotation3`=0.707107 WHERE `guid`=151761; +UPDATE `gameobject` SET `position_x`=1622.19, `position_y`=-4411.12, `position_z`=14.4452, `orientation`=2.19911, `rotation0`=0, `rotation1`=0, `rotation2`=0.891006, `rotation3`=0.453991 WHERE `guid`=151762; + +-- Ticking Present +-- Event 21: Feast of Winter Veil: Gifts +UPDATE `gameobject` SET `position_x`=-4920.98, `position_y`=-981.292, `position_z`=501.462, `orientation`=6.14356, `rotation0`=0, `rotation1`=0, `rotation2`=-0.0697556, `rotation3`=0.997564 WHERE `guid`=151764; +UPDATE `gameobject` SET `position_x`=1626.39, `position_y`=-4412.09, `position_z`=15.6993, `orientation`=3.08918, `rotation0`=0, `rotation1`=0, `rotation2`=0.999657, `rotation3`=0.0262016 WHERE `guid`=151763; + +-- Toasting Goblet +-- Event 39: Post Firework Toasting Goblets +UPDATE `gameobject` SET `position_x`=-5091.94, `position_y`=-776.493, `position_z`=496.144, `orientation`=0.366518, `rotation0`=0, `rotation1`=0, `rotation2`=0.182235, `rotation3`=0.983255 WHERE `guid`=407469; +UPDATE `gameobject` SET `position_x`=-5093.93, `position_y`=-776.219, `position_z`=496.127, `orientation`=5.95157, `rotation0`=0, `rotation1`=0, `rotation2`=-0.165047, `rotation3`=0.986286 WHERE `guid`=407472; +UPDATE `gameobject` SET `position_x`=-5165.08, `position_y`=-864.071, `position_z`=508.072, `orientation`=6.24828, `rotation0`=0, `rotation1`=0, `rotation2`=-0.0174522, `rotation3`=0.999848 WHERE `guid`=407474; +UPDATE `gameobject` SET `position_x`=-5164.99, `position_y`=-865.852, `position_z`=508.073, `orientation`=3.50812, `rotation0`=0, `rotation1`=0, `rotation2`=-0.983254, `rotation3`=0.182238 WHERE `guid`=407478; +UPDATE `gameobject` SET `position_x`=-5165.93, `position_y`=-865.201, `position_z`=508.102, `orientation`=2.07694, `rotation0`=0, `rotation1`=0, `rotation2`=0.861629, `rotation3`=0.507539 WHERE `guid`=407477; +UPDATE `gameobject` SET `position_x`=-5164.98, `position_y`=-864.791, `position_z`=508.074, `orientation`=1.20428, `rotation0`=0, `rotation1`=0, `rotation2`=0.566406, `rotation3`=0.824126 WHERE `guid`=407476; +UPDATE `gameobject` SET `position_x`=-5164.17, `position_y`=-865.144, `position_z`=508.053, `orientation`=2.3911, `rotation0`=0, `rotation1`=0, `rotation2`=0.930417, `rotation3`=0.366502 WHERE `guid`=407479; +UPDATE `gameobject` SET `position_x`=-5164.39, `position_y`=-864.583, `position_z`=508.045, `orientation`=4.5204, `rotation0`=0, `rotation1`=0, `rotation2`=-0.771625, `rotation3`=0.636078 WHERE `guid`=407475; +UPDATE `gameobject` SET `position_x`=-14296.9, `position_y`=523.05, `position_z`=9.7606, `orientation`=5.96903, `rotation0`=0, `rotation1`=0, `rotation2`=-0.156434, `rotation3`=0.987688 WHERE `guid`=380436; +UPDATE `gameobject` SET `position_x`=-14296.6, `position_y`=524.092, `position_z`=9.76754, `orientation`=4.06662, `rotation0`=0, `rotation1`=0, `rotation2`=-0.894934, `rotation3`=0.446199 WHERE `guid`=380513; +UPDATE `gameobject` SET `position_x`=-14413.6, `position_y`=419.22, `position_z`=23.278, `orientation`=4.57276, `rotation0`=0, `rotation1`=0, `rotation2`=-0.754709, `rotation3`=0.656059 WHERE `guid`=380820; +UPDATE `gameobject` SET `position_x`=1316.62, `position_y`=-4370.39, `position_z`=28.9184, `orientation`=1.37881, `rotation0`=0, `rotation1`=0, `rotation2`=0.636078, `rotation3`=0.771625 WHERE `guid`=407480; + +-- Lantern +-- Event 7: Lunar Festival +UPDATE `gameobject` SET `position_x`=10165.4, `position_y`=2580.43, `position_z`=1361.88, `orientation`=2.23402, `rotation0`=0, `rotation1`=0, `rotation2`=0.898793, `rotation3`=0.438373 WHERE `guid`=64761; + +-- Lantern +-- Event 7: Lunar Festival +-- Event 38: Chinese New Year +UPDATE `gameobject` SET `position_x`=10159.9, `position_y`=2604.61, `position_z`=1330.83, `orientation`=3.38594, `rotation0`=0, `rotation1`=0, `rotation2`=-0.992546, `rotation3`=0.12187 WHERE `guid`=64823; + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241226193319_world.sql b/sql/migrations/20241226193319_world.sql new file mode 100644 index 00000000000..7ed2db790e1 --- /dev/null +++ b/sql/migrations/20241226193319_world.sql @@ -0,0 +1,42 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241226193319'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241226193319'); +-- Add your query below. + + +-- Remove empty pools. +DELETE FROM `pool_template` WHERE `entry` IN (417, 1858, 1864, 1873, 2528, 2530, 2549, 2868, 2869, 2870, 4292, 4293, 14228, 14249, 17005, 21400, 21422, 21424, 21450, 21486, 21526, 21550, 21600, 21650, 25620); +DELETE FROM `pool_pool` WHERE `pool_id` IN (417, 1858, 1864, 1873, 2528, 2530, 2549, 2868, 2869, 2870, 4292, 4293, 14228, 14249, 17005, 21400, 21422, 21424, 21450, 21486, 21526, 21550, 21600, 21650, 25620); + +-- `pool_creature` has guid 40461 for invalid pool 5004, skipped. +DELETE FROM `creature` WHERE `guid`=40461; +DELETE FROM `pool_creature` WHERE `guid`=40461; +DELETE FROM `creature_movement` WHERE `id`=40461; + +-- Pool ids are uint16 in core so make db reflect that. +ALTER TABLE `pool_creature` + CHANGE COLUMN `pool_entry` `pool_entry` SMALLINT UNSIGNED NOT NULL DEFAULT '0' AFTER `guid`; +ALTER TABLE `pool_creature_template` + CHANGE COLUMN `pool_entry` `pool_entry` SMALLINT UNSIGNED NOT NULL DEFAULT '0' AFTER `id`; +ALTER TABLE `pool_gameobject` + CHANGE COLUMN `pool_entry` `pool_entry` SMALLINT UNSIGNED NOT NULL DEFAULT '0' AFTER `guid`; +ALTER TABLE `pool_gameobject_template` + CHANGE COLUMN `pool_entry` `pool_entry` SMALLINT UNSIGNED NOT NULL DEFAULT '0' AFTER `id`; +ALTER TABLE `pool_pool` + CHANGE COLUMN `pool_id` `pool_id` SMALLINT UNSIGNED NOT NULL DEFAULT '0' FIRST, + CHANGE COLUMN `mother_pool` `mother_pool` SMALLINT UNSIGNED NOT NULL DEFAULT '0' AFTER `pool_id`; +ALTER TABLE `pool_template` + CHANGE COLUMN `entry` `entry` SMALLINT UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Pool entry' FIRST; + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241228161610_world.sql b/sql/migrations/20241228161610_world.sql new file mode 100644 index 00000000000..c21e584413b --- /dev/null +++ b/sql/migrations/20241228161610_world.sql @@ -0,0 +1,398 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241228161610'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241228161610'); +-- Add your query below. + + +-- Banner +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(8058, 180776, 0, 1608.54, 227.274, -46.2984, 5.48033, 0, 0, -0.390731, 0.920505, 120, 120, 100, 1, 7, 10), -- Undercity +(8059, 180776, 0, 1582.5, 227.39, -45.8039, 4.01426, 0, 0, -0.906307, 0.422619, 120, 120, 100, 1, 7, 10), -- Undercity +(8060, 180776, 0, 1608.55, 253.162, -46.6006, 0.715585, 0, 0, 0.350207, 0.936672, 120, 120, 100, 1, 7, 10), -- Undercity +(8061, 180776, 0, 1582.64, 253.478, -45.6257, 2.40855, 0, 0, 0.93358, 0.358368, 120, 120, 100, 1, 7, 10), -- Undercity +(8064, 180776, 1, 1382.96, -4355.71, 38.0235, 3.28124, 0, 0, -0.997563, 0.0697661, 120, 120, 100, 1, 7, 10), -- Orgrimmar +(8065, 180776, 1, 1676.75, -4363.53, 46.238, 3.57793, 0, 0, -0.976295, 0.216442, 120, 120, 100, 1, 7, 10), -- Orgrimmar +(8066, 180776, 1, 1733.14, -4408.25, 48.4424, 2.18166, 0, 0, 0.887011, 0.461749, 120, 120, 100, 1, 7, 10), -- Orgrimmar +(8067, 180776, 1, 1386.3, -4382.36, 38.4741, 3.26377, 0, 0, -0.998135, 0.0610518, 120, 120, 100, 1, 7, 10), -- Orgrimmar +(8068, 180776, 1, -1235.89, -90.114, 165.731, 0.488691, 0, 0, 0.241921, 0.970296, 120, 120, 100, 1, 7, 10), -- Thunder Bluff +(8069, 180776, 1, -1420.32, -111.116, 173.95, 5.67232, 0, 0, -0.300705, 0.953717, 120, 120, 100, 1, 7, 10), -- Thunder Bluff +(8072, 180776, 1, -1124.17, 64.2812, 146.743, 4.4855, 0, 0, -0.782608, 0.622515, 120, 120, 100, 1, 7, 10), -- Thunder Bluff +(8073, 180776, 1, -1181.29, -91.9861, 165.958, 2.53072, 0, 0, 0.953716, 0.300708, 120, 120, 100, 1, 7, 10), -- Thunder Bluff +(8074, 180776, 1, -1276.95, 50.0955, 132.456, 0.506145, 0, 0, 0.25038, 0.968148, 120, 120, 100, 1, 7, 10), -- Thunder Bluff +(8075, 180776, 1, -1206.35, 133.66, 138.144, 3.82227, 0, 0, -0.942641, 0.333808, 120, 120, 100, 1, 7, 10); -- Thunder Bluff +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`, `flags`, `instance`, `patch_min`, `patch_max`) VALUES +(4825, 1, 'Luner Festival Banner', 0, 13, 7, 10), +(4826, 1, 'Luner Festival Banner', 0, 13, 7, 10), +(4827, 1, 'Luner Festival Banner', 0, 13, 7, 10), +(4828, 1, 'Luner Festival Banner', 0, 13, 7, 10), +(4829, 1, 'Luner Festival Banner', 0, 13, 7, 10), +(4830, 1, 'Luner Festival Banner', 0, 13, 7, 10), +(4831, 1, 'Luner Festival Banner', 0, 12, 7, 10), +(4832, 1, 'Luner Festival Banner', 0, 12, 7, 10), +(4833, 1, 'Luner Festival Banner', 0, 1, 7, 10), +(4834, 1, 'Luner Festival Banner', 0, 1, 7, 10), +(4835, 1, 'Luner Festival Banner', 0, 1, 7, 10), +(4836, 1, 'Luner Festival Banner', 0, 1, 7, 10), +(4837, 1, 'Luner Festival Banner', 0, 16, 7, 10), +(4838, 1, 'Luner Festival Banner', 0, 16, 7, 10); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`, `flags`, `patch_min`, `patch_max`) VALUES +(65203, 4825, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8069, 4825, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65204, 4826, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8074, 4826, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65205, 4827, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8068, 4827, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65206, 4828, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8075, 4828, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65207, 4829, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8073, 4829, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65208, 4830, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8072, 4830, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65209, 4831, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8064, 4831, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65210, 4832, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8067, 4832, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65199, 4833, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8059, 4833, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65200, 4834, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8061, 4834, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65201, 4835, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8058, 4835, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65202, 4836, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8060, 4836, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65211, 4837, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8065, 4837, 0, 'Lunar Festival Banner - White', 0, 7, 10), +(65212, 4838, 0, 'Lunar Festival Banner - Yellow', 0, 7, 10), +(8066, 4838, 0, 'Lunar Festival Banner - White', 0, 7, 10); +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES +(8058, 7), +(8059, 7), +(8060, 7), +(8061, 7), +(8064, 7), +(8065, 7), +(8066, 7), +(8067, 7), +(8068, 7), +(8069, 7), +(8072, 7), +(8073, 7), +(8074, 7), +(8075, 7); + +-- AQWar - Resource, Bars, Alliance, Tier 1 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4913.73, `position_y`=-1225.95, `position_z`=501.651, `orientation`=2.26893, `rotation0`=0, `rotation1`=0, `rotation2`=0.906307, `rotation3`=0.422619 WHERE `guid`=220101; + +-- AQWar - Resource, Bars, Alliance, Tier 2 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4913.74, `position_y`=-1225.93, `position_z`=501.651, `orientation`=2.26893, `rotation0`=0, `rotation1`=0, `rotation2`=0.906307, `rotation3`=0.422619 WHERE `guid`=220102; + +-- AQWar - Resource, Bars, Alliance, Tier 3 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4913.72, `position_y`=-1225.92, `position_z`=501.651, `orientation`=2.26893, `rotation0`=0, `rotation1`=0, `rotation2`=0.906307, `rotation3`=0.422619 WHERE `guid`=220103; + +-- AQWar - Resource, Bars, Alliance, Tier 4 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4913.71, `position_y`=-1225.91, `position_z`=501.651, `orientation`=2.26893, `rotation0`=0, `rotation1`=0, `rotation2`=0.906307, `rotation3`=0.422619 WHERE `guid`=220104; + +-- AQWar - Resource, Bars, Alliance, Tier 5 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4913.78, `position_y`=-1225.86, `position_z`=501.651, `orientation`=2.28638, `rotation0`=0, `rotation1`=0, `rotation2`=0.909961, `rotation3`=0.414694 WHERE `guid`=220105; + +-- Festive Gift +-- Event 21: Feast of Winter Veil: Gifts +UPDATE `gameobject` SET `position_x`=-4917.09, `position_y`=-981.593, `position_z`=501.838, `orientation`=2.40855, `rotation0`=0, `rotation1`=0, `rotation2`=0.93358, `rotation3`=0.358368 WHERE `guid`=151765; +UPDATE `gameobject` SET `position_x`=1627.26, `position_y`=-4414.72, `position_z`=15.8731, `orientation`=4.90438, `rotation0`=0, `rotation1`=0, `rotation2`=-0.636078, `rotation3`=0.771625 WHERE `guid`=151766; + +-- AQWar - Resource, Cooking, Alliance, Tier 1 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4937.28, `position_y`=-1282.87, `position_z`=501.672, `orientation`=2.25147, `rotation0`=0, `rotation1`=0, `rotation2`=0.902585, `rotation3`=0.430512 WHERE `guid`=220111; + +-- AQWar - Resource, Herbs, Alliance, Tier 1 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4935.58, `position_y`=-1284.82, `position_z`=501.671, `orientation`=2.25147, `rotation0`=0, `rotation1`=0, `rotation2`=0.902585, `rotation3`=0.430512 WHERE `guid`=220121; + +-- AQWar - Resource, Herbs, Alliance, Tier 2 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4935.6, `position_y`=-1284.84, `position_z`=501.671, `orientation`=2.25147, `rotation0`=0, `rotation1`=0, `rotation2`=0.902585, `rotation3`=0.430512 WHERE `guid`=220122; + +-- AQWar - Resource, Herbs, Alliance, Tier 3 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4935.59, `position_y`=-1284.83, `position_z`=501.671, `orientation`=2.25147, `rotation0`=0, `rotation1`=0, `rotation2`=0.902585, `rotation3`=0.430512 WHERE `guid`=220123; + +-- AQWar - Resource, Herbs, Alliance, Tier 4 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4935.62, `position_y`=-1284.83, `position_z`=501.671, `orientation`=2.25147, `rotation0`=0, `rotation1`=0, `rotation2`=0.902585, `rotation3`=0.430512 WHERE `guid`=220124; + +-- AQWar - Resource, Herbs, Alliance, Tier 5 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4935.56, `position_y`=-1284.89, `position_z`=501.671, `orientation`=2.23402, `rotation0`=0, `rotation1`=0, `rotation2`=0.898793, `rotation3`=0.438373 WHERE `guid`=220125; + +-- AQWar - Resource, Cooking, Alliance, Tier 2 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4937.14, `position_y`=-1282.9, `position_z`=501.672, `orientation`=2.26893, `rotation0`=0, `rotation1`=0, `rotation2`=0.906307, `rotation3`=0.422619 WHERE `guid`=220112; + +-- AQWar - Resource, Cooking, Alliance, Tier 3 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=-4937.29, `position_y`=-1282.87, `position_z`=501.672, `orientation`=2.25147, `rotation0`=0, `rotation1`=0, `rotation2`=0.902585, `rotation3`=0.430512 WHERE `guid`=220113; + +-- AQWar - Resource, Skins, Horde, Initial +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1590.82, `position_y`=-4155.33, `position_z`=36.2926, `orientation`=3.7001, `rotation0`=0, `rotation1`=0, `rotation2`=-0.961261, `rotation3`=0.27564 WHERE `guid`=220040; + +-- AQWar - Resource, Skins, Horde, Tier 1 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1590.88, `position_y`=-4155.33, `position_z`=36.298, `orientation`=3.68265, `rotation0`=0, `rotation1`=0, `rotation2`=-0.96363, `rotation3`=0.267241 WHERE `guid`=220041; + +-- AQWar - Resource, Skins, Horde, Tier 2 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1590.85, `position_y`=-4155.34, `position_z`=36.2996, `orientation`=3.7001, `rotation0`=0, `rotation1`=0, `rotation2`=-0.961261, `rotation3`=0.27564 WHERE `guid`=220042; + +-- AQWar - Resource, Skins, Horde, Tier 3 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1590.85, `position_y`=-4155.34, `position_z`=36.2992, `orientation`=3.7001, `rotation0`=0, `rotation1`=0, `rotation2`=-0.961261, `rotation3`=0.27564 WHERE `guid`=220043; + +-- AQWar - Resource, Skins, Horde, Tier 4 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1590.85, `position_y`=-4155.34, `position_z`=36.2995, `orientation`=3.7001, `rotation0`=0, `rotation1`=0, `rotation2`=-0.961261, `rotation3`=0.27564 WHERE `guid`=220044; + +-- AQWar - Resource, Skins, Horde, Tier 5 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1590.85, `position_y`=-4155.34, `position_z`=36.2999, `orientation`=3.7001, `rotation0`=0, `rotation1`=0, `rotation2`=-0.961261, `rotation3`=0.27564 WHERE `guid`=220045; + +-- AQWar - Resource, Herbs, Horde, Initial +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1637.11, `position_y`=-4147.21, `position_z`=36.0414, `orientation`=3.73501, `rotation0`=0, `rotation1`=0, `rotation2`=-0.956305, `rotation3`=0.292372 WHERE `guid`=220020; + +-- AQWar - Resource, Herbs, Horde, Tier 1 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1637.1, `position_y`=-4147.25, `position_z`=36.0531, `orientation`=3.73501, `rotation0`=0, `rotation1`=0, `rotation2`=-0.956305, `rotation3`=0.292372 WHERE `guid`=220021; + +-- AQWar - Resource, Herbs, Horde, Tier 2 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1637.11, `position_y`=-4147.25, `position_z`=36.0536, `orientation`=3.73501, `rotation0`=0, `rotation1`=0, `rotation2`=-0.956305, `rotation3`=0.292372 WHERE `guid`=220022; + +-- AQWar - Resource, Herbs, Horde, Tier 3 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1637.11, `position_y`=-4147.26, `position_z`=36.0547, `orientation`=3.75246, `rotation0`=0, `rotation1`=0, `rotation2`=-0.953716, `rotation3`=0.300708 WHERE `guid`=220023; + +-- AQWar - Resource, Herbs, Horde, Tier 4 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1637.08, `position_y`=-4147.23, `position_z`=36.0448, `orientation`=3.71755, `rotation0`=0, `rotation1`=0, `rotation2`=-0.958819, `rotation3`=0.284016 WHERE `guid`=220024; + +-- AQWar - Resource, Herbs, Horde, Tier 5 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1637.1, `position_y`=-4147.23, `position_z`=36.0451, `orientation`=3.71755, `rotation0`=0, `rotation1`=0, `rotation2`=-0.958819, `rotation3`=0.284016 WHERE `guid`=220025; + +-- AQWar - Resource, Bandages, Horde, Initial +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1579.35, `position_y`=-4109.25, `position_z`=34.5417, `orientation`=3.75246, `rotation0`=0, `rotation1`=0, `rotation2`=-0.953716, `rotation3`=0.300708 WHERE `guid`=220000; + +-- AQWar - Resource, Bandages, Horde, Tier 1 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1579.33, `position_y`=-4109.25, `position_z`=34.5487, `orientation`=3.71755, `rotation0`=0, `rotation1`=0, `rotation2`=-0.958819, `rotation3`=0.284016 WHERE `guid`=220001; + +-- AQWar - Resource, Bandages, Horde, Tier 2 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1579.32, `position_y`=-4109.28, `position_z`=34.5515, `orientation`=3.73501, `rotation0`=0, `rotation1`=0, `rotation2`=-0.956305, `rotation3`=0.292372 WHERE `guid`=220002; + +-- AQWar - Resource, Bandages, Horde, Tier 3 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1579.33, `position_y`=-4109.28, `position_z`=34.547, `orientation`=3.73501, `rotation0`=0, `rotation1`=0, `rotation2`=-0.956305, `rotation3`=0.292372 WHERE `guid`=220003; + +-- AQWar - Resource, Bandages, Horde, Tier 4 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1579.33, `position_y`=-4109.28, `position_z`=34.5475, `orientation`=3.73501, `rotation0`=0, `rotation1`=0, `rotation2`=-0.956305, `rotation3`=0.292372 WHERE `guid`=220004; + +-- AQWar - Resource, Bandages, Horde, Tier 5 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1579.33, `position_y`=-4109.28, `position_z`=34.5478, `orientation`=3.73501, `rotation0`=0, `rotation1`=0, `rotation2`=-0.956305, `rotation3`=0.292372 WHERE `guid`=220005; + +-- AQWar - Resource, Cooking, Horde, Initial +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1619.83, `position_y`=-4092.43, `position_z`=34.5107, `orientation`=3.7001, `rotation0`=0, `rotation1`=0, `rotation2`=-0.961261, `rotation3`=0.27564 WHERE `guid`=220010; + +-- AQWar - Resource, Cooking, Horde, Tier 1 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1619.8, `position_y`=-4092.53, `position_z`=34.4888, `orientation`=3.7001, `rotation0`=0, `rotation1`=0, `rotation2`=-0.961261, `rotation3`=0.27564 WHERE `guid`=220011; + +-- AQWar - Resource, Cooking, Horde, Tier 2 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1619.8, `position_y`=-4092.53, `position_z`=34.4892, `orientation`=3.7001, `rotation0`=0, `rotation1`=0, `rotation2`=-0.961261, `rotation3`=0.27564 WHERE `guid`=220012; + +-- AQWar - Resource, Cooking, Horde, Tier 3 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1619.81, `position_y`=-4092.53, `position_z`=34.4901, `orientation`=3.7001, `rotation0`=0, `rotation1`=0, `rotation2`=-0.961261, `rotation3`=0.27564 WHERE `guid`=220013; + +-- AQWar - Resource, Cooking, Horde, Tier 4 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1619.81, `position_y`=-4092.53, `position_z`=34.4894, `orientation`=3.7001, `rotation0`=0, `rotation1`=0, `rotation2`=-0.961261, `rotation3`=0.27564 WHERE `guid`=220014; + +-- AQWar - Resource, Cooking, Horde, Tier 5 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1619.81, `position_y`=-4092.52, `position_z`=34.4912, `orientation`=3.7001, `rotation0`=0, `rotation1`=0, `rotation2`=-0.961261, `rotation3`=0.27564 WHERE `guid`=220015; + +-- AQWar - Resource, Bars, Horde, Initial +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1683.11, `position_y`=-4134.35, `position_z`=39.5419, `orientation`=3.71755, `rotation0`=0, `rotation1`=0, `rotation2`=-0.958819, `rotation3`=0.284016 WHERE `guid`=220030; + +-- AQWar - Resource, Bars, Horde, Tier 1 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1683.1, `position_y`=-4134.31, `position_z`=39.539, `orientation`=3.73501, `rotation0`=0, `rotation1`=0, `rotation2`=-0.956305, `rotation3`=0.292372 WHERE `guid`=220031; + +-- AQWar - Resource, Bars, Horde, Tier 2 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1683.1, `position_y`=-4134.3, `position_z`=39.5387, `orientation`=3.73501, `rotation0`=0, `rotation1`=0, `rotation2`=-0.956305, `rotation3`=0.292372 WHERE `guid`=220032; + +-- AQWar - Resource, Bars, Horde, Tier 3 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1683.11, `position_y`=-4134.31, `position_z`=39.5403, `orientation`=3.73501, `rotation0`=0, `rotation1`=0, `rotation2`=-0.956305, `rotation3`=0.292372 WHERE `guid`=220033; + +-- AQWar - Resource, Bars, Horde, Tier 4 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1683.03, `position_y`=-4134.31, `position_z`=39.528, `orientation`=3.71755, `rotation0`=0, `rotation1`=0, `rotation2`=-0.958819, `rotation3`=0.284016 WHERE `guid`=220034; + +-- AQWar - Resource, Bars, Horde, Tier 5 +-- Event 22: AQ War Effort (NPC & GO 'Initial') +UPDATE `gameobject` SET `position_x`=1683.14, `position_y`=-4134.34, `position_z`=39.5466, `orientation`=3.75246, `rotation0`=0, `rotation1`=0, `rotation2`=-0.953716, `rotation3`=0.300708 WHERE `guid`=220035; + +-- War Map +-- Event 54: AQ War Troop Silithus (NPC & GO) DAY 1 +UPDATE `gameobject` SET `position_x`=-6779.12, `position_y`=815.042, `position_z`=55.747, `orientation`=0, `rotation0`=0, `rotation1`=0, `rotation2`=0, `rotation3`=1 WHERE `guid`=220200; + +-- Duke's Box +-- Event 54: AQ War Troop Silithus (NPC & GO) DAY 1 +UPDATE `gameobject` SET `position_x`=-6782.3, `position_y`=812.623, `position_z`=55.7469, `orientation`=0.698131, `rotation0`=0, `rotation1`=0, `rotation2`=0.34202, `rotation3`=0.939693 WHERE `guid`=220207; + +-- Firework Launcher +-- Event 7: Lunar Festival +UPDATE `gameobject` SET `position_x`=10152.6, `position_y`=2607.9, `position_z`=1330.83, `orientation`=4.32842, `rotation0`=0, `rotation1`=0, `rotation2`=-0.829037, `rotation3`=0.559194 WHERE `guid`=65331; + +-- Festive Mug +-- Event 38: Chinese New Year +UPDATE `gameobject` SET `position_x`=-14412.9, `position_y`=424.427, `position_z`=9.90461, `orientation`=1.88495, `rotation0`=0, `rotation1`=0, `rotation2`=0.809016, `rotation3`=0.587786 WHERE `guid`=375057; +UPDATE `gameobject` SET `position_x`=-14347.1, `position_y`=439.873, `position_z`=8.53721, `orientation`=3.6652, `rotation0`=0, `rotation1`=0, `rotation2`=-0.965925, `rotation3`=0.258821 WHERE `guid`=379588; + +-- Arena Spoils +UPDATE `gameobject` SET `position_x`=595.293, `position_y`=-188.853, `position_z`=-54.1381, `orientation`=0.191985, `rotation0`=0, `rotation1`=0, `rotation2`=0.0958452, `rotation3`=0.995396 WHERE `guid`=399068; + +-- Grand Widow Faerlina Door +UPDATE `gameobject` SET `id`=181167 WHERE `id`=194022; +UPDATE `gameobject_template` SET `flags`=34 WHERE `entry`=181167; + +-- Undead Fire +-- Event 90: Scourge Invasion - Attacking Winterspring +-- Event 91: Scourge Invasion - Attacking Tanaris +-- Event 92: Scourge Invasion - Attacking Azshara +-- Event 93: Scourge Invasion - Attacking Blasted Lands +-- Event 94: Scourge Invasion - Attacking Eastern Plaguelands +-- Event 95: Scourge Invasion - Attacking Burning Steppes +UPDATE `gameobject` SET `position_x`=-11539.1, `position_y`=-3284.73, `position_z`=8.61913, `orientation`=3.87463, `rotation0`=0, `rotation1`=0, `rotation2`=-0.93358, `rotation3`=0.358368 WHERE `guid`=67986; + +-- Undead Fire Aura +-- Event 90: Scourge Invasion - Attacking Winterspring +-- Event 91: Scourge Invasion - Attacking Tanaris +-- Event 92: Scourge Invasion - Attacking Azshara +-- Event 93: Scourge Invasion - Attacking Blasted Lands +-- Event 94: Scourge Invasion - Attacking Eastern Plaguelands +-- Event 95: Scourge Invasion - Attacking Burning Steppes +UPDATE `gameobject` SET `position_x`=-11539.1, `position_y`=-3284.73, `position_z`=8.61913, `orientation`=3.87463, `rotation0`=0, `rotation1`=0, `rotation2`=-0.93358, `rotation3`=0.358368 WHERE `guid`=68016; + +-- Heigan the Unclean - Exit Door +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(13336, 181203, 533, 2771.5, -3737.34, 273.596, 4.71239, 0, 0, -0.707107, 0.707107, 180, 180, 100, 0, 9, 10); -- Naxxramas + +-- Standing, Large +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(13504, 181300, 0, 1595.84, 240.163, -52.1429, 0.890117, 0, 0, 0.430511, 0.902586, 180, 180, 100, 1, 9, 10), -- Undercity +(13505, 181300, 0, -8884.23, 566.347, 92.8298, 0.715585, 0, 0, 0.350207, 0.936672, 180, 180, 100, 1, 9, 10), -- Stormwind City +(13506, 181300, 0, -8893.99, 578.844, 92.8094, 0.680677, 0, 0, 0.333806, 0.942642, 180, 180, 100, 1, 9, 10), -- Stormwind City +(13507, 181300, 0, -8973.18, 490.654, 97.0779, 2.19911, 0, 0, 0.891006, 0.453991, 180, 180, 100, 1, 9, 10), -- Stormwind City +(13508, 181300, 0, -8987.69, 509.24, 97.0765, 5.39307, 0, 0, -0.430511, 0.902586, 180, 180, 100, 1, 9, 10), -- Stormwind City +(13509, 181300, 0, -9018.08, 485.234, 97.1197, 5.42797, 0, 0, -0.414693, 0.909961, 180, 180, 100, 1, 9, 10), -- Stormwind City +(13510, 181300, 0, -9003.58, 466.834, 97.1185, 2.1293, 0, 0, 0.874619, 0.48481, 180, 180, 100, 1, 9, 10), -- Stormwind City +(13528, 181300, 0, -9066.78, 452.947, 93.2955, 5.51524, 0, 0, -0.374606, 0.927184, 180, 180, 100, 1, 9, 10), -- Stormwind City +(13539, 181300, 0, -9046.63, 428.583, 93.2955, 2.30383, 0, 0, 0.913545, 0.406738, 180, 180, 100, 1, 9, 10), -- Stormwind City +(13545, 181300, 0, -9060.67, 417.703, 93.2955, 2.28638, 0, 0, 0.909961, 0.414694, 180, 180, 100, 1, 9, 10), -- Stormwind City +(13553, 181300, 0, -9079.23, 442.914, 93.2955, 5.37562, 0, 0, -0.438371, 0.898794, 180, 180, 100, 1, 9, 10), -- Stormwind City +(13554, 181300, 0, -9106.58, 422.097, 93.7786, 3.78737, 0, 0, -0.948323, 0.317306, 180, 180, 100, 1, 9, 10), -- Stormwind City +(13555, 181300, 0, -9085.16, 396.496, 93.5758, 3.82227, 0, 0, -0.942641, 0.333808, 180, 180, 100, 1, 9, 10); -- Stormwind City +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES +(13504, 1), +(13505, 1), +(13506, 1), +(13507, 1), +(13508, 1), +(13509, 1), +(13510, 1), +(13528, 1), +(13539, 1), +(13545, 1), +(13553, 1), +(13554, 1), +(13555, 1); + +-- Camp Table +-- Event 1: Midsummer Fire Festival +UPDATE `gameobject` SET `position_x`=-11279.4, `position_y`=-3054.08, `position_z`=-0.157278, `orientation`=5.96903, `rotation0`=0, `rotation1`=0, `rotation2`=-0.156434, `rotation3`=0.987688 WHERE `guid`=36099; + +-- Floating, medium +-- Event 1: Midsummer Fire Festival +UPDATE `gameobject` SET `position_x`=10043.9, `position_y`=2380.27, `position_z`=1313.66, `orientation`=4.32842, `rotation0`=0, `rotation1`=0, `rotation2`=-0.829037, `rotation3`=0.559194 WHERE `guid`=36265; + +-- Kel'Thuzad Trigger +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(13558, 181444, 533, 3716.13, -5106.58, 128.42, 4.7822, 0, 0, -0.681998, 0.731354, 180, 180, 100, 1, 0, 10); -- Naxxramas + +-- Doodad_kelthuzad_throne02 +UPDATE `gameobject` SET `position_x`=3764.48, `position_y`=-5116.53, `position_z`=146.207, `orientation`=2.94088, `rotation0`=0, `rotation1`=0, `rotation2`=0.994968, `rotation3`=0.100189 WHERE `guid`=533128; + +-- Plague Fissure +UPDATE `gameobject` SET `position_x`=2803.05, `position_y`=-3676.46, `position_z`=273.84, `orientation`=0, `rotation0`=0, `rotation1`=0, `rotation2`=0, `rotation3`=1 WHERE `guid`=533177; + +-- Plague Fissure +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `patch_min`, `patch_max`) VALUES +(13562, 181695, 533, 2759.12, -3705.27, 273.667, 0, 0, 0, 0, 1, 180, 180, 100, 1, 9, 10); -- Naxxramas +UPDATE `gameobject` SET `position_x`=2786.7, `position_y`=-3733, `position_z`=273.631, `orientation`=0, `rotation0`=0, `rotation1`=0, `rotation2`=0, `rotation3`=1 WHERE `guid`=533189; + +-- Dust Bag +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `spawn_flags`, `visibility_mod`, `patch_min`, `patch_max`) VALUES +-- Alliance Camp +(9496, 181962, 1, -7144.21, 1402.09, 4.55081, 6.10865, 0, 0, -0.0871553, 0.996195, 180, 180, 100, 1, 2, 0, 10, 10), +(9497, 181962, 1, -7142.41, 1402.99, 4.79462, 6.03884, 0, 0, -0.121869, 0.992546, 180, 180, 100, 1, 2, 0, 10, 10), +(9498, 181962, 1, -7140.45, 1401.68, 4.85929, 5.98648, 0, 0, -0.147809, 0.989016, 180, 180, 100, 1, 2, 0, 10, 10), +(9499, 181962, 1, -7142.03, 1403.94, 4.91669, 1.02974, 0, 0, 0.492423, 0.870356, 180, 180, 100, 1, 2, 0, 10, 10), +(9500, 181962, 1, -7143.07, 1403.95, 4.82184, 1.81514, 0, 0, 0.788011, 0.615662, 180, 180, 100, 1, 2, 0, 10, 10), +(9501, 181962, 1, -7145.65, 1401.86, 4.39894, 2.23402, 0, 0, 0.898793, 0.438373, 180, 180, 100, 1, 2, 0, 10, 10), +(9502, 181962, 1, -7144.95, 1402.46, 4.51687, 1.36136, 0, 0, 0.62932, 0.777146, 180, 180, 100, 1, 2, 0, 10, 10), +(9503, 181962, 1, -7144.9, 1401.41, 4.42734, 4.4855, 0, 0, -0.782608, 0.622515, 180, 180, 100, 1, 2, 0, 10, 10), +(9504, 181962, 1, -7147.84, 1405.12, 4.44306, 0.506145, 0, 0, 0.25038, 0.968148, 180, 180, 100, 1, 2, 0, 10, 10), +(9507, 181962, 1, -7148.8, 1405.12, 4.35205, 1.98967, 0, 0, 0.83867, 0.54464, 180, 180, 100, 1, 2, 0, 10, 10), +(9508, 181962, 1, -7148.12, 1403.96, 4.36007, 5.55015, 0, 0, -0.358368, 0.93358, 180, 180, 100, 1, 2, 0, 10, 10), +-- Horde Camp +(13566, 181962, 1, -7596.26, 756.602, -16.7828, 2.51327, 0, 0, 0.951056, 0.309017, 180, 180, 100, 1, 2, 0, 10, 10), +(13567, 181962, 1, -7595.53, 756.927, -16.7378, 1.15192, 0, 0, 0.544639, 0.838671, 180, 180, 100, 1, 2, 0, 10, 10), +(13568, 181962, 1, -7595.12, 756.091, -16.7162, 5.28835, 0, 0, -0.477159, 0.878817, 180, 180, 100, 1, 2, 0, 10, 10), +(13582, 181962, 1, -7596.3, 754.496, -16.8031, 0.59341, 0, 0, 0.292371, 0.956305, 180, 180, 100, 1, 2, 0, 10, 10), +(13583, 181962, 1, -7598.29, 756.553, -16.8921, 0.383971, 0, 0, 0.190808, 0.981627, 180, 180, 100, 1, 2, 0, 10, 10), +(13584, 181962, 1, -7594.49, 753.237, -16.7275, 2.26893, 0, 0, 0.906307, 0.422619, 180, 180, 100, 1, 2, 0, 10, 10), +(13585, 181962, 1, -7598.62, 755.709, -16.9598, 1.98967, 0, 0, 0.83867, 0.54464, 180, 180, 100, 1, 2, 0, 10, 10), +(13587, 181962, 1, -7597.09, 754.64, -16.8684, 4.04917, 0, 0, -0.898793, 0.438373, 180, 180, 100, 1, 2, 0, 10, 10), +(13588, 181962, 1, -7596.59, 755.269, -16.8084, 1.20428, 0, 0, 0.566406, 0.824126, 180, 180, 100, 1, 2, 0, 10, 10), +(13589, 181962, 1, -7594.29, 752.393, -16.7654, 1.46608, 0, 0, 0.66913, 0.743145, 180, 180, 100, 1, 2, 0, 10, 10), +(13590, 181962, 1, -7599.11, 757.084, -16.9406, 4.69494, 0, 0, -0.71325, 0.70091, 180, 180, 100, 1, 2, 0, 10, 10), +(13591, 181962, 1, -7598.36, 757.403, -16.8868, 2.18166, 0, 0, 0.887011, 0.461749, 180, 180, 100, 1, 2, 0, 10, 10); + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241229001108_world.sql b/sql/migrations/20241229001108_world.sql new file mode 100644 index 00000000000..6eb009bfc53 --- /dev/null +++ b/sql/migrations/20241229001108_world.sql @@ -0,0 +1,33 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241229001108'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241229001108'); +-- Add your query below. + + +-- Naglering was not unique before 1.10. +UPDATE `item_template` SET `max_count`=0 WHERE `entry`=11669 AND `patch`=0; + +-- Acidic Walkers correct stat order before 1.10. +UPDATE `item_template` SET `stat_type2`=3, `stat_value2`=4, `stat_type3`=6, `stat_value3`=7 WHERE `entry`=9454 AND `patch`=0; + +-- Backusarian Gauntlets correct stat order before 1.10. +UPDATE `item_template` SET `stat_type2`=6, `stat_value2`=14, `stat_type3`=7, `stat_value3`=15 WHERE `entry`=12637 AND `patch`=0; + +-- Cadaverous Leggings correct stat order before 1.10. +UPDATE `item_template` SET `stat_type2`=3, `stat_value2`=12, `stat_type3`=4, `stat_value3`=10 WHERE `entry`=14638 AND `patch`=0; + +-- Boots of the Shrieker correct stat order before 1.10. +UPDATE `item_template` SET `stat_type3`=4, `stat_type4`=7 WHERE `entry`=13398 AND `patch`=0; + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241229144029_world.sql b/sql/migrations/20241229144029_world.sql new file mode 100644 index 00000000000..eb3d4b1ddb2 --- /dev/null +++ b/sql/migrations/20241229144029_world.sql @@ -0,0 +1,24 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241229144029'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241229144029'); +-- Add your query below. + + +-- Add missing cry emote to Janice Felstone. +DELETE FROM `creature_ai_scripts` WHERE `id`=1077801; +INSERT INTO `creature_ai_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(1077801, 0, 0, 1, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Janice Felstone - Emote Cry'), +(1077801, 0, 1, 16, 2680, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Janice Felstone - Play Sound'); + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241231005055_world.sql b/sql/migrations/20241231005055_world.sql new file mode 100644 index 00000000000..788e87f705b --- /dev/null +++ b/sql/migrations/20241231005055_world.sql @@ -0,0 +1,79 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241231005055'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241231005055'); +-- Add your query below. + + +-- Remove loot from equipment of creatures. (handled by static flag) +DELETE FROM `creature_equip_template` WHERE `entry`=2344; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (2344, 1, 12934, 1985, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=2345; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (2345, 1, 1901, 0, 2552, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=2346; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (2346, 1, 2809, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=3727; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (3727, 1, 5289, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=4809; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (4809, 1, 2176, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=4810; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (4810, 1, 4991, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=4811; +UPDATE `creature_template` SET `equipment_id`=0 WHERE `entry`=4811; +DELETE FROM `creature_equip_template` WHERE `entry`=4812; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (4812, 1, 1907, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=4813; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (4813, 1, 2559, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=4814; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (4814, 1, 2177, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=4832; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (4832, 1, 5303, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=5860; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (5860, 1, 5277, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=5861; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (5861, 1, 3361, 1984, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=5862; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (5862, 1, 5303, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=5998; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (5998, 1, 2182, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=5999; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (5999, 1, 2178, 1984, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=6000; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (6000, 1, 2176, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=6002; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (6002, 1, 2177, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=6003; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (6003, 1, 5305, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=6004; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (6004, 1, 5280, 0, 6886, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=6005; +UPDATE `creature_template` SET `equipment_id`=0 WHERE `entry`=6005; +DELETE FROM `creature_equip_template` WHERE `entry`=6006; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (6006, 1, 1907, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=6007; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (6007, 1, 6224, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=6008; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (6008, 1, 2559, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=6009; +UPDATE `creature_template` SET `equipment_id`=0 WHERE `entry`=6009; +DELETE FROM `creature_equip_template` WHERE `entry`=7360; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (7360, 1, 2695, 1985, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=7851; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (7851, 1, 4991, 0, 0, 0, 10); +DELETE FROM `creature_equip_template` WHERE `entry`=8282; +INSERT INTO `creature_equip_template` (`entry`, `probability`, `item1`, `item2`, `item3`, `patch_min`, `patch_max`) VALUES (8282, 1, 2177, 0, 0, 0, 10); + +-- Remove empty item row. +DELETE FROM `item_template` WHERE `entry`=0; + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20241231045934_world.sql b/sql/migrations/20241231045934_world.sql new file mode 100644 index 00000000000..d5b34164b24 --- /dev/null +++ b/sql/migrations/20241231045934_world.sql @@ -0,0 +1,260 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241231045934'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20241231045934'); +-- Add your query below. + + +-- Digger / Forager +UPDATE `creature` SET `id`=4113, `id2`=4114, `movement_type`=2, `wander_distance`=0, `position_x`=-5577.205078, `position_y`=-3046.627441, `position_z`=-51.085835, `orientation`=3.09626 WHERE `guid`=21168; +INSERT INTO `creature_movement` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES +(21168, 1, -5577.205078, -3046.627441, -51.085835, 100.000000, 0, 0.000000, 0), +(21168, 2, -5598.694824, -3051.496582, -51.804516, 100.000000, 0, 0.000000, 0), +(21168, 3, -5622.291504, -3048.560547, -50.123432, 100.000000, 0, 0.000000, 0), +(21168, 4, -5636.980469, -3068.203613, -48.460876, 100.000000, 0, 0.000000, 0), +(21168, 5, -5655.888672, -3082.365967, -47.014256, 100.000000, 0, 0.000000, 0), +(21168, 6, -5667.268066, -3083.895508, -46.223736, 100.000000, 0, 0.000000, 0), +(21168, 7, -5674.979492, -3076.548096, -46.341225, 100.000000, 0, 0.000000, 0), +(21168, 8, -5676.949707, -3073.082764, -46.365749, 100.000000, 0, 0.000000, 0), +(21168, 9, -5672.545898, -3064.973877, -44.762089, 100.000000, 16000, 0.000000, 4113), +(21168, 10, -5678.213867, -3060.809814, -45.157825, 100.000000, 0, 0.000000, 0), +(21168, 11, -5685.600000, -3054.660000, -46.239900, 100.000000, 0, 0.000000, 0), +(21168, 12, -5677.620000, -3038.470000, -46.364900, 100.000000, 0, 0.000000, 0), +(21168, 13, -5683.920000, -3031.450000, -44.413700, 100.000000, 0, 0.000000, 0), +(21168, 14, -5688.791504, -3027.419189, -39.195911, 100.000000, 0, 0.000000, 0), +(21168, 15, -5685.689941, -3020.705322, -38.431103, 100.000000, 0, 0.000000, 0), +(21168, 16, -5680.379395, -3010.234375, -37.506283, 100.000000, 0, 0.000000, 0), +(21168, 17, -5677.346680, -3003.399902, -36.906395, 100.000000, 0, 0.000000, 0), +(21168, 18, -5672.020996, -2993.657715, -37.491028, 100.000000, 0, 0.000000, 0), +(21168, 19, -5665.534180, -2985.289307, -39.001850, 100.000000, 0, 0.000000, 0), +(21168, 20, -5658.670000, -2971.430000, -41.076000, 100.000000, 16000, 0.000000, 4113), +(21168, 21, -5665.534180, -2985.289307, -39.001850, 100.000000, 0, 0.000000, 0), +(21168, 22, -5672.020996, -2993.657715, -37.491028, 100.000000, 0, 0.000000, 0), +(21168, 23, -5677.346680, -3003.399902, -36.906395, 100.000000, 0, 0.000000, 0), +(21168, 24, -5680.379395, -3010.234375, -37.506283, 100.000000, 0, 0.000000, 0), +(21168, 25, -5685.689941, -3020.705322, -38.431103, 100.000000, 0, 0.000000, 0), +(21168, 26, -5688.791504, -3027.419189, -39.195911, 100.000000, 0, 0.000000, 0), +(21168, 27, -5683.920000, -3031.450000, -44.413700, 100.000000, 0, 0.000000, 0), +(21168, 28, -5673.084473, -3030.127930, -46.446888, 100.000000, 0, 0.000000, 0), +(21168, 29, -5657.228027, -3026.672363, -46.839172, 100.000000, 0, 0.000000, 0), +(21168, 30, -5629.370000, -3025.780000, -48.626800, 100.000000, 0, 0.000000, 0), +(21168, 31, -5615.170000, -3031.230000, -50.830400, 100.000000, 0, 0.000000, 0), +(21168, 32, -5592.790000, -3032.350000, -50.601700, 100.000000, 0, 0.000000, 0), +(21168, 33, -5578.050000, -3028.840000, -50.584300, 100.000000, 0, 0.000000, 0), +(21168, 34, -5557.490000, -3038.950000, -49.679500, 100.000000, 0, 0.000000, 0), +(21168, 35, -5549.000000, -3040.920000, -46.015700, 100.000000, 0, 0.000000, 0), +(21168, 36, -5542.310000, -3043.570000, -44.172700, 5.92976000, 16000, 0.000000, 4113), +(21168, 37, -5552.650000, -3047.000000, -45.863100, 100.000000, 0, 0.000000, 0), +(21168, 38, -5560.740000, -3047.399999, -48.755800, 100.000000, 0, 0.000000, 0); +DELETE FROM `creature_movement_scripts` WHERE `id`=4113; +INSERT INTO `creature_movement_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(4113, 0, 0, 1, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Gravelsnout Digger - Emote State Work'), +(4113, 16, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Gravelsnout Digger - Emote None'); + +-- Digger / Surveyor +UPDATE `creature` SET `id`=4113, `id2`=4116, `movement_type`=2, `wander_distance`=0, `position_x`=-5683.45, `position_y`=-3402.22, `position_z`=-39.9734, `orientation`=0.187281 WHERE `guid`=21177; +INSERT INTO `creature_movement` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES +(21177, 1, -5683.45, -3402.22, -39.9734, 0.187281, 16000, 0.000000, 4113), +(21177, 2, -5695.49, -3404.63, -41.3489, 100.000000, 0, 0.000000, 0), +(21177, 3, -5707.49, -3407.07, -43.2466, 100.000000, 0, 0.000000, 0), +(21177, 4, -5712.99, -3407.7, -44.156, 100.000000, 0, 0.000000, 0), +(21177, 5, -5726.11, -3403.67, -43.1356, 100.000000, 0, 0.000000, 0), +(21177, 6, -5731.73, -3402.64, -43.1177, 100.000000, 0, 0.000000, 0), +(21177, 7, -5743.47, -3400.51, -43.4636, 100.000000, 0, 0.000000, 0), +(21177, 8, -5745, -3383.8, -39.1807, 100.000000, 0, 0.000000, 0), +(21177, 9, -5756.21, -3368.11, -33.2895, 100.000000, 0, 0.000000, 0), +(21177, 10, -5768.48, -3345.85, -33.8938, 100.000000, 0, 0.000000, 0), +(21177, 11, -5775.52, -3328.23, -35.9136, 100.000000, 0, 0.000000, 0), +(21177, 12, -5768.45, -3302.31, -29.396, 100.000000, 0, 0.000000, 0), +(21177, 13, -5770.91, -3283.56, -23.4318, 100.000000, 0, 0.000000, 0), +(21177, 14, -5763.18, -3254.46, -27.044, 100.000000, 0, 0.000000, 0), +(21177, 15, -5763.62, -3240.85, -28.7719, 100.000000, 0, 0.000000, 0), +(21177, 16, -5759, -3229.04, -31.1396, 100.000000, 0, 0.000000, 0), +(21177, 17, -5759.05, -3220.16, -31.0334, 100.000000, 0, 0.000000, 0), +(21177, 18, -5755.35, -3203.2, -33.8634, 0.928291, 16000, 0.000000, 4113), +(21177, 19, -5759.05, -3220.16, -31.0334, 100.000000, 0, 0.000000, 0), +(21177, 20, -5764.3, -3242.57, -28.0418, 100.000000, 0, 0.000000, 0), +(21177, 21, -5763.18, -3254.46, -27.044, 100.000000, 0, 0.000000, 0), +(21177, 22, -5769.74, -3285.49, -25.2488, 100.000000, 0, 0.000000, 0), +(21177, 23, -5769.61, -3305.96, -30.0609, 100.000000, 0, 0.000000, 0), +(21177, 24, -5780.24, -3333.9, -38.2232, 100.000000, 0, 0.000000, 0), +(21177, 25, -5794.56, -3360.22, -44.9097, 100.000000, 0, 0.000000, 0), +(21177, 26, -5804.11, -3379.93, -47.6672, 4.24822, 16000, 0.000000, 4113), +(21177, 27, -5780.44, -3383.91, -45.7149, 100.000000, 0, 0.000000, 0), +(21177, 28, -5753.39, -3384.36, -40.77, 100.000000, 0, 0.000000, 0), +(21177, 29, -5743.47, -3400.51, -43.4636, 100.000000, 0, 0.000000, 0), +(21177, 30, -5712.99, -3407.7, -44.156, 100.000000, 0, 0.000000, 0), +(21177, 31, -5695.49, -3404.63, -41.3489, 100.000000, 0, 0.000000, 0); + +-- Digger / Surveyor +UPDATE `creature` SET `id`=4113, `id2`=4116, `movement_type`=2, `wander_distance`=0, `position_x`=-5412.9, `position_y`=-3354.58, `position_z`=-37.1158, `orientation`=5.53404 WHERE `guid`=21174; +INSERT INTO `creature_movement` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES +(21174, 1, -5412.9, -3354.58, -37.1158, 5.53404, 16000, 0.000000, 4113), +(21174, 2, -5418.41, -3349.54, -39.2202, 100.000000, 0, 0.000000, 0), +(21174, 3, -5423.93, -3346.93, -40.0309, 100.000000, 0, 0.000000, 0), +(21174, 4, -5438.72, -3340.69, -37.8232, 100.000000, 0, 0.000000, 0), +(21174, 5, -5446.58, -3337.36, -36.4722, 100.000000, 0, 0.000000, 0), +(21174, 6, -5468.65, -3340.08, -32.1009, 100.000000, 0, 0.000000, 0), +(21174, 7, -5475.28, -3330.96, -29.7181, 2.21517, 16000, 0.000000, 4113), +(21174, 8, -5465.22, -3334.17, -32.8386, 100.000000, 0, 0.000000, 0), +(21174, 9, -5446.58, -3337.36, -36.4722, 100.000000, 0, 0.000000, 0), +(21174, 10, -5441.31, -3319.33, -35.2426, 100.000000, 0, 0.000000, 0), +(21174, 11, -5438.31, -3302.64, -35.1959, 100.000000, 0, 0.000000, 0), +(21174, 12, -5441.42, -3291.61, -33.3526, 1.96142, 16000, 0.000000, 4113), +(21174, 13, -5438.31, -3302.64, -35.1959, 100.000000, 0, 0.000000, 0), +(21174, 14, -5441.31, -3319.33, -35.2426, 100.000000, 0, 0.000000, 0), +(21174, 15, -5446.58, -3337.36, -36.4722, 100.000000, 0, 0.000000, 0), +(21174, 16, -5438.72, -3340.69, -37.8232, 100.000000, 0, 0.000000, 0), +(21174, 17, -5423.93, -3346.93, -40.0309, 100.000000, 0, 0.000000, 0); + +-- Digger / Surveyor +-- guid 21173 +UPDATE `creature` SET `id`=4113, `id2`=4116, `movement_type`=2, `wander_distance`=0, `position_x`=-5303.88, `position_y`=-3210.58, `position_z`=-38.108, `orientation`=0.702996 WHERE `guid`=21173; +DELETE FROM `creature_movement` WHERE `id`=21173; +INSERT INTO `creature_movement` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES +(21173, 1, -5303.88, -3210.58, -38.108, 0.702996, 16000, 0.000000, 4113), +(21173, 2, -5309.76, -3215.89, -38.6163, 100.000000, 0, 0.000000, 0), +(21173, 3, -5326.64, -3235.72, -40.7382, 100.000000, 0, 0.000000, 0), +(21173, 4, -5338.31, -3256.99, -41.0446, 100.000000, 0, 0.000000, 0), +(21173, 5, -5359.85, -3241, -43.6952, 100.000000, 0, 0.000000, 0), +(21173, 6, -5355.34, -3224.22, -42.7986, 100.000000, 0, 0.000000, 0), +(21173, 7, -5378.99, -3190.86, -30.3811, 100.000000, 0, 0.000000, 0), +(21173, 8, -5368.76, -3171.13, -29.4815, 0.791644, 16000, 0.000000, 4113), +(21173, 9, -5378.99, -3190.86, -30.3811, 100.000000, 0, 0.000000, 0), +(21173, 10, -5368.06, -3211.83, -36.8703, 100.000000, 0, 0.000000, 0), +(21173, 11, -5373.15, -3227.57, -37.821, 100.000000, 0, 0.000000, 0), +(21173, 12, -5359.85, -3241, -43.6952, 100.000000, 0, 0.000000, 0), +(21173, 13, -5338.57, -3259.28, -40.8438, 100.000000, 0, 0.000000, 0), +(21173, 14, -5330.42, -3240.24, -41.2852, 100.000000, 0, 0.000000, 0), +(21173, 15, -5325.74, -3233.77, -40.5765, 100.000000, 0, 0.000000, 0), +(21173, 16, -5310.62, -3216.29, -39.0843, 100.000000, 0, 0.000000, 0); + +-- Digger / Forager +INSERT INTO `creature` (`guid`, `id`, `id2`, `id3`, `id4`, `id5`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecsmin`, `spawntimesecsmax`, `wander_distance`, `health_percent`, `mana_percent`, `movement_type`, `spawn_flags`, `visibility_mod`, `patch_min`, `patch_max`) VALUES +(21540, 4113, 4114, 0, 0, 0, 1, -5388.39, -2792.21, -28.2212, 4.34009, 300, 300, 0, 100, 100, 2, 0, 0, 0, 10); +INSERT INTO `creature_movement` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES +(21540, 1, -5388.39, -2792.21, -28.2212, 4.34009, 16000, 0.000000, 4113), +(21540, 2, -5385.41, -2780.82, -27.7131, 100.000000, 0, 0.000000, 0), +(21540, 3, -5380.85, -2775.71, -28.3603, 100.000000, 0, 0.000000, 0), +(21540, 4, -5380.77, -2758.78, -25.3726, 100.000000, 0, 0.000000, 0), +(21540, 5, -5380.26, -2747.8, -27.6929, 100.000000, 0, 0.000000, 0), +(21540, 6, -5381.96, -2737.17, -27.4202, 100.000000, 0, 0.000000, 0), +(21540, 7, -5379.37, -2720.18, -28.0506, 100.000000, 0, 0.000000, 0), +(21540, 8, -5376.86, -2698.61, -28.8572, 1.39858, 16000, 0.000000, 4113), +(21540, 9, -5379.37, -2720.18, -28.0506, 100.000000, 0, 0.000000, 0), +(21540, 10, -5362.38, -2741.79, -25.4607, 100.000000, 0, 0.000000, 0), +(21540, 11, -5352.63, -2752.09, -32.3077, 100.000000, 0, 0.000000, 0), +(21540, 12, -5349.2, -2769.29, -41.128, 100.000000, 0, 0.000000, 0), +(21540, 13, -5347.51, -2776.88, -43.3204, 100.000000, 0, 0.000000, 0), +(21540, 14, -5342.4, -2785.85, -45.4928, 100.000000, 0, 0.000000, 0), +(21540, 15, -5335.42, -2787.29, -46.5162, 6.09186, 16000, 0.000000, 4113), +(21540, 16, -5342.4, -2785.85, -45.4928, 100.000000, 0, 0.000000, 0), +(21540, 17, -5347.51, -2776.88, -43.3204, 100.000000, 0, 0.000000, 0), +(21540, 18, -5365.85, -2767.64, -38.5592,100.000000, 0, 0.000000, 0), +(21540, 19, -5380.26, -2747.8, -27.6929, 100.000000, 0, 0.000000, 0), +(21540, 20, -5380.77, -2758.78, -25.3726, 100.000000, 0, 0.000000, 0), +(21540, 21, -5380.85, -2775.71, -28.3603, 100.000000, 0, 0.000000, 0), +(21540, 22, -5385.03, -2783.34, -28.415, 100.000000, 0, 0.000000, 0); + +-- Digger / Forager +INSERT INTO `creature` (`guid`, `id`, `id2`, `id3`, `id4`, `id5`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecsmin`, `spawntimesecsmax`, `wander_distance`, `health_percent`, `mana_percent`, `movement_type`, `spawn_flags`, `visibility_mod`, `patch_min`, `patch_max`) VALUES +(21541, 4113, 4114, 0, 0, 0, 1, -5229.04, -2716.89, -48.3032, 1.30027, 300, 300, 0, 100, 100, 2, 0, 0, 0, 10); +INSERT INTO `creature_movement` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES +(21541, 1, -5229.04, -2716.89, -48.3032, 1.30027, 16000, 0.000000, 4113), +(21541, 2, -5234.96, -2739.95, -49.7299, 100.000000, 0, 0.000000, 0), +(21541, 3, -5251.09, -2756.48, -49.3771, 100.000000, 0, 0.000000, 0), +(21541, 4, -5259.18, -2757.12, -48.8489, 100.000000, 0, 0.000000, 0), +(21541, 5, -5281.29, -2762.18, -48.5574, 100.000000, 0, 0.000000, 0), +(21541, 6, -5310.22, -2778.74, -47.7718, 100.000000, 0, 0.000000, 0), +(21541, 7, -5321.14, -2784.58, -47.5234, 3.62914, 16000, 0.000000, 4113), +(21541, 8, -5311.93, -2791.88, -50.1181, 100.000000, 0, 0.000000, 0), +(21541, 9, -5304.51, -2797.77, -51.5683, 100.000000, 0, 0.000000, 0), +(21541, 10, -5290.91, -2800.98, -52.1154, 100.000000, 0, 0.000000, 0), +(21541, 11, -5284.09, -2809.55, -51.4081, 5.15046, 16000, 0.000000, 4113), +(21541, 12, -5290.91, -2800.98, -52.1154, 100.000000, 0, 0.000000, 0), +(21541, 13, -5304.51, -2797.77, -51.5683, 100.000000, 0, 0.000000, 0), +(21541, 14, -5310.22, -2778.74, -47.7718, 100.000000, 0, 0.000000, 0), +(21541, 15, -5288.41, -2765.43, -48.6034, 100.000000, 0, 0.000000, 0), +(21541, 16, -5259.18, -2757.12, -48.8489, 100.000000, 0, 0.000000, 0), +(21541, 17, -5251.09, -2756.48, -49.3771, 100.000000, 0, 0.000000, 0), +(21541, 18, -5243.43, -2748.2, -49.2543, 100.000000, 0, 0.000000, 0), +(21541, 19, -5234.96, -2739.95, -49.7299, 100.000000, 0, 0.000000, 0); + +-- Digger / Surveyor +UPDATE `creature` SET `id`=4113, `id2`=4116, `movement_type`=2, `wander_distance`=0, `position_x`=-4635.13, `position_y`=-946.347, `position_z`=-43.9067, `orientation`=2.7874 WHERE `guid`=21175; +INSERT INTO `creature_movement` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES +(21175, 1, -4635.13, -946.347, -43.9067, 2.7874, 16000, 0.000000, 4113), +(21175, 2, -4620.23, -949.246, -44.227, 100.000000, 0, 0.000000, 0), +(21175, 3, -4606.37, -958.566, -44.7544, 100.000000, 0, 0.000000, 0), +(21175, 4, -4601.22, -957.194, -48.205, 100.000000, 0, 0.000000, 0), +(21175, 5, -4591.65, -954.635, -51.0271, 100.000000, 0, 0.000000, 0), +(21175, 6, -4579.38, -959.277, -49.9424, 100.000000, 0, 0.000000, 0), +(21175, 7, -4563.58, -969.177, -48.3699, 100.000000, 0, 0.000000, 0), +(21175, 8, -4557.14, -965.098, -44.1455, 100.000000, 0, 0.000000, 0), +(21175, 9, -4559.88, -959.314, -40.1306, 100.000000, 0, 0.000000, 0), +(21175, 10, -4570.75, -947.923, -41.4449, 100.000000, 0, 0.000000, 0), +(21175, 11, -4586.41, -931.062, -41.8179, 100.000000, 0, 0.000000, 0), +(21175, 12, -4590.13, -923.588, -40.7887, 100.000000, 0, 0.000000, 0), +(21175, 13, -4589.46, -909.302, -39.9038, 1.42107, 16000, 0.000000, 4113), +(21175, 14, -4590.13, -923.588, -40.7887, 100.000000, 0, 0.000000, 0), +(21175, 15, -4580.56, -936.905, -41.8179, 100.000000, 0, 0.000000, 0), +(21175, 16, -4572.62, -943.773, -41.062, 100.000000, 0, 0.000000, 0), +(21175, 17, -4564.62, -956.296, -40.3205, 100.000000, 0, 0.000000, 0), +(21175, 18, -4557.92, -961.218, -40.8271, 100.000000, 0, 0.000000, 0), +(21175, 19, -4556.15, -966.882, -45.7144, 100.000000, 0, 0.000000, 0), +(21175, 20, -4568.59, -967.792, -48.8071, 100.000000, 0, 0.000000, 0), +(21175, 21, -4578.55, -959.795, -49.6993, 100.000000, 0, 0.000000, 0), +(21175, 22, -4588.77, -949.498, -51.915, 100.000000, 0, 0.000000, 0), +(21175, 23, -4607.56, -933.442, -56.8174, 100.000000, 0, 0.000000, 0), +(21175, 24, -4615.26, -920.676, -58.1721, 100.000000, 0, 0.000000, 0), +(21175, 25, -4612.66, -910.935, -57.1251, 100.000000, 0, 0.000000, 0), +(21175, 26, -4608.23, -890.857, -51.1049, 100.000000, 0, 0.000000, 0), +(21175, 27, -4592.47, -863.47, -52.7843, 100.000000, 0, 0.000000, 0), +(21175, 28, -4577.62, -849.963, -52.5047, 100.000000, 0, 0.000000, 0), +(21175, 29, -4570.25, -837.985, -49.9771, 1.07551, 16000, 0.000000, 4113), +(21175, 30, -4575.37, -848.033, -52.4168, 100.000000, 0, 0.000000, 0), +(21175, 31, -4587.68, -861.741, -52.3736, 100.000000, 0, 0.000000, 0), +(21175, 32, -4603.46, -886.418, -50.7409, 100.000000, 0, 0.000000, 0), +(21175, 33, -4607.46, -902.793, -53.4442, 100.000000, 0, 0.000000, 0), +(21175, 34, -4609.41, -914.574, -57.0317, 100.000000, 0, 0.000000, 0), +(21175, 35, -4607.56, -933.442, -56.8174, 100.000000, 0, 0.000000, 0), +(21175, 36, -4594.69, -948.919, -52.0772,100.000000, 0, 0.000000, 0), +(21175, 37, -4598.9, -958.816, -47.739, 100.000000, 0, 0.000000, 0), +(21175, 38, -4606.37, -958.566, -44.7544, 100.000000, 0, 0.000000, 0), +(21175, 39, -4617.92, -952.57, -43.1393, 100.000000, 0, 0.000000, 0); + +-- Digger / Surveyor +UPDATE `creature` SET `id`=4113, `id2`=4116, `movement_type`=2, `wander_distance`=0, `position_x`=-4458.62, `position_y`=-1003.71, `position_z`=-49.9253, `orientation`=2.38043 WHERE `guid`=21176; +INSERT INTO `creature_movement` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `waittime`, `wander_distance`, `script_id`) VALUES +(21176, 1, -4458.62, -1003.71, -49.9253, 2.38043, 16000, 0.000000, 4113), +(21176, 2, -4447.82, -1005.28, -51.6557, 100.000000, 0, 0.000000, 0), +(21176, 3, -4442.97, -1002.21, -54.7445, 100.000000, 0, 0.000000, 0), +(21176, 4, -4428.59, -993.099, -56.1911, 100.000000, 0, 0.000000, 0), +(21176, 5, -4419.94, -990.274, -56.0395, 100.000000, 0, 0.000000, 0), +(21176, 6, -4401.57, -984.253, -55.8161, 100.000000, 0, 0.000000, 0), +(21176, 7, -4383.13, -975.728, -55.6905, 100.000000, 0, 0.000000, 0), +(21176, 8, -4370.35, -969.833, -55.0777, 100.000000, 0, 0.000000, 0), +(21176, 9, -4367.87, -953.68, -53.6813, 100.000000, 0, 0.000000, 0), +(21176, 10, -4374.25, -949.765, -53.849, 2.59166, 16000, 0.000000, 4113), +(21176, 11, -4375.38, -960.675, -55.1778, 100.000000, 0, 0.000000, 0), +(21176, 12, -4376.36, -968.615, -55.6328, 100.000000, 0, 0.000000, 0), +(21176, 13, -4377.69, -979.477, -55.7554, 100.000000, 0, 0.000000, 0), +(21176, 14, -4383.13, -989.845, -55.4296, 100.000000, 0, 0.000000, 0), +(21176, 15, -4391.49, -1005.78, -54.929, 4.22927, 16000, 0.000000, 4113), +(21176, 16, -4405.42, -995.001, -56.1911, 100.000000, 0, 0.000000, 0), +(21176, 17, -4416.52, -996.005, -56.1911, 100.000000, 0, 0.000000, 0), +(21176, 18, -4427.76, -997.021, -56.1911, 100.000000, 0, 0.000000, 0), +(21176, 19, -4443.33, -1003.75, -54.2043, 100.000000, 0, 0.000000, 0), +(21176, 20, -4452.67, -1009.38, -47.9145, 100.000000, 0, 0.000000, 0); + + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/src/game/Battlegrounds/BattleGround.cpp b/src/game/Battlegrounds/BattleGround.cpp index 6bb6ba14d4f..9fab08ea83a 100644 --- a/src/game/Battlegrounds/BattleGround.cpp +++ b/src/game/Battlegrounds/BattleGround.cpp @@ -757,9 +757,10 @@ uint32 BattleGround::GetBonusHonorFromKill(uint32 kills) const return kills * (uint32)MaNGOS::Honor::GetHonorGain(GetMaxLevel(), GetMaxLevel(), 1); } -float BattleGround::GetHonorModifier() { +float BattleGround::GetHonorModifier() const +{ // If the game ends in under one hour, less Bonus Honor will be earned from control of mines, graveyards and for the General kill (win). - float elapsed = (float)GetStartTime() / IN_MILLISECONDS / HOUR; + float const elapsed = (float)GetStartTime() / (float)IN_MILLISECONDS / (float)HOUR; return elapsed < 1.0f ? pow(60, elapsed - 1) : 1.0f; } diff --git a/src/game/Battlegrounds/BattleGround.h b/src/game/Battlegrounds/BattleGround.h index 8633862503c..c877b864af8 100644 --- a/src/game/Battlegrounds/BattleGround.h +++ b/src/game/Battlegrounds/BattleGround.h @@ -119,7 +119,7 @@ class BattleGround BattleGroundWinner GetWinner() const { return m_winner; } uint32 GetBattlemasterEntry() const; uint32 GetBonusHonorFromKill(uint32 kills) const; - float GetHonorModifier(); + float GetHonorModifier() const; // Set methods: void SetName(char const* name) { m_name = name; } diff --git a/src/game/Group/Group.cpp b/src/game/Group/Group.cpp index efe0d30b8f6..c1e87b86631 100644 --- a/src/game/Group/Group.cpp +++ b/src/game/Group/Group.cpp @@ -369,8 +369,8 @@ bool Group::AddMember(ObjectGuid guid, char const* name, uint8 joinMethod) // Compare group and player bind InstanceGroupBind* groupBind = GetBoundInstance(map->GetId()); InstancePlayerBind* playerBind = player->GetBoundInstance(map->GetId()); - if (playerBind && groupBind && !player->m_InstanceValid && playerBind->state == groupBind->state && !((DungeonMap*)map)->IsUnloadingBeforeReset()) - player->m_InstanceValid = true; + if (playerBind && groupBind && !player->m_instanceValid && playerBind->state == groupBind->state && !((DungeonMap*)map)->IsUnloadingBeforeReset()) + player->m_instanceValid = true; } { @@ -1576,7 +1576,7 @@ bool Group::_addMember(ObjectGuid guid, char const* name, bool isAssistant, uint // if the same group invites the player back, cancel the homebind timer if (InstanceGroupBind *bind = GetBoundInstance(player->GetMapId())) if (bind->state->GetInstanceId() == player->GetInstanceId()) - player->m_InstanceValid = true; + player->m_instanceValid = true; } if (!isBGGroup() && !(player && player->IsSavingDisabled())) @@ -2273,7 +2273,7 @@ void Group::_homebindIfInstance(Player* player) // unless the player is permanently saved to the instance InstancePlayerBind *playerBind = player->GetBoundInstance(map->GetId()); if (!playerBind || !playerBind->perm) - player->m_InstanceValid = false; + player->m_instanceValid = false; } } } diff --git a/src/game/Handlers/DuelHandler.cpp b/src/game/Handlers/DuelHandler.cpp index 421a68d3345..b32bd03a016 100644 --- a/src/game/Handlers/DuelHandler.cpp +++ b/src/game/Handlers/DuelHandler.cpp @@ -32,18 +32,18 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket) ObjectGuid guid; recvPacket >> guid; - if (!GetPlayer()->duel) // ignore accept from duel-sender + if (!GetPlayer()->m_duel) // ignore accept from duel-sender return; Player* pl = GetPlayer(); - Player* plTarget = pl->duel->opponent; + Player* plTarget = pl->m_duel->opponent; - if (pl == pl->duel->initiator || !plTarget || !plTarget->duel || pl == plTarget || pl->duel->startTime != 0 || plTarget->duel->startTime != 0) + if (pl == pl->m_duel->initiator || !plTarget || !plTarget->m_duel || pl == plTarget || pl->m_duel->startTime != 0 || plTarget->m_duel->startTime != 0) return; time_t now = time(nullptr); - pl->duel->startTimer = now; - plTarget->duel->startTimer = now; + pl->m_duel->startTimer = now; + plTarget->m_duel->startTimer = now; pl->SendDuelCountdown(3000); plTarget->SendDuelCountdown(3000); @@ -53,15 +53,15 @@ void WorldSession::HandleDuelCancelledOpcode(WorldPacket& recvPacket) { auto pPlayer = GetPlayer(); // no duel requested - if (!pPlayer->duel) + if (!pPlayer->m_duel) return; // player surrendered in a duel using /forfeit - if (pPlayer->duel->startTime != 0) + if (pPlayer->m_duel->startTime != 0) { pPlayer->CombatStopWithPets(true); - if (pPlayer->duel->opponent) - pPlayer->duel->opponent->CombatStopWithPets(true); + if (pPlayer->m_duel->opponent) + pPlayer->m_duel->opponent->CombatStopWithPets(true); pPlayer->CastSpell(GetPlayer(), 7267, true); // beg pPlayer->DuelComplete(DUEL_WON); diff --git a/src/game/Handlers/MovementHandler.cpp b/src/game/Handlers/MovementHandler.cpp index 50173217bed..04244aecebb 100644 --- a/src/game/Handlers/MovementHandler.cpp +++ b/src/game/Handlers/MovementHandler.cpp @@ -92,8 +92,8 @@ void WorldSession::HandleMoveWorldportAckOpcode() } // reset instance validity, except if going to an instance inside an instance - if (!GetPlayer()->m_InstanceValid && !mEntry->IsDungeon()) - GetPlayer()->m_InstanceValid = true; + if (!GetPlayer()->m_instanceValid && !mEntry->IsDungeon()) + GetPlayer()->m_instanceValid = true; // relocate the player to the teleport destination if (!map) @@ -341,10 +341,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData) if (pPlayerMover) { if (IsFallEndOpcode(opcode) && pPlayerMover->IsLaunched()) - { pPlayerMover->SetLaunched(false); - pPlayerMover->SetXYSpeed(0.0f); - } pPlayerMover->UpdateFallInformationIfNeed(movementInfo, opcode); } diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index 26964ca9842..b9a5a8cb8f6 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -63,7 +63,6 @@ class LootTemplate::LootGroup // A set of loot def float TotalChance() const; // Overall chance for the group void Verify(LootStore const& lootstore, uint32 id, uint32 group_id) const; - void CollectLootIds(LootIdSet& set) const; void CheckLootRefs(LootIdSet* ref_set) const; private: LootStoreItemList ExplicitlyChanced; // Entries with chances defined in DB diff --git a/src/game/LootMgr.h b/src/game/LootMgr.h index 94ca766a42e..087fd66743a 100644 --- a/src/game/LootMgr.h +++ b/src/game/LootMgr.h @@ -217,7 +217,7 @@ class LootTemplate public: // Adds an entry to the group (at loading stage) void AddEntry(LootStoreItem& item); - // Rolls for every item in the template and adds the rolled items the the loot + // Rolls for every item in the template and adds the rolled items to the loot void Process(Loot& loot, LootStore const& store, bool rate, uint8 GroupId = 0) const; // True if template includes at least 1 quest drop entry @@ -238,7 +238,7 @@ class LootTemplate class LootValidatorRef : public Reference { public: - LootValidatorRef() {} + LootValidatorRef() = default; void targetObjectDestroyLink() override {} void sourceObjectDestroyLink() override {} }; diff --git a/src/game/Maps/GridMap.cpp b/src/game/Maps/GridMap.cpp index 49b0fbde277..d2b041261e0 100644 --- a/src/game/Maps/GridMap.cpp +++ b/src/game/Maps/GridMap.cpp @@ -1168,8 +1168,8 @@ GridMap* TerrainInfo::LoadMapAndVMap(uint32 const x, uint32 const y) m_GridMaps[x][y] = map; // load VMAPs for current map/grid... - MapEntry const* i_mapEntry = sMapStorage.LookupEntry(m_mapId); - char const* mapName = i_mapEntry ? i_mapEntry->name : "UNNAMEDMAP\x0"; + MapEntry const* mapEntry = sMapStorage.LookupEntry(m_mapId); + char const* mapName = mapEntry ? mapEntry->name : "UNNAMEDMAP\x0"; int vmapLoadResult = VMAP::VMapFactory::createOrGetVMapManager()->loadMap((sWorld.GetDataPath() + "vmaps").c_str(), m_mapId, x, y); switch (vmapLoadResult) diff --git a/src/game/Maps/Map.cpp b/src/game/Maps/Map.cpp index 3242b573d23..0eaca5fb6dd 100644 --- a/src/game/Maps/Map.cpp +++ b/src/game/Maps/Map.cpp @@ -67,17 +67,17 @@ Map::~Map() if (m_persistentState) m_persistentState->SetUsedByMapState(nullptr); // field pointer can be deleted after this - if (i_data) + if (m_data) { - delete i_data; - i_data = nullptr; + delete m_data; + m_data = nullptr; } //release reference count - if (m_TerrainData->Release()) - sTerrainMgr.UnloadTerrain(m_TerrainData->GetMapId()); + if (m_terrainData->Release()) + sTerrainMgr.UnloadTerrain(m_terrainData->GetMapId()); - if (!_corpseToRemove.empty()) + if (!m_corpseToRemove.empty()) sLog.Out(LOG_BASIC, LOG_LVL_ERROR, "[MAP] Map %u (instance %u) deleted while there are still corpses to remove", GetId(), GetInstanceId()); delete m_weatherSystem; @@ -114,24 +114,24 @@ void Map::LoadMapAndVMap(int gx, int gy) if (m_bLoadedGrids[gx][gx]) return; - GridMap * pInfo = m_TerrainData->Load(gx, gy); + GridMap * pInfo = m_terrainData->Load(gx, gy); if (pInfo) m_bLoadedGrids[gx][gy] = true; } Map::Map(uint32 id, time_t expiry, uint32 InstanceId) - : i_mapEntry(sMapStorage.LookupEntry(id)), - i_id(id), i_InstanceId(InstanceId), m_unloadTimer(0), - m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE), m_persistentState(nullptr), + : m_mapEntry(sMapStorage.LookupEntry(id)), + m_id(id), m_instanceId(InstanceId), m_unloadTimer(0), + m_visibilityDistance(DEFAULT_VISIBILITY_DISTANCE), m_persistentState(nullptr), m_activeNonPlayersIter(m_activeNonPlayers.end()), m_transportsUpdateIter(m_transports.end()), - m_createTime(time(nullptr)), i_gridExpiry(expiry), m_TerrainData(sTerrainMgr.LoadTerrain(id)), - i_data(nullptr), i_script_id(0), m_unloading(false), m_crashed(false), - _processingSendObjUpdates(false), _processingUnitsRelocation(false), - m_updateFinished(false), m_updateDiffMod(0), m_GridActivationDistance(DEFAULT_VISIBILITY_DISTANCE), - _lastPlayersUpdate(WorldTimer::getMSTime()), _lastMapUpdate(WorldTimer::getMSTime()), - _lastCellsUpdate(WorldTimer::getMSTime()), _inactivePlayersSkippedUpdates(0), - _objUpdatesThreads(0), _unitRelocationThreads(0), _lastPlayerLeftTime(0), - m_lastMvtSpellsUpdate(0), _bonesCleanupTimer(0), m_uiScriptedEventsTimer(1000) + m_createTime(time(nullptr)), m_gridExpiry(expiry), m_terrainData(sTerrainMgr.LoadTerrain(id)), + m_data(nullptr), m_scriptId(0), m_unloading(false), m_crashed(false), + m_processingSendObjUpdates(false), m_processingUnitsRelocation(false), + m_updateFinished(false), m_updateDiffMod(0), m_gridActivationDistance(DEFAULT_VISIBILITY_DISTANCE), + m_lastPlayersUpdate(WorldTimer::getMSTime()), m_lastMapUpdate(WorldTimer::getMSTime()), + m_lastCellsUpdate(WorldTimer::getMSTime()), m_inactivePlayersSkippedUpdates(0), + m_objUpdatesThreads(0), m_unitRelocationThreads(0), m_lastPlayerLeftTime(0), + m_lastMvtSpellsUpdate(0), m_bonesCleanupTimer(0), m_uiScriptedEventsTimer(1000) { m_CreatureGuids.Set(sObjectMgr.GetFirstTemporaryCreatureLowGuid()); m_GameObjectGuids.Set(sObjectMgr.GetFirstTemporaryGameObjectLowGuid()); @@ -150,9 +150,9 @@ Map::Map(uint32 id, time_t expiry, uint32 InstanceId) Map::InitVisibilityDistance(); //add reference for TerrainData object - m_TerrainData->AddRef(); + m_terrainData->AddRef(); - m_persistentState = sMapPersistentStateMgr.AddPersistentState(i_mapEntry, GetInstanceId(), 0, IsDungeon()); + m_persistentState = sMapPersistentStateMgr.AddPersistentState(m_mapEntry, GetInstanceId(), 0, IsDungeon()); m_persistentState->SetUsedByMapState(this); m_weatherSystem = new WeatherSystem(this); @@ -219,8 +219,8 @@ void Map::SpawnActiveObjects() void Map::InitVisibilityDistance() { //init visibility for continents - m_VisibleDistance = World::GetMaxVisibleDistanceOnContinents(); - m_GridActivationDistance = World::GetMaxVisibleDistanceOnContinents(); + m_visibilityDistance = World::GetMaxVisibleDistanceOnContinents(); + m_gridActivationDistance = World::GetMaxVisibleDistanceOnContinents(); } // Template specialization of utility methods @@ -316,7 +316,7 @@ Map::EnsureGridCreated(GridPair const& p) { if (!getNGrid(p.x_coord, p.y_coord)) { - setNGrid(new NGridType(p.x_coord * MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld.getConfig(CONFIG_BOOL_GRID_UNLOAD)), + setNGrid(new NGridType(p.x_coord * MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, m_gridExpiry, sWorld.getConfig(CONFIG_BOOL_GRID_UNLOAD)), p.x_coord, p.y_coord); // build a linkage between this map and NGridType @@ -345,9 +345,9 @@ Map::EnsureGridLoadedAtEnter(Cell const& cell, Player* player) grid = getNGrid(cell.GridX(), cell.GridY()); if (player) - DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_MOVES, "Player %s enter cell[%u,%u] triggers of loading grid[%u,%u] on map %u", player->GetName(), cell.CellX(), cell.CellY(), cell.GridX(), cell.GridY(), i_id); + DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_MOVES, "Player %s enter cell[%u,%u] triggers of loading grid[%u,%u] on map %u", player->GetName(), cell.CellX(), cell.CellY(), cell.GridX(), cell.GridY(), m_id); else - DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_MOVES, "Active object nearby triggers of loading grid [%u,%u] on map %u", cell.GridX(), cell.GridY(), i_id); + DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_MOVES, "Active object nearby triggers of loading grid [%u,%u] on map %u", cell.GridX(), cell.GridY(), m_id); ResetGridExpiry(*getNGrid(cell.GridX(), cell.GridY()), 0.1f); grid->SetGridState(GRID_STATE_ACTIVE); @@ -366,7 +366,7 @@ bool Map::EnsureGridLoaded(Cell const& cell) if (grid == nullptr) { - sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "[Map%u][CRASH] Grid [%u:%u] NOT loaded !!", i_id, cell.GridX(), cell.GridY()); + sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "[Map%u][CRASH] Grid [%u:%u] NOT loaded !!", m_id, cell.GridX(), cell.GridY()); throw new std::string("Crash AT EnsureGridLoaded"); ASSERT(false); } @@ -439,11 +439,11 @@ bool Map::Add(Player* player) player->GetViewPoint().Event_AddedToWorld(&(*grid)(cell.CellX(), cell.CellY())); UpdateObjectVisibility(player, cell, p); - if (i_data) - i_data->OnPlayerEnter(player); + if (m_data) + m_data->OnPlayerEnter(player); // Remove any buffs defined in instance_aura_removal for the new map - sAuraRemovalMgr.PlayerEnterMap(i_id, player); + sAuraRemovalMgr.PlayerEnterMap(m_id, player); player->SetSplineDonePending(false); player->GetSession()->ClearIncomingPacketsByType(PACKET_PROCESS_MOVEMENT); @@ -832,12 +832,12 @@ inline void Map::UpdateActiveCellsSynch(uint32 now, uint32 diff) inline void Map::UpdateCells(uint32 map_diff) { uint32 now = WorldTimer::getMSTime(); - uint32 diff = WorldTimer::getMSTimeDiff(_lastCellsUpdate, now); + uint32 diff = WorldTimer::getMSTimeDiff(m_lastCellsUpdate, now); if (diff < sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_UPDATE_CELLS_DIFF)) return; - _lastCellsUpdate = now; + m_lastCellsUpdate = now; m_currentTime = std::chrono::time_point_cast(Clock::now()); // update active cells around players and active objects @@ -846,16 +846,16 @@ inline void Map::UpdateCells(uint32 map_diff) else UpdateActiveCellsSynch(now, diff); - if (IsContinent() && m_motionThreads->status() == ThreadPool::Status::READY && !unitsMvtUpdate.empty()) + if (IsContinent() && m_motionThreads->status() == ThreadPool::Status::READY && !m_unitsMvtUpdate.empty()) { - for (std::unordered_set::iterator it = unitsMvtUpdate.begin(); it != unitsMvtUpdate.end(); it++) + for (std::unordered_set::iterator it = m_unitsMvtUpdate.begin(); it != m_unitsMvtUpdate.end(); it++) m_motionThreads << [it,diff](){ if ((*it)->IsInWorld()) (*it)->GetMotionMaster()->UpdateMotionAsync(diff); }; m_motionThreads->processWorkload().wait(); } - unitsMvtUpdate.clear(); + m_unitsMvtUpdate.clear(); } @@ -900,15 +900,15 @@ void Map::UpdateSessionsMovementAndSpellsIfNeeded() void Map::UpdatePlayers() { uint32 now = WorldTimer::getMSTime(); - uint32 diff = WorldTimer::getMSTimeDiff(_lastPlayersUpdate, now); + uint32 diff = WorldTimer::getMSTimeDiff(m_lastPlayersUpdate, now); if (diff < sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_UPDATE_PLAYERS_DIFF)) return; m_currentTime = std::chrono::time_point_cast(Clock::now()); - ++_inactivePlayersSkippedUpdates; - bool updateInactivePlayers = _inactivePlayersSkippedUpdates > sWorld.getConfig(CONFIG_UINT32_INACTIVE_PLAYERS_SKIP_UPDATES); + ++m_inactivePlayersSkippedUpdates; + bool updateInactivePlayers = m_inactivePlayersSkippedUpdates > sWorld.getConfig(CONFIG_UINT32_INACTIVE_PLAYERS_SKIP_UPDATES); if (!IsContinent()) updateInactivePlayers = true; for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter) @@ -926,19 +926,19 @@ void Map::UpdatePlayers() plr->ResetSkippedUpdateTime(); } if (updateInactivePlayers) - _inactivePlayersSkippedUpdates = 0; - _lastPlayersUpdate = now; + m_inactivePlayersSkippedUpdates = 0; + m_lastPlayersUpdate = now; } void Map::DoUpdate(uint32 maxDiff) { uint32 now = WorldTimer::getMSTime(); - uint32 diff = WorldTimer::getMSTimeDiff(_lastMapUpdate, now); + uint32 diff = WorldTimer::getMSTimeDiff(m_lastMapUpdate, now); if (diff > maxDiff) diff = maxDiff; - _lastMapUpdate = now; + m_lastMapUpdate = now; if (HavePlayers()) - _lastPlayerLeftTime = now; + m_lastPlayerLeftTime = now; Update(diff); } @@ -946,7 +946,7 @@ void Map::Update(uint32 t_diff) { uint32 updateMapTime = WorldTimer::getMSTime(); m_currentTime = std::chrono::time_point_cast(Clock::now()); - _dynamicTree.update(t_diff); + m_dynamicTree.update(t_diff); UpdateSessionsMovementAndSpellsIfNeeded(); // update worldsessions for existing players @@ -1028,8 +1028,8 @@ void Map::Update(uint32 t_diff) ScriptsProcess(); - if (i_data) - i_data->Update(t_diff); + if (m_data) + m_data->Update(t_diff); m_weatherSystem->UpdateWeathers(t_diff); @@ -1047,29 +1047,29 @@ void Map::Update(uint32 t_diff) { if (sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_TICK_LOWER_GRID_ACTIVATION_DISTANCE) && updateMapTime > sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_TICK_LOWER_GRID_ACTIVATION_DISTANCE)) { - --m_GridActivationDistance; - if (m_GridActivationDistance < sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_MIN_GRID_ACTIVATION_DISTANCE)) - m_GridActivationDistance = sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_MIN_GRID_ACTIVATION_DISTANCE); + --m_gridActivationDistance; + if (m_gridActivationDistance < sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_MIN_GRID_ACTIVATION_DISTANCE)) + m_gridActivationDistance = sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_MIN_GRID_ACTIVATION_DISTANCE); } else if (sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_TICK_INCREASE_GRID_ACTIVATION_DISTANCE) && updateMapTime < sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_TICK_INCREASE_GRID_ACTIVATION_DISTANCE)) { - ++m_GridActivationDistance; - if (m_GridActivationDistance > World::GetMaxVisibleDistanceOnContinents()) - m_GridActivationDistance = World::GetMaxVisibleDistanceOnContinents(); + ++m_gridActivationDistance; + if (m_gridActivationDistance > World::GetMaxVisibleDistanceOnContinents()) + m_gridActivationDistance = World::GetMaxVisibleDistanceOnContinents(); } if (packetBroadcastSlow || (sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_TICK_LOWER_VISIBILITY_DISTANCE) && updateMapTime > sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_TICK_LOWER_VISIBILITY_DISTANCE))) { - --m_VisibleDistance; - if (m_VisibleDistance < sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_MIN_VISIBILITY_DISTANCE)) - m_VisibleDistance = sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_MIN_VISIBILITY_DISTANCE); + --m_visibilityDistance; + if (m_visibilityDistance < sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_MIN_VISIBILITY_DISTANCE)) + m_visibilityDistance = sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_MIN_VISIBILITY_DISTANCE); } else if (sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_TICK_INCREASE_VISIBILITY_DISTANCE) && updateMapTime < sWorld.getConfig(CONFIG_UINT32_MAPUPDATE_TICK_INCREASE_VISIBILITY_DISTANCE)) { - ++m_VisibleDistance; - if (m_VisibleDistance > World::GetMaxVisibleDistanceOnContinents()) - m_VisibleDistance = World::GetMaxVisibleDistanceOnContinents(); + ++m_visibilityDistance; + if (m_visibilityDistance > World::GetMaxVisibleDistanceOnContinents()) + m_visibilityDistance = World::GetMaxVisibleDistanceOnContinents(); } } m_updateFinished = true; @@ -1207,8 +1207,8 @@ void ScriptedEvent::SendEventToAllTargets(uint32 uiData) void Map::Remove(Player* player, bool remove) { - if (i_data) - i_data->OnPlayerLeave(player); + if (m_data) + m_data->OnPlayerLeave(player); m_mCreatureSummonCount.erase(player->GetGUID()); m_mCreatureSummonLimit.erase(player->GetGUID()); @@ -1242,7 +1242,7 @@ void Map::Remove(Player* player, bool remove) if (!getNGrid(cell.data.Part.grid_x, cell.data.Part.grid_y)) { - sLog.Out(LOG_BASIC, LOG_LVL_ERROR, "Map::Remove() i_grids was nullptr x:%d, y:%d", cell.data.Part.grid_x, cell.data.Part.grid_y); + sLog.Out(LOG_BASIC, LOG_LVL_ERROR, "Map::Remove() m_grids was nullptr x:%d, y:%d", cell.data.Part.grid_x, cell.data.Part.grid_y); return; } @@ -1535,7 +1535,7 @@ bool Map::UnloadGrid(uint32 const& x, uint32 const& y, bool pForce) if (!pForce && ActiveObjectsNearGrid(x, y)) return false; - sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "Unloading grid[%u,%u] for map %u", x, y, i_id); + sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "Unloading grid[%u,%u] for map %u", x, y, m_id); ObjectGridUnloader unloader(*grid); // Finish remove and delete all creatures with delayed remove before moving to respawn grids @@ -1567,10 +1567,10 @@ bool Map::UnloadGrid(uint32 const& x, uint32 const& y, bool pForce) if (m_bLoadedGrids[gx][gy]) { m_bLoadedGrids[gx][gy] = false; - m_TerrainData->Unload(gx, gy); + m_terrainData->Unload(gx, gy); } - sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "Unloading grid[%u,%u] for map %u finished", x, y, i_id); + sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "Unloading grid[%u,%u] for map %u finished", x, y, m_id); return true; } @@ -1594,9 +1594,9 @@ void Map::UnloadAll(bool pForce) } // Bones list should be empty at this point. - if (!_bones.empty()) { + if (!m_bones.empty()) { sLog.Out(LOG_BASIC, LOG_LVL_ERROR, "Non empty bones list, probably leaking. Please report."); - _bones.clear(); + m_bones.clear(); } } @@ -1621,7 +1621,7 @@ bool Map::CheckGridIntegrity(Creature* c, bool moved) char const* Map::GetMapName() const { - return i_mapEntry ? i_mapEntry->name : "UNNAMEDMAP\x0"; + return m_mapEntry ? m_mapEntry->name : "UNNAMEDMAP\x0"; } void Map::UpdateObjectVisibility(WorldObject* obj, Cell cell, CellPair cellpair) @@ -1748,7 +1748,7 @@ inline void Map::setNGrid(NGridType* grid, uint32 x, uint32 y) sLog.Out(LOG_BASIC, LOG_LVL_ERROR, "map::setNGrid() Invalid grid coordinates found: %d, %d!", x, y); MANGOS_ASSERT(false); } - i_grids[x][y] = grid; + m_grids[x][y] = grid; } void Map::AddObjectToRemoveList(WorldObject* obj) @@ -1756,20 +1756,20 @@ void Map::AddObjectToRemoveList(WorldObject* obj) MANGOS_ASSERT(obj->GetMapId() == GetId() && obj->GetInstanceId() == GetInstanceId()); obj->CleanupsBeforeDelete(); // remove or simplify at least cross referenced links - std::lock_guard lock(i_objectsToRemove_lock); - i_objectsToRemove.insert(obj); + std::lock_guard lock(m_objectsToRemoveLock); + m_objectsToRemove.insert(obj); } void Map::RemoveAllObjectsInRemoveList() { - if (i_objectsToRemove.empty()) + if (m_objectsToRemove.empty()) return; - std::lock_guard lock(i_objectsToRemove_lock); - while (!i_objectsToRemove.empty()) + std::lock_guard lock(m_objectsToRemoveLock); + while (!m_objectsToRemove.empty()) { - WorldObject* obj = *i_objectsToRemove.begin(); - i_objectsToRemove.erase(i_objectsToRemove.begin()); + WorldObject* obj = *m_objectsToRemove.begin(); + m_objectsToRemove.erase(m_objectsToRemove.begin()); switch (obj->GetTypeId()) { @@ -1970,16 +1970,16 @@ void Map::RemoveFromActive(WorldObject* obj) void Map::CreateInstanceData(bool load) { - if (i_data) + if (m_data) return; - if (!i_mapEntry->scriptId) + if (!m_mapEntry->scriptId) return; - i_script_id = i_mapEntry->scriptId; + m_scriptId = m_mapEntry->scriptId; - i_data = sScriptMgr.CreateInstanceData(this); - if (!i_data) + m_data = sScriptMgr.CreateInstanceData(this); + if (!m_data) return; if (load) @@ -1988,7 +1988,7 @@ void Map::CreateInstanceData(bool load) std::unique_ptr result; if (Instanceable()) - result = CharacterDatabase.PQuery("SELECT data FROM instance WHERE id = '%u'", i_InstanceId); + result = CharacterDatabase.PQuery("SELECT data FROM instance WHERE id = '%u'", m_instanceId); else result = CharacterDatabase.PQuery("SELECT data FROM world WHERE map = '%u'", GetId()); @@ -1998,25 +1998,25 @@ void Map::CreateInstanceData(bool load) char const* data = fields[0].GetString(); if (data) { - sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "Loading instance data for `%s` (Map: %u Instance: %u)", sScriptMgr.GetScriptName(i_script_id), GetId(), i_InstanceId); - i_data->Load(data); + sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "Loading instance data for `%s` (Map: %u Instance: %u)", sScriptMgr.GetScriptName(m_scriptId), GetId(), m_instanceId); + m_data->Load(data); } else - i_data->Create(); + m_data->Create(); } else { // for non-instanceable map always add data to table if not found, later code expected that for map in `word` exist always after load if (!Instanceable()) CharacterDatabase.PExecute("INSERT INTO world VALUES ('%u', '')", GetId()); - i_data->Create(); + m_data->Create(); } } else { - sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "New instance data, \"%s\" ,initialized!", sScriptMgr.GetScriptName(i_script_id)); - i_data->Initialize(); - i_data->Create(); + sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "New instance data, \"%s\" ,initialized!", sScriptMgr.GetScriptName(m_scriptId)); + m_data->Initialize(); + m_data->Create(); } } @@ -2080,7 +2080,7 @@ DungeonMap::DungeonMap(uint32 id, time_t expiry, uint32 InstanceId) : Map(id, expiry, InstanceId), m_resetAfterUnload(false), m_unloadWhenEmpty(false) { - MANGOS_ASSERT(i_mapEntry->IsDungeon()); + MANGOS_ASSERT(m_mapEntry->IsDungeon()); //lets initialize visibility distance for dungeons DungeonMap::InitVisibilityDistance(); @@ -2097,8 +2097,8 @@ DungeonMap::~DungeonMap() void DungeonMap::InitVisibilityDistance() { //init visibility distance for instances - m_VisibleDistance = World::GetMaxVisibleDistanceInInstances(); - m_GridActivationDistance = World::GetMaxVisibleDistanceInInstances(); + m_visibilityDistance = World::GetMaxVisibleDistanceInInstances(); + m_gridActivationDistance = World::GetMaxVisibleDistanceInInstances(); } /* @@ -2124,7 +2124,7 @@ bool DungeonMap::CanEnter(Player* player) if (m_resetAfterUnload) { - sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "[DungeonReset] %s attempted to enter map %u, instance %u during reset", player->GetName(), i_InstanceId); + sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "[DungeonReset] %s attempted to enter map %u, instance %u during reset", player->GetName(), m_instanceId); player->SendTransferAborted(TRANSFER_ABORT_NOT_FOUND); return false; } @@ -2330,7 +2330,7 @@ bool DungeonMap::Reset(InstanceResetMethod method) { // set the homebind timer for players inside (1 minute) for (const auto& itr : m_mapRefManager) - itr.getSource()->m_InstanceValid = false; + itr.getSource()->m_instanceValid = false; } // the unload timer is not started @@ -2410,7 +2410,7 @@ void DungeonMap::SetResetSchedule(bool on) uint32 DungeonMap::GetMaxPlayers() const { - return i_mapEntry->maxPlayers; + return m_mapEntry->maxPlayers; } DungeonPersistentState* DungeonMap::GetPersistanceState() const @@ -2452,8 +2452,8 @@ BattleGroundPersistentState* BattleGroundMap::GetPersistanceState() const void BattleGroundMap::InitVisibilityDistance() { //init visibility distance for BG - m_VisibleDistance = World::GetMaxVisibleDistanceInBG(); - m_GridActivationDistance = World::GetMaxVisibleDistanceInBG(); + m_visibilityDistance = World::GetMaxVisibleDistanceInBG(); + m_gridActivationDistance = World::GetMaxVisibleDistanceInBG(); } bool BattleGroundMap::CanEnter(Player* player) @@ -2479,7 +2479,7 @@ bool BattleGroundMap::Add(Player* player) return false; // reset instance validity, battleground maps do not homebind - player->m_InstanceValid = true; + player->m_instanceValid = true; return Map::Add(player); } @@ -2790,44 +2790,44 @@ WorldObject* Map::GetWorldObjectOrPlayer(ObjectGuid guid) void Map::AddUpdateObject(Object *obj) { - if (_processingSendObjUpdates) + if (m_processingSendObjUpdates) return; - std::lock_guard lock(i_objectsToClientUpdate_lock); - i_objectsToClientUpdate.insert(obj); + std::lock_guard lock(m_objectsToClientUpdateLock); + m_objectsToClientUpdate.insert(obj); } void Map::RemoveUpdateObject(Object *obj) { - ASSERT(!_processingSendObjUpdates); - std::lock_guard lock(i_objectsToClientUpdate_lock); - i_objectsToClientUpdate.erase( obj ); + ASSERT(!m_processingSendObjUpdates); + std::lock_guard lock(m_objectsToClientUpdateLock); + m_objectsToClientUpdate.erase( obj ); } void Map::AddRelocatedUnit(Unit *obj) { - if (_processingUnitsRelocation) + if (m_processingUnitsRelocation) return; - std::lock_guard lock(i_unitsRelocated_lock); - i_unitsRelocated.insert(obj); + std::lock_guard lock(m_unitsRelocatedLock); + m_unitsRelocated.insert(obj); } void Map::RemoveRelocatedUnit(Unit *obj) { - ASSERT(!_processingUnitsRelocation); - std::lock_guard lock(i_unitsRelocated_lock); - i_unitsRelocated.erase(obj); + ASSERT(!m_processingUnitsRelocation); + std::lock_guard lock(m_unitsRelocatedLock); + m_unitsRelocated.erase(obj); } void Map::AddUnitToMovementUpdate(Unit *unit) { - std::lock_guard lock(unitsMvtUpdate_lock); - unitsMvtUpdate.insert(unit); + std::lock_guard lock(m_unitsMvtUpdateLock); + m_unitsMvtUpdate.insert(unit); } void Map::RemoveUnitFromMovementUpdate(Unit *unit) { - std::lock_guard lock(unitsMvtUpdate_lock); - unitsMvtUpdate.erase(unit); + std::lock_guard lock(m_unitsMvtUpdateLock); + m_unitsMvtUpdate.erase(unit); } @@ -2838,10 +2838,10 @@ void Map::SendObjectUpdates() // VERY HEAVY LOAD in case of a lot of players at the same place // ~2ms / object if 500 players in the visible area around uint32 now = WorldTimer::getMSTime(); - uint32 objectsCount = i_objectsToClientUpdate.size(); + uint32 objectsCount = m_objectsToClientUpdate.size(); if (!objectsCount) return; - _processingSendObjUpdates = true; + m_processingSendObjUpdates = true; // Compute maximum number of threads //#define FORCE_OLD_THREADCOUNT @@ -2851,10 +2851,10 @@ void Map::SendObjectUpdates() int threads = 1; if (IsContinent()) threads = m_objectThreads ? m_objectThreads->size() +1 : 1; - if (!_objUpdatesThreads) - _objUpdatesThreads = 1; - if (threads < _objUpdatesThreads) - _objUpdatesThreads = threads; + if (!m_objUpdatesThreads) + m_objUpdatesThreads = 1; + if (threads < m_objUpdatesThreads) + m_objUpdatesThreads = threads; #endif if (threads > objectsCount) threads = objectsCount; @@ -2867,10 +2867,10 @@ void Map::SendObjectUpdates() step++; std::vector::iterator> t; - t.reserve(i_objectsToClientUpdate.size() + 1); - for (std::unordered_set::iterator it = i_objectsToClientUpdate.begin(); it != i_objectsToClientUpdate.end(); it++) + t.reserve(m_objectsToClientUpdate.size() + 1); + for (std::unordered_set::iterator it = m_objectsToClientUpdate.begin(); it != m_objectsToClientUpdate.end(); it++) t.push_back(it); - t.push_back(i_objectsToClientUpdate.end()); + t.push_back(m_objectsToClientUpdate.end()); uint32 timeout = sWorld.getConfig(CONFIG_UINT32_MAP_OBJECTSUPDATE_TIMEOUT); //#define FORCE_NO_ATOMIC_INT #if ATOMIC_INT_LOCK_FREE == 2 && !defined(FORCE_NO_ATOMIC_INT) @@ -2899,10 +2899,10 @@ void Map::SendObjectUpdates() if (job.valid()) job.wait(); - if (ait >= i_objectsToClientUpdate.size()) //ait is increased before checks, so max value is `objectsCount + threads` - i_objectsToClientUpdate.clear(); + if (ait >= m_objectsToClientUpdate.size()) //ait is increased before checks, so max value is `objectsCount + threads` + m_objectsToClientUpdate.clear(); else - i_objectsToClientUpdate.erase(t.front(), t[ait]); + m_objectsToClientUpdate.erase(t.front(), t[ait]); #else std::vector counters; for (int i = 0; i < threads; i++) @@ -2930,22 +2930,22 @@ void Map::SendObjectUpdates() if (job.valid()) job.wait(); for (int i = 0; i < threads; i++) - i_objectsToClientUpdate.erase(t[step * i], t[counters[i]]); + m_objectsToClientUpdate.erase(t[step * i], t[counters[i]]); #endif #ifdef FORCE_OLD_THREADCOUNT // If we timeout, use more threads ! - if (!i_objectsToClientUpdate.empty()) - ++_objUpdatesThreads; + if (!m_objectsToClientUpdate.empty()) + ++m_objUpdatesThreads; else - --_objUpdatesThreads; + --m_objUpdatesThreads; #endif - _processingSendObjUpdates = false; + m_processingSendObjUpdates = false; #ifdef MAP_SENDOBJECTUPDATES_PROFILE uint32 diff = WorldTimer::getMSTimeDiffToNow(now); if (diff > 50) - sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "SendObjectUpdates in %04u ms [%u threads. %3u/%3u]", diff, threads, objectsCount - i_objectsToClientUpdate.size(), objectsCount); + sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "SendObjectUpdates in %04u ms [%u threads. %3u/%3u]", diff, threads, objectsCount - m_objectsToClientUpdate.size(), objectsCount); #endif } @@ -2955,19 +2955,19 @@ void Map::UpdateVisibilityForRelocations() { // VERY HEAVY LOAD in case of a lot of players at the same place uint32 now = WorldTimer::getMSTime(); - uint32 objectsCount = i_unitsRelocated.size(); + uint32 objectsCount = m_unitsRelocated.size(); if (!objectsCount) return; - _processingUnitsRelocation = true; + m_processingUnitsRelocation = true; // Compute number of threads to spawn uint32 threads = 1; if (IsContinent()) threads = m_visibilityThreads->size() + 1; - if (!_unitRelocationThreads) - _unitRelocationThreads = 1; - if (threads < _unitRelocationThreads) - _unitRelocationThreads = threads; + if (!m_unitRelocationThreads) + m_unitRelocationThreads = 1; + if (threads < m_unitRelocationThreads) + m_unitRelocationThreads = threads; if (threads > objectsCount) threads = objectsCount; uint32 step = objectsCount / threads; @@ -2975,8 +2975,8 @@ void Map::UpdateVisibilityForRelocations() ASSERT(step > 0); std::vector::iterator> t; - t.reserve(i_unitsRelocated.size()); - for (std::unordered_set::iterator it = i_unitsRelocated.begin(); it != i_unitsRelocated.end(); it++) + t.reserve(m_unitsRelocated.size()); + for (std::unordered_set::iterator it = m_unitsRelocated.begin(); it != m_unitsRelocated.end(); it++) t.emplace_back(it); std::atomic ait(0); uint32 timeout = sWorld.getConfig(CONFIG_UINT32_MAP_VISIBILITYUPDATE_TIMEOUT); @@ -3000,22 +3000,22 @@ void Map::UpdateVisibilityForRelocations() f(); if (job.valid()) job.wait(); - if (ait >= i_unitsRelocated.size()) //ait is increased before checks, so max value is `objectsCount + threads` - i_unitsRelocated.clear(); + if (ait >= m_unitsRelocated.size()) //ait is increased before checks, so max value is `objectsCount + threads` + m_unitsRelocated.clear(); else - i_unitsRelocated.erase(t.front(), t[ait]); + m_unitsRelocated.erase(t.front(), t[ait]); - if (!i_unitsRelocated.empty()) - ++_unitRelocationThreads; + if (!m_unitsRelocated.empty()) + ++m_unitRelocationThreads; else - --_unitRelocationThreads; + --m_unitRelocationThreads; - _processingUnitsRelocation = false; + m_processingUnitsRelocation = false; #ifdef MAP_UPDATEVISIBILITY_PROFILE uint32 diff = WorldTimer::getMSTimeDiffToNow(now); if (diff > 50) - sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "VisibilityUpdate in %04u ms [%u threads/done %u/%u]", diff, threads, objectsCount - i_unitsRelocated.size(), objectsCount); + sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "VisibilityUpdate in %04u ms [%u threads/done %u/%u]", diff, threads, objectsCount - m_unitsRelocated.size(), objectsCount); #endif } @@ -3151,8 +3151,8 @@ bool Map::GetWalkHitPosition(GenericTransport* transport, float srcX, float srcY } MMAP::MMapManager* mmap = MMAP::MMapFactory::createOrGetMMapManager(); - dtNavMeshQuery const* m_navMeshQuery = transport ? mmap->GetModelNavMeshQuery(transport->GetDisplayId()) : mmap->GetNavMeshQuery(GetId()); - if (!m_navMeshQuery) + dtNavMeshQuery const* navMeshQuery = transport ? mmap->GetModelNavMeshQuery(transport->GetDisplayId()) : mmap->GetNavMeshQuery(GetId()); + if (!navMeshQuery) { sLog.Out(LOG_BASIC, LOG_LVL_DETAIL, "WalkHitPos: No nav mesh loaded !"); return false; @@ -3174,7 +3174,7 @@ bool Map::GetWalkHitPosition(GenericTransport* transport, float srcX, float srcY if (!locatedOnSteepSlope) filter.setExcludeFlags(NAV_STEEP_SLOPES); - dtPolyRef startRef = PathInfo::FindWalkPoly(m_navMeshQuery, point, filter, closestPoint, zSearchDist); + dtPolyRef startRef = PathInfo::FindWalkPoly(navMeshQuery, point, filter, closestPoint, zSearchDist); if (!startRef) { sLog.Out(LOG_BASIC, LOG_LVL_DETAIL, "WalkHitPos: Start poly not found"); @@ -3187,7 +3187,7 @@ bool Map::GetWalkHitPosition(GenericTransport* transport, float srcX, float srcY int visitedCount = 0; float t = 0.0f; float hitNormal[3] = {0}; // Normal of wall hit. Not always defined by raycast (if no wall hit) - dtStatus result = m_navMeshQuery->raycast(startRef, closestPoint, endPosition, &filter, &t, hitNormal, visited, &visitedCount, 50); + dtStatus result = navMeshQuery->raycast(startRef, closestPoint, endPosition, &filter, &t, hitNormal, visited, &visitedCount, 50); if (dtStatusFailed(result) || !visitedCount) { sLog.Out(LOG_BASIC, LOG_LVL_DETAIL, "WalkHitPos: Navmesh raycast failed"); @@ -3201,14 +3201,14 @@ bool Map::GetWalkHitPosition(GenericTransport* transport, float srcX, float srcY endPosition[i] = point[i] + (endPosition[i] - point[i]) * hitNormal[i]; } - if (dtStatusFailed(m_navMeshQuery->closestPointOnPoly(visited[visitedCount - 1], endPosition, endPosition, nullptr))) + if (dtStatusFailed(navMeshQuery->closestPointOnPoly(visited[visitedCount - 1], endPosition, endPosition, nullptr))) return false; // Compute complete path, and at each path step, check for dynamic LoS collision // Rq: This is non-sense on Transports, since we are using position offsets ... float pathPoints[MAX_POINT_PATH_LENGTH * VERTEX_SIZE]; int pointCount = 0; - result = m_navMeshQuery->findStraightPath( + result = navMeshQuery->findStraightPath( closestPoint, // start position endPosition, // end position visited, // current path @@ -3289,7 +3289,7 @@ bool Map::GetWalkRandomPosition(GenericTransport* transport, float &x, float &y, // Find the navMeshQuery. MMAP::MMapManager* mmap = MMAP::MMapFactory::createOrGetMMapManager(); - dtNavMeshQuery const* m_navMeshQuery = transport ? mmap->GetModelNavMeshQuery(transport->GetDisplayId()) : mmap->GetNavMeshQuery(GetId()); + dtNavMeshQuery const* navMeshQuery = transport ? mmap->GetModelNavMeshQuery(transport->GetDisplayId()) : mmap->GetNavMeshQuery(GetId()); float radius = maxRadius * rand_norm_f(); // Find a valid position nearby. @@ -3298,19 +3298,19 @@ bool Map::GetWalkRandomPosition(GenericTransport* transport, float &x, float &y, if (transport) transport->CalculatePassengerOffset(point[2], point[0], point[1]); - if (m_navMeshQuery) + if (navMeshQuery) { // ATTENTION : Positions are Y,Z,X float closestPoint[3] = { 0.0f, 0.0f, 0.0f }; dtQueryFilter filter; filter.setIncludeFlags(moveAllowedFlags); filter.setExcludeFlags(NAV_STEEP_SLOPES); - dtPolyRef startRef = PathInfo::FindWalkPoly(m_navMeshQuery, point, filter, closestPoint); + dtPolyRef startRef = PathInfo::FindWalkPoly(navMeshQuery, point, filter, closestPoint); if (!startRef) return false; dtPolyRef randomPosRef = 0; - dtStatus result = m_navMeshQuery->findRandomPointAroundCircle(startRef, closestPoint, maxRadius, &filter, rand_norm_f, &randomPosRef, point); + dtStatus result = navMeshQuery->findRandomPointAroundCircle(startRef, closestPoint, maxRadius, &filter, rand_norm_f, &randomPosRef, point); if (dtStatusFailed(result) || !MaNGOS::IsValidMapCoord(point[2], point[0], point[1])) return false; @@ -3323,12 +3323,12 @@ bool Map::GetWalkRandomPosition(GenericTransport* transport, float &x, float &y, dtPolyRef visited[10] = { 0 }; int visitedCount = 0; float hitNormal[3] = { 0 }; // Normal of wall hit. - result = m_navMeshQuery->raycast(startRef, closestPoint, endPosition, &filter, &t, hitNormal, visited, &visitedCount, 10); + result = navMeshQuery->raycast(startRef, closestPoint, endPosition, &filter, &t, hitNormal, visited, &visitedCount, 10); if (dtStatusFailed(result) || !visitedCount) return false; for (int i = 0; i < 3; ++i) endPosition[i] += hitNormal[i] * 0.5f; - result = m_navMeshQuery->closestPointOnPoly(visited[visitedCount - 1], endPosition, endPosition, nullptr); + result = navMeshQuery->closestPointOnPoly(visited[visitedCount - 1], endPosition, endPosition, nullptr); if (dtStatusFailed(result) || !MaNGOS::IsValidMapCoord(endPosition[2], endPosition[0], endPosition[1])) return false; } @@ -3377,46 +3377,46 @@ GameObjectModel const* Map::FindDynamicObjectCollisionModel(float x1, float y1, ASSERT(MaNGOS::IsValidMapCoord(x2, y2, z2)); Vector3 const pos1 = Vector3(x1, y1, z1); Vector3 const pos2 = Vector3(x2, y2, z2); - std::shared_lock lock(_dynamicTree_lock); - return _dynamicTree.getObjectHit(pos1, pos2); + std::shared_lock lock(m_dynamicTreeLock); + return m_dynamicTree.getObjectHit(pos1, pos2); } void Map::RemoveGameObjectModel(const GameObjectModel &model) { - std::lock_guard lock(_dynamicTree_lock); - _dynamicTree.remove(model); - _dynamicTree.balance(); + std::lock_guard lock(m_dynamicTreeLock); + m_dynamicTree.remove(model); + m_dynamicTree.balance(); } void Map::InsertGameObjectModel(const GameObjectModel &model) { - std::lock_guard lock(_dynamicTree_lock); - _dynamicTree.insert(model); - _dynamicTree.balance(); + std::lock_guard lock(m_dynamicTreeLock); + m_dynamicTree.insert(model); + m_dynamicTree.balance(); } bool Map::ContainsGameObjectModel(const GameObjectModel &model) const { - std::shared_lock lock(_dynamicTree_lock); - return _dynamicTree.contains(model); + std::shared_lock lock(m_dynamicTreeLock); + return m_dynamicTree.contains(model); } bool Map::GetDynamicObjectHitPos(Movement::Vector3 start, Movement::Vector3 end, Movement::Vector3 &out, float finalDistMod) const { - std::shared_lock lock(_dynamicTree_lock); - return _dynamicTree.getObjectHitPos(start, end, out, finalDistMod); + std::shared_lock lock(m_dynamicTreeLock); + return m_dynamicTree.getObjectHitPos(start, end, out, finalDistMod); } float Map::GetDynamicTreeHeight(float x, float y, float z, float maxSearchDist) const { - std::shared_lock lock(_dynamicTree_lock); - return _dynamicTree.getHeight(x, y, z, maxSearchDist); + std::shared_lock lock(m_dynamicTreeLock); + return m_dynamicTree.getHeight(x, y, z, maxSearchDist); } bool Map::CheckDynamicTreeLoS(float x1, float y1, float z1, float x2, float y2, float z2, bool ignoreM2Model) const { - std::shared_lock lock(_dynamicTree_lock); - return _dynamicTree.isInLineOfSight(x1, y1, z1, x2, y2, z2, ignoreM2Model); + std::shared_lock lock(m_dynamicTreeLock); + return m_dynamicTree.isInLineOfSight(x1, y1, z1, x2, y2, z2, ignoreM2Model); } @@ -3464,12 +3464,12 @@ void Map::CrashUnload() m_persistentState = nullptr; } - if (i_data) - i_data->SaveToDB(); + if (m_data) + m_data->SaveToDB(); //release reference count - if (m_TerrainData->Release()) - sTerrainMgr.UnloadTerrain(m_TerrainData->GetMapId()); + if (m_terrainData->Release()) + sTerrainMgr.UnloadTerrain(m_terrainData->GetMapId()); } @@ -3500,10 +3500,10 @@ void Map::PrintInfos(ChatHandler& handler) { handler.PSendSysMessage("Performance infos on Map (%u, %u)", GetId(), GetInstanceId()); handler.PSendSysMessage("%u non player active", m_activeNonPlayers.size()); - handler.PSendSysMessage("%u objects to client update [%u threads]", i_objectsToClientUpdate.size(), _objUpdatesThreads); - handler.PSendSysMessage("%u objects relocated [%u threads]", i_unitsRelocated.size(), _unitRelocationThreads); + handler.PSendSysMessage("%u objects to client update [%u threads]", m_objectsToClientUpdate.size(), m_objUpdatesThreads); + handler.PSendSysMessage("%u objects relocated [%u threads]", m_unitsRelocated.size(), m_unitRelocationThreads); handler.PSendSysMessage("%u scripts scheduled", m_scriptSchedule.size()); - handler.PSendSysMessage("Vis:%.1f Act:%.1f", m_VisibleDistance, m_GridActivationDistance); + handler.PSendSysMessage("Vis:%.1f Act:%.1f", m_visibilityDistance, m_gridActivationDistance); } bool Map::ShouldUpdateMap(uint32 now, uint32 inactiveTimeLimit) @@ -3512,7 +3512,7 @@ bool Map::ShouldUpdateMap(uint32 now, uint32 inactiveTimeLimit) if (!HavePlayers() && inactiveTimeLimit) { - if (WorldTimer::getMSTimeDiff(_lastPlayerLeftTime, now) > inactiveTimeLimit) + if (WorldTimer::getMSTimeDiff(m_lastPlayerLeftTime, now) > inactiveTimeLimit) update = false; } @@ -3523,8 +3523,8 @@ bool Map::ShouldUpdateMap(uint32 now, uint32 inactiveTimeLimit) // in AddCorpseToRemove because it can be called concurrently. if (!update) { - std::lock_guard guard(_corpseRemovalLock); - if (!_corpseToRemove.empty()) + std::lock_guard guard(m_corpseRemovalLock); + if (!m_corpseToRemove.empty()) update = true; } @@ -3537,8 +3537,8 @@ bool Map::ShouldUpdateMap(uint32 now, uint32 inactiveTimeLimit) */ void Map::AddCorpseToRemove(Corpse* corpse, ObjectGuid looter_guid) { - std::lock_guard guard(_corpseRemovalLock); - _corpseToRemove.emplace_back(corpse, looter_guid); + std::lock_guard guard(m_corpseRemovalLock); + m_corpseToRemove.emplace_back(corpse, looter_guid); } /** @@ -3546,8 +3546,8 @@ void Map::AddCorpseToRemove(Corpse* corpse, ObjectGuid looter_guid) */ void Map::RemoveBones(Corpse* corpse) { - std::lock_guard guard(_bonesLock); - _bones.remove(corpse); + std::lock_guard guard(m_bonesLock); + m_bones.remove(corpse); } /** @@ -3555,8 +3555,8 @@ void Map::RemoveBones(Corpse* corpse) */ void Map::RemoveCorpses(bool unload) { - std::lock_guard guard(_corpseRemovalLock); - for (auto iter = _corpseToRemove.begin(); iter != _corpseToRemove.end();) + std::lock_guard guard(m_corpseRemovalLock); + for (auto iter = m_corpseToRemove.begin(); iter != m_corpseToRemove.end();) { auto corpse = iter->first; auto& looterGuid = iter->second; @@ -3618,8 +3618,8 @@ void Map::RemoveCorpses(bool unload) // Only take the lock for a second { - std::lock_guard guard(_bonesLock); - _bones.push_back(bones); + std::lock_guard guard(m_bonesLock); + m_bones.push_back(bones); } } @@ -3632,7 +3632,7 @@ void Map::RemoveCorpses(bool unload) corpse->DeleteFromDB(); delete corpse; - iter = _corpseToRemove.erase(iter); + iter = m_corpseToRemove.erase(iter); } } @@ -3642,21 +3642,21 @@ void Map::RemoveCorpses(bool unload) */ void Map::RemoveOldBones(uint32 const diff) { - _bonesCleanupTimer += diff; - if (_bonesCleanupTimer < sWorld.GetWorldUpdateTimerInterval(WUPDATE_CORPSES)) + m_bonesCleanupTimer += diff; + if (m_bonesCleanupTimer < sWorld.GetWorldUpdateTimerInterval(WUPDATE_CORPSES)) return; - _bonesCleanupTimer = 0u; + m_bonesCleanupTimer = 0u; time_t now = time(nullptr); - std::lock_guard guard(_bonesLock); - for (auto iter = _bones.begin(); iter != _bones.end();) + std::lock_guard guard(m_bonesLock); + for (auto iter = m_bones.begin(); iter != m_bones.end();) { Corpse* bones = *iter; if (bones->IsExpired(now)) { Remove(bones, true); - iter = _bones.erase(iter); + iter = m_bones.erase(iter); } else ++iter; @@ -3740,3 +3740,40 @@ Creature* Map::LoadCreatureSpawnWithGroup(uint32 leaderDbGuid, bool delaySpawn) return pLeader; } + +GameObject* Map::LoadGameObjectSpawn(uint32 dbGuid, bool delaySpawn) +{ + GameObjectData const* pSpawnData = sObjectMgr.GetGOData(dbGuid); + if (!pSpawnData) + return nullptr; + + if (GetId() != pSpawnData->position.mapId) + { + sLog.Out(LOG_SCRIPTS, LOG_LVL_ERROR, "Attempt to load gameobject spawn guid %u on wrong map %u.", dbGuid, GetId()); + return nullptr; + } + + GameObject* pGameObject; + if (pGameObject = GetGameObject(ObjectGuid(HIGHGUID_GAMEOBJECT, pSpawnData->id, dbGuid))) + return pGameObject; + + if (!IsLoaded(pSpawnData->position.x, pSpawnData->position.y)) + return nullptr; + + pGameObject = GameObject::CreateGameObject(pSpawnData->id); + if (!pGameObject->LoadFromDB(dbGuid, this, true)) + { + delete pGameObject; + return nullptr; + } + + if (delaySpawn) + { + pGameObject->SetRespawnTime(pGameObject->GetRespawnDelay()); + if (sWorld.getConfig(CONFIG_BOOL_SAVE_RESPAWN_TIME_IMMEDIATELY)) + pGameObject->SaveRespawnTime(); + } + + Add(pGameObject); + return pGameObject; +} diff --git a/src/game/Maps/Map.h b/src/game/Maps/Map.h index ba040e040cd..36e4289be21 100644 --- a/src/game/Maps/Map.h +++ b/src/game/Maps/Map.h @@ -366,8 +366,8 @@ class Map : public GridRefManager void MessageDistBroadcast(Player const*, WorldPacket*, float dist, bool to_self, bool own_team_only = false); void MessageDistBroadcast(WorldObject const*, WorldPacket*, float dist); - float GetVisibilityDistance() const { return m_VisibleDistance; } - float GetGridActivationDistance() const { return m_GridActivationDistance; } + float GetVisibilityDistance() const { return m_visibilityDistance; } + float GetGridActivationDistance() const { return m_gridActivationDistance; } //function for setting up visibility distance for maps on per-type/per-Id basis virtual void InitVisibilityDistance(); @@ -400,12 +400,12 @@ class Map : public GridRefManager void ResetGridExpiry(NGridType& grid, float factor = 1) const { - grid.ResetTimeTracker((time_t)((float)i_gridExpiry*factor)); + grid.ResetTimeTracker((time_t)((float)m_gridExpiry*factor)); } - time_t GetGridExpiry(void) const { return i_gridExpiry; } + time_t GetGridExpiry(void) const { return m_gridExpiry; } time_t GetCreateTime() const { return m_createTime; } - uint32 GetId(void) const { return i_id; } + uint32 GetId(void) const { return m_id; } // some calls like isInWater should not use vmaps due to processor power // can return INVALID_HEIGHT if under z+2 z coord not found height @@ -416,17 +416,17 @@ class Map : public GridRefManager static bool CheckGridIntegrity(Creature* c, bool moved); - uint32 GetInstanceId() const { return i_InstanceId; } + uint32 GetInstanceId() const { return m_instanceId; } virtual bool CanEnter(Player* /*player*/) { return true; } char const* GetMapName() const; - MapEntry const* GetMapEntry() const { return i_mapEntry; } - bool Instanceable() const { return i_mapEntry && i_mapEntry->Instanceable(); } - bool IsNonRaidDungeon() const { return i_mapEntry && i_mapEntry->IsNonRaidDungeon(); } - bool IsDungeon() const { return i_mapEntry && i_mapEntry->IsDungeon(); } - bool IsRaid() const { return i_mapEntry && i_mapEntry->IsRaid(); } - bool IsBattleGround() const { return i_mapEntry && i_mapEntry->IsBattleGround(); } - bool IsContinent() const { return i_mapEntry && i_mapEntry->IsContinent(); } + MapEntry const* GetMapEntry() const { return m_mapEntry; } + bool Instanceable() const { return m_mapEntry && m_mapEntry->Instanceable(); } + bool IsNonRaidDungeon() const { return m_mapEntry && m_mapEntry->IsNonRaidDungeon(); } + bool IsDungeon() const { return m_mapEntry && m_mapEntry->IsDungeon(); } + bool IsRaid() const { return m_mapEntry && m_mapEntry->IsRaid(); } + bool IsBattleGround() const { return m_mapEntry && m_mapEntry->IsBattleGround(); } + bool IsContinent() const { return m_mapEntry && m_mapEntry->IsContinent(); } // can't be nullptr for loaded map MapPersistentState* GetPersistentState() const { return m_persistentState; } @@ -500,6 +500,7 @@ class Map : public GridRefManager Creature* SummonCreature(uint32 entry, float x, float y, float z, float ang, TempSummonType spwtype = TEMPSUMMON_DEAD_DESPAWN, uint32 despwtime = 25000, bool asActiveObject = false); Creature* LoadCreatureSpawn(uint32 dbGuid, bool delaySpawn = false); Creature* LoadCreatureSpawnWithGroup(uint32 leaderDbGuid, bool delaySpawn = false); + GameObject* LoadGameObjectSpawn(uint32 dbGuid, bool delaySpawn = false); Player* GetPlayer(ObjectGuid guid); GameObject* GetGameObject(ObjectGuid const& guid) { return GetObject(guid); } @@ -542,12 +543,12 @@ class Map : public GridRefManager uint32 GenerateLocalLowGuid(HighGuid guidhigh); //get corresponding TerrainData object for this particular map - TerrainInfo const* GetTerrain() const { return m_TerrainData; } + TerrainInfo const* GetTerrain() const { return m_terrainData; } void CreateInstanceData(bool load); - InstanceData* GetInstanceData() { return i_data; } - InstanceData const* GetInstanceData() const { return i_data; } - uint32 GetScriptId() const { return i_script_id; } + InstanceData* GetInstanceData() { return m_data; } + InstanceData const* GetInstanceData() const { return m_data; } + uint32 GetScriptId() const { return m_scriptId; } // GameObjectCollision float GetHeight(float x, float y, float z, bool vmap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const; @@ -562,7 +563,7 @@ class Map : public GridRefManager VMAP::ModelInstance* FindCollisionModel(float x1, float y1, float z1, float x2, float y2, float z2); GameObjectModel const* FindDynamicObjectCollisionModel(float x1, float y1, float z1, float x2, float y2, float z2); - void Balance() { _dynamicTree.balance(); } + void Balance() { m_dynamicTree.balance(); } void RemoveGameObjectModel(const GameObjectModel& model); void InsertGameObjectModel(const GameObjectModel& model); bool ContainsGameObjectModel(const GameObjectModel& model) const; @@ -605,7 +606,7 @@ class Map : public GridRefManager private: void LoadMapAndVMap(int gx, int gy); - void SetTimer(uint32 t) { i_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; } + void SetTimer(uint32 t) { m_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; } static void SendInitSelf(Player* player); @@ -628,7 +629,7 @@ class Map : public GridRefManager { MANGOS_ASSERT(x < MAX_NUMBER_OF_GRIDS); MANGOS_ASSERT(y < MAX_NUMBER_OF_GRIDS); - return i_grids[x][y]; + return m_grids[x][y]; } void setNGrid(NGridType* grid, uint32 x, uint32 y); @@ -639,26 +640,26 @@ class Map : public GridRefManager void SendObjectUpdates(); void UpdateVisibilityForRelocations(); - bool _processingSendObjUpdates = false; - uint32 _objUpdatesThreads = 0; - mutable std::mutex i_objectsToClientUpdate_lock; - std::unordered_set i_objectsToClientUpdate; + bool m_processingSendObjUpdates = false; + uint32 m_objUpdatesThreads = 0; + mutable std::mutex m_objectsToClientUpdateLock; + std::unordered_set m_objectsToClientUpdate; - bool _processingUnitsRelocation = false; - uint32 _unitRelocationThreads = 0; - mutable std::mutex i_unitsRelocated_lock; - std::unordered_set i_unitsRelocated; + bool m_processingUnitsRelocation = false; + uint32 m_unitRelocationThreads = 0; + mutable std::mutex m_unitsRelocatedLock; + std::unordered_set m_unitsRelocated; - mutable std::mutex unitsMvtUpdate_lock; - std::unordered_set unitsMvtUpdate; + mutable std::mutex m_unitsMvtUpdateLock; + std::unordered_set m_unitsMvtUpdate; - mutable MapMutexType _corpseRemovalLock; + mutable MapMutexType m_corpseRemovalLock; typedef std::list> CorpseRemoveList; - CorpseRemoveList _corpseToRemove; + CorpseRemoveList m_corpseToRemove; - MapMutexType _bonesLock; - uint32 _bonesCleanupTimer; - std::list _bones; + MapMutexType m_bonesLock; + uint32 m_bonesCleanupTimer; + std::list m_bones; void RemoveCorpses(bool unload = false); void RemoveOldBones(uint32 const diff); @@ -669,15 +670,15 @@ class Map : public GridRefManager std::unique_ptr m_cellThreads; protected: - MapEntry const* i_mapEntry; - uint32 i_id; - uint32 i_InstanceId; + MapEntry const* m_mapEntry; + uint32 m_id; + uint32 m_instanceId; uint32 m_unloadTimer = 0; - float m_VisibleDistance; - float m_GridActivationDistance; + float m_visibilityDistance; + float m_gridActivationDistance; - mutable std::shared_timed_mutex _dynamicTree_lock; - DynamicMapTree _dynamicTree; + mutable std::shared_timed_mutex m_dynamicTreeLock; + DynamicMapTree m_dynamicTree; MapPersistentState* m_persistentState = nullptr; @@ -689,8 +690,8 @@ class Map : public GridRefManager ActiveNonPlayers::iterator m_activeNonPlayersIter; typedef TypeUnorderedMapContainer MapStoredObjectTypesContainer; - mutable std::shared_timed_mutex m_objectsStore_lock; - MapStoredObjectTypesContainer m_objectsStore; + mutable std::shared_timed_mutex m_objectsStore_lock; + MapStoredObjectTypesContainer m_objectsStore; // Objects that must update even in inactive grids without activating them typedef std::set TransportsContainer; @@ -704,25 +705,25 @@ class Map : public GridRefManager uint32 m_lastMvtSpellsUpdate = 0; private: time_t m_createTime; // time when map was created - time_t i_gridExpiry; + time_t m_gridExpiry; - NGridType* i_grids[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; + NGridType* m_grids[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; //Shared geodata object with map coord info... - TerrainInfo * const m_TerrainData; + TerrainInfo * const m_terrainData; bool m_bLoadedGrids[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; std::bitset marked_cells; - mutable std::mutex i_objectsToRemove_lock; - std::set i_objectsToRemove; + mutable std::mutex m_objectsToRemoveLock; + std::set m_objectsToRemove; typedef std::multimap ScriptScheduleMap; mutable MapMutexType m_scriptSchedule_lock; ScriptScheduleMap m_scriptSchedule; - InstanceData* i_data = nullptr; - uint32 i_script_id = 0; + InstanceData* m_data = nullptr; + uint32 m_scriptId = 0; // Map local low guid counters mutable std::mutex m_guidGenerators_lock; @@ -740,13 +741,11 @@ class Map : public GridRefManager void RemoveFromGrid(T*, NGridType*, Cell const&); // Custom - uint32 _lastMapUpdate = 0; - uint32 _lastPlayerLeftTime = 0; - uint32 _lastPlayersUpdate; - uint32 _inactivePlayersSkippedUpdates = 0; - uint32 _lastCellsUpdate; - - int8 _updateIdx; + uint32 m_lastMapUpdate = 0; + uint32 m_lastPlayerLeftTime = 0; + uint32 m_lastPlayersUpdate; + uint32 m_inactivePlayersSkippedUpdates = 0; + uint32 m_lastCellsUpdate; // Elevators are not loaded normally. void LoadElevatorTransports(); @@ -961,7 +960,7 @@ class Map : public GridRefManager public: CreatureGroupHolderType CreatureGroupHolder; - uint32 GetLastPlayerLeftTime() const { return _lastPlayerLeftTime; } + uint32 GetLastPlayerLeftTime() const { return m_lastPlayerLeftTime; } }; class WorldMap : public Map diff --git a/src/game/Maps/MapPersistentStateMgr.h b/src/game/Maps/MapPersistentStateMgr.h index 1d2fb21ee61..91382f928d1 100644 --- a/src/game/Maps/MapPersistentStateMgr.h +++ b/src/game/Maps/MapPersistentStateMgr.h @@ -276,7 +276,7 @@ struct DungeonResetEvent DungeonResetEvent(ResetEventType t, uint32 _mapid, uint32 _instanceid) : type(t), mapId(_mapid), instanceId(_instanceid) {} - bool operator == (DungeonResetEvent const& e) { return e.mapId == mapId && e.instanceId == instanceId; } + bool operator==(DungeonResetEvent const& e) const { return e.mapId == mapId && e.instanceId == instanceId; } }; typedef std::map > ResetTimeMapType; diff --git a/src/game/Maps/Pool/PoolManager.cpp b/src/game/Maps/Pool/PoolManager.cpp index cabee093b43..6b08f3bd788 100644 --- a/src/game/Maps/Pool/PoolManager.cpp +++ b/src/game/Maps/Pool/PoolManager.cpp @@ -135,7 +135,7 @@ void PoolObject::CheckEventLinkAndReport(uint32 poolId, int16 event_id { std::map::const_iterator itr = creature2event.find(guid); if (itr == creature2event.end() || itr->second != event_id) - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "Creature (GUID: %u) expected to be listed in `game_event_creature` for event %u as part pool %u", guid, event_id, poolId); + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Creature (GUID: %u) expected to be listed in `game_event_creature` for event %u as part pool %u", guid, event_id, poolId); } template<> @@ -143,7 +143,7 @@ void PoolObject::CheckEventLinkAndReport(uint32 poolId, int16 event_ { std::map::const_iterator itr = go2event.find(guid); if (itr == go2event.end() || itr->second != event_id) - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "Gameobject (GUID: %u) expected to be listed in `game_event_gameobject` for event %u as part pool %u", guid, event_id, poolId); + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Gameobject (GUID: %u) expected to be listed in `game_event_gameobject` for event %u as part pool %u", guid, event_id, poolId); } template<> @@ -597,7 +597,7 @@ void PoolGroup::ReSpawn1Object(MapPersistentState& /*mapState*/, PoolObjec //////////////////////////////////////////////////////////// // Methods of class PoolManager -PoolManager::PoolManager() : max_pool_id(0) +PoolManager::PoolManager() : m_maxPoolId(0) { } @@ -631,7 +631,7 @@ struct PoolMapChecker // pool spawns must be at single instanceable map if (mapEntry->Instanceable()) { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "`%s` has %s spawned at instanceable map %u when one or several other spawned at different map %u in pool id %i, skipped.", + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`%s` has %s spawned at instanceable map %u when one or several other spawned at different map %u in pool id %i, skipped.", tableName, elementName, mapid, poolMapEntry->id, pool_id); return false; } @@ -639,7 +639,7 @@ struct PoolMapChecker // pool spawns must be at single instanceable map if (poolMapEntry->Instanceable()) { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "`%s` has %s spawned at map %u when one or several other spawned at different instanceable map %u in pool id %i, skipped.", + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`%s` has %s spawned at map %u when one or several other spawned at different instanceable map %u in pool id %i, skipped.", tableName, elementName, mapid, poolMapEntry->id, pool_id); return false; } @@ -653,12 +653,12 @@ bool CheckPoolAndChance(char const* table, uint16 pool_id, float chance) { if (pool_id > sPoolMgr.GetMaxPoolId()) { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "`%s` pool id (%i) is out of range compared to max pool id in `pool_template`, skipped.", table, pool_id); + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`%s` pool id (%i) is out of range compared to max pool id in `pool_template`, skipped.", table, pool_id); return false; } if (chance < 0 || chance > 100) { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "`%s` has an invalid chance (%f) in pool id (%i), skipped.", table, chance, pool_id); + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`%s` has an invalid chance (%f) in pool id (%i), skipped.", table, chance, pool_id); return false; } return true; @@ -676,15 +676,15 @@ void PoolManager::LoadFromDB() else { Field* fields = result->Fetch(); - max_pool_id = fields[0].GetUInt16(); + m_maxPoolId = fields[0].GetUInt16(); } - mPoolTemplate.resize(max_pool_id + 1); + m_poolTemplate.resize(m_maxPoolId + 1); result = WorldDatabase.PQuery("SELECT `entry`, `max_limit`, `flags`, `description`, `instance` FROM `pool_template` WHERE %u BETWEEN `patch_min` AND `patch_max`", sWorld.GetWowPatch()); if (!result) { - mPoolTemplate.clear(); + m_poolTemplate.clear(); sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, ">> Table pool_template is empty:"); sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, ""); return; @@ -702,12 +702,16 @@ void PoolManager::LoadFromDB() uint16 pool_id = fields[0].GetUInt16(); - PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_id]; + PoolTemplateData& pPoolTemplate = m_poolTemplate[pool_id]; + pPoolTemplate.MaxLimit = fields[1].GetUInt32(); + if (pPoolTemplate.MaxLimit < 1) + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Pool Id (%u) has no max limit set.", pool_id); pPoolTemplate.PoolFlags = fields[2].GetUInt32(); pPoolTemplate.description = fields[3].GetCppString(); + if (pPoolTemplate.description.empty()) + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Pool Id (%u) has no description set.", pool_id); pPoolTemplate.InstanceId = sWorld.getConfig(CONFIG_BOOL_CONTINENTS_INSTANCIATE) ? fields[4].GetUInt32() : 0; - pPoolTemplate.PoolFlags |= POOL_FLAG_AUTO_SPAWN; } @@ -716,12 +720,12 @@ void PoolManager::LoadFromDB() sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, ""); sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, ">> Loaded %u objects pools", count); - PoolMapChecker mapChecker(mPoolTemplate); + PoolMapChecker mapChecker(m_poolTemplate); // Creatures (guids and entries) - mPoolCreatureGroups.resize(max_pool_id + 1); - mCreatureSearchMap.clear(); + m_poolCreatureGroups.resize(m_maxPoolId + 1); + m_creatureSearchMap.clear(); result = WorldDatabase.PQuery( "SELECT `guid`, `pool_entry`, `chance`, 0, `flags`, `patch_min`, `patch_max` FROM `pool_creature` WHERE %u BETWEEN `patch_min` AND `patch_max` " @@ -764,33 +768,42 @@ void PoolManager::LoadFromDB() CreatureData const* data = sObjectMgr.GetCreatureData(guid); if (!data) { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "`%s` has a non existing creature spawn (GUID: %u) defined for pool id (%u), skipped.", table, guid, pool_id); + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`%s` has a non existing creature spawn (GUID: %u) defined for pool id (%u), skipped.", table, guid, pool_id); continue; } + // `pool_creature` and `pool_creature_template` can't have guids duplicates (in second case because entries also unique) // So if guid already listed in pools then this duplicate from alt.table // Also note: for added guid not important what case we skip from 2 tables if (uint16 alt_pool_id = IsPartOfAPool(guid)) { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "`%s` has guid %u for pool %u that already added to pool %u from `pool_creature_template` for creature entry %u, skipped.", + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`%s` has guid %u for pool %u that already added to pool %u from `pool_creature_template` for creature entry %u, skipped.", table, guid, pool_id, alt_pool_id, entry_id); continue; } + if (!CheckPoolAndChance(table, pool_id, chance)) continue; + + if (!m_poolTemplate[pool_id].MaxLimit) + { + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`%s` has guid %u for invalid pool %u, skipped.", table, guid, pool_id); + continue; + } + if (!mapChecker.CheckAndRemember(data->position.mapId, pool_id, table, "creature guid")) continue; - PoolTemplateData *pPoolTemplate = &mPoolTemplate[pool_id]; + PoolTemplateData *pPoolTemplate = &m_poolTemplate[pool_id]; ++count; PoolObject plObject = PoolObject(guid, chance, flags); - PoolGroup& cregroup = mPoolCreatureGroups[pool_id]; + PoolGroup& cregroup = m_poolCreatureGroups[pool_id]; cregroup.SetPoolId(pool_id); cregroup.AddEntry(plObject, pPoolTemplate->MaxLimit); SearchPair p(guid, pool_id); - mCreatureSearchMap.insert(p); + m_creatureSearchMap.insert(p); } while (result->NextRow()); @@ -799,8 +812,8 @@ void PoolManager::LoadFromDB() } // Gameobjects (guids and entries) - mPoolGameobjectGroups.resize(max_pool_id + 1); - mGameobjectSearchMap.clear(); + m_poolGameObjectGroups.resize(m_maxPoolId + 1); + m_gameObjectSearchMap.clear(); // 0 1 2 3 4 5 6 result = WorldDatabase.PQuery("SELECT `guid`, `pool_entry`, `chance`, 0, `flags`, `patch_min`, `patch_max` FROM `pool_gameobject` WHERE (%u BETWEEN `patch_min` AND `patch_max`) " "UNION " @@ -842,42 +855,42 @@ void PoolManager::LoadFromDB() GameObjectData const* data = sObjectMgr.GetGOData(guid); if (!data) { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "`%s` has a non existing gameobject spawn (GUID: %u) defined for pool id (%u), skipped.", table, guid, pool_id); - continue; - } - GameObjectInfo const* goinfo = ObjectMgr::GetGameObjectInfo(data->id); - if (goinfo->type != GAMEOBJECT_TYPE_CHEST && - goinfo->type != GAMEOBJECT_TYPE_GOOBER && - goinfo->type != GAMEOBJECT_TYPE_FISHINGHOLE && - goinfo->type != GAMEOBJECT_TYPE_SPELL_FOCUS) - { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "`%s` has a not lootable gameobject spawn (GUID: %u, type: %u) defined for pool id (%u), skipped.", table, guid, goinfo->type, pool_id); + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`%s` has a non existing gameobject spawn (GUID: %u) defined for pool id (%u), skipped.", table, guid, pool_id); continue; } + // `pool_gameobject` and `pool_gameobject_template` can't have guids duplicates (in second case because entries also unique) // So if guid already listed in pools then this duplicate from alt.table // Also note: for added guid not important what case we skip from 2 tables if (uint16 alt_pool_id = IsPartOfAPool(guid)) { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "`%s` has guid %u for pool %u that already added to pool %u from `pool_gameobject_template` for gameobject entry %u, skipped.", + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`%s` has guid %u for pool %u that already added to pool %u from `pool_gameobject_template` for gameobject entry %u, skipped.", table, guid, pool_id, alt_pool_id, entry_id); continue; } + if (!CheckPoolAndChance(table, pool_id, chance)) continue; + + if (!m_poolTemplate[pool_id].MaxLimit) + { + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`%s` has guid %u for invalid pool %u, skipped.", table, guid, pool_id); + continue; + } + if (!mapChecker.CheckAndRemember(data->position.mapId, pool_id, table, "gameobject guid")) continue; - PoolTemplateData *pPoolTemplate = &mPoolTemplate[pool_id]; + PoolTemplateData *pPoolTemplate = &m_poolTemplate[pool_id]; ++count; PoolObject plObject = PoolObject(guid, chance, flags); - PoolGroup& gogroup = mPoolGameobjectGroups[pool_id]; + PoolGroup& gogroup = m_poolGameObjectGroups[pool_id]; gogroup.SetPoolId(pool_id); gogroup.AddEntry(plObject, pPoolTemplate->MaxLimit); SearchPair p(guid, pool_id); - mGameobjectSearchMap.insert(p); + m_gameObjectSearchMap.insert(p); } while (result->NextRow()); @@ -886,7 +899,7 @@ void PoolManager::LoadFromDB() } // Pool of pools - mPoolPoolGroups.resize(max_pool_id + 1); + m_poolPoolGroups.resize(m_maxPoolId + 1); // 1 2 3 4 result = WorldDatabase.Query("SELECT `pool_id`, `mother_pool`, `chance`, `flags` FROM `pool_pool`"); @@ -914,49 +927,51 @@ void PoolManager::LoadFromDB() float chance = fields[2].GetFloat(); uint32 flags = fields[3].GetFloat(); - if (child_pool_id > max_pool_id) + if (child_pool_id > m_maxPoolId) { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "`pool_pool` included pool_id (%i) is out of range compared to max pool id in `pool_template`, skipped.", child_pool_id); + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`pool_pool` included pool_id (%i) is out of range compared to max pool id in `pool_template`, skipped.", child_pool_id); continue; } + if (mother_pool_id == child_pool_id) { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "`pool_pool` pool_id (%i) includes itself, dead-lock detected, skipped.", child_pool_id); + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "`pool_pool` pool_id (%i) includes itself, dead-lock detected, skipped.", child_pool_id); continue; } + if (!CheckPoolAndChance("pool_pool", mother_pool_id, chance)) continue; - PoolTemplateData *pPoolTemplateMother = &mPoolTemplate[mother_pool_id]; + PoolTemplateData *pPoolTemplateMother = &m_poolTemplate[mother_pool_id]; ++count; PoolObject plObject = PoolObject(child_pool_id, chance, flags); - PoolGroup& plgroup = mPoolPoolGroups[mother_pool_id]; + PoolGroup& plgroup = m_poolPoolGroups[mother_pool_id]; plgroup.SetPoolId(mother_pool_id); plgroup.AddEntry(plObject, pPoolTemplateMother->MaxLimit); SearchPair p(child_pool_id, mother_pool_id); - mPoolSearchMap.insert(p); + m_poolSearchMap.insert(p); // update top independent pool flag - mPoolTemplate[child_pool_id].PoolFlags &= ~POOL_FLAG_AUTO_SPAWN; + m_poolTemplate[child_pool_id].PoolFlags &= ~POOL_FLAG_AUTO_SPAWN; } while (result->NextRow()); // Now check for circular reference - for (uint16 i = 0; i < max_pool_id; ++i) + for (uint16 i = 0; i < m_maxPoolId; ++i) { std::set checkedPools; - for (SearchMap::iterator poolItr = mPoolSearchMap.find(i); poolItr != mPoolSearchMap.end(); poolItr = mPoolSearchMap.find(poolItr->second)) + for (SearchMap::iterator poolItr = m_poolSearchMap.find(i); poolItr != m_poolSearchMap.end(); poolItr = m_poolSearchMap.find(poolItr->second)) { // if child pool not have map data then it empty or have not checked child then will checked and all line later - if (MapEntry const* childMapEntry = mPoolTemplate[poolItr->first].mapEntry) + if (MapEntry const* childMapEntry = m_poolTemplate[poolItr->first].mapEntry) { if (!mapChecker.CheckAndRemember(childMapEntry->id, poolItr->second, "pool_pool", "pool with creature/gameobject")) { - mPoolPoolGroups[poolItr->second].RemoveOneRelation(poolItr->first); - mPoolSearchMap.erase(poolItr); + m_poolPoolGroups[poolItr->second].RemoveOneRelation(poolItr->first); + m_poolSearchMap.erase(poolItr); --count; break; } @@ -971,9 +986,9 @@ void PoolManager::LoadFromDB() ss << checkedPool << " "; ss << "create(s) a circular reference, which can cause the server to freeze.\nRemoving the last link between mother pool " << poolItr->first << " and child pool " << poolItr->second; - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "%s", ss.str().c_str()); - mPoolPoolGroups[poolItr->second].RemoveOneRelation(poolItr->first); - mPoolSearchMap.erase(poolItr); + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "%s", ss.str().c_str()); + m_poolPoolGroups[poolItr->second].RemoveOneRelation(poolItr->first); + m_poolSearchMap.erase(poolItr); --count; break; } @@ -984,26 +999,90 @@ void PoolManager::LoadFromDB() sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, ">> Loaded %u pools in mother pools", count); } - // check chances integrity - for (uint16 pool_entry = 0; pool_entry < mPoolTemplate.size(); ++pool_entry) + for (uint16 pool_entry = 0; pool_entry < m_poolTemplate.size(); ++pool_entry) { - if (mPoolTemplate[pool_entry].IsAutoSpawn()) + if (m_poolTemplate[pool_entry].MaxLimit && + m_poolGameObjectGroups[pool_entry].isEmpty() && + m_poolCreatureGroups[pool_entry].isEmpty() && + m_poolPoolGroups[pool_entry].isEmpty()) + { + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Pool Id (%u) is empty.", pool_entry); + } + + if (!m_poolTemplate[pool_entry].InstanceId && + m_poolTemplate[pool_entry].mapEntry && + m_poolTemplate[pool_entry].mapEntry->IsContinent() && + sWorld.getConfig(CONFIG_BOOL_CONTINENTS_INSTANCIATE)) + { + m_poolTemplate[pool_entry].InstanceId = GetContinentInstanceIdForPool(pool_entry); + } + + // check chances integrity + if (m_poolTemplate[pool_entry].IsAutoSpawn()) { if (!CheckPool(pool_entry)) { - sLog.Out(LOG_DBERROR, LOG_LVL_MINIMAL, "Pool Id (%u) has all creatures or gameobjects with explicit chance sum <>100 and no equal chance defined. The pool system cannot pick one to spawn.", pool_entry); - mPoolTemplate[pool_entry].PoolFlags &= ~POOL_FLAG_AUTO_SPAWN; + sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Pool Id (%u) has all creatures or gameobjects with explicit chance sum <>100 and no equal chance defined. The pool system cannot pick one to spawn.", pool_entry); + m_poolTemplate[pool_entry].PoolFlags &= ~POOL_FLAG_AUTO_SPAWN; } } } } +// goes through the spawns in the pool to figure out on which continent instance to spawn the pool +uint32 PoolManager::GetContinentInstanceIdForPool(uint16 pool_id) const +{ + if (!m_poolGameObjectGroups[pool_id].isEmpty()) + { + for (auto const& itr : m_poolGameObjectGroups[pool_id].GetEqualChanced()) + { + if (GameObjectData const* data = sObjectMgr.GetGOData(itr.guid)) + { + if (data->position.mapId <= MAX_CONTINENT_ID) + return sMapMgr.GetContinentInstanceId(data->position.mapId, data->position.x, data->position.y); + } + } + + for (auto const& itr : m_poolGameObjectGroups[pool_id].GetExplicitlyChanced()) + { + if (GameObjectData const* data = sObjectMgr.GetGOData(itr.guid)) + { + if (data->position.mapId <= MAX_CONTINENT_ID) + return sMapMgr.GetContinentInstanceId(data->position.mapId, data->position.x, data->position.y); + } + } + } + + if (!m_poolCreatureGroups[pool_id].isEmpty()) + { + for (auto const& itr : m_poolCreatureGroups[pool_id].GetEqualChanced()) + { + if (CreatureData const* data = sObjectMgr.GetCreatureData(itr.guid)) + { + if (data->position.mapId <= MAX_CONTINENT_ID) + return sMapMgr.GetContinentInstanceId(data->position.mapId, data->position.x, data->position.y); + } + } + + for (auto const& itr : m_poolCreatureGroups[pool_id].GetExplicitlyChanced()) + { + if (CreatureData const* data = sObjectMgr.GetCreatureData(itr.guid)) + { + if (data->position.mapId <= MAX_CONTINENT_ID) + return sMapMgr.GetContinentInstanceId(data->position.mapId, data->position.x, data->position.y); + } + } + } + + return 0; +} + // The initialize method will spawn all pools not in an event and not in another pool void PoolManager::Initialize(MapPersistentState* state) { // spawn pools for expected map or for not initialized shared pools state for non-instanceable maps - for (uint16 pool_entry = 0; pool_entry < mPoolTemplate.size(); ++pool_entry) - if (mPoolTemplate[pool_entry].IsAutoSpawn()) + for (uint16 pool_entry = 0; pool_entry < m_poolTemplate.size(); ++pool_entry) + if (m_poolTemplate[pool_entry].IsAutoSpawn()) InitSpawnPool(*state, pool_entry); } @@ -1012,8 +1091,8 @@ void PoolManager::Initialize(MapPersistentState* state) template<> void PoolManager::SpawnPoolGroup(MapPersistentState& mapState, uint16 pool_id, uint32 db_guid, bool instantly) { - if (!mPoolCreatureGroups[pool_id].isEmpty()) - mPoolCreatureGroups[pool_id].SpawnObject(mapState, mPoolTemplate[pool_id].GetSpawnCount(), db_guid, instantly, false); + if (!m_poolCreatureGroups[pool_id].isEmpty()) + m_poolCreatureGroups[pool_id].SpawnObject(mapState, m_poolTemplate[pool_id].GetSpawnCount(), db_guid, instantly, false); } // Call to spawn a pool, if cache if true the method will spawn only if cached entry is different @@ -1021,8 +1100,8 @@ void PoolManager::SpawnPoolGroup(MapPersistentState& mapState, uint16 template<> void PoolManager::SpawnPoolGroup(MapPersistentState& mapState, uint16 pool_id, uint32 db_guid, bool instantly) { - if (!mPoolGameobjectGroups[pool_id].isEmpty()) - mPoolGameobjectGroups[pool_id].SpawnObject(mapState, mPoolTemplate[pool_id].GetSpawnCount(), db_guid, instantly, false); + if (!m_poolGameObjectGroups[pool_id].isEmpty()) + m_poolGameObjectGroups[pool_id].SpawnObject(mapState, m_poolTemplate[pool_id].GetSpawnCount(), db_guid, instantly, false); } // Call to spawn a pool, if cache if true the method will spawn only if cached entry is different @@ -1030,8 +1109,8 @@ void PoolManager::SpawnPoolGroup(MapPersistentState& mapState, uint1 template<> void PoolManager::SpawnPoolGroup(MapPersistentState& mapState, uint16 pool_id, uint32 sub_pool_id, bool instantly) { - if (!mPoolPoolGroups[pool_id].isEmpty()) - mPoolPoolGroups[pool_id].SpawnObject(mapState, mPoolTemplate[pool_id].GetSpawnCount(), sub_pool_id, instantly, pool_id); + if (!m_poolPoolGroups[pool_id].isEmpty()) + m_poolPoolGroups[pool_id].SpawnObject(mapState, m_poolTemplate[pool_id].GetSpawnCount(), sub_pool_id, instantly, pool_id); } /*! @@ -1046,44 +1125,44 @@ void PoolManager::SpawnPool(MapPersistentState& mapState, uint16 pool_id, bool i // Call to despawn a pool, all gameobjects/creatures in this pool are removed void PoolManager::DespawnPool(MapPersistentState& mapState, uint16 pool_id) { - if (!mPoolCreatureGroups[pool_id].isEmpty()) - mPoolCreatureGroups[pool_id].DespawnObject(mapState); + if (!m_poolCreatureGroups[pool_id].isEmpty()) + m_poolCreatureGroups[pool_id].DespawnObject(mapState); - if (!mPoolGameobjectGroups[pool_id].isEmpty()) - mPoolGameobjectGroups[pool_id].DespawnObject(mapState); + if (!m_poolGameObjectGroups[pool_id].isEmpty()) + m_poolGameObjectGroups[pool_id].DespawnObject(mapState); - if (!mPoolPoolGroups[pool_id].isEmpty()) - mPoolPoolGroups[pool_id].DespawnObject(mapState); + if (!m_poolPoolGroups[pool_id].isEmpty()) + m_poolPoolGroups[pool_id].DespawnObject(mapState); } // Method that check chance integrity of the creatures and gameobjects in this pool bool PoolManager::CheckPool(uint16 pool_id) const { - return pool_id <= max_pool_id && - mPoolGameobjectGroups[pool_id].CheckPool() && - mPoolCreatureGroups[pool_id].CheckPool() && - mPoolPoolGroups[pool_id].CheckPool(); + return pool_id <= m_maxPoolId && + m_poolGameObjectGroups[pool_id].CheckPool() && + m_poolCreatureGroups[pool_id].CheckPool() && + m_poolPoolGroups[pool_id].CheckPool(); } // Method that check linking all elements to event void PoolManager::CheckEventLinkAndReport(uint16 pool_id, int16 event_id, std::map const& creature2event, std::map const& go2event) const { - mPoolGameobjectGroups[pool_id].CheckEventLinkAndReport(event_id, creature2event, go2event); - mPoolCreatureGroups[pool_id].CheckEventLinkAndReport(event_id, creature2event, go2event); - mPoolPoolGroups[pool_id].CheckEventLinkAndReport(event_id, creature2event, go2event); + m_poolGameObjectGroups[pool_id].CheckEventLinkAndReport(event_id, creature2event, go2event); + m_poolCreatureGroups[pool_id].CheckEventLinkAndReport(event_id, creature2event, go2event); + m_poolPoolGroups[pool_id].CheckEventLinkAndReport(event_id, creature2event, go2event); } // Method that exclude some elements from next spawn template<> void PoolManager::SetExcludeObject(uint16 pool_id, uint32 db_guid_or_pool_id, bool state) { - mPoolCreatureGroups[pool_id].SetExcludeObject(db_guid_or_pool_id, state); + m_poolCreatureGroups[pool_id].SetExcludeObject(db_guid_or_pool_id, state); } template<> void PoolManager::SetExcludeObject(uint16 pool_id, uint32 db_guid_or_pool_id, bool state) { - mPoolGameobjectGroups[pool_id].SetExcludeObject(db_guid_or_pool_id, state); + m_poolGameObjectGroups[pool_id].SetExcludeObject(db_guid_or_pool_id, state); } // Call to update the pool when a gameobject/creature part of pool [pool_id] is ready to respawn @@ -1120,7 +1199,7 @@ struct SpawnPoolInMapsWorker // used for calling from global systems when need spawn pool in all appropriate map persistent states void PoolManager::SpawnPoolInMaps(uint16 pool_id, bool instantly) { - PoolTemplateData& poolTemplate = mPoolTemplate[pool_id]; + PoolTemplateData& poolTemplate = m_poolTemplate[pool_id]; SpawnPoolInMapsWorker worker(*this, pool_id, instantly); sMapPersistentStateMgr.DoForAllStatesWithMapId(poolTemplate.mapEntry->id, poolTemplate.InstanceId, worker); @@ -1143,7 +1222,7 @@ struct DespawnPoolInMapsWorker // used for calling from global systems when need spawn pool in all appropriate map persistent states void PoolManager::DespawnPoolInMaps(uint16 pool_id) { - PoolTemplateData& poolTemplate = mPoolTemplate[pool_id]; + PoolTemplateData& poolTemplate = m_poolTemplate[pool_id]; DespawnPoolInMapsWorker worker(*this, pool_id); sMapPersistentStateMgr.DoForAllStatesWithMapId(poolTemplate.mapEntry->id, poolTemplate.InstanceId, worker); @@ -1152,7 +1231,7 @@ void PoolManager::DespawnPoolInMaps(uint16 pool_id) void PoolManager::InitSpawnPool(MapPersistentState& mapState, uint16 pool_id) { // spawn pool for expected map or for not initialized shared pools state for non-instanceable maps - if (mPoolTemplate[pool_id].CanBeSpawnedAtMap(mapState.GetMapEntry())) + if (m_poolTemplate[pool_id].CanBeSpawnedAtMap(mapState.GetMapEntry())) SpawnPool(mapState, pool_id, true); } @@ -1175,7 +1254,7 @@ struct UpdatePoolInMapsWorker template void PoolManager::UpdatePoolInMaps(uint16 pool_id, uint32 db_guid_or_pool_id) { - PoolTemplateData& poolTemplate = mPoolTemplate[pool_id]; + PoolTemplateData& poolTemplate = m_poolTemplate[pool_id]; UpdatePoolInMapsWorker worker(*this, pool_id, db_guid_or_pool_id); sMapPersistentStateMgr.DoForAllStatesWithMapId(poolTemplate.mapEntry->id, poolTemplate.InstanceId, worker); diff --git a/src/game/Maps/Pool/PoolManager.h b/src/game/Maps/Pool/PoolManager.h index 72bc05a0dbf..93855491a31 100644 --- a/src/game/Maps/Pool/PoolManager.h +++ b/src/game/Maps/Pool/PoolManager.h @@ -158,7 +158,7 @@ class PoolManager void LoadFromDB(); void Initialize(MapPersistentState* state); // called at new MapPersistentState object create - uint16 GetMaxPoolId() const { return max_pool_id; } + uint16 GetMaxPoolId() const { return m_maxPoolId; } template uint16 IsPartOfAPool(uint32 db_guid_or_pool_id) const; @@ -193,6 +193,7 @@ class PoolManager // used for calling from global systems when need spawn pool in all appropriate map instances void SpawnPoolInMaps(uint16 pool_id, bool instantly); void DespawnPoolInMaps(uint16 pool_id); + uint32 GetContinentInstanceIdForPool(uint16 pool_id) const; // used for calling from global systems when need initialize spawn pool state in appropriate (possible) map persistent state void InitSpawnPool(MapPersistentState& mapState, uint16 pool_id); @@ -200,18 +201,18 @@ class PoolManager template void UpdatePoolInMaps(uint16 pool_id, uint32 db_guid_or_pool_id = 0); - void RemoveAutoSpawnForPool(uint16 pool_id) { mPoolTemplate[pool_id].PoolFlags &= ~POOL_FLAG_AUTO_SPAWN; } + void RemoveAutoSpawnForPool(uint16 pool_id) { m_poolTemplate[pool_id].PoolFlags &= ~POOL_FLAG_AUTO_SPAWN; } typedef std::vector PoolTemplateDataMap; - PoolTemplateData const& GetPoolTemplate(uint16 pool_id) const { return mPoolTemplate[pool_id]; } - PoolGroup& GetPoolCreatures(uint16 pool_id) { return mPoolCreatureGroups[pool_id]; } - PoolGroup& GetPoolGameObjects(uint16 pool_id) { return mPoolGameobjectGroups[pool_id]; } - PoolGroup const& GetPoolPools(uint16 pool_id) const { return mPoolPoolGroups[pool_id]; } + PoolTemplateData const& GetPoolTemplate(uint16 pool_id) const { return m_poolTemplate[pool_id]; } + PoolGroup& GetPoolCreatures(uint16 pool_id) { return m_poolCreatureGroups[pool_id]; } + PoolGroup& GetPoolGameObjects(uint16 pool_id) { return m_poolGameObjectGroups[pool_id]; } + PoolGroup const& GetPoolPools(uint16 pool_id) const { return m_poolPoolGroups[pool_id]; } protected: template void SpawnPoolGroup(MapPersistentState& mapState, uint16 pool_id, uint32 db_guid_or_pool_id, bool instantly); - uint16 max_pool_id; + uint16 m_maxPoolId; typedef std::vector > PoolGroupCreatureMap; typedef std::vector > PoolGroupGameObjectMap; @@ -219,15 +220,15 @@ class PoolManager typedef std::pair SearchPair; typedef std::map SearchMap; - PoolTemplateDataMap mPoolTemplate; - PoolGroupCreatureMap mPoolCreatureGroups; - PoolGroupGameObjectMap mPoolGameobjectGroups; - PoolGroupPoolMap mPoolPoolGroups; + PoolTemplateDataMap m_poolTemplate; + PoolGroupCreatureMap m_poolCreatureGroups; + PoolGroupGameObjectMap m_poolGameObjectGroups; + PoolGroupPoolMap m_poolPoolGroups; // static maps DB low guid -> pool id - SearchMap mCreatureSearchMap; - SearchMap mGameobjectSearchMap; - SearchMap mPoolSearchMap; + SearchMap m_creatureSearchMap; + SearchMap m_gameObjectSearchMap; + SearchMap m_poolSearchMap; }; #define sPoolMgr MaNGOS::Singleton::Instance() @@ -236,8 +237,8 @@ class PoolManager template<> inline uint16 PoolManager::IsPartOfAPool(uint32 db_guid) const { - SearchMap::const_iterator itr = mCreatureSearchMap.find(db_guid); - if (itr != mCreatureSearchMap.end()) + SearchMap::const_iterator itr = m_creatureSearchMap.find(db_guid); + if (itr != m_creatureSearchMap.end()) return itr->second; return 0; @@ -247,8 +248,8 @@ inline uint16 PoolManager::IsPartOfAPool(uint32 db_guid) const template<> inline uint16 PoolManager::IsPartOfAPool(uint32 db_guid) const { - SearchMap::const_iterator itr = mGameobjectSearchMap.find(db_guid); - if (itr != mGameobjectSearchMap.end()) + SearchMap::const_iterator itr = m_gameObjectSearchMap.find(db_guid); + if (itr != m_gameObjectSearchMap.end()) return itr->second; return 0; @@ -258,8 +259,8 @@ inline uint16 PoolManager::IsPartOfAPool(uint32 db_guid) const template<> inline uint16 PoolManager::IsPartOfAPool(uint32 pool_id) const { - SearchMap::const_iterator itr = mPoolSearchMap.find(pool_id); - if (itr != mPoolSearchMap.end()) + SearchMap::const_iterator itr = m_poolSearchMap.find(pool_id); + if (itr != m_poolSearchMap.end()) return itr->second; return 0; diff --git a/src/game/Maps/ScriptCommands.cpp b/src/game/Maps/ScriptCommands.cpp index b9c6f6372e1..a0df8de009f 100644 --- a/src/game/Maps/ScriptCommands.cpp +++ b/src/game/Maps/ScriptCommands.cpp @@ -2314,22 +2314,8 @@ bool Map::ScriptCommand_DespawnGameObject(ScriptInfo const& script, WorldObject* // SCRIPT_COMMAND_LOAD_GAMEOBJECT_SPAWN (82) bool Map::ScriptCommand_LoadGameObject(ScriptInfo const& script, WorldObject* source, WorldObject* target) { - GameObjectData const* pGameObjectData = sObjectMgr.GetGOData(script.loadGo.goGuid); - - if (GetId() != pGameObjectData->position.mapId) - { - sLog.Out(LOG_SCRIPTS, LOG_LVL_ERROR, "SCRIPT_COMMAND_LOAD_GAMEOBJECT_SPAWN (script id %u) tried to spawn guid %u on wrong map %u.", script.id, script.loadGo.goGuid, GetId()); + if (!LoadGameObjectSpawn(script.loadGo.goGuid)) return ShouldAbortScript(script); - } - - if (GetGameObject(ObjectGuid(HIGHGUID_GAMEOBJECT, pGameObjectData->id, script.loadGo.goGuid))) - return ShouldAbortScript(script); // already spawned - - GameObject* pGameobject = GameObject::CreateGameObject(pGameObjectData->id); - if (!pGameobject->LoadFromDB(script.loadGo.goGuid, this, true)) - delete pGameobject; - else - Add(pGameobject); return false; } diff --git a/src/game/Maps/ZoneScriptMgr.cpp b/src/game/Maps/ZoneScriptMgr.cpp index 4518909e090..e350ff75913 100644 --- a/src/game/Maps/ZoneScriptMgr.cpp +++ b/src/game/Maps/ZoneScriptMgr.cpp @@ -102,7 +102,7 @@ void ZoneScriptMgr::HandlePlayerLeaveZone(Player* plr, uint32 zoneid) //sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "Player %u left ZoneScript", plr->GetGUIDLow()); } -ZoneScript * ZoneScriptMgr::GetZoneScriptToZoneId(uint32 zoneid) +ZoneScript* ZoneScriptMgr::GetZoneScriptToZoneId(uint32 zoneid) { ZoneScriptsMap::iterator itr = m_ZoneScriptsMap.find(zoneid); if (itr == m_ZoneScriptsMap.end()) @@ -135,7 +135,7 @@ bool ZoneScriptMgr::HandleCustomSpell(Player* plr, uint32 spellId, GameObject* g return false; } -ZoneScript * ZoneScriptMgr::GetZoneScript(uint32 zoneId) +ZoneScript* ZoneScriptMgr::GetZoneScript(uint32 zoneId) { ZoneScriptsMap::iterator itr = m_ZoneScriptsMap.find(zoneId); if (itr != m_ZoneScriptsMap.end()) diff --git a/src/game/Maps/ZoneScriptMgr.h b/src/game/Maps/ZoneScriptMgr.h index 81ba59e0d28..a4a02975a25 100644 --- a/src/game/Maps/ZoneScriptMgr.h +++ b/src/game/Maps/ZoneScriptMgr.h @@ -62,7 +62,7 @@ class ZoneScriptMgr void HandlePlayerLeaveZone(Player* plr, uint32 areaflag); // return assigned outdoor pvp - ZoneScript * GetZoneScriptToZoneId(uint32 zoneid); + ZoneScript* GetZoneScriptToZoneId(uint32 zoneid); // handle custom (non-exist in dbc) spell if registered bool HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go); @@ -70,7 +70,7 @@ class ZoneScriptMgr // handle custom go if registered bool HandleOpenGo(Player* plr, uint64 guid); - ZoneScript * GetZoneScript(uint32 zoneId); + ZoneScript* GetZoneScript(uint32 zoneId); void AddZone(uint32 zoneid, ZoneScript * handle); diff --git a/src/game/Movement/TargetedMovementGenerator.cpp b/src/game/Movement/TargetedMovementGenerator.cpp index b0d86d6a7c4..baa0eda6cd1 100644 --- a/src/game/Movement/TargetedMovementGenerator.cpp +++ b/src/game/Movement/TargetedMovementGenerator.cpp @@ -31,6 +31,12 @@ #include "Geometry.h" //-----------------------------------------------// +template +bool TargetedMovementGeneratorMedium::IsFarEnoughToMoveStationaryFollower(T &owner) const +{ + return !i_target->IsWithinDist(&owner, 1.4f * m_fOffset); +} + template void TargetedMovementGeneratorMedium::_setTargetLocation(T &owner) { @@ -93,7 +99,7 @@ void TargetedMovementGeneratorMedium::_setTargetLocation(T &owner) } } // prevent redundant micro-movement for pets, other followers. - else if (!i_target->IsMoving() && owner.movespline->Finalized() && i_target->IsWithinDistInMap(&owner, 1.4f * m_fOffset)) + else if (!i_target->IsMoving() && owner.movespline->Finalized() && !IsFarEnoughToMoveStationaryFollower(owner)) { return; } @@ -660,7 +666,7 @@ bool FollowMovementGenerator::Update(T &owner, uint32 const& time_diff) // Follow movement may be interrupted if (!targetMoved && owner.movespline->Finalized()) - targetMoved = !owner.IsWithinDist3d(dest.x, dest.y, dest.z, m_fOffset + i_target->GetObjectBoundingRadius() + 0.5f); + targetMoved = this->IsFarEnoughToMoveStationaryFollower(owner); if (targetMoved) { @@ -799,6 +805,10 @@ template void TargetedMovementGeneratorMedium >::UpdateAsync(Player &, uint32); template void TargetedMovementGeneratorMedium >::UpdateAsync(Creature &, uint32); template void TargetedMovementGeneratorMedium >::UpdateAsync(Creature &, uint32); +template bool TargetedMovementGeneratorMedium >::IsFarEnoughToMoveStationaryFollower(Player &) const; +template bool TargetedMovementGeneratorMedium >::IsFarEnoughToMoveStationaryFollower(Player &) const; +template bool TargetedMovementGeneratorMedium >::IsFarEnoughToMoveStationaryFollower(Creature &) const; +template bool TargetedMovementGeneratorMedium >::IsFarEnoughToMoveStationaryFollower(Creature &) const; template bool ChaseMovementGenerator::Update(Player &, uint32 const&); template bool ChaseMovementGenerator::Update(Creature &, uint32 const&); diff --git a/src/game/Movement/TargetedMovementGenerator.h b/src/game/Movement/TargetedMovementGenerator.h index b9b392b7c72..baf9e7ac3ba 100644 --- a/src/game/Movement/TargetedMovementGenerator.h +++ b/src/game/Movement/TargetedMovementGenerator.h @@ -59,6 +59,7 @@ class TargetedMovementGeneratorMedium void UnitSpeedChanged() { m_bRecalculateTravel=true; } void UpdateFinalDistance(float fDistance); + bool IsFarEnoughToMoveStationaryFollower(T&) const; protected: void _setTargetLocation(T &); diff --git a/src/game/ObjectGuid.h b/src/game/ObjectGuid.h index 4200db3c2a6..5bacdcb03ef 100644 --- a/src/game/ObjectGuid.h +++ b/src/game/ObjectGuid.h @@ -240,19 +240,14 @@ class ObjectGuid uint64 m_guid; }; -namespace std { - - template <> - struct hash +template <> +struct std::hash +{ + std::size_t operator()(ObjectGuid const& k) const { - std::size_t operator()(ObjectGuid const& k) const - { - using std::hash; - return hash()(k.GetRawValue()); - } - }; - -} + return std::hash()(k.GetRawValue()); + } +}; typedef std::unordered_set ObjectGuidSet; typedef std::list GuidList; diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index b60b167df86..51c785ab183 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -2045,14 +2045,6 @@ void ObjectMgr::LoadCreatureClassLevelStats() } while (result->NextRow()); } - // placeholder values - constexpr float phMeleeDamage = 1.5f; - constexpr float phRangedDamage = 1.3f; - constexpr float phDamageIncreasePerLevel = 1.2f; - constexpr int32 phStat = 20; - constexpr float phStatIncreasePerLevel = 0.1f; - constexpr int32 phArmorPerLevel = 30; - for (auto unitClass : creatureClasses) { result = WorldDatabase.PQuery("SELECT MAX(`level_max`) FROM `creature_template` WHERE `unit_class`=%u", unitClass); @@ -2125,37 +2117,37 @@ void ObjectMgr::LoadCreatureClassLevelStats() if (cls.melee_damage <= 0.0f) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Invalid `melee_damage` = %g in `creature_classlevelstats` for `class`=%u and `level`=%u!", cls.melee_damage, unitClass, level); - cls.melee_damage = phMeleeDamage + phMeleeDamage * phDamageIncreasePerLevel * i; + cls.melee_damage = 1; } if (cls.ranged_damage <= 0.0f) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Invalid `ranged_damage` = %g in `creature_classlevelstats` for `class`=%u and `level`=%u!", cls.melee_damage, unitClass, level); - cls.ranged_damage = phRangedDamage + phRangedDamage * phDamageIncreasePerLevel * i; + cls.ranged_damage = 1; } if (cls.attack_power <= 0) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Invalid `attack_power` = %i in `creature_classlevelstats` for `class`=%u and `level`=%u!", cls.melee_damage, unitClass, level); - cls.attack_power = phStat + phStat * phStatIncreasePerLevel * i; + cls.attack_power = 1; } if (cls.ranged_attack_power <= 0) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Invalid `ranged_attack_power` = %i in `creature_classlevelstats` for `class`=%u and `level`=%u!", cls.melee_damage, unitClass, level); - cls.ranged_attack_power = phStat + phStat * phStatIncreasePerLevel * i; + cls.ranged_attack_power = 1; } if (cls.health <= 0) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Invalid `health` = %i in `creature_classlevelstats` for `class`=%u and `level`=%u!", cls.melee_damage, unitClass, level); - cls.health = phStat * 2 + phStat * 2 * i; + cls.health = 1; } if (cls.base_health <= 0) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Invalid `base_health` = %i in `creature_classlevelstats` for `class`=%u and `level`=%u!", cls.melee_damage, unitClass, level); - cls.base_health = phStat + phStat * i; + cls.base_health = 1; } if (cls.mana < 0) @@ -2173,31 +2165,31 @@ void ObjectMgr::LoadCreatureClassLevelStats() if (cls.strength <= 0) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Invalid `strength` = %i in `creature_classlevelstats` for `class`=%u and `level`=%u!", cls.melee_damage, unitClass, level); - cls.strength = phStat + phStat * phStatIncreasePerLevel * i; + cls.strength = 1; } if (cls.agility <= 0) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Invalid `agility` = %i in `creature_classlevelstats` for `class`=%u and `level`=%u!", cls.melee_damage, unitClass, level); - cls.agility = phStat + phStat * phStatIncreasePerLevel * i; + cls.agility = 1; } if (cls.stamina <= 0) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Invalid `stamina` = %i in `creature_classlevelstats` for `class`=%u and `level`=%u!", cls.melee_damage, unitClass, level); - cls.stamina = phStat + phStat * phStatIncreasePerLevel * i; + cls.stamina = 1; } if (cls.intellect <= 0) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Invalid `intellect` = %i in `creature_classlevelstats` for `class`=%u and `level`=%u!", cls.melee_damage, unitClass, level); - cls.intellect = phStat + phStat * phStatIncreasePerLevel * i; + cls.intellect = 1; } if (cls.spirit <= 0) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Invalid `spirit` = %i in `creature_classlevelstats` for `class`=%u and `level`=%u!", cls.melee_damage, unitClass, level); - cls.spirit = phStat + phStat * phStatIncreasePerLevel * i; + cls.spirit = 1; } if (cls.armor < 0) @@ -2215,62 +2207,35 @@ void ObjectMgr::LoadCreatureClassLevelStats() if (!cls.health) { sLog.Out(LOG_DBERROR, LOG_LVL_ERROR, "Missing creature CLS data for `class` = %u and `level` = %u!", unitClass, i+1); - cls.melee_damage = phMeleeDamage + phMeleeDamage * phDamageIncreasePerLevel * i; - cls.ranged_damage = phRangedDamage + phRangedDamage * phDamageIncreasePerLevel * i; - cls.attack_power = phStat + phStat * phStatIncreasePerLevel * i; - cls.ranged_attack_power = phStat + phStat * phStatIncreasePerLevel * i; - cls.health = phStat * 2 + phStat * 2 * i; - cls.base_health = phStat + phStat * i; - cls.mana = phStat * 2 + phStat * 2 * i; - cls.base_mana = phStat + phStat * i; - cls.strength = phStat + phStat * phStatIncreasePerLevel * i; - cls.agility = phStat + phStat * phStatIncreasePerLevel * i; - cls.stamina = phStat + phStat * phStatIncreasePerLevel * i; - cls.intellect = phStat + phStat * phStatIncreasePerLevel * i; - cls.spirit = phStat + phStat * phStatIncreasePerLevel * i; - cls.armor = phArmorPerLevel * i; + Log::WaitBeforeContinueIfNeed(); + exit(1); } } if (currentMaxLevel < requiredMaxLevel) { - CreatureClassLevelStats& penultimateLevelCls = m_CreatureCLSMap[unitClass][currentMaxLevel - 2]; + CreatureClassLevelStats& minLevelCls = m_CreatureCLSMap[unitClass][0]; CreatureClassLevelStats& maxLevelCls = m_CreatureCLSMap[unitClass][currentMaxLevel - 1]; - float const meleeDamageIncreasePerLevel = std::max(1.03f, maxLevelCls.melee_damage / penultimateLevelCls.melee_damage); - float const rangedDamageIncreasePerLevel = std::max(1.03f, maxLevelCls.ranged_damage / penultimateLevelCls.ranged_damage); - float const attackPowerIncreasePerLevel = std::max(1.03f, float(maxLevelCls.attack_power) / float(penultimateLevelCls.attack_power)); - float const rangedAttackPowerIncreasePerLevel = std::max(1.03f, float(maxLevelCls.ranged_attack_power) / float(penultimateLevelCls.ranged_attack_power)); - float const healthIncreasePerLevel = std::max(1.03f, float(maxLevelCls.health) / float(penultimateLevelCls.health)); - float const baseHealthIncreasePerLevel = std::max(1.03f, float(maxLevelCls.base_health) / float(penultimateLevelCls.base_health)); - float const manaIncreasePerLevel = std::max(1.03f, float(maxLevelCls.mana) / float(penultimateLevelCls.mana)); - float const baseManaIncreasePerLevel = std::max(1.03f, float(maxLevelCls.base_mana) / float(penultimateLevelCls.base_mana)); - float const strengthIncreasePerLevel = std::max(1.03f, float(maxLevelCls.strength) / float(penultimateLevelCls.strength)); - float const agilityIncreasePerLevel = std::max(1.03f, float(maxLevelCls.agility) / float(penultimateLevelCls.agility)); - float const staminaIncreasePerLevel = std::max(1.03f, float(maxLevelCls.stamina) / float(penultimateLevelCls.stamina)); - float const intellectIncreasePerLevel = std::max(1.03f, float(maxLevelCls.intellect) / float(penultimateLevelCls.intellect)); - float const spiritIncreasePerLevel = std::max(1.03f, float(maxLevelCls.spirit) / float(penultimateLevelCls.spirit)); - float const armorIncreasePerLevel = std::max(1.03f, float(maxLevelCls.armor) / float(penultimateLevelCls.armor)); - for (uint32 i = currentMaxLevel; i < requiredMaxLevel; i++) { CreatureClassLevelStats& cls = m_CreatureCLSMap[unitClass][i]; if (!cls.health) { - cls.melee_damage = maxLevelCls.melee_damage * std::pow(meleeDamageIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.ranged_damage = maxLevelCls.ranged_damage * std::pow(rangedDamageIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.attack_power = maxLevelCls.attack_power * std::pow(attackPowerIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.ranged_attack_power = maxLevelCls.ranged_attack_power * std::pow(rangedAttackPowerIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.health = maxLevelCls.health * std::pow(healthIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.base_health = maxLevelCls.base_health * std::pow(baseHealthIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.mana = maxLevelCls.mana * std::pow(manaIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.base_mana = maxLevelCls.base_mana * std::pow(baseManaIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.strength = maxLevelCls.strength * std::pow(strengthIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.agility = maxLevelCls.agility * std::pow(agilityIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.stamina = maxLevelCls.stamina * std::pow(staminaIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.intellect = maxLevelCls.intellect * std::pow(intellectIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.spirit = maxLevelCls.spirit * std::pow(spiritIncreasePerLevel, 1 + (i - currentMaxLevel)); - cls.armor = maxLevelCls.armor * std::pow(armorIncreasePerLevel, 1 + (i - currentMaxLevel)); + cls.melee_damage = InterpolateValueAtIndex(1, minLevelCls.melee_damage, currentMaxLevel, maxLevelCls.melee_damage, i + 1); + cls.ranged_damage = InterpolateValueAtIndex(1, minLevelCls.ranged_damage, currentMaxLevel, maxLevelCls.ranged_damage, i + 1); + cls.attack_power = InterpolateValueAtIndex(1, minLevelCls.attack_power, currentMaxLevel, maxLevelCls.attack_power, i + 1); + cls.ranged_attack_power = InterpolateValueAtIndex(1, minLevelCls.ranged_attack_power, currentMaxLevel, maxLevelCls.ranged_attack_power, i + 1); + cls.health = InterpolateValueAtIndex(1, minLevelCls.health, currentMaxLevel, maxLevelCls.health, i + 1); + cls.base_health = InterpolateValueAtIndex(1, minLevelCls.base_health, currentMaxLevel, maxLevelCls.base_health, i + 1); + cls.mana = InterpolateValueAtIndex(1, minLevelCls.mana, currentMaxLevel, maxLevelCls.mana, i + 1); + cls.base_mana = InterpolateValueAtIndex(1, minLevelCls.base_mana, currentMaxLevel, maxLevelCls.base_mana, i + 1); + cls.strength = InterpolateValueAtIndex(1, minLevelCls.strength, currentMaxLevel, maxLevelCls.strength, i + 1); + cls.agility = InterpolateValueAtIndex(1, minLevelCls.agility, currentMaxLevel, maxLevelCls.agility, i + 1); + cls.stamina = InterpolateValueAtIndex(1, minLevelCls.stamina, currentMaxLevel, maxLevelCls.stamina, i + 1); + cls.intellect = InterpolateValueAtIndex(1, minLevelCls.intellect, currentMaxLevel, maxLevelCls.intellect, i + 1); + cls.spirit = InterpolateValueAtIndex(1, minLevelCls.spirit, currentMaxLevel, maxLevelCls.spirit, i + 1); + cls.armor = InterpolateValueAtIndex(1, std::max(1, minLevelCls.armor), currentMaxLevel, std::max(1, maxLevelCls.armor), i + 1); } } } diff --git a/src/game/Objects/Creature.cpp b/src/game/Objects/Creature.cpp index 3c6ac29956b..6be7bccd8dc 100644 --- a/src/game/Objects/Creature.cpp +++ b/src/game/Objects/Creature.cpp @@ -192,8 +192,8 @@ bool CreatureCreatePos::Relocate(Creature* cr) const } Creature::Creature(CreatureSubtype subtype) : - Unit(), i_AI(nullptr), - loot(this), lootForPickPocketed(false), lootForBody(false), lootForSkin(false), skinningForOthersTimer(5000), m_TargetNotReachableTimer(0), + Unit(), m_AI(nullptr), + loot(this), lootForPickPocketed(false), lootForBody(false), lootForSkin(false), skinningForOthersTimer(5000), m_targetNotReachableTimer(0), m_pacifiedTimer(0), m_manaRegen(0), m_groupLootTimer(0), m_groupLootId(0), m_lootMoney(0), m_lootGroupRecipientId(0), m_corpseDecayTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), @@ -215,12 +215,12 @@ Creature::Creature(CreatureSubtype subtype) : Creature::~Creature() { - CleanupsBeforeDelete(); + Unit::CleanupsBeforeDelete(); m_vendorItemCounts.clear(); - delete i_AI; - i_AI = nullptr; + delete m_AI; + m_AI = nullptr; } void Creature::AddToWorld() @@ -244,7 +244,7 @@ void Creature::AddToWorld() Unit::AddToWorld(); - if (!i_AI) + if (!m_AI) AIM_Initialize(); if (!bWasInWorld && m_zoneScript) m_zoneScript->OnCreatureCreate(this); @@ -767,7 +767,7 @@ void Creature::Update(uint32 update_diff, uint32 diff) { SetDeathState(JUST_DIED); SetHealth(0); - i_motionMaster.Clear(); + m_motionMaster.Clear(); ClearUnitState(UNIT_STAT_ALL_DYN_STATES); LoadCreatureAddon(true); } @@ -839,10 +839,10 @@ void Creature::Update(uint32 update_diff, uint32 diff) StopGroupLoot(); } } - if (i_AI) + if (m_AI) { m_AI_locked = true; - i_AI->UpdateAI_corpse(diff); + m_AI->UpdateAI_corpse(diff); m_AI_locked = false; } @@ -928,10 +928,10 @@ void Creature::Update(uint32 update_diff, uint32 diff) else m_callForHelpTimer -= update_diff; - unreachableTarget = !i_motionMaster.empty() && + unreachableTarget = !m_motionMaster.empty() && !HasExtraFlag(CREATURE_FLAG_EXTRA_NO_UNREACHABLE_EVADE) && - i_motionMaster.GetCurrent()->GetMovementGeneratorType() == CHASE_MOTION_TYPE && - !i_motionMaster.GetCurrent()->IsReachable() && + m_motionMaster.GetCurrent()->GetMovementGeneratorType() == CHASE_MOTION_TYPE && + !m_motionMaster.GetCurrent()->IsReachable() && !HasDistanceCasterMovement() && !GetCharmerOrOwnerGuid().IsPlayer() && (!CanReachWithMeleeAutoAttack(GetVictim()) || !IsWithinLOSInMap(GetVictim())) && !(GetVictim()->IsPlayer() && static_cast(GetVictim())->GetCheatData()->IsInKnockBack()); @@ -940,12 +940,12 @@ void Creature::Update(uint32 update_diff, uint32 diff) if (unreachableTarget) { - m_TargetNotReachableTimer += update_diff; - if (GetMapId() == MAP_ALTERAC_VALLEY && CanHaveThreatList() && m_TargetNotReachableTimer > 1000) // Alterac Valley exploit fix + m_targetNotReachableTimer += update_diff; + if (GetMapId() == MAP_ALTERAC_VALLEY && CanHaveThreatList() && m_targetNotReachableTimer > 1000) // Alterac Valley exploit fix GetThreatManager().modifyThreatPercent(GetVictim(), -101); } else - m_TargetNotReachableTimer = 0; + m_targetNotReachableTimer = 0; if (AI()) { @@ -954,7 +954,7 @@ void Creature::Update(uint32 update_diff, uint32 diff) try { // Reset after 24 secs - if (leash || (m_TargetNotReachableTimer > 24000)) + if (leash || (m_targetNotReachableTimer > 24000)) AI()->EnterEvadeMode(); else if (!IsEvadeBecauseTargetNotReachable()) AI()->UpdateAI(diff); // AI not react good at real update delays (while freeze in non-active part of map) @@ -1223,10 +1223,10 @@ bool Creature::AIM_Initialize() // Clear flag. Escort AI will set it if this creature is escortable SetEscortable(false); - i_motionMaster.Initialize(); + m_motionMaster.Initialize(); - CreatureAI * oldAI = i_AI; - i_AI = FactorySelector::selectAI(this); + CreatureAI * oldAI = m_AI; + m_AI = FactorySelector::selectAI(this); delete oldAI; return true; @@ -1995,29 +1995,34 @@ void Creature::LoadDefaultEquipment(GameEventCreatureData const* eventData) } else { + // use default from the template + LoadEquipment(m_creatureInfo->equipment_id, true); + + // loot can override the default equipment if (HasStaticFlag(CREATURE_STATIC_FLAG_CAN_WIELD_LOOT)) { - LoadEquipment(0, true); GenerateLootForBody(nullptr, nullptr); - bool usingLoot = false; + bool hasMainHand = false; + bool hasOffHand = false; + bool hasRanged = false; for (auto const& itr : loot.items) { if (ItemPrototype const* pItem = sObjectMgr.GetItemPrototype(itr.itemid)) { - if (!GetVirtualItemDisplayId(BASE_ATTACK)) + if (!hasMainHand) { if (pItem->InventoryType == INVTYPE_WEAPON || pItem->InventoryType == INVTYPE_WEAPONMAINHAND || pItem->InventoryType == INVTYPE_2HWEAPON && !GetVirtualItemDisplayId(OFF_ATTACK)) { SetVirtualItem(BASE_ATTACK, itr.itemid); - usingLoot = true; + hasMainHand = true; continue; } } - if (!GetVirtualItemDisplayId(OFF_ATTACK) && GetVirtualItemInventoryType(BASE_ATTACK) != INVTYPE_2HWEAPON) + if (!hasOffHand && GetVirtualItemInventoryType(BASE_ATTACK) != INVTYPE_2HWEAPON) { if (pItem->InventoryType == INVTYPE_WEAPON || pItem->InventoryType == INVTYPE_WEAPONOFFHAND || @@ -2025,26 +2030,20 @@ void Creature::LoadDefaultEquipment(GameEventCreatureData const* eventData) pItem->InventoryType == INVTYPE_HOLDABLE) { SetVirtualItem(OFF_ATTACK, itr.itemid); - usingLoot = true; + hasOffHand = true; continue; } } - if (!GetVirtualItemDisplayId(RANGED_ATTACK) && pItem->IsRangedWeapon()) + if (!hasRanged && pItem->IsRangedWeapon()) { SetVirtualItem(RANGED_ATTACK, itr.itemid); - usingLoot = true; + hasRanged = true; continue; } } } - - if (usingLoot) - return; } - - // use default from the template - LoadEquipment(m_creatureInfo->equipment_id, true); } } @@ -2242,7 +2241,7 @@ void Creature::SetDeathState(DeathState s) RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); SetWalk(!HasExtraFlag(CREATURE_FLAG_EXTRA_ALWAYS_RUN), true); - i_motionMaster.Initialize(); + m_motionMaster.Initialize(); } } @@ -3566,8 +3565,8 @@ void Creature::OnLeaveCombat() if (m_creatureGroup) m_creatureGroup->OnLeaveCombat(this); - if (i_AI) - i_AI->EnterEvadeMode(); + if (m_AI) + m_AI->EnterEvadeMode(); if (m_zoneScript) m_zoneScript->OnCreatureEvade(this); @@ -3578,8 +3577,8 @@ void Creature::OnEnterCombat(Unit* pWho, bool notInCombat) if (!pWho) return; - if (i_AI && !HasUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_FLEEING)) - i_AI->AttackedBy(pWho); + if (m_AI && !HasUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_FLEEING)) + m_AI->AttackedBy(pWho); if (m_creatureGroup) m_creatureGroup->OnMemberAttackStart(this, pWho); @@ -3598,8 +3597,8 @@ void Creature::OnEnterCombat(Unit* pWho, bool notInCombat) if (IsMounted()) Unmount(); - if (i_AI) - i_AI->EnterCombat(pWho); + if (m_AI) + m_AI->EnterCombat(pWho); // Mark as At War with faction in client so player can attack back. if (GetReputationId() >= 0) diff --git a/src/game/Objects/Creature.h b/src/game/Objects/Creature.h index 0923d760b08..7f7bb359e34 100644 --- a/src/game/Objects/Creature.h +++ b/src/game/Objects/Creature.h @@ -68,14 +68,14 @@ struct CreatureCreatePos class ThreatListProcesser { public: - ThreatListProcesser() {} - virtual ~ThreatListProcesser() {} + ThreatListProcesser() = default; + virtual ~ThreatListProcesser() = default; virtual bool Process(Unit* unit) = 0; }; class Creature : public Unit { - CreatureAI *i_AI; + CreatureAI *m_AI; public: @@ -126,7 +126,7 @@ class Creature : public Unit void SaveHomePosition() { SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); } void SetHomePosition(float x, float y, float z, float o); void GetHomePosition(float &x, float &y, float &z, float &o); - Position const& GetHomePosition() { return m_homePosition; } + Position const& GetHomePosition() const { return m_homePosition; } float GetHomePositionO() const { return m_homePosition.o; } void ResetHomePosition(); @@ -141,12 +141,12 @@ class Creature : public Unit void SetDefaultValuesFromStaticFlags(); CreatureSubtype GetSubtype() const { return m_subtype; } - bool IsPet() const { return m_subtype == CREATURE_SUBTYPE_PET; } + bool IsPet() const override { return m_subtype == CREATURE_SUBTYPE_PET; } bool IsTotem() const { return m_subtype == CREATURE_SUBTYPE_TOTEM; } Totem const* ToTotem() const { return IsTotem() ? reinterpret_cast(this) : nullptr; } Totem* ToTotem() { return IsTotem() ? reinterpret_cast(this) : nullptr; } bool IsTemporarySummon() const { return m_subtype == CREATURE_SUBTYPE_TEMPORARY_SUMMON; } - bool IsCorpse() const { return GetDeathState() == CORPSE; } + bool IsCorpse() const override { return GetDeathState() == CORPSE; } bool IsDespawned() const { return GetDeathState() == DEAD; } void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; } bool IsRacialLeader() const { return GetCreatureInfo()->racial_leader; } @@ -203,10 +203,10 @@ class Creature : public Unit bool IsInEvadeMode() const; bool AIM_Initialize(); - void SetAI(CreatureAI * ai) { i_AI = ai; } + void SetAI(CreatureAI * ai) { m_AI = ai; } - CreatureAI* AI() { return i_AI; } - CreatureAI const* AI() const { return i_AI; } + CreatureAI* AI() { return m_AI; } + CreatureAI const* AI() const { return m_AI; } void SetAInitializeOnRespawn(bool initialize) { if (initialize) @@ -272,7 +272,7 @@ class Creature : public Unit bool FallGround(); bool LoadFromDB(uint32 guid, Map* map, bool force = false); - void SaveToDB(); + virtual void SaveToDB(); // overwrited in Pet virtual void SaveToDB(uint32 mapid); virtual void DeleteFromDB(); // overwrited in Pet @@ -502,8 +502,8 @@ class Creature : public Unit // Auto evade timer (if target not reachable) // Tested on retail 5.4.0: Creatures evade after 3 seconds (but does not return to home position) - bool IsEvadeBecauseTargetNotReachable() const { return m_TargetNotReachableTimer > 3000; } - uint32 m_TargetNotReachableTimer; + bool IsEvadeBecauseTargetNotReachable() const { return m_targetNotReachableTimer > 3000; } + uint32 m_targetNotReachableTimer; std::shared_ptr const& GetLastLeashExtensionTimePtr() const; void SetLastLeashExtensionTimePtr(std::shared_ptr const& timer); diff --git a/src/game/Objects/DynamicObject.cpp b/src/game/Objects/DynamicObject.cpp index 871cccbb8c0..8f37934d7c1 100644 --- a/src/game/Objects/DynamicObject.cpp +++ b/src/game/Objects/DynamicObject.cpp @@ -179,7 +179,7 @@ void DynamicObject::Update(uint32 update_diff, uint32 p_time) return; } - if (_deleted) + if (m_deleted) return; // If this object is from the current channeled spell, do not delete it. Otherwise diff --git a/src/game/Objects/GameObject.cpp b/src/game/Objects/GameObject.cpp index 95a425d774d..5adc2a07787 100644 --- a/src/game/Objects/GameObject.cpp +++ b/src/game/Objects/GameObject.cpp @@ -83,7 +83,7 @@ GameObject::GameObject() : SpellCaster(), m_useTimes = 0; m_spellId = 0; m_cooldownTime = 0; - i_AI = nullptr; + m_AI = nullptr; m_model = nullptr; m_rotation = 0; m_playerGroupId = 0; @@ -102,7 +102,7 @@ GameObject::~GameObject() } } - delete i_AI; + delete m_AI; delete m_model; MANGOS_ASSERT(m_spellDynObjects.empty()); @@ -133,7 +133,7 @@ void GameObject::AddToWorld() // After Object::AddToWorld so that for initial state the GO is added to the world (and hence handled correctly) UpdateCollisionState(); - if (!i_AI) + if (!m_AI) AIM_Initialize(); if (sWorld.getConfig(CONFIG_UINT32_SPELL_PROC_DELAY)) @@ -142,8 +142,8 @@ void GameObject::AddToWorld() void GameObject::AIM_Initialize() { - delete i_AI; - i_AI = sScriptMgr.GetGameObjectAI(this); + delete m_AI; + m_AI = sScriptMgr.GetGameObjectAI(this); } void GameObject::RemoveFromWorld() @@ -335,8 +335,8 @@ void GameObject::Update(uint32 update_diff, uint32 /*p_time*/) UpdatePendingProcs(update_diff); // UpdateAI - if (i_AI) - i_AI->UpdateAI(update_diff); + if (m_AI) + m_AI->UpdateAI(update_diff); switch (m_lootState) { diff --git a/src/game/Objects/GameObject.h b/src/game/Objects/GameObject.h index 7d2cee29e25..68f69d417d7 100644 --- a/src/game/Objects/GameObject.h +++ b/src/game/Objects/GameObject.h @@ -221,7 +221,7 @@ class GameObject : public SpellCaster // Gestion des GameObjectAI void AIM_Initialize(); - GameObjectAI* AI() { return i_AI; } + GameObjectAI* AI() { return m_AI; } void UpdateCollisionState(); void UpdateModel(); // updates model in case displayId were changed @@ -282,7 +282,7 @@ class GameObject : public SpellCaster Position m_stationaryPosition; - GameObjectAI* i_AI; + GameObjectAI* m_AI; uint32 m_playerGroupId; private: diff --git a/src/game/Objects/Object.cpp b/src/game/Objects/Object.cpp index 07920f3574c..2b481a1ff05 100644 --- a/src/game/Objects/Object.cpp +++ b/src/game/Objects/Object.cpp @@ -190,8 +190,8 @@ Object::Object() : m_updateFlag(0) m_inWorld = false; m_isNewObject = false; m_objectUpdated = false; - _deleted = false; - _delayedActions = 0; + m_deleted = false; + m_delayedActions = 0; } Object::~Object() @@ -968,7 +968,7 @@ void Object::ClearUpdateMask(bool remove) RemoveFromClientUpdateList(); m_objectUpdated = false; } - _delayedActions &= ~OBJECT_DELAYED_MARK_CLIENT_UPDATE; + m_delayedActions &= ~OBJECT_DELAYED_MARK_CLIENT_UPDATE; } bool Object::LoadValues(char const* data) @@ -1392,9 +1392,9 @@ void Object::MarkForClientUpdate() void Object::ExecuteDelayedActions() { - if (_delayedActions & OBJECT_DELAYED_MARK_CLIENT_UPDATE) + if (m_delayedActions & OBJECT_DELAYED_MARK_CLIENT_UPDATE) { - if (m_inWorld && !_deleted) + if (m_inWorld && !m_deleted) { if (!m_objectUpdated) { @@ -1402,13 +1402,13 @@ void Object::ExecuteDelayedActions() m_objectUpdated = true; } } - _delayedActions &= ~OBJECT_DELAYED_MARK_CLIENT_UPDATE; + m_delayedActions &= ~OBJECT_DELAYED_MARK_CLIENT_UPDATE; } - if (_delayedActions & OBJECT_DELAYED_ADD_TO_REMOVE_LIST) + if (m_delayedActions & OBJECT_DELAYED_ADD_TO_REMOVE_LIST) { if (!IsDeleted() && IsInWorld()) ((WorldObject*)this)->AddObjectToRemoveList(); - _delayedActions &= ~OBJECT_DELAYED_ADD_TO_REMOVE_LIST; + m_delayedActions &= ~OBJECT_DELAYED_ADD_TO_REMOVE_LIST; } } @@ -1453,7 +1453,7 @@ void WorldObject::SetVisibilityModifier(float f) WorldObject::WorldObject() : m_isActiveObject(false), m_visibilityModifier(DEFAULT_VISIBILITY_MODIFIER), m_currMap(nullptr), - m_mapId(0), m_InstanceId(0), m_summonLimitAlert(0), worldMask(WORLD_DEFAULT_OBJECT), m_zoneScript(nullptr), + m_mapId(0), m_instanceId(0), m_summonLimitAlert(0), m_worldMask(WORLD_DEFAULT_OBJECT), m_zoneScript(nullptr), m_transport(nullptr) { m_movementInfo.stime = WorldTimer::getMSTime(); @@ -2286,7 +2286,7 @@ void WorldObject::SetMap(Map* map) m_currMap = map; //lets save current map's Id/instanceId m_mapId = map->GetId(); - m_InstanceId = map->GetInstanceId(); + m_instanceId = map->GetInstanceId(); // Order is important, must be done after m_currMap is set SetZoneScript(); @@ -2312,11 +2312,11 @@ TerrainInfo const* WorldObject::GetTerrain() const void WorldObject::AddObjectToRemoveList() { - if (_deleted) // Already in the remove list + if (m_deleted) // Already in the remove list return; GetMap()->AddObjectToRemoveList(this); - _deleted = true; + m_deleted = true; } uint32 Map::GetSummonLimitForObject(uint64 guid) const @@ -2887,7 +2887,7 @@ void Object::ForceValuesUpdateAtIndex(uint16 i) void WorldObject::SetWorldMask(uint32 newMask) { - worldMask = newMask; + m_worldMask = newMask; } bool WorldObject::CanSeeInWorld(WorldObject const* other) const @@ -2899,7 +2899,7 @@ bool WorldObject::CanSeeInWorld(WorldObject const* other) const if (GetGUID() == other->GetGUID()) return true; - return CanSeeInWorld(other->worldMask); + return CanSeeInWorld(other->m_worldMask); } bool WorldObject::CanSeeInWorld(uint32 otherPhaseMask) const @@ -2909,9 +2909,9 @@ bool WorldObject::CanSeeInWorld(uint32 otherPhaseMask) const ((Player*)this)->IsGameMaster()) return true; // Un monde en commun ? - if (worldMask & otherPhaseMask) + if (m_worldMask & otherPhaseMask) return true; - if (otherPhaseMask & worldMask) + if (otherPhaseMask & m_worldMask) return true; return false; } @@ -3556,7 +3556,7 @@ ReputationRank WorldObject::GetReactionTo(WorldObject const* target) const return REP_FRIENDLY; // duel - always hostile to opponent - if (selfPlayerOwner->duel && selfPlayerOwner->duel->opponent == targetPlayerOwner && selfPlayerOwner->duel->startTime != 0 && !selfPlayerOwner->duel->finished) + if (selfPlayerOwner->m_duel && selfPlayerOwner->m_duel->opponent == targetPlayerOwner && selfPlayerOwner->m_duel->startTime != 0 && !selfPlayerOwner->m_duel->finished) return REP_HOSTILE; // same group - checks dependant only on our faction - skip FFA_PVP for example @@ -3708,7 +3708,7 @@ bool WorldObject::IsValidAttackTarget(Unit const* target, bool checkAlive) const // PvP checks if (playerAffectingAttacker && playerAffectingTarget) { - if (playerAffectingAttacker->duel && playerAffectingAttacker->duel->opponent == playerAffectingTarget && playerAffectingAttacker->duel->startTime != 0) + if (playerAffectingAttacker->m_duel && playerAffectingAttacker->m_duel->opponent == playerAffectingTarget && playerAffectingAttacker->m_duel->startTime != 0) return true; if (playerAffectingTarget->IsPvP()) @@ -3756,7 +3756,7 @@ bool WorldObject::IsValidHelpfulTarget(Unit const* target, bool checkAlive) cons return true; // cannot help others in duels - if (playerAffectingTarget->duel && playerAffectingTarget->duel->startTime != 0) + if (playerAffectingTarget->m_duel && playerAffectingTarget->m_duel->startTime != 0) return false; // group forces friendly relations in ffa pvp diff --git a/src/game/Objects/Object.h b/src/game/Objects/Object.h index aee23e4b905..ee747560bf2 100644 --- a/src/game/Objects/Object.h +++ b/src/game/Objects/Object.h @@ -155,7 +155,7 @@ class Object virtual void BuildUpdateData(UpdateDataMapType& update_players); void MarkForClientUpdate(); void SendForcedObjectUpdate(); - void AddDelayedAction(ObjectDelayedAction e) { _delayedActions |= e; } + void AddDelayedAction(ObjectDelayedAction e) { m_delayedActions |= e; } void ExecuteDelayedActions(); void BuildValuesUpdateBlockForPlayer(UpdateData& data, Player* target) const; @@ -365,7 +365,7 @@ class Object void InitValues() { _InitValues(); } // Nostalrius - bool IsDeleted() const { return _deleted; } + bool IsDeleted() const { return m_deleted; } // Convertions inline bool IsWorldObject() const { return isType(TYPEMASK_WORLDOBJECT); } @@ -392,11 +392,11 @@ class Object SpellCaster* ToSpellCaster(); SpellCaster const* ToSpellCaster() const; - inline bool IsCorpse() const { return GetTypeId() == TYPEID_CORPSE; } + virtual inline bool IsCorpse() const { return GetTypeId() == TYPEID_CORPSE; } Corpse* ToCorpse(); Corpse const* ToCorpse() const; - bool IsPet() const; + virtual bool IsPet() const; Pet* ToPet(); Pet const* ToPet() const; @@ -404,7 +404,7 @@ class Object virtual bool HasInvolvedQuest(uint32 /* quest_id */) const { return false; } protected: - Object (); + Object(); void _InitValues(); void _Create (uint32 guidlow, uint32 entry, HighGuid guidhigh); @@ -430,8 +430,8 @@ class Object uint16 m_valuesCount; bool m_objectUpdated; - bool _deleted; // Object in remove list - uint32 _delayedActions; + bool m_deleted; // Object in remove list + uint32 m_delayedActions; private: bool m_inWorld; @@ -544,7 +544,7 @@ class WorldObject : public Object bool GetRandomPoint(float x, float y, float z, float distance, float &rand_x, float &rand_y, float &rand_z) const; uint32 GetMapId() const { return m_mapId; } - uint32 GetInstanceId() const { return m_InstanceId; } + uint32 GetInstanceId() const { return m_instanceId; } uint32 GetZoneId() const; uint32 GetAreaId() const; @@ -652,7 +652,7 @@ class WorldObject : public Object bool IsFlying() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_FLYING); } bool IsWalking() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_WALK_MODE); } bool IsWalkingBackward() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_BACKWARD); } - bool IsMoving() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_MASK_MOVING); } + virtual bool IsMoving() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_MASK_MOVING); } bool IsSwimming() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_SWIMMING); } bool IsMovingButNotWalking() const { return IsMoving() && !(IsWalking() || IsWalkingBackward()); } @@ -745,7 +745,7 @@ class WorldObject : public Object bool HasMMapsForCurrentMap() const; void SetZoneScript(); - ZoneScript* GetZoneScript() const { return m_zoneScript; } + virtual ZoneScript* GetZoneScript() const { return m_zoneScript; } void AddToClientUpdateList() override; void RemoveFromClientUpdateList() override; @@ -775,9 +775,9 @@ class WorldObject : public Object ViewPoint& GetViewPoint() { return m_viewPoint; } // WorldMask - uint32 worldMask; + uint32 m_worldMask; virtual void SetWorldMask(uint32 newMask); - uint32 GetWorldMask() const { return worldMask; } + uint32 GetWorldMask() const { return m_worldMask; } // Visibilite bool CanSeeInWorld(WorldObject const* other) const; bool CanSeeInWorld(uint32 otherPhase) const; @@ -789,7 +789,7 @@ class WorldObject : public Object //use them ONLY in LoadFromDB()/Create() funcs and nowhere else! //mapId/instanceId should be set in SetMap() function! void SetLocationMapId(uint32 mapId) { m_mapId = mapId; } - void SetLocationInstanceId(uint32 _instanceId) { m_InstanceId = _instanceId; } + void SetLocationInstanceId(uint32 _instanceId) { m_instanceId = _instanceId; } bool IsWithinLootXPDist(WorldObject const* objToLoot) const; @@ -812,19 +812,13 @@ class WorldObject : public Object // c.f. GetVisibilityModifier(). Be very conservative using this - a large // draw distance can be expensive for updates with lots of players float m_visibilityModifier; - Map* m_currMap; //current object's Map location - uint32 m_mapId; // object at map with map_id - uint32 m_InstanceId; // in map copy with instance id - + uint32 m_instanceId; // in map copy with instance id Position m_position; Cell m_currentCell; // store current cell where object listed - ViewPoint m_viewPoint; - WorldUpdateCounter m_updateTracker; - uint32 m_summonLimitAlert; // Timer to alert GMs if a creature is at the summon limit }; diff --git a/src/game/Objects/Pet.h b/src/game/Objects/Pet.h index c227bef8dae..3d7a3338dd4 100644 --- a/src/game/Objects/Pet.h +++ b/src/game/Objects/Pet.h @@ -226,7 +226,7 @@ class Pet : public Creature void CastPetAuras(bool current); void CastPetAura(PetAura const* aura); - virtual void RemoveAllCooldowns(bool sendOnly = false) override; + void RemoveAllCooldowns(bool sendOnly = false) override; void _LoadSpellCooldowns(); void _SaveSpellCooldowns(); diff --git a/src/game/Objects/Player.cpp b/src/game/Objects/Player.cpp index 18a30774ac7..ca8ebb3dcac 100644 --- a/src/game/Objects/Player.cpp +++ b/src/game/Objects/Player.cpp @@ -582,8 +582,6 @@ Player::Player(WorldSession* session) : Unit(), m_modManaRegen = 0; m_modManaRegenInterrupt = 0; m_carryHealthRegen = 0; - for (float & s : m_SpellCritPercentage) - s = 0.0f; m_regenTimer = 0; m_weaponChangeTimer = 0; @@ -608,21 +606,21 @@ Player::Player(WorldSession* session) : Unit(), m_auraUpdateMask = 0; m_LFGAreaId = 0; - duel = nullptr; + m_duel = nullptr; - m_GuildIdInvited = 0; + m_guildIdInvited = 0; m_atLoginFlags = AT_LOGIN_NONE; - mSemaphoreTeleport_Near = false; - mSemaphoreTeleport_Far = false; - mPendingFarTeleport = false; + m_semaphoreTeleportNear = false; + m_semaphoreTeleportFar = false; + m_pendingFarTeleport = false; - m_DelayedOperations = 0; + m_delayedOperations = 0; m_bCanDelayTeleport = false; m_bHasDelayedTeleport = false; m_bHasBeenAliveAtDelayedTeleport = true; // overwrite always at setup teleport data, so not used infact - m_teleport_options = 0; + m_teleportOptions = 0; m_trade = nullptr; @@ -648,8 +646,8 @@ Player::Player(WorldSession* session) : Unit(), m_loginTime = time(nullptr); m_createTime = m_loginTime; m_lastTick = m_loginTime; - m_WeaponProficiency = 0; - m_ArmorProficiency = 0; + m_weaponProficiency = 0; + m_armorProficiency = 0; m_canParry = false; m_canBlock = false; m_canDualWield = false; @@ -672,8 +670,8 @@ Player::Player(WorldSession* session) : Unit(), /////////////////// Instance System ///////////////////// - m_HomebindTimer = 0; - m_InstanceValid = true; + m_homebindTimer = 0; + m_instanceValid = true; for (auto& i : m_auraBaseMod) { @@ -695,8 +693,8 @@ Player::Player(WorldSession* session) : Unit(), m_cannotBeDetectedTimer = 0; // Phasing - worldMask = WORLD_DEFAULT_CHAR; - i_AI = nullptr; + m_worldMask = WORLD_DEFAULT_CHAR; + m_AI = nullptr; m_cheatOptions = 0x0; m_lastFromClientCastedSpellID = 0; @@ -712,7 +710,7 @@ Player::Player(WorldSession* session) : Unit(), m_petSpell = 0; m_areaCheckTimer = 0; m_skippedUpdateTime = 0; - m_DetectInvTimer = 1 * IN_MILLISECONDS; + m_detectInvisibilityTimer = 1 * IN_MILLISECONDS; // GM variables m_gmInvisibilityLevel = session->GetSecurity(); @@ -721,11 +719,8 @@ Player::Player(WorldSession* session) : Unit(), m_smartInstanceRebind = true; // TODO: remove it - launched = false; - xy_speed = 0.0f; - + m_launched = false; m_justBoarded = false; - m_cameraUpdateTimer = 0; m_longSightSpell = 0; m_longSightRange = 0.0f; @@ -1494,7 +1489,7 @@ SpellAuraHolder const* Player::GetMirrorTimerBuff(MirrorTimer::Type timer) const } } -bool Player::IsCityProtector() { return m_ExtraFlags & PLAYER_EXTRA_CITY_PROTECTOR; } +bool Player::IsCityProtector() const { return m_ExtraFlags & PLAYER_EXTRA_CITY_PROTECTOR; } void Player::SetCityTitle() { @@ -1526,8 +1521,8 @@ void Player::Update(uint32 update_diff, uint32 p_time) //used to implement delayed far teleports SetCanDelayTeleport(true); Unit::Update(update_diff, p_time); - if (i_AI) - i_AI->UpdateAI(p_time); + if (m_AI) + m_AI->UpdateAI(p_time); SetCanDelayTeleport(false); time_t now = time(nullptr); @@ -1537,25 +1532,25 @@ void Player::Update(uint32 update_diff, uint32 p_time) UpdatePvPContestedFlagTimer(update_diff); // Delay delete duel - if (duel && duel->finished) + if (m_duel && m_duel->finished) { - delete duel; - duel = nullptr; + delete m_duel; + m_duel = nullptr; } UpdateDuelFlag(now); CheckDuelDistance(now); // Handle detect stealth units - if (m_DetectInvTimer > 0) + if (m_detectInvisibilityTimer > 0) { - if (update_diff >= m_DetectInvTimer) + if (update_diff >= m_detectInvisibilityTimer) { HandleStealthedUnitsDetection(); - m_DetectInvTimer = 2000; + m_detectInvisibilityTimer = 2000; } else - m_DetectInvTimer -= update_diff; + m_detectInvisibilityTimer -= update_diff; } // Update items that have just a limited lifetime @@ -1602,10 +1597,10 @@ void Player::Update(uint32 update_diff, uint32 p_time) { if (GetTimeInnEnter() > 0) // Freeze update { - time_t time_inn = now - GetTimeInnEnter(); - if (time_inn >= 10) // Freeze update + time_t timeInn = now - GetTimeInnEnter(); + if (timeInn >= 10) { - SetRestBonus(GetRestBonus() + ComputeRest(time_inn)); + SetRestBonus(GetRestBonus() + ComputeRest(timeInn)); UpdateInnerTime(now); } } @@ -1719,7 +1714,7 @@ void Player::Update(uint32 update_diff, uint32 p_time) SendUpdateToOutOfRangeGroupMembers(); if (IsHasDelayedTeleport()) - TeleportTo(m_teleport_dest, m_teleport_options, m_teleportRecoverDelayed); + TeleportTo(m_teleportDest, m_teleportOptions, m_teleportRecoverDelayed); // Movement extrapolation & cheat computation - only if not already kicked! if (!GetSession()->IsConnected()) @@ -2205,7 +2200,7 @@ bool Player::SwitchInstance(uint32 newInstanceId) m_movementInfo.RemoveMovementFlag(MOVEFLAG_ONTRANSPORT); } // Stop duel - if (duel) + if (m_duel) if (GameObject* obj = GetMap()->GetGameObject(GetGuidValue(PLAYER_DUEL_ARBITER))) DuelComplete(DUEL_FLED); @@ -2294,7 +2289,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati // The player was ported to another map and looses the duel immediately. // We have to perform this check before the teleport, otherwise the // ObjectAccessor won't find the flag. - if (duel && GetMapId() != mapid && FindMap()) + if (m_duel && GetMapId() != mapid && FindMap()) if (GameObject* obj = FindMap()->GetGameObject(GetGuidValue(PLAYER_DUEL_ARBITER))) DuelComplete(DUEL_FLED); @@ -2320,8 +2315,8 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati { SetSemaphoreTeleportNear(true); //lets save teleport destination for player - m_teleport_dest = WorldLocation(mapid, x, y, z, orientation); - m_teleport_options = options; + m_teleportDest = WorldLocation(mapid, x, y, z, orientation); + m_teleportOptions = options; m_teleportRecoverDelayed = recover; return true; } @@ -2343,7 +2338,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati } // this will be used instead of the current location in SaveToDB - m_teleport_dest = WorldLocation(mapid, x, y, z, orientation); + m_teleportDest = WorldLocation(mapid, x, y, z, orientation); DisableSpline(); SetFallInformation(0); @@ -2355,10 +2350,10 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati if (!GetSession()->PlayerLogout()) { const auto wps = [this](){ - MovementPacketSender::SendTeleportToController(this, m_teleport_dest.x, - m_teleport_dest.y, - m_teleport_dest.z, - m_teleport_dest.o); + MovementPacketSender::SendTeleportToController(this, m_teleportDest.x, + m_teleportDest.y, + m_teleportDest.z, + m_teleportDest.o); }; if (recover) m_teleportRecover = recover; @@ -2496,7 +2491,7 @@ bool Player::ExecuteTeleportFar(ScheduledTeleportData* data) if (oldmap) oldmap->Remove(this, false); - m_teleport_dest = WorldLocation(mapid, data->x, data->y, data->z, data->orientation); + m_teleportDest = WorldLocation(mapid, data->x, data->y, data->z, data->orientation); DisableSpline(); SetFallInformation(0); ScheduleDelayedOperation(DELAYED_CAST_HONORLESS_TARGET); @@ -2533,7 +2528,7 @@ void Player::SendNewWorld() { // transfer finished, inform client to start load WorldPacket data(SMSG_NEW_WORLD, (20)); - data << uint32(m_teleport_dest.mapId); + data << uint32(m_teleportDest.mapId); if (m_transport) { data << m_movementInfo.GetTransportPos().x; @@ -2543,10 +2538,10 @@ void Player::SendNewWorld() } else { - data << m_teleport_dest.x; - data << m_teleport_dest.y; - data << m_teleport_dest.z; - data << m_teleport_dest.o; + data << m_teleportDest.x; + data << m_teleportDest.y; + data << m_teleportDest.z; + data << m_teleportDest.o; } GetSession()->SendPacket(&data); SendSavedInstances(); @@ -2584,10 +2579,10 @@ bool Player::TeleportToBGEntryPoint() void Player::ProcessDelayedOperations() { - if (m_DelayedOperations == 0) + if (m_delayedOperations == 0) return; - if (m_DelayedOperations & DELAYED_RESURRECT_PLAYER) + if (m_delayedOperations & DELAYED_RESURRECT_PLAYER) { ResurrectPlayer(0.0f, false); @@ -2607,17 +2602,17 @@ void Player::ProcessDelayedOperations() SpawnCorpseBones(); } - if (m_DelayedOperations & DELAYED_SAVE_PLAYER) + if (m_delayedOperations & DELAYED_SAVE_PLAYER) SaveToDB(); - if (m_DelayedOperations & DELAYED_SPELL_CAST_DESERTER) + if (m_delayedOperations & DELAYED_SPELL_CAST_DESERTER) CastSpell(this, 26013, true); // Deserter - if (m_DelayedOperations & DELAYED_CAST_HONORLESS_TARGET) + if (m_delayedOperations & DELAYED_CAST_HONORLESS_TARGET) CastSpell(this, 2479, true); //we have executed ALL delayed ops, so clear the flag - m_DelayedOperations = 0; + m_delayedOperations = 0; } void Player::AddToWorld() @@ -3796,7 +3791,7 @@ void Player::InitStatsForLevel(bool reapplyMods) SetFloatValue(PLAYER_RANGED_CRIT_PERCENTAGE, 0.0f); // Init spell schools (will be recalculated in UpdateAllStats() at loading and in _ApplyAllStatBonuses() at reset - for (float & i : m_SpellCritPercentage) + for (float & i : m_modSpellCritChance) i = 0.0f; SetFloatValue(PLAYER_PARRY_PERCENTAGE, 0.0f); @@ -3979,8 +3974,8 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent PlayerSpellState state = learning ? PLAYERSPELL_NEW : PLAYERSPELL_UNCHANGED; - bool disabled_case = false; - bool superceded_old = false; + bool disabledCase = false; + bool supercededOld = false; PlayerSpellMap::iterator itr = m_spells.find(spellId); if (itr != m_spells.end()) @@ -4059,7 +4054,7 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent if (disabled) return false; - disabled_case = true; + disabledCase = true; } else switch (itr->second.state) { @@ -4084,7 +4079,7 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent TalentSpellPos const* talentPos = GetTalentSpellPos(spellId); - if (!disabled_case) // skip new spell adding if spell already known (disabled spells case) + if (!disabledCase) // skip new spell adding if spell already known (disabled spells case) { // talent: unlearn all other talent ranks (high and low) if (talentPos) @@ -4144,7 +4139,7 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent playerSpell2.active = false; if (playerSpell2.state != PLAYERSPELL_NEW) playerSpell2.state = PLAYERSPELL_CHANGED; - superceded_old = true; // new spell replace old in action bars and spell book. + supercededOld = true; // new spell replace old in action bars and spell book. } else if (m_spell.first == spellId) { @@ -4223,7 +4218,7 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent } // return true (for send learn packet) only if spell active (in case ranked spells) and not replace old spell - return active && !disabled && !superceded_old; + return active && !disabled && !supercededOld; } bool Player::IsNeedCastPassiveLikeSpellAtLearn(SpellEntry const* spellInfo) const @@ -4277,7 +4272,7 @@ void Player::LearnSpell(uint32 spellId, bool dependent, bool talent) } } -void Player::RemoveSpell(uint32 spellId, bool disabled, bool learn_low_rank) +void Player::RemoveSpell(uint32 spellId, bool disabled, bool learnLowRank) { PlayerSpellMap::iterator itr = m_spells.find(spellId); if (itr == m_spells.end()) @@ -4311,8 +4306,8 @@ void Player::RemoveSpell(uint32 spellId, bool disabled, bool learn_low_rank) if (itr == m_spells.end() || playerSpell.state == PLAYERSPELL_REMOVED) return; - bool cur_active = itr->second.active; - bool cur_dependent = itr->second.dependent; + bool currentActive = itr->second.active; + bool currentDependent = itr->second.dependent; if (disabled) { @@ -4360,44 +4355,44 @@ void Player::RemoveSpell(uint32 spellId, bool disabled, bool learn_low_rank) UpdateSpellTrainedSkills(spellId, false); // activate lesser rank in spellbook/action bar, and cast it if need - bool prev_activate = false; + bool previousActivated = false; - if (uint32 prev_id = sSpellMgr.GetPrevSpellInChain(spellId)) + if (uint32 previousId = sSpellMgr.GetPrevSpellInChain(spellId)) { - uint32 nextId = sSpellMgr.GetSpellBookSuccessorSpellId(prev_id); + uint32 nextId = sSpellMgr.GetSpellBookSuccessorSpellId(previousId); // if talent then lesser rank also talent and need learn if (talentPos) { - if (learn_low_rank) - LearnSpell(prev_id, false); + if (learnLowRank) + LearnSpell(previousId, false); } // if ranked non-stackable spell: need activate lesser rank and update dependence state - else if (cur_active && nextId == spellId) + else if (currentActive && nextId == spellId) { // need manually update dependence state (learn spell ignore like attempts) - PlayerSpellMap::iterator prev_itr = m_spells.find(prev_id); + PlayerSpellMap::iterator prev_itr = m_spells.find(previousId); if (prev_itr != m_spells.end()) { PlayerSpell& spell = prev_itr->second; - if (spell.dependent != cur_dependent) + if (spell.dependent != currentDependent) { - spell.dependent = cur_dependent; + spell.dependent = currentDependent; if (spell.state != PLAYERSPELL_NEW) spell.state = PLAYERSPELL_CHANGED; } // now re-learn if need re-activate - if (cur_active && !spell.active && learn_low_rank) + if (currentActive && !spell.active && learnLowRank) { - if (AddSpell(prev_id, true, false, spell.dependent, spell.disabled)) + if (AddSpell(previousId, true, false, spell.dependent, spell.disabled)) { // downgrade spell ranks in spellbook and action bar WorldPacket data(SMSG_SUPERCEDED_SPELL, 4); data << uint16(spellId); - data << uint16(prev_id); + data << uint16(previousId); GetSession()->SendPacket(&data); - prev_activate = true; + previousActivated = true; } } } @@ -4405,7 +4400,7 @@ void Player::RemoveSpell(uint32 spellId, bool disabled, bool learn_low_rank) } // remove from spell book if not replaced by lesser rank - if (!prev_activate) + if (!previousActivated) SendSpellRemoved(spellId); } @@ -4474,7 +4469,7 @@ void Player::_LoadSpellCooldowns(std::unique_ptr result) } } -void Player::_SaveSpellCooldowns() +void Player::_SaveSpellCooldowns() const { static SqlStatementID deleteSpellCooldown; @@ -5709,52 +5704,6 @@ float Player::GetDodgeFromAgility() const return GetStat(STAT_AGILITY) / classrate; } -float Player::GetSpellCritFromIntellect() const -{ -// Chance to crit is computed from INT and LEVEL as follows: - // chance = base + INT / (rate0 + rate1 * LEVEL) - // The formula keeps the crit chance at %5 on every level unless the player - // increases his intelligence by other means (enchants, buffs, talents, ...) - - //[TZERO] from mangos 3462 for 1.12 MUST BE CHECKED - - static const struct - { - float base; - float rate0, rate1; - } - crit_data[MAX_CLASSES] = - { - { 0.0f, 0.0f, 10.0f }, // 0: unused - { 0.0f, 0.0f, 10.0f }, // 1: warrior - { 3.70f, 14.77f, 0.65f }, // 2: paladin - { 0.0f, 0.0f, 10.0f }, // 3: hunter - { 0.0f, 0.0f, 10.0f }, // 4: rogue - { 2.97f, 10.03f, 0.82f }, // 5: priest - { 0.0f, 0.0f, 10.0f }, // 6: unused - { 3.54f, 11.51f, 0.80f }, // 7: shaman - { 3.70f, 14.77f, 0.65f }, // 8: mage - { 3.18f, 11.30f, 0.82f }, // 9: warlock - { 0.0f, 0.0f, 10.0f }, // 10: unused - { 3.33f, 12.41f, 0.79f } // 11: druid - }; - float crit_chance; - - // only players use intelligence for critical chance computations - if (GetTypeId() == TYPEID_PLAYER) - { - int my_class = GetClass(); - float crit_ratio = crit_data[my_class].rate0 + crit_data[my_class].rate1 * GetLevel(); - crit_chance = crit_data[my_class].base + GetStat(STAT_INTELLECT) / crit_ratio; - } - else - crit_chance = m_baseSpellCritChance; - - crit_chance = crit_chance > 0.0 ? crit_chance : 0.0; - - return crit_chance; -} - void Player::SetRegularAttackTime(bool resetTimer) { for (int i = 0; i < MAX_ATTACK; ++i) @@ -7263,7 +7212,7 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea) //If players are too far way of duel flag... then player loose the duel void Player::CheckDuelDistance(time_t currTime) { - if (!duel || duel->finished) + if (!m_duel || m_duel->finished) return; GameObject* obj = GetMap()->GetGameObject(GetGuidValue(PLAYER_DUEL_ARBITER)); @@ -7275,16 +7224,16 @@ void Player::CheckDuelDistance(time_t currTime) } bool inRange = true; - if (duel->transportGuid) - inRange = GetTransport() && GetTransport()->GetGUIDLow() == duel->transportGuid; - else if (!IsWithinDistInMap(obj, duel->outOfBound ? 70.0f : 75.0f)) + if (m_duel->transportGuid) + inRange = GetTransport() && GetTransport()->GetGUIDLow() == m_duel->transportGuid; + else if (!IsWithinDistInMap(obj, m_duel->outOfBound ? 70.0f : 75.0f)) inRange = false; - if (duel->outOfBound == 0) + if (m_duel->outOfBound == 0) { // Nostalrius : modification de la distance de duel (50 -> 75m) if (!inRange) { - duel->outOfBound = currTime; + m_duel->outOfBound = currTime; WorldPacket data(SMSG_DUEL_OUTOFBOUNDS, 0); GetSession()->SendPacket(&data); @@ -7295,16 +7244,16 @@ void Player::CheckDuelDistance(time_t currTime) // Nostalrius : modification de la distance de duel if (inRange) { - duel->outOfBound = 0; + m_duel->outOfBound = 0; WorldPacket data(SMSG_DUEL_INBOUNDS, 0); GetSession()->SendPacket(&data); } - else if (currTime >= (duel->outOfBound + 10)) + else if (currTime >= (m_duel->outOfBound + 10)) { CombatStopWithPets(true); - if (duel->opponent) - duel->opponent->CombatStopWithPets(true); + if (m_duel->opponent) + m_duel->opponent->CombatStopWithPets(true); DuelComplete(DUEL_FLED); } @@ -7320,30 +7269,30 @@ bool Player::IsOutdoorPvPActive() const void Player::DuelComplete(DuelCompleteType type) { // duel not requested - if (!duel || duel->finished) + if (!m_duel || m_duel->finished) return; WorldPacket data(SMSG_DUEL_COMPLETE, (1)); data << (uint8)((type != DUEL_INTERRUPTED) ? 1 : 0); GetSession()->SendPacket(&data); - duel->opponent->GetSession()->SendPacket(&data); + m_duel->opponent->GetSession()->SendPacket(&data); if (type != DUEL_INTERRUPTED) { data.Initialize(SMSG_DUEL_WINNER, (1 + 20)); // we guess size data << (uint8)((type == DUEL_WON) ? 0 : 1); // 0 = just won; 1 = fled - data << duel->opponent->GetName(); + data << m_duel->opponent->GetName(); data << GetName(); SendObjectMessageToSet(&data, true); } //Remove Duel Flag object if (GameObject* obj = GetMap()->GetGameObject(GetGuidValue(PLAYER_DUEL_ARBITER))) - duel->initiator->RemoveGameObject(obj, true); + m_duel->initiator->RemoveGameObject(obj, true); /* remove auras */ std::vector auras2remove; - SpellAuraHolderMap const& vAuras = duel->opponent->GetSpellAuraHolderMap(); + SpellAuraHolderMap const& vAuras = m_duel->opponent->GetSpellAuraHolderMap(); for (const auto& itr : vAuras) { if (!itr.second->IsPositive() && @@ -7354,12 +7303,12 @@ void Player::DuelComplete(DuelCompleteType type) #else itr.second->GetCasterGuid() == GetObjectGuid() && #endif - itr.second->GetAuraApplyTime() >= duel->startTime) + itr.second->GetAuraApplyTime() >= m_duel->startTime) auras2remove.push_back(itr.second->GetId()); } for (uint32 i : auras2remove) - duel->opponent->RemoveAurasDueToSpell(i); + m_duel->opponent->RemoveAurasDueToSpell(i); auras2remove.clear(); SpellAuraHolderMap const& auras = GetSpellAuraHolderMap(); @@ -7369,43 +7318,43 @@ void Player::DuelComplete(DuelCompleteType type) // World of Warcraft Client Patch 1.7.0 (2005-09-13) // - You are no longer able to kill players in duels with reflected DoT spells #if SUPPORTED_CLIENT_BUILD > CLIENT_BUILD_1_6_1 - (aura.second->GetCasterGuid() == duel->opponent->GetObjectGuid() || aura.second->IsReflected()) && + (aura.second->GetCasterGuid() == m_duel->opponent->GetObjectGuid() || aura.second->IsReflected()) && #else - aura.second->GetCasterGuid() == duel->opponent->GetObjectGuid() && + aura.second->GetCasterGuid() == m_duel->opponent->GetObjectGuid() && #endif - aura.second->GetAuraApplyTime() >= duel->startTime) + aura.second->GetAuraApplyTime() >= m_duel->startTime) auras2remove.push_back(aura.second->GetId()); } for (uint32 i : auras2remove) RemoveAurasDueToSpell(i); // cleanup combo points - if (GetComboTargetGuid() == duel->opponent->GetObjectGuid()) + if (GetComboTargetGuid() == m_duel->opponent->GetObjectGuid()) ClearComboPoints(); - else if (GetComboTargetGuid() == duel->opponent->GetPetGuid()) + else if (GetComboTargetGuid() == m_duel->opponent->GetPetGuid()) ClearComboPoints(); - if (duel->opponent->GetComboTargetGuid() == GetObjectGuid()) - duel->opponent->ClearComboPoints(); - else if (duel->opponent->GetComboTargetGuid() == GetPetGuid()) - duel->opponent->ClearComboPoints(); + if (m_duel->opponent->GetComboTargetGuid() == GetObjectGuid()) + m_duel->opponent->ClearComboPoints(); + else if (m_duel->opponent->GetComboTargetGuid() == GetPetGuid()) + m_duel->opponent->ClearComboPoints(); // reset extraAttacks counter if (type != DUEL_INTERRUPTED) { ResetExtraAttacks(); - duel->opponent->ResetExtraAttacks(); + m_duel->opponent->ResetExtraAttacks(); } //cleanups SetGuidValue(PLAYER_DUEL_ARBITER, ObjectGuid()); SetUInt32Value(PLAYER_DUEL_TEAM, 0); - duel->opponent->SetGuidValue(PLAYER_DUEL_ARBITER, ObjectGuid()); - duel->opponent->SetUInt32Value(PLAYER_DUEL_TEAM, 0); + m_duel->opponent->SetGuidValue(PLAYER_DUEL_ARBITER, ObjectGuid()); + m_duel->opponent->SetUInt32Value(PLAYER_DUEL_TEAM, 0); - if (duel->opponent->duel) - duel->opponent->duel->finished = true; - duel->finished = true; + if (m_duel->opponent->m_duel) + m_duel->opponent->m_duel->finished = true; + m_duel->finished = true; } //---------------------------------------------------------// @@ -16533,19 +16482,19 @@ void Player::SendSavedInstances() const } // convert the player's binds to the group -void Player::ConvertInstancesToGroup(Player* player, Group* group, ObjectGuid player_guid) +void Player::ConvertInstancesToGroup(Player* player, Group* group, ObjectGuid playerGuid) { bool has_binds = false; bool has_solo = false; if (player) { - player_guid = player->GetObjectGuid(); + playerGuid = player->GetObjectGuid(); if (!group) group = player->GetGroup(); } - MANGOS_ASSERT(player_guid); + MANGOS_ASSERT(playerGuid); // copy all binds to the group, when changing leader it's assumed the character // will not have any solo binds @@ -16572,15 +16521,15 @@ void Player::ConvertInstancesToGroup(Player* player, Group* group, ObjectGuid pl } } - uint32 player_lowguid = player_guid.GetCounter(); + uint32 playerLowGuid = playerGuid.GetCounter(); // if the player's not online we don't know what binds it has if (!player || !group || has_binds) - CharacterDatabase.PExecute("INSERT INTO `group_instance` SELECT `guid`, `instance`, `permanent` FROM `character_instance` WHERE `guid` = '%u'", player_lowguid); + CharacterDatabase.PExecute("INSERT INTO `group_instance` SELECT `guid`, `instance`, `permanent` FROM `character_instance` WHERE `guid` = '%u'", playerLowGuid); // the following should not get executed when changing leaders if (!player || has_solo) - CharacterDatabase.PExecute("DELETE FROM `character_instance` WHERE `guid` = '%u' AND `permanent` = 0", player_lowguid); + CharacterDatabase.PExecute("DELETE FROM `character_instance` WHERE `guid` = '%u' AND `permanent` = 0", playerLowGuid); } bool Player::_LoadHomeBind(std::unique_ptr result) @@ -17770,18 +17719,18 @@ bool Player::IsInInterFactionMode() const void Player::UpdateDuelFlag(time_t currTime) { - if (!duel || duel->finished || duel->startTimer == 0 || currTime < duel->startTimer + 3) + if (!m_duel || m_duel->finished || m_duel->startTimer == 0 || currTime < m_duel->startTimer + 3) return; SetUInt32Value(PLAYER_DUEL_TEAM, 1); - duel->opponent->SetUInt32Value(PLAYER_DUEL_TEAM, 2); + m_duel->opponent->SetUInt32Value(PLAYER_DUEL_TEAM, 2); - duel->startTimer = 0; - duel->startTime = currTime; - if (duel->opponent->duel) + m_duel->startTimer = 0; + m_duel->startTime = currTime; + if (m_duel->opponent->m_duel) { - duel->opponent->duel->startTimer = 0; - duel->opponent->duel->startTime = currTime; + m_duel->opponent->m_duel->startTimer = 0; + m_duel->opponent->m_duel->startTime = currTime; } } @@ -17926,7 +17875,7 @@ void Player::PossessSpellInitialize() GetSession()->SendPacket(&data); } -void Player::CharmSpellInitialize() +void Player::CharmSpellInitialize() const { Unit* charm = GetCharm(); @@ -17994,7 +17943,7 @@ void Player::CharmSpellInitialize() GetSession()->SendPacket(&data); } -void Player::RemovePetActionBar() +void Player::RemovePetActionBar() const { WorldPacket data(SMSG_PET_SPELLS, 8); data << ObjectGuid(); @@ -18560,7 +18509,7 @@ bool Player::ActivateTaxiPathTo(uint32 taxi_path_id, uint32 spellid /*= 0*/, boo return ActivateTaxiPathTo(nodes, nullptr, spellid, nocheck); } -void Player::ContinueTaxiFlight() +void Player::ContinueTaxiFlight() const { uint32 sourceNode = m_taxi.GetTaxiSource(); if (!sourceNode) @@ -18935,7 +18884,7 @@ bool Player::BuyItemFromVendor(ObjectGuid vendorGuid, uint32 item, uint8 count, return crItem->maxcount != 0; } -void Player::SendRaidGroupOnlyError(uint32 timer, RaidGroupError error) +void Player::SendRaidGroupOnlyError(uint32 timer, RaidGroupError error) const { WorldPacket data(SMSG_RAID_GROUP_ONLY, 4 + 4); data << uint32(timer); @@ -18946,33 +18895,33 @@ void Player::SendRaidGroupOnlyError(uint32 timer, RaidGroupError error) void Player::UpdateHomebindTime(uint32 time) { // GMs never get homebind timer online - if (m_InstanceValid || IsGameMaster()) + if (m_instanceValid || IsGameMaster()) { - if (m_HomebindTimer) // instance valid, but timer not reset + if (m_homebindTimer) // instance valid, but timer not reset { // hide reminder SendRaidGroupOnlyError(0, ERR_RAID_GROUP_REQUIRED); } // instance is valid, reset homebind timer - m_HomebindTimer = 0; + m_homebindTimer = 0; } - else if (m_HomebindTimer > 0) + else if (m_homebindTimer > 0) { - if (time >= m_HomebindTimer) + if (time >= m_homebindTimer) { // teleport to homebind location TeleportToHomebind(); - m_HomebindTimer = 0; + m_homebindTimer = 0; } else - m_HomebindTimer -= time; + m_homebindTimer -= time; } else { // instance is invalid, start homebind timer - m_HomebindTimer = 60000; + m_homebindTimer = 60000; // send message to player - SendRaidGroupOnlyError(m_HomebindTimer, ERR_RAID_GROUP_REQUIRED); + SendRaidGroupOnlyError(m_homebindTimer, ERR_RAID_GROUP_REQUIRED); sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "PLAYER: Player '%s' (GUID: %u) will be teleported to homebind in 60 seconds", GetName(), GetGUIDLow()); } } @@ -19414,7 +19363,7 @@ void Player::SetLongSight(Aura const* aura) } } -void Player::UpdateLongSight() +void Player::UpdateLongSight() const { if (!m_longSightSpell) return; @@ -19793,7 +19742,7 @@ void Player::LearnQuestRewardedSpells() void Player::SetSemaphoreTeleportNear(bool semphsetting) { - mSemaphoreTeleport_Near = semphsetting; + m_semaphoreTeleportNear = semphsetting; if (!IsBeingTeleported()) { m_teleportRecover = std::function(); @@ -19803,7 +19752,7 @@ void Player::SetSemaphoreTeleportNear(bool semphsetting) void Player::SetSemaphoreTeleportFar(bool semphsetting) { - mSemaphoreTeleport_Far = semphsetting; + m_semaphoreTeleportFar = semphsetting; if (!IsBeingTeleported()) { m_teleportRecover = std::function(); @@ -20162,7 +20111,7 @@ ZoneScript* Player::GetZoneScript() const return sZoneScriptMgr.GetZoneScriptToZoneId(GetZoneId()); } -bool Player::HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item const* ignoreItem) +bool Player::HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item const* ignoreItem) const { if (spellInfo->EquippedItemClass < 0) return true; @@ -20511,7 +20460,7 @@ void Player::ResurectUsingRequestData() SpawnCorpseBones(); } -void Player::SetClientControl(Unit const* target, uint8 allowMove) +void Player::SetClientControl(Unit const* target, uint8 allowMove) const { #if SUPPORTED_CLIENT_BUILD > CLIENT_BUILD_1_9_4 WorldPacket data(SMSG_CLIENT_CONTROL_UPDATE, target->GetPackGUID().size() + 1); @@ -21455,17 +21404,17 @@ bool Player::TeleportToHomebind(uint32 options, bool hearthCooldown) return TeleportTo(m_homebind, (options | TELE_TO_FORCE_MAP_CHANGE)); } -Unit* Player::GetSelectedUnit() +Unit* Player::GetSelectedUnit() const { return GetMap()->GetUnit(m_curSelectionGuid); } -Creature* Player::GetSelectedCreature() +Creature* Player::GetSelectedCreature() const { return GetMap()->GetCreature(m_curSelectionGuid); } -Player* Player::GetSelectedPlayer() +Player* Player::GetSelectedPlayer() const { return GetMap()->GetPlayer(m_curSelectionGuid); } @@ -21541,8 +21490,8 @@ void Player::SendDuelCountdown(uint32 counter) const void Player::RemoveAI() { - if (i_AI) - i_AI->Remove(); + if (m_AI) + m_AI->Remove(); } void Player::RemoveTemporaryAI() @@ -21558,17 +21507,17 @@ void Player::RemoveTemporaryAI() void Player::SetControlledBy(Unit* pWho) { - if (i_AI) + if (m_AI) { PlayerBotEntry* pBot = GetSession()->GetBot(); // Careful not to delete bot ai - if (!pBot || (pBot->ai.get() != i_AI)) - delete i_AI; + if (!pBot || (pBot->ai.get() != m_AI)) + delete m_AI; - i_AI = nullptr; + m_AI = nullptr; } - i_AI = new PlayerControlledAI(this, pWho); + m_AI = new PlayerControlledAI(this, pWho); } #define CHANGERACE_LOG(format, ...) sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "[RaceChanger/Log] " format, ##__VA_ARGS__) @@ -22787,6 +22736,58 @@ void Player::CastHighestStealthRank() CastSpell(nullptr, stealthSpellEntry, true); } +template T Player::ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell* spell) +{ + SpellEntry const* spellInfo = sSpellMgr.GetSpellEntry(spellId); + if (!spellInfo || spellInfo->HasAttribute(SPELL_ATTR_EX3_IGNORE_CASTER_MODIFIERS)) return 0; + float totalpct = 0; + float totalflat = 0; + for (const auto mod : m_spellMods[op]) + { + if (!IsAffectedBySpellmod(spellInfo,mod,spell)) + continue; + + if (mod->type == SPELLMOD_FLAT) + totalflat += mod->value; + else if (mod->type == SPELLMOD_PCT) + { + // skip percent mods for null basevalue (most important for spell mods with charges) + if (basevalue == T(0)) + continue; + + // special case (skip >10sec spell casts for instant cast setting) + if (mod->op==SPELLMOD_CASTING_TIME && basevalue >= T(10*IN_MILLISECONDS) && mod->value <= -100) + continue; + + totalpct += mod->value; + } + +#if SUPPORTED_CLIENT_BUILD > CLIENT_BUILD_1_10_2 + // World of Warcraft Client Patch 1.11.0 (2006-06-20) + // - Nature's Grace: You will no longer consume this effect when casting a + // spell which was made instant by Nature's Swiftness. + if (!((mod->op == SPELLMOD_CASTING_TIME) && (mod->type == SPELLMOD_FLAT) && HasInstantCastingSpellMod(spellInfo))) +#endif + DropModCharge(mod, spell); + + // Nostalrius : fix ecorce (22812 - +1sec incant) + rapidite nature (17116 - sorts instant) = 0sec de cast + if (mod->op == SPELLMOD_CASTING_TIME && mod->type == SPELLMOD_PCT && mod->value == -100) + { + totalpct = -100; + totalflat = 0; + break; + } + } + + float diff = (float(basevalue) + totalflat) * totalpct/100.0f + totalflat; + basevalue = T(float(basevalue) + diff); + return T(diff); +} + +template int32 Player::ApplySpellMod(uint32 spellId, SpellModOp op, int32& basevalue, Spell* spell); +template uint32 Player::ApplySpellMod(uint32 spellId, SpellModOp op, uint32& basevalue, Spell* spell); +template float Player::ApplySpellMod(uint32 spellId, SpellModOp op, float& basevalue, Spell* spell); + static char const* type_strings[] = { "Basic", diff --git a/src/game/Objects/Player.h b/src/game/Objects/Player.h index 5d05139876f..5a22a029a2d 100644 --- a/src/game/Objects/Player.h +++ b/src/game/Objects/Player.h @@ -1067,8 +1067,8 @@ class Player final: public Unit ItemDurationList m_itemDuration; TradeData* m_trade; - uint32 m_WeaponProficiency; - uint32 m_ArmorProficiency; + uint32 m_weaponProficiency; + uint32 m_armorProficiency; // internal common parts for CanStore/StoreItem functions InventoryResult _CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec& dest, ItemPrototype const* pProto, uint32& count, bool swap, Item const* pSrcItem) const; @@ -1126,7 +1126,7 @@ class Player final: public Unit uint8 GetBankBagSlotCount() const { return GetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_BANK_BAG_SLOTS); } void SetBankBagSlotCount(uint8 count) { SetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_BANK_BAG_SLOTS, count); } bool HasItemCount(uint32 item, uint32 count = 1, bool inBankAlso = false) const; - bool HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item const* ignoreItem = nullptr); + bool HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item const* ignoreItem = nullptr) const; bool HasItemWithIdEquipped(uint32 item, uint32 count = 1, uint8 except_slot = NULL_SLOT) const; InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 item, uint32 count, uint32* no_space_count = nullptr) const { @@ -1203,10 +1203,10 @@ class Player final: public Unit void SendBuyError(BuyResult msg, Creature const* pCreature, uint32 item, uint32 param) const; void SendSellError(SellResult msg, Creature const* pCreature, ObjectGuid itemGuid, uint32 param) const; void SendOpenContainer() const; - void AddWeaponProficiency(uint32 newflag) { m_WeaponProficiency |= newflag; } - void AddArmorProficiency(uint32 newflag) { m_ArmorProficiency |= newflag; } - uint32 GetWeaponProficiency() const { return m_WeaponProficiency; } - uint32 GetArmorProficiency() const { return m_ArmorProficiency; } + void AddWeaponProficiency(uint32 newflag) { m_weaponProficiency |= newflag; } + void AddArmorProficiency(uint32 newflag) { m_armorProficiency |= newflag; } + uint32 GetWeaponProficiency() const { return m_weaponProficiency; } + uint32 GetArmorProficiency() const { return m_armorProficiency; } bool IsTwoHandUsed() const { Item* mainItem = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND); @@ -1488,9 +1488,9 @@ class Player final: public Unit public: void SendPetTameFailure(PetTameFailureReason reason) const; void PetSpellInitialize(); - void CharmSpellInitialize(); + void CharmSpellInitialize() const; void PossessSpellInitialize(); - void RemovePetActionBar(); + void RemovePetActionBar() const; // Take possession of a new spawned creature Creature* SummonPossessedMinion(uint32 creatureId, uint32 spellId, float x, float y, float z, float ang, uint32 duration); @@ -1584,7 +1584,7 @@ class Player final: public Unit void SendClearAllCooldowns(Unit const* target) const; void SendSpellCooldown(uint32 spellId, uint32 cooldown, ObjectGuid target) const; void _LoadSpellCooldowns(std::unique_ptr result); - void _SaveSpellCooldowns(); + void _SaveSpellCooldowns() const; template void RemoveSomeCooldown(F check) @@ -1631,7 +1631,6 @@ class Player final: public Unit private: float m_modManaRegen; float m_modManaRegenInterrupt; - float m_SpellCritPercentage[MAX_SPELL_SCHOOL]; float m_carryHealthRegen; ObjectGuid m_comboTargetGuid; int8 m_comboPoints; @@ -1652,7 +1651,6 @@ class Player final: public Unit static float GetManaBonusFromIntellect(float intellect); float GetMeleeCritFromAgility() const; float GetDodgeFromAgility() const; - float GetSpellCritFromIntellect() const; void InitStatBuffMods() { for (int i = STAT_STRENGTH; i < MAX_STATS; ++i) SetFloatValue(PLAYER_FIELD_POSSTAT0 + i, 0); @@ -1696,8 +1694,6 @@ class Player final: public Unit void UpdateAllCritPercentages(); void UpdateParryPercentage(); void UpdateDodgePercentage(); - void UpdateAllSpellCritChances(); - void UpdateSpellCritChance(uint32 school); void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, float& min_damage, float& max_damage, uint8 index = 0) const; float GetWeaponBasedAuraModifier(WeaponAttackType attType, AuraType auraType) const final; @@ -1740,9 +1736,6 @@ class Player final: public Unit void UpdateEquipSpellsAtFormChange(); void outDebugStatsValues() const; - float GetSpellCritPercent(SpellSchools school) const { return m_SpellCritPercentage[school]; } - void SetSpellCritPercent(SpellSchools school, float percent) { m_SpellCritPercentage[school] = percent; } - /*********************************************************/ /*** SKILLS SYSTEM ***/ /*********************************************************/ @@ -1798,15 +1791,15 @@ class Player final: public Unit uint32 m_areaUpdateId; // Current teleport data - WorldLocation m_teleport_dest; - uint32 m_teleport_options; + WorldLocation m_teleportDest; + uint32 m_teleportOptions; std::function m_teleportRecover; std::function m_teleportRecoverDelayed; - bool mSemaphoreTeleport_Near; - bool mSemaphoreTeleport_Far; - bool mPendingFarTeleport; + bool m_semaphoreTeleportNear; + bool m_semaphoreTeleportFar; + bool m_pendingFarTeleport; - uint32 m_DelayedOperations; + uint32 m_delayedOperations; bool m_bCanDelayTeleport; bool m_bHasDelayedTeleport; bool m_bHasBeenAliveAtDelayedTeleport; @@ -1836,7 +1829,7 @@ class Player final: public Unit void ScheduleDelayedOperation(uint32 operation) { if (operation < DELAYED_END) - m_DelayedOperations |= operation; + m_delayedOperations |= operation; } Unit* m_mover; @@ -1870,9 +1863,7 @@ class Player final: public Unit uint16 m_homebindAreaId; // knockback/jumping states - bool launched; - // not null only if player has knockback state - float xy_speed; + bool m_launched; LiquidTypeEntry const* m_lastLiquid; uint8 m_isunderwater; @@ -1917,13 +1908,13 @@ class Player final: public Unit bool SetPosition(float x, float y, float z, float orientation, bool teleport = false); void SetBindPoint(ObjectGuid guid) const; - WorldLocation& GetTeleportDest() { return m_teleport_dest; } - bool IsBeingTeleported() const { return mSemaphoreTeleport_Near || mSemaphoreTeleport_Far || mPendingFarTeleport; } - bool IsBeingTeleportedNear() const { return mSemaphoreTeleport_Near; } - bool IsBeingTeleportedFar() const { return mSemaphoreTeleport_Far; } + WorldLocation& GetTeleportDest() { return m_teleportDest; } + bool IsBeingTeleported() const { return m_semaphoreTeleportNear || m_semaphoreTeleportFar || m_pendingFarTeleport; } + bool IsBeingTeleportedNear() const { return m_semaphoreTeleportNear; } + bool IsBeingTeleportedFar() const { return m_semaphoreTeleportFar; } void SetSemaphoreTeleportNear(bool semphsetting); void SetSemaphoreTeleportFar(bool semphsetting); - void SetPendingFarTeleport(bool pending) { mPendingFarTeleport = pending; } + void SetPendingFarTeleport(bool pending) { m_pendingFarTeleport = pending; } void ExecuteTeleportNear(); void ProcessDelayedOperations(); @@ -1938,7 +1929,7 @@ class Player final: public Unit bool IsFalling() const { return m_fallStartZ != 0; } bool IsControlledByOwnClient() const { return m_session->GetClientMoverGuid() == GetObjectGuid(); } - void SetClientControl(Unit const* target, uint8 allowMove); + void SetClientControl(Unit const* target, uint8 allowMove) const; void SetMover(Unit* target) { m_mover = target ? target : this; } Unit* GetMover() const { return m_mover; } // can never be null Unit* GetConfirmedMover() const; // only returns mover confirmed by client, can be null @@ -1948,7 +1939,7 @@ class Player final: public Unit ObjectGuid const& GetFarSightGuid() const { return GetGuidValue(PLAYER_FARSIGHT); } void SaveRecallPosition(); - void GetRecallPosition(uint32& map, float& x, float& y, float& z, float& o) + void GetRecallPosition(uint32& map, float& x, float& y, float& z, float& o) const { map = m_recallMap; x = m_recallX; @@ -1981,7 +1972,7 @@ class Player final: public Unit uint32 GetLongSight() const { return m_longSightSpell; } void SetLongSight(Aura const* aura = nullptr); - void UpdateLongSight(); + void UpdateLongSight() const; bool CanWalk() const override { return true; } bool CanSwim() const override { return true; } @@ -2031,12 +2022,10 @@ class Player final: public Unit void DismountCheck(); // knockback/jumping states - bool IsLaunched() const { return launched; } - void SetLaunched(bool apply) { launched = apply; } - float GetXYSpeed() const { return xy_speed; } - void SetXYSpeed(float speed) { xy_speed = speed; } + bool IsLaunched() const { return m_launched; } + void SetLaunched(bool apply) { m_launched = apply; } - void SendRaidGroupOnlyError(uint32 timer, RaidGroupError error); + void SendRaidGroupOnlyError(uint32 timer, RaidGroupError error) const; void SendInitialPacketsBeforeAddToMap(); void SendInitialPacketsAfterAddToMap(bool login = true); @@ -2124,7 +2113,7 @@ class Player final: public Unit bool ActivateTaxiPathTo(std::vector const& nodes, Creature const* npc = nullptr, uint32 spellid = 0, bool nocheck = false); bool ActivateTaxiPathTo(uint32 taxi_path_id, uint32 spellid = 0, bool nocheck = false); void TaxiStepFinished(bool lastPointReached); - void ContinueTaxiFlight(); + void ContinueTaxiFlight() const; /*********************************************************/ /*** CINEMATIC SYSTEM ***/ @@ -2173,9 +2162,9 @@ class Player final: public Unit bool CanBeDetected() const override { return m_cannotBeDetectedTimer <= 0; } // PlayerAI management - PlayerAI* i_AI; - PlayerAI* AI() { return i_AI; } - void SetAI(PlayerAI* otherAI) { i_AI = otherAI; } + PlayerAI* m_AI; + PlayerAI* AI() { return m_AI; } + void SetAI(PlayerAI* otherAI) { m_AI = otherAI; } void SetControlledBy(Unit* pWho); void RemoveAI(); void RemoveTemporaryAI(); // will restore player bot AI if needed @@ -2223,7 +2212,7 @@ class Player final: public Unit private: bool m_isStandUpScheduled; - uint32 m_DetectInvTimer; + uint32 m_detectInvisibilityTimer; uint32 m_ExtraFlags; ObjectGuid m_curSelectionGuid; ResurrectionData m_resurrectData; @@ -2261,9 +2250,9 @@ class Player final: public Unit void SetSelectedGobj(ObjectGuid guid) { m_selectedGobj = guid; } ObjectGuid const& GetSelectionGuid() const { return m_curSelectionGuid; } void SetSelectionGuid(ObjectGuid guid) { m_curSelectionGuid = guid; SetTargetGuid(guid); } - Unit* GetSelectedUnit(); - Creature* GetSelectedCreature(); - Player* GetSelectedPlayer(); + Unit* GetSelectedUnit() const; + Creature* GetSelectedCreature() const; + Player* GetSelectedPlayer() const; Object* GetObjectByTypeMask(ObjectGuid guid, TypeMask typemask); void SetResurrectRequestData(ObjectGuid guid, uint16 mapId, uint32 instanceId, float x, float y, float z, float o, uint32 health, uint32 mana) @@ -2306,7 +2295,7 @@ class Player final: public Unit void RemoveDelayedOperation(uint32 operation) { - m_DelayedOperations &= ~operation; + m_delayedOperations &= ~operation; } inline bool HasScheduledEvent() const { return m_Events.HasScheduledEvent(); } @@ -2414,8 +2403,8 @@ class Player final: public Unit bool IsInInterFactionMode() const; // todo: -maybe move UpdateDuelFlag+DuelComplete to independent DuelHandler. - DuelInfo* duel; - bool IsInDuelWith(Player const* player) const { return duel && duel->opponent == player && duel->startTime != 0; } + DuelInfo* m_duel; + bool IsInDuelWith(Player const* player) const { return m_duel && m_duel->opponent == player && m_duel->startTime != 0; } void UpdateDuelFlag(time_t currTime); void CheckDuelDistance(time_t currTime); void DuelComplete(DuelCompleteType type); @@ -2424,7 +2413,7 @@ class Player final: public Unit void RewardHonor(Unit const* uVictim, uint32 groupSize); void RewardHonorOnDeath(); bool IsHonorOrXPTarget(Unit const* pVictim) const; - bool IsCityProtector(); + bool IsCityProtector() const; void SetCityTitle(); void RemoveCityTitle(); @@ -2436,7 +2425,7 @@ class Player final: public Unit /*********************************************************/ public: - ZoneScript* GetZoneScript() const; + ZoneScript* GetZoneScript() const override; // returns true if the player is in active state for outdoor pvp objective capturing, false otherwise bool IsOutdoorPvPActive() const; @@ -2583,7 +2572,7 @@ class Player final: public Unit std::shared_ptr m_broadcaster; void DeletePacketBroadcaster(); void CreatePacketBroadcaster(); - std::shared_ptr GetPacketBroadcaster() { return m_broadcaster; } + std::shared_ptr GetPacketBroadcaster() const { return m_broadcaster; } /*********************************************************/ /*** INSTANCE SYSTEM ***/ @@ -2595,7 +2584,7 @@ class Player final: public Unit private: bool m_enableInstanceSwitch; bool m_smartInstanceRebind; - uint32 m_HomebindTimer; + uint32 m_homebindTimer; void ResetInstance(InstanceResetMethod method, BoundInstancesMap::iterator& itr); public: @@ -2611,7 +2600,7 @@ class Player final: public Unit void AddInstanceEnterTime(uint32 instanceId, time_t enterTime) const; void UpdateHomebindTime(uint32 time); - bool m_InstanceValid; + bool m_instanceValid; // permanent binds and solo binds BoundInstancesMap m_boundInstances; mutable std::mutex m_boundInstancesMutex; @@ -2686,16 +2675,16 @@ class Player final: public Unit /*********************************************************/ private: - uint32 m_GuildIdInvited; + uint32 m_guildIdInvited; public: void SetInGuild(uint32 GuildId) { SetUInt32Value(PLAYER_GUILDID, GuildId); } void SetRank(uint32 rankId) { SetUInt32Value(PLAYER_GUILDRANK, rankId); } - void SetGuildIdInvited(uint32 GuildId) { m_GuildIdInvited = GuildId; } + void SetGuildIdInvited(uint32 GuildId) { m_guildIdInvited = GuildId; } uint32 GetGuildId() const { return GetUInt32Value(PLAYER_GUILDID); } uint32 GetRank() const { return GetUInt32Value(PLAYER_GUILDRANK); } static uint32 GetGuildIdFromDB(ObjectGuid guid); static uint32 GetRankFromDB(ObjectGuid guid); - int GetGuildIdInvited() const { return m_GuildIdInvited; } + int GetGuildIdInvited() const { return m_guildIdInvited; } static void RemovePetitionsAndSigns(ObjectGuid guid, uint32 exceptPetitionId = 0); }; @@ -2722,53 +2711,4 @@ inline Player const* ToPlayer(Object const* object) void AddItemsSetItem(Player*player,Item* item); void RemoveItemsSetItem(Player*player,ItemPrototype const* proto); -// "the bodies of template functions must be made available in a header file" -template T Player::ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell* spell) -{ - SpellEntry const* spellInfo = sSpellMgr.GetSpellEntry(spellId); - if (!spellInfo || spellInfo->HasAttribute(SPELL_ATTR_EX3_IGNORE_CASTER_MODIFIERS)) return 0; - float totalpct = 0; - float totalflat = 0; - for (const auto mod : m_spellMods[op]) - { - if (!IsAffectedBySpellmod(spellInfo,mod,spell)) - continue; - - if (mod->type == SPELLMOD_FLAT) - totalflat += mod->value; - else if (mod->type == SPELLMOD_PCT) - { - // skip percent mods for null basevalue (most important for spell mods with charges) - if (basevalue == T(0)) - continue; - - // special case (skip >10sec spell casts for instant cast setting) - if (mod->op==SPELLMOD_CASTING_TIME && basevalue >= T(10*IN_MILLISECONDS) && mod->value <= -100) - continue; - - totalpct += mod->value; - } - -#if SUPPORTED_CLIENT_BUILD > CLIENT_BUILD_1_10_2 - // World of Warcraft Client Patch 1.11.0 (2006-06-20) - // - Nature's Grace: You will no longer consume this effect when casting a - // spell which was made instant by Nature's Swiftness. - if (!((mod->op == SPELLMOD_CASTING_TIME) && (mod->type == SPELLMOD_FLAT) && HasInstantCastingSpellMod(spellInfo))) -#endif - DropModCharge(mod, spell); - - // Nostalrius : fix ecorce (22812 - +1sec incant) + rapidite nature (17116 - sorts instant) = 0sec de cast - if (mod->op == SPELLMOD_CASTING_TIME && mod->type == SPELLMOD_PCT && mod->value == -100) - { - totalpct = -100; - totalflat = 0; - break; - } - } - - float diff = (float)basevalue*(float)totalpct/100.0f + (float)totalflat; - basevalue = T((float)basevalue + diff); - return T(diff); -} - #endif diff --git a/src/game/Objects/SpellCaster.cpp b/src/game/Objects/SpellCaster.cpp index 191d8770a26..f0c19f7d1c6 100644 --- a/src/game/Objects/SpellCaster.cpp +++ b/src/game/Objects/SpellCaster.cpp @@ -1678,7 +1678,7 @@ void SpellCaster::SetCurrentCastedSpell(Spell* pSpell) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); if (Unit* pUnit = ToUnit()) - pUnit->m_AutoRepeatFirstCast = true; + pUnit->m_autoRepeatFirstCast = true; } } break; @@ -1707,7 +1707,7 @@ void SpellCaster::SetCurrentCastedSpell(Spell* pSpell) } // special action: set first cast flag if (Unit* pUnit = ToUnit()) - pUnit->m_AutoRepeatFirstCast = true; + pUnit->m_autoRepeatFirstCast = true; } break; diff --git a/src/game/Objects/TemporarySummon.h b/src/game/Objects/TemporarySummon.h index 9bd14e62d12..42f1274d193 100644 --- a/src/game/Objects/TemporarySummon.h +++ b/src/game/Objects/TemporarySummon.h @@ -35,7 +35,7 @@ class TemporarySummon : public Creature void Summon(TempSummonType type, uint32 lifetime, CreatureAiSetter pFuncAiSetter = nullptr); void UnSummon(uint32 delayDespawnTime = 0); void CleanupsBeforeDelete() override; - void SaveToDB(); + void SaveToDB() override; ObjectGuid const& GetSummonerGuid() const { return m_summoner ; } Unit* GetSummoner() const { return ObjectAccessor::GetUnit(*this, m_summoner); } TempSummonType GetDespawnType() const { return m_type; } diff --git a/src/game/Objects/Unit.cpp b/src/game/Objects/Unit.cpp index 2c1ae1d0e4c..0a6469bb99a 100644 --- a/src/game/Objects/Unit.cpp +++ b/src/game/Objects/Unit.cpp @@ -74,9 +74,9 @@ float baseMoveSpeed[MAX_MOVE_TYPE] = // Methods of class Unit Unit::Unit() - : SpellCaster(), i_motionMaster(this), m_ThreatManager(this), m_HostileRefManager(this), + : SpellCaster(), m_motionMaster(this), m_threatManager(this), m_hostileRefManager(this), movespline(new Movement::MoveSpline()), m_needUpdateVisibility(false), - m_AutoRepeatFirstCast(true), m_regenTimer(0), m_lastDamageTaken(0), + m_autoRepeatFirstCast(true), m_regenTimer(0), m_lastDamageTaken(0), m_meleeZLimit(UNIT_DEFAULT_MELEE_Z_LIMIT), m_meleeZReach(UNIT_DEFAULT_MELEE_Z_LIMIT), m_lastSanctuaryTime(0) { m_objectType |= TYPEMASK_UNIT; @@ -101,13 +101,9 @@ Unit::Unit() m_stateFlags = 0; m_deathState = ALIVE; m_invincibilityHpThreshold = 0; - - //m_Aura = nullptr; - //m_AurasCheck = 2000; - //m_removeAuraTimer = 4; m_spellAuraHoldersUpdateIterator = m_spellAuraHolders.end(); - m_Visibility = VISIBILITY_ON; + m_visibility = VISIBILITY_ON; m_AINotifyScheduled = false; m_detectInvisibilityMask = 0; @@ -141,12 +137,14 @@ Unit::Unit() for (float & stat : m_createStats) stat = 0.0f; - for (auto& m_createResistance : m_createResistances) - m_createResistance = 0; + for (auto& resistance : m_createResistances) + resistance = 0; m_attacking = nullptr; m_modSpellHitChance = 0.0f; - m_baseSpellCritChance = 5; + + for (float & crit : m_modSpellCritChance) + crit = 0.0f; m_combatTimer = 0; m_lastManaUseTimer = 0; @@ -156,7 +154,7 @@ Unit::Unit() for (float & threatMod : m_threatModifier) threatMod = 1.0f; - for (float & speed : m_speed_rate) + for (float & speed : m_speedRates) speed = 1.0f; m_charmInfo = nullptr; @@ -168,7 +166,7 @@ Unit::Unit() m_reactiveTarget[i].Clear(); } // Phasing - worldMask = WORLD_DEFAULT_UNIT; + m_worldMask = WORLD_DEFAULT_UNIT; m_casterChaseDistance = 0.0f; @@ -263,7 +261,7 @@ void Unit::Update(uint32 update_diff, uint32 p_time) Pet* myPet = GetPet(); if (HasUnitState(UNIT_STAT_FEIGN_DEATH) || !myPet || myPet->GetHostileRefManager().isEmpty()) { - if (m_HostileRefManager.isEmpty()) + if (m_hostileRefManager.isEmpty()) { if (!IsCharmerOrOwnerPlayerOrPlayerItself() && static_cast(this)->HasExtraFlag(CREATURE_FLAG_EXTRA_NO_THREAT_LIST)) OnLeaveCombat(); @@ -327,14 +325,14 @@ void Unit::Update(uint32 update_diff, uint32 p_time) GetMotionMaster()->UpdateMotionAsync(p_time); } WorldObject::Update(update_diff, p_time); - if (_delayedActions & OBJECT_DELAYED_ADD_TO_RELOCATED_LIST) + if (m_delayedActions & OBJECT_DELAYED_ADD_TO_RELOCATED_LIST) { if (IsInWorld() && !m_needUpdateVisibility) { m_needUpdateVisibility = true; GetMap()->AddRelocatedUnit(this); } - _delayedActions &= ~OBJECT_DELAYED_ADD_TO_RELOCATED_LIST; + m_delayedActions &= ~OBJECT_DELAYED_ADD_TO_RELOCATED_LIST; } m_lastDamageTaken += p_time; @@ -421,8 +419,8 @@ bool Unit::UpdateMeleeAttackingState() if (HaveOffhandWeapon() && IsAttackReady(OFF_ATTACK)) { // prevent base and off attack in same time, delay attack at 0.2 sec - uint32 base_att = GetAttackTimer(BASE_ATTACK); - if (base_att < ATTACK_DISPLAY_DELAY) + uint32 baseAttack = GetAttackTimer(BASE_ATTACK); + if (baseAttack < ATTACK_DISPLAY_DELAY) SetAttackTimer(BASE_ATTACK, ATTACK_DISPLAY_DELAY); // do attack AttackerStateUpdate(pVictim, OFF_ATTACK); @@ -725,11 +723,11 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa uint32 health = pVictim->GetHealth(); // duel ends when player has 1 or less hp bool duel_hasEnded = false; - if (pVictim->IsPlayer() && ((Player*)pVictim)->duel && damage >= (health - 1)) + if (pVictim->IsPlayer() && ((Player*)pVictim)->m_duel && damage >= (health - 1)) { // prevent kill only if killed in duel and killed by opponent or opponent controlled creature - if (((Player*)pVictim)->duel->opponent == this || - ((Player*)pVictim)->duel->opponent->GetObjectGuid() == GetOwnerGuid() + if (((Player*)pVictim)->m_duel->opponent == this || + ((Player*)pVictim)->m_duel->opponent->GetObjectGuid() == GetOwnerGuid() // World of Warcraft Client Patch 1.7.0 (2005-09-13) // - Fixed bug where you could kill someone in a duel with spell reflection. #if SUPPORTED_CLIENT_BUILD > CLIENT_BUILD_1_6_1 @@ -796,9 +794,9 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa MANGOS_ASSERT(pVictim->IsPlayer()); Player* he = (Player*)pVictim; - MANGOS_ASSERT(he->duel); + MANGOS_ASSERT(he->m_duel); - he->duel->opponent->CombatStopWithPets(true); + he->m_duel->opponent->CombatStopWithPets(true); he->CombatStopWithPets(true); he->DuelComplete(DUEL_INTERRUPTED); @@ -920,11 +918,11 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa MANGOS_ASSERT(pVictim->IsPlayer()); Player* he = (Player*)pVictim; - MANGOS_ASSERT(he->duel); + MANGOS_ASSERT(he->m_duel); he->SetHealth(1); - he->duel->opponent->CombatStopWithPets(true); + he->m_duel->opponent->CombatStopWithPets(true); he->CombatStopWithPets(true); he->CastSpell(he, 7267, true); // beg @@ -1743,29 +1741,29 @@ void Unit::TriggerDamageShields(Unit* pVictim) } } -void Unit::HandleEmoteCommand(uint32 emote_id) +void Unit::HandleEmoteCommand(uint32 emoteId) { WorldPacket data(SMSG_EMOTE, 4 + 8); - data << uint32(emote_id); + data << uint32(emoteId); data << GetObjectGuid(); SendObjectMessageToSet(&data, true); } -void Unit::HandleEmoteState(uint32 emote_id) +void Unit::HandleEmoteState(uint32 emoteId) { - SetUInt32Value(UNIT_NPC_EMOTESTATE, emote_id); + SetUInt32Value(UNIT_NPC_EMOTESTATE, emoteId); } -void Unit::HandleEmote(uint32 emote_id) +void Unit::HandleEmote(uint32 emoteId) { - if (!emote_id) + if (!emoteId) HandleEmoteState(0); - else if (EmotesEntry const* emoteEntry = sEmotesStore.LookupEntry(emote_id)) + else if (EmotesEntry const* emoteEntry = sEmotesStore.LookupEntry(emoteId)) { if (emoteEntry->EmoteType) // 1,2 states, 0 command - HandleEmoteState(emote_id); + HandleEmoteState(emoteId); else - HandleEmoteCommand(emote_id); + HandleEmoteCommand(emoteId); } } @@ -2185,23 +2183,23 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* pVictim, WeaponAttackT // This is only wrapper // Miss chance based on melee - float const miss_chance = MeleeMissChanceCalc(pVictim, attType); + float const missChance = MeleeMissChanceCalc(pVictim, attType); // Critical hit chance - float const crit_chance = GetUnitCriticalChance(attType, pVictim); + float const critChance = GetUnitCriticalChance(attType, pVictim); // stunned target cannot dodge and this is check in GetUnitDodgeChance() (returned 0 in this case) - float const dodge_chance = pVictim->GetUnitDodgeChance(); - float const block_chance = pVictim->GetUnitBlockChance(); - float const parry_chance = pVictim->GetUnitParryChance(); + float const dodgeChance = pVictim->GetUnitDodgeChance(); + float const blockChance = pVictim->GetUnitBlockChance(); + float const parryChance = pVictim->GetUnitParryChance(); // Useful if want to specify crit & miss chances for melee, else it could be removed - //DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "MELEE OUTCOME: miss %f crit %f dodge %f parry %f block %f", miss_chance, crit_chance, dodge_chance, parry_chance, block_chance); + //DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "MELEE OUTCOME: miss %f crit %f dodge %f parry %f block %f", missChance, critChance, dodgeChance, parryChance, blockChance); - return RollMeleeOutcomeAgainst(pVictim, attType, int32(crit_chance * 100), int32(miss_chance * 100), int32(dodge_chance * 100), int32(parry_chance * 100), int32(block_chance * 100), false); + return RollMeleeOutcomeAgainst(pVictim, attType, int32(critChance * 100), int32(missChance * 100), int32(dodgeChance * 100), int32(parryChance * 100), int32(blockChance * 100), false); } -MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* pVictim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance, bool SpellCasted) const +MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* pVictim, WeaponAttackType attType, int32 critChance, int32 missChance, int32 dodgeChance, int32 parryChance, int32 blockChance, bool SpellCasted) const { if (IsPlayer() && ToPlayer()->HasCheatOption(PLAYER_CHEAT_ALWAYS_CRIT)) return MELEE_HIT_CRIT; @@ -2225,9 +2223,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* pVictim, WeaponAttackT int32 roll = urand(0, 9999); //DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: skill bonus of %d for attacker", skillBonus); - //DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: rolled %d, miss %d, dodge %d, parry %d, block %d, crit %d", roll, miss_chance, dodge_chance, parry_chance, block_chance, crit_chance); + //DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: rolled %d, miss %d, dodge %d, parry %d, block %d, crit %d", roll, missChance, dodgeChance, parryChance, blockChance, critChance); - tmp = miss_chance; + tmp = missChance; if (tmp > 0 && roll < (sum += tmp)) { @@ -2236,30 +2234,30 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* pVictim, WeaponAttackT } // always crit against a sitting target (except 0 crit chance) - if (pVictim->IsPlayer() && (crit_chance > 0 || IsCreature()) && !pVictim->IsStandingUp()) + if (pVictim->IsPlayer() && (critChance > 0 || IsCreature()) && !pVictim->IsStandingUp()) { DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: CRIT (sitting victim)"); return MELEE_HIT_CRIT; } - bool from_behind = !pVictim->HasInArc(this); + bool fromBehind = !pVictim->HasInArc(this); - if (from_behind) + if (fromBehind) DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: attack came from behind."); // Dodge chance // only players can't dodge if attacker is behind - if (!pVictim->IsPlayer() || !from_behind) + if (!pVictim->IsPlayer() || !fromBehind) { - dodge_chance -= dodgeSkillBonus; + dodgeChance -= dodgeSkillBonus; // Low level reduction if (!pVictim->IsPlayer() && pVictim->GetLevel() < 10) - dodge_chance *= pVictim->GetLevel() / 10.0f; + dodgeChance *= pVictim->GetLevel() / 10.0f; - if (dodge_chance > 0 && // check if unit _can_ dodge - (roll < (sum += dodge_chance))) + if (dodgeChance > 0 && // check if unit _can_ dodge + (roll < (sum += dodgeChance))) { DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: DODGE <%d, %d)", sum - tmp, sum); return MELEE_HIT_DODGE; @@ -2268,20 +2266,20 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* pVictim, WeaponAttackT // parry chances // check if attack comes from behind, nobody can parry or block if attacker is behind - if (!from_behind && (parry_chance > 0)) + if (!fromBehind && (parryChance > 0)) { if (pVictim->IsPlayer() || !((Creature*)pVictim)->HasExtraFlag(CREATURE_FLAG_EXTRA_NO_PARRY)) { - parry_chance -= parrySkillBonus; + parryChance -= parrySkillBonus; // Low level reduction if (!pVictim->IsPlayer() && pVictim->GetLevel() < 10) - parry_chance *= pVictim->GetLevel() / 10.0f; + parryChance *= pVictim->GetLevel() / 10.0f; - if (parry_chance > 0 && // check if unit _can_ parry - (roll < (sum += parry_chance))) + if (parryChance > 0 && // check if unit _can_ parry + (roll < (sum += parryChance))) { - DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum - parry_chance, sum); + DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum - parryChance, sum); return MELEE_HIT_PARRY; } } @@ -2317,26 +2315,26 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* pVictim, WeaponAttackT // block chances // check if attack comes from behind, nobody can parry or block if attacker is behind - if (!from_behind && (block_chance > 0)) + if (!fromBehind && (blockChance > 0)) { if ((pVictim->IsPlayer() || !((Creature*)pVictim)->HasExtraFlag(CREATURE_FLAG_EXTRA_NO_BLOCK)) && !(IsCreature() && GetMeleeDamageSchoolMask() != SPELL_SCHOOL_MASK_NORMAL)) // can't block elemental melee attacks from mobs { - block_chance -= blockSkillBonus; + blockChance -= blockSkillBonus; // mobs cannot block more than 5% of attacks regardless of rating difference - if (!pVictim->IsPlayer() && (block_chance > 500)) - block_chance = 500; + if (!pVictim->IsPlayer() && (blockChance > 500)) + blockChance = 500; // Low level reduction if (!pVictim->IsPlayer() && pVictim->GetLevel() < 10) - block_chance *= pVictim->GetLevel() / 10.0f; + blockChance *= pVictim->GetLevel() / 10.0f; - if (block_chance > 0 && // check if unit _can_ block - (roll < (sum += block_chance))) + if (blockChance > 0 && // check if unit _can_ block + (roll < (sum += blockChance))) { // Critical chance - tmp = crit_chance; + tmp = critChance; if (IsPlayer() && SpellCasted && tmp > 0) { if (roll_chance_i(tmp / 100)) @@ -2352,7 +2350,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* pVictim, WeaponAttackT } // Critical chance - tmp = crit_chance; + tmp = critChance; if (tmp > 0 && roll < (sum += tmp)) { @@ -2581,12 +2579,12 @@ float Unit::RollMagicResistanceMultiplierOutcomeAgainst(float resistanceChance, bool Unit::IsEffectResist(SpellEntry const* spell, int eff) const { // Chance resist mechanic - int32 effect_mech = spell->EffectMechanic[eff]; - if (effect_mech && effect_mech != spell->Mechanic) + int32 effectMechanic = spell->EffectMechanic[eff]; + if (effectMechanic && effectMechanic != spell->Mechanic) { int32 rand = urand(0, 99); - int32 resist_mech = GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_MECHANIC_RESISTANCE, effect_mech); - return (rand < resist_mech); + int32 mechanicResistance = GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_MECHANIC_RESISTANCE, effectMechanic); + return (rand < mechanicResistance); } return false; } @@ -2800,6 +2798,80 @@ float Unit::GetUnitCriticalChance(WeaponAttackType attackType, Unit const* pVict return crit; } +float Unit::GetSpellCritFromIntellect() const +{ + // Chance to crit is computed from INT and LEVEL as follows: + // chance = base + INT / (rate0 + rate1 * LEVEL) + // The formula keeps the crit chance at %5 on every level unless the player + // increases his intelligence by other means (enchants, buffs, talents, ...) + + //[TZERO] from mangos 3462 for 1.12 MUST BE CHECKED + + static const struct + { + float base; + float rate0, rate1; + } + crit_data[MAX_CLASSES] = + { + { 0.0f, 0.0f, 10.0f }, // 0: unused + { 0.0f, 0.0f, 10.0f }, // 1: warrior + { 3.70f, 14.77f, 0.65f }, // 2: paladin + { 0.0f, 0.0f, 10.0f }, // 3: hunter + { 0.0f, 0.0f, 10.0f }, // 4: rogue + { 2.97f, 10.03f, 0.82f }, // 5: priest + { 0.0f, 0.0f, 10.0f }, // 6: unused + { 3.54f, 11.51f, 0.80f }, // 7: shaman + { 3.70f, 14.77f, 0.65f }, // 8: mage + { 3.18f, 11.30f, 0.82f }, // 9: warlock + { 0.0f, 0.0f, 10.0f }, // 10: unused + { 3.33f, 12.41f, 0.79f } // 11: druid + }; + float critChance; + + // only players use intelligence for critical chance computations + if (GetTypeId() == TYPEID_PLAYER) + { + int my_class = GetClass(); + float crit_ratio = crit_data[my_class].rate0 + crit_data[my_class].rate1 * GetLevel(); + critChance = crit_data[my_class].base + GetStat(STAT_INTELLECT) / crit_ratio; + } + else + critChance = 5.0f; + + critChance = critChance > 0.0 ? critChance : 0.0; + + return critChance; +} + +void Unit::UpdateSpellCritChance(uint32 school) +{ + // For normal school set zero crit chance + if (school == SPELL_SCHOOL_NORMAL) + { + m_modSpellCritChance[1] = 0.0f; + return; + } + // For others recalculate it from: + float crit = 0.0f; + // Crit from Intellect + crit += GetSpellCritFromIntellect(); + // Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE + crit += GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE); + // Increase crit by school from SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL + crit += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, 1 << school); + + // Store crit value + m_modSpellCritChance[school] = crit; +} + +void Unit::UpdateAllSpellCritChances() +{ + for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) + UpdateSpellCritChance(i); +} + + void Unit::_UpdateSpells(uint32 time) { if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL]) @@ -2871,14 +2943,14 @@ void Unit::_UpdateAutoRepeatSpell() if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Category == 351) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); // set 0.5 second wind-up time. - m_AutoRepeatFirstCast = true; + m_autoRepeatFirstCast = true; return; } // apply delay - if (m_AutoRepeatFirstCast && GetAttackTimer(RANGED_ATTACK) < 500) + if (m_autoRepeatFirstCast && GetAttackTimer(RANGED_ATTACK) < 500) SetAttackTimer(RANGED_ATTACK, 500); - m_AutoRepeatFirstCast = false; + m_autoRepeatFirstCast = false; // castroutine if (IsAttackReady(RANGED_ATTACK)) @@ -4766,7 +4838,7 @@ void Unit::CombatStop(bool includingCast) pCreature->UpdateCombatState(false); pCreature->UpdateCombatWithZoneState(false); pCreature->ClearLastLeashExtensionTimePtr(); - pCreature->m_TargetNotReachableTimer = 0; + pCreature->m_targetNotReachableTimer = 0; if (pCreature->GetTemporaryFactionFlags() & TEMPFACTION_RESTORE_COMBAT_STOP) pCreature->ClearTemporaryFaction(); } @@ -5178,16 +5250,16 @@ Unit* Unit::_GetTotem(TotemSlot slot) const Totem* Unit::GetTotem(TotemSlot slot) const { - if (slot >= MAX_TOTEM_SLOT || !IsInWorld() || !m_TotemSlot[slot]) + if (slot >= MAX_TOTEM_SLOT || !IsInWorld() || !m_totemSlot[slot]) return nullptr; - Creature* totem = GetMap()->GetCreature(m_TotemSlot[slot]); + Creature* totem = GetMap()->GetCreature(m_totemSlot[slot]); return totem && totem->IsTotem() ? (Totem*)totem : nullptr; } bool Unit::IsAllTotemSlotsUsed() const { - for (const auto& guid : m_TotemSlot) + for (const auto& guid : m_totemSlot) if (!guid) return false; return true; @@ -5195,13 +5267,13 @@ bool Unit::IsAllTotemSlotsUsed() const void Unit::_AddTotem(TotemSlot slot, Totem* totem) { - m_TotemSlot[slot] = totem->GetObjectGuid(); + m_totemSlot[slot] = totem->GetObjectGuid(); totem->SetWorldMask(GetWorldMask()); } void Unit::_RemoveTotem(Totem* totem) { - for (auto& guid : m_TotemSlot) + for (auto& guid : m_totemSlot) { if (guid == totem->GetObjectGuid()) { @@ -5329,11 +5401,11 @@ bool Unit::IsSpellCrit(Unit const* pVictim, SpellEntry const* spellProto, SpellS if ((spellProto->AttributesEx2 & SPELL_ATTR_EX2_CANT_CRIT)) return false; - float crit_chance = 0.0f; + float critChance = 0.0f; // Potions/healthstones can crit with a constant percentage chance if (spellProto->SpellFamilyName == SPELLFAMILY_POTION || (spellProto->IsFitToFamily())) - crit_chance = 10.0f; + critChance = 10.0f; else { // Wand shoot forced to use ranged crit @@ -5349,20 +5421,16 @@ bool Unit::IsSpellCrit(Unit const* pVictim, SpellEntry const* spellProto, SpellS case SPELL_DAMAGE_CLASS_MAGIC: { if (schoolMask & SPELL_SCHOOL_MASK_NORMAL) - crit_chance = 0.0f; + critChance = 0.0f; // For other schools - else if (IsPlayer()) - crit_chance = ((Player*)this)->GetSpellCritPercent(GetFirstSchoolInMask(schoolMask)); else - { - crit_chance = float(m_baseSpellCritChance); - crit_chance += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, schoolMask); - } + critChance = GetSpellCritPercent(GetFirstSchoolInMask(schoolMask)); + // taken if (!spellProto->IsPositiveSpell()) { // Modify critical chance by victim SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE - crit_chance += pVictim->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE, schoolMask); + critChance += pVictim->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE, schoolMask); } // scripted (increase crit chance ... against ... target by x% @@ -5381,19 +5449,19 @@ bool Unit::IsSpellCrit(Unit const* pVictim, SpellEntry const* spellProto, SpellS { // Shatter case 849: - if (pVictim->IsFrozen()) crit_chance += 10.0f; + if (pVictim->IsFrozen()) critChance += 10.0f; break; case 910: - if (pVictim->IsFrozen()) crit_chance += 20.0f; + if (pVictim->IsFrozen()) critChance += 20.0f; break; case 911: - if (pVictim->IsFrozen()) crit_chance += 30.0f; + if (pVictim->IsFrozen()) critChance += 30.0f; break; case 912: - if (pVictim->IsFrozen()) crit_chance += 40.0f; + if (pVictim->IsFrozen()) critChance += 40.0f; break; case 913: - if (pVictim->IsFrozen()) crit_chance += 50.0f; + if (pVictim->IsFrozen()) critChance += 50.0f; break; default: break; @@ -5406,8 +5474,8 @@ bool Unit::IsSpellCrit(Unit const* pVictim, SpellEntry const* spellProto, SpellS { if (pVictim->IsPlayer() && !pVictim->IsStandingUp()) return true; - crit_chance = GetUnitCriticalChance(attackType, pVictim); - crit_chance += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, schoolMask); + critChance = GetUnitCriticalChance(attackType, pVictim); + critChance += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, schoolMask); break; } default: @@ -5417,11 +5485,11 @@ bool Unit::IsSpellCrit(Unit const* pVictim, SpellEntry const* spellProto, SpellS // percent done // only players use intelligence for critical chance computations if (Player* modOwner = GetSpellModOwner()) - modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CRITICAL_CHANCE, crit_chance, spell); + modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CRITICAL_CHANCE, critChance, spell); - crit_chance = crit_chance > 0.0f ? crit_chance : 0.0f; + critChance = critChance > 0.0f ? critChance : 0.0f; - return roll_chance_f(crit_chance); + return roll_chance_f(critChance); } /** @@ -6427,14 +6495,12 @@ bool Unit::IsVisibleForOrDetect(WorldObject const* pDetector, WorldObject const* if (pDetector == this) return true; - bool at_same_transport = GetTransport() && GetTransport() == pDetector->GetTransport(); - // not in world - if (!at_same_transport && (!IsInWorld() || !pDetector->IsInWorld())) + if (!(GetTransport() && GetTransport() == pDetector->GetTransport()) && (!IsInWorld() || !pDetector->IsInWorld())) return false; // forbidden to seen (at GM respawn command) - if (m_Visibility == VISIBILITY_RESPAWN) + if (m_visibility == VISIBILITY_RESPAWN) return false; Unit const* pDetectorUnit = pDetector->ToUnit(); @@ -6481,7 +6547,7 @@ bool Unit::IsVisibleForOrDetect(WorldObject const* pDetector, WorldObject const* } // Visible units are always visible for all units - if (m_Visibility == VISIBILITY_ON) + if (m_visibility == VISIBILITY_ON) return true; // GMs see any players, not higher GMs and all units @@ -6493,7 +6559,7 @@ bool Unit::IsVisibleForOrDetect(WorldObject const* pDetector, WorldObject const* } // non faction visibility non-breakable for non-GMs - if (m_Visibility == VISIBILITY_OFF) + if (m_visibility == VISIBILITY_OFF) return false; // Hunter's Mark makes target always visible to caster. @@ -6514,7 +6580,7 @@ bool Unit::IsVisibleForOrDetect(WorldObject const* pDetector, WorldObject const* invisible = false; // special cases for always overwrite invisibility/stealth - if (invisible || m_Visibility == VISIBILITY_GROUP_STEALTH) + if (invisible || m_visibility == VISIBILITY_GROUP_STEALTH) { // non-hostile case if (!pDetector->IsHostileTo(this)) @@ -6537,11 +6603,11 @@ bool Unit::IsVisibleForOrDetect(WorldObject const* pDetector, WorldObject const* } // unit got in stealth in this moment and must ignore old detected state - if (m_Visibility == VISIBILITY_GROUP_NO_DETECT) + if (m_visibility == VISIBILITY_GROUP_NO_DETECT) return false; // GM invisibility checks early, invisibility if any detectable, so if not stealth then visible - if (m_Visibility != VISIBILITY_GROUP_STEALTH) + if (m_visibility != VISIBILITY_GROUP_STEALTH) return true; // NOW ONLY STEALTH CASE @@ -6595,7 +6661,7 @@ void Unit::UpdateVisibilityAndView() void Unit::SetVisibility(UnitVisibility x) { - m_Visibility = x; + m_visibility = x; if (IsInWorld()) UpdateVisibilityAndView(); @@ -7048,9 +7114,9 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio) } } - int32 main_speed_mod = 0; - float stack_bonus = 1.0f; - float non_stack_bonus = 1.0f; + int32 mainSpeedMod = 0; + float stackBonus = 1.0f; + float nonStackBonus = 1.0f; switch (mtype) { @@ -7060,23 +7126,23 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio) { if (IsMounted()) // Use on mount auras { - main_speed_mod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED); - stack_bonus = GetTotalAuraMultiplier(SPELL_AURA_MOD_MOUNTED_SPEED_ALWAYS); - non_stack_bonus = (100.0f + GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK)) / 100.0f; + mainSpeedMod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED); + stackBonus = GetTotalAuraMultiplier(SPELL_AURA_MOD_MOUNTED_SPEED_ALWAYS); + nonStackBonus = (100.0f + GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK)) / 100.0f; } else { - main_speed_mod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_SPEED); - stack_bonus = GetTotalAuraMultiplier(SPELL_AURA_MOD_SPEED_ALWAYS); - non_stack_bonus = (100.0f + GetMaxPositiveAuraModifier(SPELL_AURA_MOD_SPEED_NOT_STACK)) / 100.0f; + mainSpeedMod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_SPEED); + stackBonus = GetTotalAuraMultiplier(SPELL_AURA_MOD_SPEED_ALWAYS); + nonStackBonus = (100.0f + GetMaxPositiveAuraModifier(SPELL_AURA_MOD_SPEED_NOT_STACK)) / 100.0f; } break; } case MOVE_RUN_BACK: - return; + break; case MOVE_SWIM: { - main_speed_mod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_SWIM_SPEED); + mainSpeedMod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_SWIM_SPEED); break; } case MOVE_SWIM_BACK: @@ -7086,9 +7152,9 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio) return; } - float bonus = non_stack_bonus > stack_bonus ? non_stack_bonus : stack_bonus; + float bonus = nonStackBonus > stackBonus ? nonStackBonus : stackBonus; // now we ready for speed calculation - float speed = main_speed_mod ? bonus * (100.0f + main_speed_mod) / 100.0f : bonus; + float speed = mainSpeedMod ? bonus * (100.0f + mainSpeedMod) / 100.0f : bonus; switch (mtype) { @@ -7117,10 +7183,19 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio) speed *= sWorld.getConfig(((Player*)this)->InBattleGround() ? CONFIG_FLOAT_GHOST_RUN_SPEED_BG : CONFIG_FLOAT_GHOST_RUN_SPEED_WORLD); } - // Apply strongest slow aura mod to speed - int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED); - if (slow) - speed *= (100.0f + slow) / 100.0f; + switch (mtype) + { + case MOVE_RUN: + case MOVE_RUN_BACK: + case MOVE_SWIM: + { + // Apply strongest slow aura mod to speed + int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED); + if (slow) + speed *= (100.0f + slow) / 100.0f; + break; + } + } if (IsCreature()) { @@ -7145,7 +7220,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio) speed *= DEFAULT_NPC_RUN_SPEED_RATE; // normalized player pet runspeed // Speed reduction at low health percentages - if (!pCreature->IsPet() && !pCreature->IsWorldBoss() && !pCreature->HasStaticFlag(CREATURE_STATIC_FLAG_2_NO_WOUNDED_SLOWDOWN)) + if (mtype == MOVE_RUN && !pCreature->IsPet() && !pCreature->IsWorldBoss() && !pCreature->HasStaticFlag(CREATURE_STATIC_FLAG_2_NO_WOUNDED_SLOWDOWN)) { if (HasAuraState(AURA_STATE_HEALTHLESS_5_PERCENT)) speed *= SPEED_REDUCTION_HP_5; @@ -7164,7 +7239,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio) float Unit::GetSpeed(UnitMoveType mtype) const { - return m_speed_rate[mtype] * baseMoveSpeed[mtype]; + return m_speedRates[mtype] * baseMoveSpeed[mtype]; } float Unit::GetXZFlagBasedSpeed() const @@ -7219,7 +7294,7 @@ void Unit::SetSpeedRate(UnitMoveType mtype, float rate) // Update speed only on change MovementChangeType changeType = MovementPacketSender::GetChangeTypeByMoveType(mtype); - if (m_speed_rate[mtype] == rate && !HasPendingMovementChange(changeType)) + if (m_speedRates[mtype] == rate && !HasPendingMovementChange(changeType)) return; if (IsMovedByPlayer() && IsInWorld()) @@ -7242,7 +7317,7 @@ void Unit::SetSpeedRate(UnitMoveType mtype, float rate) void Unit::SetSpeedRateReal(UnitMoveType mtype, float rate) { - m_speed_rate[mtype] = rate; + m_speedRates[mtype] = rate; PropagateSpeedChange(); CallForAllControlledUnits(SetSpeedRateHelper(mtype, true), CONTROLLED_PET | CONTROLLED_GUARDIANS | CONTROLLED_CHARM | CONTROLLED_MINIPET); } @@ -7396,8 +7471,8 @@ void Unit::SetDeathState(DeathState s) RemoveAllAurasOnDeath(); UnsummonAllTotems(); - i_motionMaster.Clear(false, true); - i_motionMaster.MoveIdle(); + m_motionMaster.Clear(false, true); + m_motionMaster.MoveIdle(); if (IsPlayer()) SetRooted(true); @@ -7481,14 +7556,14 @@ void Unit::AddThreat(Unit* pVictim, float threat /*= 0.0f*/, bool crit /*= false // Only mobs can manage threat lists if (CanHaveThreatList() && IsInMap(pVictim)) - m_ThreatManager.addThreat(pVictim, threat, crit, schoolMask, threatSpell, false); + m_threatManager.addThreat(pVictim, threat, crit, schoolMask, threatSpell, false); } //====================================================================== void Unit::DeleteThreatList() { - m_ThreatManager.clearReferences(); + m_threatManager.clearReferences(); } //====================================================================== @@ -7518,7 +7593,7 @@ void Unit::TauntApply(Unit* taunter) ((Creature*)this)->AI()->AttackStart(taunter); } - m_ThreatManager.tauntApply(taunter); + m_threatManager.tauntApply(taunter); } //====================================================================== @@ -7538,7 +7613,7 @@ void Unit::TauntFadeOut(Unit* taunter) if (!target || target != taunter) return; - if (m_ThreatManager.isThreatListEmpty()) + if (m_threatManager.isThreatListEmpty()) { // Nostalrius - pas d'evade quand on charm quelque chose. if (!GetCharmGuid()) @@ -7550,8 +7625,8 @@ void Unit::TauntFadeOut(Unit* taunter) return; } - m_ThreatManager.tauntFadeOut(taunter); - target = m_ThreatManager.getHostileTarget(); + m_threatManager.tauntFadeOut(taunter); + target = m_threatManager.getHostileTarget(); // Nostalrius : Correction bug sheep/fear if (target && target != taunter && !HasAuraType(SPELL_AURA_MOD_FEAR) && !HasAuraType(SPELL_AURA_MOD_CONFUSE)) @@ -7616,8 +7691,8 @@ bool Unit::SelectHostileTarget() Unit* target = GetTauntTarget(); // No taunt aura or taunt aura caster is dead, standard target selection - if (!target && !m_ThreatManager.isThreatListEmpty()) - target = m_ThreatManager.getHostileTarget(); + if (!target && !m_threatManager.isThreatListEmpty()) + target = m_threatManager.getHostileTarget(); // stick to current target if no threat list if (!target && ((Creature*)this)->HasExtraFlag(CREATURE_FLAG_EXTRA_NO_THREAT_LIST)) @@ -9982,10 +10057,7 @@ void Unit::KnockBackFrom(WorldObject const* target, float horizontalSpeed, float // set immune anticheat and calculate speed if (Player* plr = ToPlayer()) - { plr->SetLaunched(true); - plr->SetXYSpeed(horizontalSpeed); - } KnockBack(angle, horizontalSpeed, verticalSpeed); } @@ -10041,19 +10113,19 @@ bool Unit::CanAttackWithoutEnablingPvP(Unit const* pTarget) const struct StopAttackFactionHelper { - explicit StopAttackFactionHelper(uint32 _faction_id) : faction_id(_faction_id) {} + explicit StopAttackFactionHelper(uint32 factionId) : m_factionId(factionId) {} void operator()(Unit* unit) const { - unit->StopAttackFaction(faction_id); + unit->StopAttackFaction(m_factionId); } - uint32 faction_id; + uint32 m_factionId; }; -void Unit::StopAttackFaction(uint32 faction_id) +void Unit::StopAttackFaction(uint32 factionId) { if (Unit* pVictim = GetVictim()) { - if (pVictim->GetFactionId() == faction_id) + if (pVictim->GetFactionId() == factionId) { AttackStop(); if (IsNonMeleeSpellCasted(false)) @@ -10068,7 +10140,7 @@ void Unit::StopAttackFaction(uint32 faction_id) AttackerSet const& attackers = GetAttackers(); for (AttackerSet::const_iterator itr = attackers.begin(); itr != attackers.end();) { - if ((*itr)->GetFactionId() == faction_id) + if ((*itr)->GetFactionId() == factionId) { (*itr)->AttackStop(); itr = attackers.begin(); @@ -10077,9 +10149,9 @@ void Unit::StopAttackFaction(uint32 faction_id) ++itr; } - GetHostileRefManager().deleteReferencesForFaction(faction_id); + GetHostileRefManager().deleteReferencesForFaction(factionId); - CallForAllControlledUnits(StopAttackFactionHelper(faction_id), CONTROLLED_PET | CONTROLLED_GUARDIANS | CONTROLLED_CHARM); + CallForAllControlledUnits(StopAttackFactionHelper(factionId), CONTROLLED_PET | CONTROLLED_GUARDIANS | CONTROLLED_CHARM); } void Unit::CleanupDeletedAuras() @@ -10205,15 +10277,15 @@ void Unit::HandleInterruptsOnMovement(bool positionChanged) void Unit::OnRelocated() { // switch to use G3D::Vector3 is good idea, maybe - float dx = m_last_notified_position.x - GetPositionX(); - float dy = m_last_notified_position.y - GetPositionY(); - float dz = m_last_notified_position.z - GetPositionZ(); + float dx = m_lastNotifiedPosition.x - GetPositionX(); + float dy = m_lastNotifiedPosition.y - GetPositionY(); + float dz = m_lastNotifiedPosition.z - GetPositionZ(); float distsq = dx * dx + dy * dy + dz * dz; if (distsq > World::GetRelocationLowerLimitSq()) { - m_last_notified_position.x = GetPositionX(); - m_last_notified_position.y = GetPositionY(); - m_last_notified_position.z = GetPositionZ(); + m_lastNotifiedPosition.x = GetPositionX(); + m_lastNotifiedPosition.y = GetPositionY(); + m_lastNotifiedPosition.z = GetPositionZ(); if (IsInWorld() && !m_needUpdateVisibility) AddDelayedAction(OBJECT_DELAYED_ADD_TO_RELOCATED_LIST); @@ -10320,15 +10392,15 @@ bool Unit::GetRandomAttackPoint(Unit const* attacker, float &x, float &y, float bool const canOnlySwim = attacker->CanSwim() && !attacker->CanWalk() && !attacker->CanFly(); bool const reachableBySwiming = attacker->CanSwimAtPosition(GetPosition()); - uint32 attacker_number = GetAttackers().size(); - if (attacker_number > 0) - --attacker_number; + uint32 attackerCount = GetAttackers().size(); + if (attackerCount > 0) + --attackerCount; // Don't compute a random position for a moving player or when swimming to player near shore if ((IsPlayer() && IsMoving()) || (canOnlySwim && !reachableBySwiming)) - attacker_number = 0; + attackerCount = 0; - angle += (attacker_number ? ((float(M_PI / 2) - float(M_PI) * rand_norm_f()) * attacker_number / sizeFactor) * 0.3f : 0); + angle += (attackerCount ? ((float(M_PI / 2) - float(M_PI) * rand_norm_f()) * attackerCount / sizeFactor) * 0.3f : 0); float dist = GetCombatReachToTarget(attacker, false, 0.0f, true) - 0.5f; float initialPosX, initialPosY, initialPosZ, o; @@ -10827,25 +10899,25 @@ bool Unit::IsInRaidWith(Unit const* unit) const class ThreatTransferDo { public: - ThreatTransferDo(Unit* from, Unit* to) : _from(from), _to(to) {} + ThreatTransferDo(Unit* from, Unit* to) : m_from(from), m_to(to) {} void operator()(Unit* unit) { - if (unit == _from || unit == _to) + if (unit == m_from || unit == m_to) return; - if (!unit->IsValidAttackTarget(_to)) + if (!unit->IsValidAttackTarget(m_to)) return; - if (unit->GetThreatManager().getThreat(_from) > 0.1f) - unit->AddThreat(_to, unit->GetThreatManager().getThreat(_from)); - else if (unit->GetVictim() == _from && unit->AI()) // Si on aggro sans faire de degat - unit->AI()->AttackStart(_to); + if (unit->GetThreatManager().getThreat(m_from) > 0.1f) + unit->AddThreat(m_to, unit->GetThreatManager().getThreat(m_from)); + else if (unit->GetVictim() == m_from && unit->AI()) // Si on aggro sans faire de degat + unit->AI()->AttackStart(m_to); else return; - unit->GetThreatManager().modifyThreatPercent(_from, -100); + unit->GetThreatManager().modifyThreatPercent(m_from, -100); } protected: - Unit* _from; - Unit* _to; + Unit* m_from; + Unit* m_to; }; void Unit::RemoveAttackersThreat(Unit* owner) diff --git a/src/game/Objects/Unit.h b/src/game/Objects/Unit.h index 6cbd78cd3cd..115182ec308 100644 --- a/src/game/Objects/Unit.h +++ b/src/game/Objects/Unit.h @@ -363,7 +363,7 @@ class Unit : public SpellCaster typedef std::set ComboPointHolderSet; typedef std::map SingleCastSpellTargetMap; - virtual ~Unit () override; + virtual ~Unit() override; void AddToWorld() override; void RemoveFromWorld() override; @@ -402,7 +402,7 @@ class Unit : public SpellCaster public: // Data float m_modSpellHitChance; - int32 m_baseSpellCritChance; + float m_modSpellCritChance[MAX_SPELL_SCHOOL]; float m_threatModifier[MAX_SPELL_SCHOOL]; float m_modAttackSpeedPct[3]; float m_modRecalcDamagePct[3]; @@ -465,6 +465,11 @@ class Unit : public SpellCaster float GetUnitParryChance() const; float GetUnitBlockChance() const; float GetUnitCriticalChance(WeaponAttackType attackType, Unit const* pVictim) const; + float GetSpellCritFromIntellect() const; + float GetSpellCritPercent(SpellSchools school) const { return m_modSpellCritChance[school]; } + void SetSpellCritPercent(SpellSchools school, float percent) { m_modSpellCritChance[school] = percent; } + void UpdateAllSpellCritChances(); + void UpdateSpellCritChance(uint32 school); virtual uint32 GetShieldBlockValue() const = 0; float GetPPMProcChance(uint32 WeaponSpeed, float PPM) const; @@ -627,13 +632,13 @@ class Unit : public SpellCaster /*********************************************************/ private: - UnitVisibility m_Visibility; - Position m_last_notified_position; + UnitVisibility m_visibility; + Position m_lastNotifiedPosition; public: uint32 m_detectInvisibilityMask; uint32 m_invisibilityMask; virtual bool CanBeDetected() const { return true; } - UnitVisibility GetVisibility() const { return m_Visibility; } + UnitVisibility GetVisibility() const { return m_visibility; } void SetVisibility(UnitVisibility x); void UpdateVisibilityAndView() override; @@ -792,7 +797,7 @@ class Unit : public SpellCaster ObjectGuid m_ObjectSlotGuid[4]; uint32 m_lastSanctuaryTime; // Used by SPELL_EFFECT_SANCTUARY. - bool m_AutoRepeatFirstCast; // auto shoot and wand + bool m_autoRepeatFirstCast; // auto shoot and wand SingleCastSpellTargetMap & GetSingleCastSpellTargets() { return m_singleCastSpellTargets; } SingleCastSpellTargetMap const& GetSingleCastSpellTargets() const { return m_singleCastSpellTargets; } @@ -933,8 +938,8 @@ class Unit : public SpellCaster bool m_doExtraAttacks; float m_meleeZLimit; float m_meleeZReach; - ThreatManager m_ThreatManager; // Manage all Units threatening us - HostileRefManager m_HostileRefManager; // Manage all Units that are threatened by us (has list of creatures that have us in their threat list) + ThreatManager m_threatManager; // Manage all Units threatening us + HostileRefManager m_hostileRefManager; // Manage all Units that are threatened by us (has list of creatures that have us in their threat list) std::vector m_tauntGuids; protected: uint32 m_attackTimer[MAX_ATTACK]; @@ -1131,13 +1136,13 @@ class Unit : public SpellCaster void RemoveAttackersThreat(Unit* owner); void DoResetThreat(); void DeleteThreatList(); - ThreatManager& GetThreatManager() { return m_ThreatManager; } - ThreatManager const& GetThreatManager() const { return m_ThreatManager; } + ThreatManager& GetThreatManager() { return m_threatManager; } + ThreatManager const& GetThreatManager() const { return m_threatManager; } - void AddHatedBy(HostileReference* pHostileReference) { m_HostileRefManager.insertFirst(pHostileReference); }; + void AddHatedBy(HostileReference* pHostileReference) { m_hostileRefManager.insertFirst(pHostileReference); }; void RemoveHatedBy(HostileReference* /*pHostileReference*/) { /* nothing to do yet */ } - HostileRefManager& GetHostileRefManager() { return m_HostileRefManager; } - HostileRefManager const& GetHostileRefManager() const { return m_HostileRefManager; } + HostileRefManager& GetHostileRefManager() { return m_hostileRefManager; } + HostileRefManager const& GetHostileRefManager() const { return m_hostileRefManager; } // Script Helpers uint8 GetEnemyCountInRadiusAround(Unit const* pTarget, float radius) const; @@ -1189,9 +1194,9 @@ class Unit : public SpellCaster private: Unit* _GetTotem(TotemSlot slot) const; // for templated function without include need Pet* _GetPet(ObjectGuid guid) const; // for templated function without include need - FollowerRefManager m_FollowingRefManager; + FollowerRefManager m_followingRefManager; GuardianPetList m_guardianPets; - ObjectGuid m_TotemSlot[MAX_TOTEM_SLOT]; + ObjectGuid m_totemSlot[MAX_TOTEM_SLOT]; protected: CharmInfo* m_charmInfo; ObjectGuid m_possessorGuid; // Guid of unit possessing this one @@ -1255,7 +1260,7 @@ class Unit : public SpellCaster uint32 GetGuardianCountWithEntry(uint32 entry); uint32 GetGuardiansCount() const; - ObjectGuid const& GetTotemGuid(TotemSlot slot) const { return m_TotemSlot[slot]; } + ObjectGuid const& GetTotemGuid(TotemSlot slot) const { return m_totemSlot[slot]; } Totem* GetTotem(TotemSlot slot) const; bool IsAllTotemSlotsUsed() const; void _AddTotem(TotemSlot slot, Totem* totem); // only for call from Totem summon code @@ -1310,7 +1315,7 @@ class Unit : public SpellCaster template bool CheckAllControlledUnits(Func const& func, uint32 controlledMask) const; - void AddFollower(FollowerReference* pRef) { m_FollowingRefManager.insertFirst(pRef); } + void AddFollower(FollowerReference* pRef) { m_followingRefManager.insertFirst(pRef); } void RemoveFollower(FollowerReference* /*pRef*/) { /* nothing to do yet */ } /*********************************************************/ @@ -1324,11 +1329,11 @@ class Unit : public SpellCaster std::map m_lastMovementChangeCounterPerType; bool m_hasPendingSplineDone = false; float m_casterChaseDistance; - float m_speed_rate[MAX_MOVE_TYPE]; + float m_speedRates[MAX_MOVE_TYPE]; float m_jumpInitialSpeed = 0; void UpdateSplineMovement(uint32 t_diff); protected: - MotionMaster i_motionMaster; + MotionMaster m_motionMaster; public: void SendHeartBeat(bool includingSelf = true); void SendMovementPacket(uint16 opcode, bool includingSelf = true); @@ -1352,7 +1357,6 @@ class Unit : public SpellCaster bool IsFallingSlow() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_SAFE_FALL); } void SetLevitate(bool apply); - bool IsLevitating() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_LEVITATING); } void KnockBackFrom(WorldObject const* target, float horizontalSpeed, float verticalSpeed); void KnockBack(float angle, float horizontalSpeed, float verticalSpeed); @@ -1390,7 +1394,7 @@ class Unit : public SpellCaster float GetSpeed(UnitMoveType mtype) const; float GetXZFlagBasedSpeed() const; float GetXZFlagBasedSpeed(uint32 moveFlags) const; - float GetSpeedRate(UnitMoveType mtype) const { return m_speed_rate[mtype]; } + float GetSpeedRate(UnitMoveType mtype) const { return m_speedRates[mtype]; } void PropagateSpeedChange() { GetMotionMaster()->PropagateSpeedChange(); } float GetSpeedForMovementInfo(MovementInfo const& movementInfo) const; bool ExtrapolateMovement(MovementInfo const& mi, uint32 diffMs, float &x, float &y, float &z, float &o) const; @@ -1419,8 +1423,8 @@ class Unit : public SpellCaster bool IsBehindTarget(Unit const* pTarget, bool strict = true) const; bool CantPathToVictim() const; - MotionMaster* GetMotionMaster() { return &i_motionMaster; } - MotionMaster const* GetMotionMaster() const { return &i_motionMaster; } + MotionMaster* GetMotionMaster() { return &m_motionMaster; } + MotionMaster const* GetMotionMaster() const { return &m_motionMaster; } void RestoreMovement(); template diff --git a/src/game/OutdoorPvP/OutdoorPvPEP.cpp b/src/game/OutdoorPvP/OutdoorPvPEP.cpp index edc3e268a21..59b299e1d93 100644 --- a/src/game/OutdoorPvP/OutdoorPvPEP.cpp +++ b/src/game/OutdoorPvP/OutdoorPvPEP.cpp @@ -1119,7 +1119,7 @@ class OutdoorPvP_eastern_plaguelands : public ZoneScript_Script { return 0; } - ZoneScript* GetZoneScript() const + ZoneScript* GetZoneScript() const override { return new OutdoorPvPEP(); } diff --git a/src/game/OutdoorPvP/OutdoorPvPSI.cpp b/src/game/OutdoorPvP/OutdoorPvPSI.cpp index 825fedcb31b..d14ea952d53 100644 --- a/src/game/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/game/OutdoorPvP/OutdoorPvPSI.cpp @@ -88,6 +88,51 @@ void OutdoorPvPSI::OnPlayerLeave(Player* plr) OutdoorPvP::OnPlayerLeave(plr); } +static std::vector const sAllianceDustBags = { 9496, 9497, 9498, 9499, 9500, 9501, 9502, 9503, 9504, 9507, 9508 }; +static std::vector const sHordeDustBags = { 13566, 13567, 13568, 13582, 13583, 13584, 13585, 13587, 13588, 13589, 13590, 13591 }; + +void OutdoorPvPSI::SpawnDustBags(uint32 resource, std::vector const& allBags, std::set& spawnedBags) +{ + uint32 neededBags = resource / 15; + if (neededBags > spawnedBags.size()) + { + for (auto const& dbGuid : allBags) + { + if (spawnedBags.find(dbGuid) == spawnedBags.end()) + { + if (GetMap()->LoadGameObjectSpawn(dbGuid)) + { + spawnedBags.insert(dbGuid); + if (spawnedBags.size() >= neededBags) + break; + } + } + } + } +} + +void OutdoorPvPSI::ResetResourceCount() +{ + m_Gathered_A = 0; + m_Gathered_H = 0; + + for (auto const& dbGuid : m_allianceDustBags) + { + ObjectGuid guid = ObjectGuid(HIGHGUID_GAMEOBJECT, SI_DUST_BAG, dbGuid); + if (GameObject* pGo = GetMap()->GetGameObject(guid)) + pGo->AddObjectToRemoveList(); + } + m_allianceDustBags.clear(); + + for (auto const& dbGuid : m_hordeDustBags) + { + ObjectGuid guid = ObjectGuid(HIGHGUID_GAMEOBJECT, SI_DUST_BAG, dbGuid); + if (GameObject* pGo = GetMap()->GetGameObject(guid)) + pGo->AddObjectToRemoveList(); + } + m_hordeDustBags.clear(); +} + bool OutdoorPvPSI::HandleAreaTrigger(Player* plr, uint32 trigger) { /** If the player doesn't have a silithyst */ @@ -109,12 +154,15 @@ bool OutdoorPvPSI::HandleAreaTrigger(Player* plr, uint32 trigger) TeamApplyBuff(TEAM_ALLIANCE, SI_CENARION_FAVOR); sWorld.SendZoneText(OutdoorPvPSIBuffZones[0], sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_SI_CAPTURE_A)); m_LastController = ALLIANCE; - m_Gathered_A = 0; - m_Gathered_H = 0; + ResetResourceCount(); sLog.Out(LOG_BG, LOG_LVL_DETAIL, "[Silithus] Under Alliance control"); //sGameEventMgr.SetSilithusPVPEventCompleted(true); //sGameEventMgr.UpdateSilithusPVP(); } + else + { + SpawnDustBags(m_Gathered_A, sAllianceDustBags, m_allianceDustBags); + } // complete quest plr->KilledMonsterCredit(SI_TURNIN_QUEST_CM_A, ObjectGuid()); } @@ -130,12 +178,15 @@ bool OutdoorPvPSI::HandleAreaTrigger(Player* plr, uint32 trigger) TeamApplyBuff(TEAM_HORDE, SI_CENARION_FAVOR); sWorld.SendZoneText(OutdoorPvPSIBuffZones[0], sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_SI_CAPTURE_H)); m_LastController = HORDE; - m_Gathered_A = 0; - m_Gathered_H = 0; + ResetResourceCount(); sLog.Out(LOG_BG, LOG_LVL_DETAIL, "[Silithus] Under Horde control"); //sGameEventMgr.SetSilithusPVPEventCompleted(true); //sGameEventMgr.UpdateSilithusPVP(); } + else + { + SpawnDustBags(m_Gathered_H, sHordeDustBags, m_hordeDustBags); + } // complete quest plr->KilledMonsterCredit(SI_TURNIN_QUEST_CM_H, ObjectGuid()); } diff --git a/src/game/OutdoorPvP/OutdoorPvPSI.h b/src/game/OutdoorPvP/OutdoorPvPSI.h index 4ead562c751..64c5ca0429b 100644 --- a/src/game/OutdoorPvP/OutdoorPvPSI.h +++ b/src/game/OutdoorPvP/OutdoorPvPSI.h @@ -46,6 +46,7 @@ uint32 const SI_TURNIN_QUEST_CM_A = 17090; uint32 const SI_TURNIN_QUEST_CM_H = 18199; uint32 const SI_SILITHYST_MOUND = 181597; uint32 const SI_SILITHYST_GEYSER = 181598; +uint32 const SI_DUST_BAG = 181962; class OutdoorPvPSI : public OutdoorPvP { @@ -70,12 +71,16 @@ class OutdoorPvPSI : public OutdoorPvP void UpdateWorldState(); - private: + void ResetResourceCount(); + + void SpawnDustBags(uint32 resource, std::vector const& allBags, std::set& spawnedBags); + private: + std::set m_allianceDustBags; + std::set m_hordeDustBags; uint32 m_Gathered_A; uint32 m_Gathered_H; uint32 m_MaxRessources; - uint32 m_LastController; }; diff --git a/src/game/PlayerBots/CombatBotBaseAI.cpp b/src/game/PlayerBots/CombatBotBaseAI.cpp index 61776b830df..d4cdb15a17a 100644 --- a/src/game/PlayerBots/CombatBotBaseAI.cpp +++ b/src/game/PlayerBots/CombatBotBaseAI.cpp @@ -3052,7 +3052,7 @@ bool CombatBotBaseAI::IsWearingShield(Player* pPlayer) const bool CombatBotBaseAI::IsInDuel() const { - return me->duel && me->duel->startTime != 0; + return me->m_duel && me->m_duel->startTime != 0; } CombatBotRoles CombatBotBaseAI::GetRole() const diff --git a/src/game/PlayerBots/PartyBotAI.cpp b/src/game/PlayerBots/PartyBotAI.cpp index c6b95734d85..b2306302ed1 100644 --- a/src/game/PlayerBots/PartyBotAI.cpp +++ b/src/game/PlayerBots/PartyBotAI.cpp @@ -365,8 +365,8 @@ Unit* PartyBotAI::SelectAttackTarget(Player* pLeader) const { if (IsInDuel()) { - if (me->duel->opponent && IsValidHostileTarget(me->duel->opponent)) - return me->duel->opponent; + if (me->m_duel->opponent && IsValidHostileTarget(me->m_duel->opponent)) + return me->m_duel->opponent; } else { diff --git a/src/game/Spells/Spell.cpp b/src/game/Spells/Spell.cpp index 33b1d0fd10e..bf12287dcc8 100644 --- a/src/game/Spells/Spell.cpp +++ b/src/game/Spells/Spell.cpp @@ -6870,7 +6870,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (target->GetTransport() != m_caster->GetTransport()) return SPELL_FAILED_NOT_ON_TRANSPORT; - if (target->duel) + if (target->m_duel) return SPELL_FAILED_TARGET_DUELING; break; @@ -8299,8 +8299,8 @@ bool Spell::CheckTarget(Unit* target, SpellEffectIndex eff) Player* casterOwner = m_casterUnit->GetCharmerOrOwnerPlayerOrPlayerItself(); Player* targetOwner = target->GetCharmerOrOwnerPlayerOrPlayerItself(); if (targetOwner && casterOwner && casterOwner != targetOwner && - targetOwner->duel && targetOwner->duel->startTime != 0 && - targetOwner->duel->opponent != casterOwner) + targetOwner->m_duel && targetOwner->m_duel->startTime != 0 && + targetOwner->m_duel->opponent != casterOwner) return false; } diff --git a/src/game/Spells/SpellAuras.cpp b/src/game/Spells/SpellAuras.cpp index edb157e4387..2f48e9d0255 100644 --- a/src/game/Spells/SpellAuras.cpp +++ b/src/game/Spells/SpellAuras.cpp @@ -610,7 +610,7 @@ void AreaAura::Update(uint32 diff) { Player* Target = itr->getSource(); if (Target && Target->IsAlive() && Target->GetSubGroup() == subgroup && - (!Target->duel || owner == Target) && caster->IsFriendlyTo(Target) && + (!Target->m_duel || owner == Target) && caster->IsFriendlyTo(Target) && (caster->IsPvP() || !Target->IsPvP())) // auras dont affect pvp flagged targets if caster is not flagged { if (caster->IsWithinDistInMap(Target, m_radius)) @@ -1558,7 +1558,7 @@ void Aura::TriggerSpell() for (auto const& it : pList) { Player* pPlayer = it.getSource(); - if (pPlayer->GetGUID() == casterGUID) continue; + if (pPlayer->GetGUID() == casterGUID.GetRawValue()) continue; if (!pPlayer) continue; if (pPlayer->IsDead()) continue; // 2d distance should be good enough @@ -1826,6 +1826,12 @@ void Aura::HandleAuraDummy(bool apply, bool Real) } return; } + case 20556: // Golemagg's Trust + { + m_isPeriodic = true; + m_modifier.periodictime = 1000; + return; + } case 22646: // Goblin Rocket Helmet { if (Unit* caster = GetCaster()) @@ -2062,8 +2068,18 @@ void Aura::HandleAuraDummy(bool apply, bool Real) case 23183: // Mark of Frost { if (m_removeMode == AURA_REMOVE_BY_DEATH) - target->CastSpell(target, 23182, true, nullptr, this); - return; + { + if (Unit* caster = GetCaster()) + { + // Azuregos + // TODO verify: Only cast Mark of Frost on targets nearby when engaged? + // if (caster->IsInCombat()) + // { + target->CastSpell(target, 23182, true, nullptr, this); + // } + } + } + return; } case 28169: // Mutating Injection { @@ -3477,8 +3493,8 @@ void Aura::HandleModCharm(bool apply, bool Real) pPlayer->GetSession()->DoLootRelease(lootGuid); pPlayer->SetControlledBy(caster); - if (pPlayer->i_AI && m_spellAuraHolder->GetId() == 28410) - pPlayer->i_AI->enablePositiveSpells = true; + if (pPlayer->m_AI && m_spellAuraHolder->GetId() == 28410) + pPlayer->m_AI->enablePositiveSpells = true; } target->UpdateControl(); @@ -4237,6 +4253,7 @@ void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real) Unit* target = GetTarget(); target->UpdateSpeed(MOVE_RUN, false); + target->UpdateSpeed(MOVE_RUN_BACK, false); target->UpdateSpeed(MOVE_SWIM, false); } @@ -5266,10 +5283,7 @@ void Aura::HandleModSpellCritChance(bool apply, bool Real) if (!Real) return; - if (GetTarget()->GetTypeId() == TYPEID_PLAYER) - ((Player*)GetTarget())->UpdateAllSpellCritChances(); - else - GetTarget()->m_baseSpellCritChance += apply ? m_modifier.m_amount : (-m_modifier.m_amount); + GetTarget()->UpdateAllSpellCritChances(); } void Aura::HandleModSpellCritChanceSchool(bool /*apply*/, bool Real) @@ -5278,12 +5292,9 @@ void Aura::HandleModSpellCritChanceSchool(bool /*apply*/, bool Real) if (!Real) return; - if (GetTarget()->GetTypeId() != TYPEID_PLAYER) - return; - for (int school = SPELL_SCHOOL_NORMAL; school < MAX_SPELL_SCHOOL; ++school) if (m_modifier.m_miscvalue & (1 << school)) - ((Player*)GetTarget())->UpdateSpellCritChance(school); + GetTarget()->UpdateSpellCritChance(school); } /********************************/ @@ -6795,6 +6806,29 @@ void Aura::PeriodicDummyTick() return; } + case 20556: // Golemagg's Trust + { + if (Unit* pCaster = GetCaster()) + { + if (pCaster->IsDead() && !pCaster->IsInCombat()) + { + return; + } + // Golemagg's Core Ragers will deal increased damage + // and have 50% increased attack speed if tanked too close to Golemagg. + std::list addList; + pCaster->GetCreatureListWithEntryInGrid(addList, 11672, 30.0f); + if (!addList.empty()) + { + for (const auto& itr : addList) + { + // Golemagg's Trust Buff + pCaster->CastSpell(itr, 20553, true, nullptr, this); + } + } + } + return; + } } break; } diff --git a/src/game/Spells/SpellEffects.cpp b/src/game/Spells/SpellEffects.cpp index 5e4f09b6cdf..0b15a6fc24e 100644 --- a/src/game/Spells/SpellEffects.cpp +++ b/src/game/Spells/SpellEffects.cpp @@ -5602,34 +5602,34 @@ void Spell::EffectDuel(SpellEffectIndex effIdx) Player* target = (Player*)unitTarget; // if the caster is already in a duel or has issued a challenge - if (caster->duel && caster->duel->opponent != target) + if (caster->m_duel && caster->m_duel->opponent != target) { - if (caster->duel->startTime) + if (caster->m_duel->startTime) caster->DuelComplete(DUEL_WON); else caster->DuelComplete(DUEL_INTERRUPTED); - delete caster->duel; - delete target->duel; - caster->duel = target->duel = nullptr; + delete caster->m_duel; + delete target->m_duel; + caster->m_duel = target->m_duel = nullptr; } // if the caster attempts to duel somebody they're already in a duel with - if (caster->duel && caster->duel->opponent == target && caster->duel->startTime) + if (caster->m_duel && caster->m_duel->opponent == target && caster->m_duel->startTime) { SendCastResult(SPELL_FAILED_TARGET_ENEMY); return; } // if the target already has a pending duel/is dueling, reject the request - if (target->duel) + if (target->m_duel) { SendCastResult(SPELL_FAILED_TARGET_DUELING); return; } // caster or target already have requested duel - if (caster->duel || !target->GetSocial() || target->GetSocial()->HasIgnore(caster->GetObjectGuid()) || target->FindMap() != caster->FindMap()) + if (caster->m_duel || !target->GetSocial() || target->GetSocial()->HasIgnore(caster->GetObjectGuid()) || target->FindMap() != caster->FindMap()) return; // Players can only fight a duel with each other outside (=not inside dungeons and not in capital cities) @@ -5682,13 +5682,13 @@ void Spell::EffectDuel(SpellEffectIndex effIdx) target->GetSession()->SendPacket(&data); // create duel-info - DuelInfo *duel = new DuelInfo; + DuelInfo* duel = new DuelInfo; duel->initiator = caster; duel->opponent = target; duel->startTime = 0; duel->startTimer = 0; - DuelInfo *duel2 = new DuelInfo; + DuelInfo* duel2 = new DuelInfo; duel2->initiator = caster; duel2->opponent = caster; duel2->startTime = 0; @@ -5699,8 +5699,8 @@ void Spell::EffectDuel(SpellEffectIndex effIdx) duel->transportGuid = t->GetGUIDLow(); duel2->transportGuid = t->GetGUIDLow(); } - caster->duel = duel; - target->duel = duel2; + caster->m_duel = duel; + target->m_duel = duel2; caster->SetGuidValue(PLAYER_DUEL_ARBITER, pGameObj->GetObjectGuid()); target->SetGuidValue(PLAYER_DUEL_ARBITER, pGameObj->GetObjectGuid()); @@ -6490,10 +6490,7 @@ void Spell::EffectPlayerPull(SpellEffectIndex effIdx) // set immune anticheat and calculate speed if (Player* plr = unitTarget->ToPlayer()) - { plr->SetLaunched(true); - plr->SetXYSpeed(horizontalSpeed); - } unitTarget->KnockBack(angle, horizontalSpeed, verticalSpeed); break; diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index d555085d1da..5d82f145ab7 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -630,33 +630,6 @@ void Player::UpdateDodgePercentage() SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value); } -void Player::UpdateSpellCritChance(uint32 school) -{ - // For normal school set zero crit chance - if (school == SPELL_SCHOOL_NORMAL) - { - m_SpellCritPercentage[1] = 0.0f; - return; - } - // For others recalculate it from: - float crit = 0.0f; - // Crit from Intellect - crit += GetSpellCritFromIntellect(); - // Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE - crit += GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE); - // Increase crit by school from SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL - crit += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, 1 << school); - - // Store crit value - m_SpellCritPercentage[school] = crit; -} - -void Player::UpdateAllSpellCritChances() -{ - for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) - UpdateSpellCritChance(i); -} - void Player::UpdateManaRegen() { // Mana regen from spirit @@ -754,6 +727,7 @@ bool Creature::UpdateAllStats() UpdateMaxHealth(); UpdateAttackPowerAndDamage(); UpdateAttackPowerAndDamage(true); + UpdateAllSpellCritChances(); for (int i = POWER_MANA; i < MAX_POWERS; ++i) UpdateMaxPower(Powers(i)); @@ -1005,6 +979,8 @@ bool Pet::UpdateAllStats() for (int i = STAT_STRENGTH; i < MAX_STATS; ++i) UpdateStats(Stats(i)); + UpdateAllSpellCritChances(); + for (int i = POWER_MANA; i < MAX_POWERS; ++i) UpdateMaxPower(Powers(i)); diff --git a/src/game/Transports/Transport.h b/src/game/Transports/Transport.h index 28ad51b2f8c..cc9be2a19ef 100644 --- a/src/game/Transports/Transport.h +++ b/src/game/Transports/Transport.h @@ -105,7 +105,7 @@ class Transport : public GenericTransport void MoveToNextWayPoint(); // move m_next/m_cur to next points float CalculateSegmentPos(float perc); - bool IsMoving() const { return m_isMoving; } + bool IsMoving() const override { return m_isMoving; } void SetMoving(bool val) { m_isMoving = val; } ShortTimeTracker m_positionChangeTimer; diff --git a/src/game/World.h b/src/game/World.h index e80073d43d1..50209fbbd5f 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -634,8 +634,8 @@ enum RealmType class SessionPacketSendTask { - SessionPacketSendTask(const SessionPacketSendTask&) = delete; public: + SessionPacketSendTask(SessionPacketSendTask const&) = delete; SessionPacketSendTask(uint32 accountId, WorldPacket& data) : m_accountId(accountId), m_data(data) {} void operator ()(); private: @@ -759,7 +759,7 @@ class World // Uptime (in secs) uint32 GetUptime() const { return uint32(m_gameTime - m_startTime); } - tm *GetLocalTimeByTime(time_t now) const { return localtime(&now); } + static tm *GetLocalTimeByTime(time_t now) { return localtime(&now); } uint32 GetLastMaintenanceDay() const { @@ -827,8 +827,8 @@ class World bool getConfig(eConfigBoolValues index) const { return m_configBoolValues[index]; } // Are we on a "Player versus Player" server? - bool IsPvPRealm() { return (getConfig(CONFIG_UINT32_GAME_TYPE) == REALM_TYPE_PVP || getConfig(CONFIG_UINT32_GAME_TYPE) == REALM_TYPE_RPPVP || getConfig(CONFIG_UINT32_GAME_TYPE) == REALM_TYPE_FFA_PVP); } - bool IsFFAPvPRealm() { return getConfig(CONFIG_UINT32_GAME_TYPE) == REALM_TYPE_FFA_PVP; } + bool IsPvPRealm() const { return (getConfig(CONFIG_UINT32_GAME_TYPE) == REALM_TYPE_PVP || getConfig(CONFIG_UINT32_GAME_TYPE) == REALM_TYPE_RPPVP || getConfig(CONFIG_UINT32_GAME_TYPE) == REALM_TYPE_FFA_PVP); } + bool IsFFAPvPRealm() const { return getConfig(CONFIG_UINT32_GAME_TYPE) == REALM_TYPE_FFA_PVP; } void KickAll(); void KickAllLess(AccountTypes sec); @@ -862,7 +862,7 @@ class World LocaleConstant GetAvailableDbcLocale(LocaleConstant locale) const { if (m_availableDbcLocaleMask & (1 << locale)) return locale; else return m_defaultDbcLocale; } // Nostalrius - MovementBroadcaster* GetBroadcaster() { return m_broadcaster.get(); } + MovementBroadcaster* GetBroadcaster() const { return m_broadcaster.get(); } float GetTimeRate() const { return m_timeRate; } void SetTimeRate(float rate) { m_timeRate = rate; } float m_timeRate; diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 2cb334116ea..956c15b5e51 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -678,7 +678,7 @@ void WorldSession::LogoutPlayer(bool Save) }); // Teleport to home if the player is in an invalid instance - if (!_player->m_InstanceValid && !_player->IsGameMaster()) + if (!_player->m_instanceValid && !_player->IsGameMaster()) { _player->TeleportToHomebind(); //this is a bad place to call for far teleport because we need player to be in world for successful logout @@ -1135,7 +1135,7 @@ void WorldSession::ExecuteOpcode(OpcodeHandler const& opHandle, WorldPacket* pac //we should execute delayed teleports only for alive(!) players //because we don't want player's ghost teleported from graveyard if (_player->IsHasDelayedTeleport()) - _player->TeleportTo(_player->m_teleport_dest, _player->m_teleport_options); + _player->TeleportTo(_player->m_teleportDest, _player->m_teleportOptions); } if (packet->rpos() < packet->wpos() && sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) LogUnprocessedTail(packet); diff --git a/src/game/WorldSession.h b/src/game/WorldSession.h index 1f9019903fe..e42a0dcf9f5 100644 --- a/src/game/WorldSession.h +++ b/src/game/WorldSession.h @@ -371,11 +371,11 @@ class WorldSession // Public chat cooldown restriction functionality // Intentionally session-based to avoid login/logout hijinks - time_t GetLastPubChanMsgTime() { return m_lastPubChannelMsgTime; } + time_t GetLastPubChanMsgTime() const { return m_lastPubChannelMsgTime; } void SetLastPubChanMsgTime(time_t time) { m_lastPubChannelMsgTime = time; } // Bot system - PlayerBotEntry* GetBot() { return m_bot.get(); } + PlayerBotEntry* GetBot() const { return m_bot.get(); } void SetBot(std::shared_ptr const& b) { m_bot = b; } // Warden / Anticheat @@ -487,7 +487,7 @@ class WorldSession void LoadTutorialsData(); void SendTutorialsData(); void SaveTutorialsData(); - uint32 GetTutorialInt(uint32 intId) + uint32 GetTutorialInt(uint32 intId) const { ASSERT(intId < ACCOUNT_TUTORIALS_COUNT); return m_tutorials[intId]; diff --git a/src/scripts/battlegrounds/battleground_alterac.cpp b/src/scripts/battlegrounds/battleground_alterac.cpp index 02b05e67e9c..17b7a2aaf63 100644 --- a/src/scripts/battlegrounds/battleground_alterac.cpp +++ b/src/scripts/battlegrounds/battleground_alterac.cpp @@ -2119,7 +2119,7 @@ struct AV_NpcEventAI : public npc_escortAI it->CastSpell(m_creature, AV_INVOCATION_SPELL, false); m_RamRiderList.clear(); - m_creature->SummonGameObject(OBJECT_WB_H_INVOCATION, -360.006989f, -130.33f, 26.4321f, 5.6635f, 0, 0, 0, 0, -1, false); + m_creature->SummonGameObject(OBJECT_WB_H_INVOCATION, -360.139f, -133.403f, 26.4856f, 4.41568f, 0, 0, -0.803857f, 0.594823f, -1, false); m_creature->SetHomePosition(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0.0f); Stop();//SetEscortPaused(true); isGobSummoned = true; @@ -2152,7 +2152,7 @@ struct AV_NpcEventAI : public npc_escortAI it->CastSpell(m_creature, AV_INVOCATION_SPELL, false); m_RamRiderList.clear(); - m_creature->SummonGameObject(OBJECT_WB_A_INVOCATION, -199.7f, -342.698f, 6.809f, 1.69646f, 0, 0, 0, 0, -1, false); + m_creature->SummonGameObject(OBJECT_WB_A_INVOCATION, -199.993f, -343.217f, 6.77662f, 3.68265f, 0, 0, -0.96363f, 0.267241f, -1, false); m_creature->SetHomePosition(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0.0f); Stop();//SetEscortPaused(true); isGobSummoned = true; diff --git a/src/scripts/eastern_kingdoms/burning_steppes/molten_core/boss_golemagg.cpp b/src/scripts/eastern_kingdoms/burning_steppes/molten_core/boss_golemagg.cpp index e13aa5ee7ee..b1287a99f68 100644 --- a/src/scripts/eastern_kingdoms/burning_steppes/molten_core/boss_golemagg.cpp +++ b/src/scripts/eastern_kingdoms/burning_steppes/molten_core/boss_golemagg.cpp @@ -14,169 +14,272 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* ScriptData -SDName: Boss_Golemagg -SD%Complete: 75 -SDComment: Timers need to be confirmed, Golemagg's Trust need to be checked -SDCategory: Molten Core -EndScriptData */ - -/* - Golemagg and his adds should evade if dogs are pulled too far away from Golemagg -*/ - #include "scriptPCH.h" #include "molten_core.h" +#include "Utilities/EventMap.h" -enum +enum Golemagg : uint32 { - SPELL_MAGMASPLASH = 13879, - SPELL_PYROBLAST = 20228, - SPELL_EARTHQUAKE = 19798, - SPELL_ENRAGE = 19953, - SPELL_GOLEMAGG_TRUST = 20553, - - // Core Rager - EMOTE_LOWHP = -1409002, - SPELL_MANGLE = 19820, - SPELL_TRASH = 3391 + // Auras (set in db - creature_template) + // SPELL_MAGMASPLASH = 13879, + // SPELL_GOLEMAGG_TRUST_AURA = 20556, + // SPELL_DOUBLE_ATTACK = 18943, + + // Spells + SPELL_PYROBLAST = 20228, + SPELL_EARTHQUAKE = 19798, + SPELL_GOLEMAGG_TRUST = 20553, + SPELL_ATTRACK_RAGER = 20544, + + // Events + EVENT_PYROBLAST = 1, + EVENT_EARTHQUAKE = 2, + EVENT_GOLEMAGG_TRUST = 3 }; struct boss_golemaggAI : public ScriptedAI { - boss_golemaggAI(Creature* pCreature) : ScriptedAI(pCreature) + explicit boss_golemaggAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); + m_pInstance = static_cast(pCreature->GetInstanceData()); + boss_golemaggAI::Reset(); } - ScriptedInstance* m_pInstance; + EventMap m_CombatEvents{}; + ScriptedInstance* m_pInstance{}; + std::list m_addList; - uint32 m_uiPyroblastTimer; - uint32 m_uiEarthquakeTimer; - uint32 TickTimer; - bool m_bEnraged; + bool m_bEnraged = false; void Reset() override { - m_uiPyroblastTimer = 7 * IN_MILLISECONDS; // These timers are probably wrong - m_uiEarthquakeTimer = 3 * IN_MILLISECONDS; - TickTimer = 10000; m_bEnraged = false; + m_CombatEvents.Reset(); + m_addList.clear(); if (m_pInstance && m_creature->IsAlive()) + { m_pInstance->SetData(TYPE_GOLEMAGG, NOT_STARTED); + } - - std::list ChiensListe; - GetCreatureListWithEntryInGrid(ChiensListe, m_creature, 11672, 150.0f); - if (!ChiensListe.empty()) + std::list addList; + GetCreatureListWithEntryInGrid(addList, m_creature, NPC_CORE_RAGER, 250.0f); + if (!addList.empty()) { - for (const auto& itr : ChiensListe) + for (const auto& itr : addList) { if (itr->GetDeathState() == ALIVE) + { itr->DealDamage(itr, itr->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); + } + itr->Respawn(); } } - // available in creature_addon - // m_creature->CastSpell(m_creature, SPELL_MAGMASPLASH, true); } - void Aggro(Unit* pWho) override + void Aggro(Unit*) override { if (m_pInstance) + { m_pInstance->SetData(TYPE_GOLEMAGG, IN_PROGRESS); + } + + // Store add guids + std::list adds; + GetCreatureListWithEntryInGrid(adds, m_creature, NPC_CORE_RAGER, 150.0f); + m_addList.clear(); + for (const auto& itr : adds) + { + m_addList.push_back(itr->GetObjectGuid()); + } + + ScheduleCombatEvents(); } - void JustDied(Unit* pKiller) override + void EnterEvadeMode() override + { + KillAdds(true); + ScriptedAI::EnterEvadeMode(); + } + + void JustDied(Unit*) override { if (m_pInstance) + { m_pInstance->SetData(TYPE_GOLEMAGG, DONE); + } + + KillAdds(false); } - void UpdateAI(uint32 const uiDiff) override + void KillAdds(bool respawn) { - if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim()) - return; - - // Pyroblast - if (m_uiPyroblastTimer < uiDiff) + if (!m_addList.empty()) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + for (const auto& itr : m_addList) { - if (DoCastSpellIfCan(pTarget, SPELL_PYROBLAST) == CAST_OK) - m_uiPyroblastTimer = (3 + rand() % 4) * IN_MILLISECONDS; + if (auto coreRager = m_creature->GetMap()->GetCreature(itr)) + { + coreRager->DisappearAndDie(); + if (respawn) + { + coreRager->Respawn(); + } + } } } - else - m_uiPyroblastTimer -= uiDiff; + } - // Enrage - if (!m_bEnraged && m_creature->GetHealthPercent() < 10.0f) + void DamageTaken(Unit*, uint32& uiDamage) override + { + if (!m_bEnraged) { - if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) - m_bEnraged = true; + // At 10% health, Golemagg will Earthquake, + // dealing Physical damage to all players every couple seconds. + if (m_creature->GetHealthPercent() < 10.f) + { + if (DoCastSpellIfCan(m_creature, SPELL_ATTRACK_RAGER) == CAST_OK) + { + m_bEnraged = true; + m_CombatEvents.ScheduleEvent(EVENT_EARTHQUAKE, Seconds(5)); + } + } } + } - if (TickTimer < uiDiff) + void UpdateAI(uint32 const uiDiff) override + { + if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim()) { - if (DoCastSpellIfCan(m_creature, SPELL_GOLEMAGG_TRUST) == CAST_OK) - TickTimer = 2000; + return; } - else TickTimer -= uiDiff; - // Earthquake - if (m_bEnraged) + m_CombatEvents.Update(uiDiff); + UpdateEvents(); + + DoMeleeAttackIfReady(); + } + + void ScheduleCombatEvents() + { + m_CombatEvents.ScheduleEvent(EVENT_PYROBLAST, Seconds(7)); + m_CombatEvents.ScheduleEvent(EVENT_GOLEMAGG_TRUST, Seconds(10)); + } + + void UpdateEvents() + { + while (const uint32 eventId = m_CombatEvents.ExecuteEvent()) { - if (m_uiEarthquakeTimer < uiDiff) + switch (eventId) { - if (DoCastSpellIfCan(m_creature->GetVictim(), SPELL_EARTHQUAKE) == CAST_OK) - m_uiEarthquakeTimer = 3 * IN_MILLISECONDS; + case EVENT_PYROBLAST: + { + // Golemagg Pyroblasts a random player, + // dealing Fire damage and leaving an additional Fire DOT on them. + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_PYROBLAST) == CAST_OK) + { + m_CombatEvents.Repeat(Seconds(7)); + return; + } + } + + // Cast Failed: Try again in 1s + m_CombatEvents.Repeat(Seconds(1)); + return; + } + case EVENT_EARTHQUAKE: + { + if (DoCastSpellIfCan(m_creature->GetVictim(), SPELL_EARTHQUAKE) == CAST_OK) + { + m_CombatEvents.Repeat(Seconds(5)); + return; + } + + // Cast Failed: Try again in 1s + m_CombatEvents.Repeat(Seconds(1)); + return; + } + case EVENT_GOLEMAGG_TRUST: + { + if (DoCastSpellIfCan(m_creature, SPELL_GOLEMAGG_TRUST) == CAST_OK) + { + m_CombatEvents.Repeat(Seconds(2)); + return; + } + // Cast Failed: Try again in 1s + m_CombatEvents.Repeat(Seconds(1)); + return; + } } - else - m_uiEarthquakeTimer -= uiDiff; } + } +}; +CreatureAI* GetAI_boss_golemagg(Creature* pCreature) +{ + return new boss_golemaggAI(pCreature); +} - DoMeleeAttackIfReady(); - } +enum CoreRager : uint32 +{ + // Spells + // SPELL_TRASH = 3391, // Custom? + SPELL_MANGLE = 19820, + SPELL_FULL_HEAL = 17683, + + // Texts + EMOTE_LOWHP = 7865, + + // Events + EVENT_MANGLE = 1, + EVENT_TRASH = 2, + EVENT_CHECK_LEASH = 3 }; struct mob_core_ragerAI : public ScriptedAI { - mob_core_ragerAI(Creature* pCreature) : ScriptedAI(pCreature) + explicit mob_core_ragerAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = static_cast(pCreature->GetInstanceData()); Reset(); } - ScriptedInstance* m_pInstance; - uint32 m_uiMangleTimer; - uint32 TickTimer; + EventMap m_CombatEvents{}; + ScriptedInstance* m_pInstance{}; void Reset() override { - TickTimer = 1000; - m_uiMangleTimer = 7 * IN_MILLISECONDS; // These times are probably wrong + m_CombatEvents.Reset(); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override + void Aggro(Unit*) override { - if (m_pInstance) + ScheduleCombatEvents(); + } + + void DamageTaken(Unit*, uint32& uiDamage) override + { + if (!m_pInstance) { - if (Creature* pGolemagg = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_GOLEMAGG))) + return; + } + + if (m_pInstance->GetData(TYPE_GOLEMAGG) == DONE) + { + return; + } + + if (m_creature->HealthBelowPctDamaged(50, uiDamage)) + { + uiDamage = 0; + DoScriptText(EMOTE_LOWHP, m_creature); + SpellCastResult result = DoCastSpellIfCan(m_creature->GetVictim(), SPELL_FULL_HEAL); + if (result != CAST_OK) { - if (pGolemagg->IsAlive()) - { - if (m_creature->GetHealthPercent() < 50.0f) - { - DoScriptText(EMOTE_LOWHP, m_creature); - m_creature->SetHealth(m_creature->GetMaxHealth()); - } - } - else - m_creature->DisappearAndDie(); + m_creature->SetHealth(m_creature->GetMaxHealth()); } } } @@ -184,33 +287,73 @@ struct mob_core_ragerAI : public ScriptedAI void UpdateAI(uint32 const uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim()) - return; - - // Mangle - if (m_uiMangleTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature->GetVictim(), SPELL_MANGLE) == CAST_OK) - m_uiMangleTimer = 10 * IN_MILLISECONDS; + return; } - else - m_uiMangleTimer -= uiDiff; - if (TickTimer < uiDiff) - { - TickTimer = 1000; - if (!m_creature->HasAura(SPELL_TRASH) && !(bool)(rand() % 10)) - m_creature->CastSpell(m_creature, SPELL_TRASH, true); - } - else TickTimer -= uiDiff; + m_CombatEvents.Update(uiDiff); + UpdateEvents(); DoMeleeAttackIfReady(); } -}; -CreatureAI* GetAI_boss_golemagg(Creature* pCreature) -{ - return new boss_golemaggAI(pCreature); -} + void ScheduleCombatEvents() + { + // m_CombatEvents.ScheduleEvent(EVENT_TRASH, Seconds(1)); + m_CombatEvents.ScheduleEvent(EVENT_MANGLE, Seconds(7)); + m_CombatEvents.ScheduleEvent(EVENT_CHECK_LEASH, Seconds(3)); + } + + void UpdateEvents() + { + while (const uint32 eventId = m_CombatEvents.ExecuteEvent()) + { + switch (eventId) + { + /* + case EVENT_TRASH: + { + if (!m_creature->HasAura(SPELL_TRASH)) + { + m_creature->CastSpell(m_creature, SPELL_TRASH, true); + } + + m_CombatEvents.Repeat(Seconds(urand(1, 10))); + return; + } + */ + case EVENT_MANGLE: + { + if (DoCastSpellIfCan(m_creature->GetVictim(), SPELL_MANGLE) == CAST_OK) + { + m_CombatEvents.Repeat(Seconds(10)); + return; + } + + // Cast Failed: Try again in 1s + m_CombatEvents.Repeat(Seconds(1)); + return; + } + case EVENT_CHECK_LEASH: + { + if (Creature* pGolemagg = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_GOLEMAGG))) + { + if (m_creature->GetDistance2d(pGolemagg) > 100.f) + { + if (auto pGolemaggAI = dynamic_cast(pGolemagg->AI())) + { + pGolemaggAI->EnterEvadeMode(); + } + } + } + + m_CombatEvents.Repeat(Seconds(3)); + return; + } + } + } + } +}; CreatureAI* GetAI_mob_core_rager(Creature* pCreature) { diff --git a/src/scripts/eastern_kingdoms/burning_steppes/molten_core/boss_majordomo_executus.cpp b/src/scripts/eastern_kingdoms/burning_steppes/molten_core/boss_majordomo_executus.cpp index 11d6b38048d..5640b5a2a21 100644 --- a/src/scripts/eastern_kingdoms/burning_steppes/molten_core/boss_majordomo_executus.cpp +++ b/src/scripts/eastern_kingdoms/burning_steppes/molten_core/boss_majordomo_executus.cpp @@ -288,7 +288,8 @@ struct boss_majordomoAI : public ScriptedAI { case 6: m_creature->GetMotionMaster()->MovePoint(POINT_SUMMON1, (float)POINT_SUMMON1_X, (float)POINT_SUMMON1_Y, (float)POINT_SUMMON1_Z); - m_creature->SummonGameObject(178108, 842.237488f, -833.683105f, -231.916498f, 3.000000f, 0, 0, 0, 0, 0); + m_creature->SummonGameObject(178107, 838.951f, -830.383f, -230.206f, 0.837757f, 0, 0, 0.406736f, 0.913546f, 0); + m_creature->SummonGameObject(178108, 839.279f, -831.058f, -230.202f, 4.90438f, 0, 0, -0.636078f, 0.771625f, 0); m_creature->CastSpell(m_creature, 19774, false); DoScriptText(SAY_MAJ, m_creature); break; diff --git a/src/scripts/eastern_kingdoms/eastern_plaguelands/eastern_plaguelands.cpp b/src/scripts/eastern_kingdoms/eastern_plaguelands/eastern_plaguelands.cpp index b92d60fa162..ae8dffc88f0 100644 --- a/src/scripts/eastern_kingdoms/eastern_plaguelands/eastern_plaguelands.cpp +++ b/src/scripts/eastern_kingdoms/eastern_plaguelands/eastern_plaguelands.cpp @@ -1766,7 +1766,7 @@ enum MarkOfDetonationData bool EffectDummyGameObj_go_mark_of_detonation(WorldObject* pCaster, uint32 uiSpellId, SpellEffectIndex effIndex, GameObject* pGameObjectTarget) { - //always check spellid and effectindex + // always check spellid and effectindex if (uiSpellId == SPELL_PLACING_SMOKEY_S_EXPLOSIVES && effIndex == EFFECT_INDEX_0) { if (Player* pPlayer = pCaster->ToPlayer()) @@ -1775,8 +1775,36 @@ bool EffectDummyGameObj_go_mark_of_detonation(WorldObject* pCaster, uint32 uiSpe { pPlayer->KilledMonsterCredit(pCreature->GetEntry(), pCreature->GetObjectGuid()); pCreature->DealDamage(pCreature, pCreature->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); + + // TODO: move this to db as On Death event script on the creature with guid condition + static std::map> const fireObjectsMap = + { + // TODO: fire and smoke gameobjects for the other positions are not sniffed + // { 53157, {} }, + // { 53168, {} }, + // { 54270, {} }, + { 54271 ,{ 2780, 2781, 2782, 2783, 2784, 2787, 2790, 2791, 2792, 2793 } } + // { 56689, {} }, + // { 92232, {} }, + // { 92254, {} }, + // { 92262, {} }, + }; + + auto itr = fireObjectsMap.find(pCreature->GetGUIDLow()); + if (itr != fireObjectsMap.end()) + { + ScriptInfo script; + script.id = uiSpellId; + script.command = SCRIPT_COMMAND_RESPAWN_GAMEOBJECT; + script.respawnGo.despawnDelay = 12; + for (auto const& goGuid : itr->second) + { + script.respawnGo.goGuid = goGuid; + pCreature->GetMap()->ScriptCommandStartDirect(script, pCreature, pCreature); + } + } } - //always return true when we are handling this spell and effect + // always return true when we are handling this spell and effect pGameObjectTarget->Despawn(); return true; } diff --git a/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/boss_maexxna.cpp b/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/boss_maexxna.cpp index 7ebac9665da..18f58c4729a 100644 --- a/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/boss_maexxna.cpp +++ b/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/boss_maexxna.cpp @@ -289,10 +289,7 @@ struct boss_maexxnaAI : public ScriptedAI // set immune anticheat and calculate speed if (Player* plr = pTarget->ToPlayer()) - { plr->SetLaunched(true); - plr->SetXYSpeed(horizontalSpeed); - } pTarget->KnockBack(angle, horizontalSpeed, verticalSpeed); wraps.push_back(std::make_pair(uint32(2000), pTarget->GetObjectGuid())); diff --git a/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/boss_sapphiron.cpp b/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/boss_sapphiron.cpp index 950bc7f5fbe..5aee929fb4d 100644 --- a/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/boss_sapphiron.cpp +++ b/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/boss_sapphiron.cpp @@ -401,7 +401,7 @@ struct boss_sapphironAI : public ScriptedAI m_creature->HandleEmote(EMOTE_ONESHOT_LIFTOFF); m_creature->SetHover(true); - m_creature->m_TargetNotReachableTimer = 0; + m_creature->m_targetNotReachableTimer = 0; if (m_creature->GetTemporaryFactionFlags() & TEMPFACTION_RESTORE_COMBAT_STOP) m_creature->ClearTemporaryFaction(); diff --git a/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/instance_naxxramas.cpp b/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/instance_naxxramas.cpp index a0aec8037db..e16d4ded14e 100644 --- a/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/instance_naxxramas.cpp +++ b/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/instance_naxxramas.cpp @@ -565,7 +565,6 @@ void instance_naxxramas::OnObjectCreate(GameObject* pGo) case GO_PLAG_HEIG_ENTRY_DOOR: UpdateAutomaticBossEntranceDoor(pGo, m_auiEncounter[TYPE_HEIGAN]); break; - case GO_PLAG_HEIG_EXIT_DOOR: case GO_PLAG_HEIG_OLD_EXIT_DOOR: case GO_PLAG_LOAT_DOOR: UpdateBossGate(pGo, m_auiEncounter[TYPE_HEIGAN]); diff --git a/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/naxxramas.h b/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/naxxramas.h index 68fa636e7a0..1c33c992bca 100644 --- a/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/naxxramas.h +++ b/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/naxxramas.h @@ -166,7 +166,7 @@ enum NaxxGOs : uint32 GO_ARAC_ANUB_DOOR = 181126, //encounter door - open on click after click auto open/close on encounter pull/kill/reset GO_ARAC_ANUB_GATE = 181195, //open after boss is dead GO_ARAC_FAER_WEB = 181235, //encounter door - GO_ARAC_FAER_DOOR = 194022, //after faerlina, to outer ring + GO_ARAC_FAER_DOOR = 181167, //after faerlina, to outer ring GO_ARAC_MAEX_INNER_DOOR = 181197, //encounter door GO_ARAC_MAEX_OUTER_DOOR = 181209, //right before maex diff --git a/src/scripts/kalimdor/desolace/maraudon/boss_celebras_the_cursed.cpp b/src/scripts/kalimdor/desolace/maraudon/boss_celebras_the_cursed.cpp index 88236604877..4f949e2d126 100644 --- a/src/scripts/kalimdor/desolace/maraudon/boss_celebras_the_cursed.cpp +++ b/src/scripts/kalimdor/desolace/maraudon/boss_celebras_the_cursed.cpp @@ -239,7 +239,7 @@ struct celebrasSpiritAI : public npc_escortAI Event_Timer = 1000; break; case 3: - m_creature->SummonGameObject(GO_TOME, 652.175f, 74.069f, -85.334327f, 5.6635f, 0, 0, 0, 0, -1, false); + m_creature->SummonGameObject(GO_TOME, 652.431f, 74.7087f, -85.3355f, 6.16101f, 0, 0, -0.0610485f, 0.998135f, -1, false); Event_Timer = 1000; break; case 4: diff --git a/src/scripts/kalimdor/silithus/silithus.cpp b/src/scripts/kalimdor/silithus/silithus.cpp index 8a2f6908c55..eca5a4a7b20 100644 --- a/src/scripts/kalimdor/silithus/silithus.cpp +++ b/src/scripts/kalimdor/silithus/silithus.cpp @@ -617,7 +617,6 @@ CreatureAI* GetAI_npc_colossus(Creature* pCreature) enum { GO_GLYPHED_CRYSTAL = 180514, - GO_GLYPHED_CRYSTAL_BIG = 210342 }; struct npc_Geologist_LarksbaneAI : public ScriptedAI @@ -645,11 +644,11 @@ struct npc_Geologist_LarksbaneAI : public ScriptedAI m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - if (GameObject* pGo = m_creature->SummonGameObject(GO_GLYPHED_CRYSTAL, -6826.51f, 809.082f, 51.8577f, 0.259445f)) + if (GameObject* pGo = m_creature->SummonGameObject(GO_GLYPHED_CRYSTAL, -6825.29f, 809.125f, 51.8699f, 0.349065f, 0, 0, 0.173648f, 0.984808f)) lCrystalGUIDs.push_back(pGo->GetGUID()); - if (GameObject* pGo = m_creature->SummonGameObject(GO_GLYPHED_CRYSTAL, -6827.54f, 806.711f, 51.9809f, 2.2241f)) + if (GameObject* pGo = m_creature->SummonGameObject(GO_GLYPHED_CRYSTAL, -6822.21f, 808.584f, 51.5885f, 2.77507f, 0, 0, 0.983254f, 0.182238f)) lCrystalGUIDs.push_back(pGo->GetGUID()); - if (GameObject* pGo = m_creature->SummonGameObject(GO_GLYPHED_CRYSTAL_BIG, -6825.31f, 805.146f, 51.9435f, -1.255528f)) + if (GameObject* pGo = m_creature->SummonGameObject(GO_GLYPHED_CRYSTAL, -6823.57f, 811.977f, 51.4426f, 4.41568f, 0, 0, -0.803857f, 0.594823f)) lCrystalGUIDs.push_back(pGo->GetGUID()); uiCurrAction = 1; diff --git a/src/shared/Util.h b/src/shared/Util.h index 3e65bbb3177..3859caec210 100644 --- a/src/shared/Util.h +++ b/src/shared/Util.h @@ -442,6 +442,16 @@ typedef char const*(*ValueToStringFunc) (uint32 value); std::string FlagsToString(uint32 flags, ValueToStringFunc getNameFunc); +inline float GetLambda(float startIndex, float endIndex, float currentIndex) +{ + return (currentIndex - startIndex) / (endIndex - startIndex); +} + +inline float InterpolateValueAtIndex(float startIndex, float startValue, float endIndex, float endValue, float currentIndex) +{ + return startValue + GetLambda(startIndex, endIndex, currentIndex) * (endValue - startValue); +} + std::vector SplitStringByDelimiter(std::string const& str, char delimiter); #endif diff --git a/src/shared/WheatyExceptionReport.cpp b/src/shared/WheatyExceptionReport.cpp index 1f7c2ea609b..5d63af5d3eb 100644 --- a/src/shared/WheatyExceptionReport.cpp +++ b/src/shared/WheatyExceptionReport.cpp @@ -822,7 +822,7 @@ DWORD dwTypeIndex, unsigned nestingLevel, DWORD_PTR offset, bool& bHandled, -char* Name) +char const* Name) { bHandled = false; diff --git a/src/shared/WheatyExceptionReport.h b/src/shared/WheatyExceptionReport.h index 1ee4bca7c37..75b2777b3d8 100644 --- a/src/shared/WheatyExceptionReport.h +++ b/src/shared/WheatyExceptionReport.h @@ -98,7 +98,7 @@ class WheatyExceptionReport static bool FormatSymbolValue(PSYMBOL_INFO, STACKFRAME*, char* pszBuffer, unsigned cbBuffer); - static char* DumpTypeIndex(char*, DWORD64, DWORD, unsigned, DWORD_PTR, bool&, char*); + static char* DumpTypeIndex(char*, DWORD64, DWORD, unsigned, DWORD_PTR, bool&, char const*); static char* FormatOutputValue(char* pszCurrBuffer, BasicType basicType, DWORD64 length, PVOID pAddress);