This commit is contained in:
郑佩茹
2022-03-23 08:47:32 -06:00
9 changed files with 539 additions and 7 deletions

View File

@@ -0,0 +1,30 @@
-- DB update 2022_03_21_01 -> 2022_03_23_00
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_03_21_01';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_03_21_01 2022_03_23_00 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1647993341915438725'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1647993341915438725');
-- Burning Blade npc weapons
UPDATE `creature` SET `equipment_id` = 1 WHERE `id1` IN (4663,4664,4665,4666,4667);
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_03_23_00' WHERE sql_rev = '1647993341915438725';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,31 @@
-- DB update 2022_03_23_00 -> 2022_03_23_01
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_03_23_00';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_03_23_00 2022_03_23_01 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1647989885861421023'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1647989885861421023');
DELETE FROM `smart_scripts` WHERE `entryorguid`=12939100 AND `source_type`=9 AND `id`=11 AND `link`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(12939100, 9, 11, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 1, 0, 5000, 0, 0, 0, 0, 19, 28391, 0, 0, 0, 0, 0, 0, 0, 'Acherus Necromancer - On Script - Say Line 0');
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_03_23_01' WHERE sql_rev = '1647989885861421023';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,456 @@
-- DB update 2022_03_23_01 -> 2022_03_23_02
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_03_23_01';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_03_23_01 2022_03_23_02 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1647689221083701700'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1647689221083701700');
-- Lucifron
DELETE FROM `creature_loot_template` WHERE `Entry` = 12118;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(12118, 7068, 0, 30.0, 0, 1, 0, 1, 6),
(12118, 7077, 0, 30.0, 0, 1, 0, 1, 3),
(12118, 7078, 0, 40.0, 0, 1, 0, 1, 2),
(12118, 17329, 0, 100.0, 1, 1, 0, 1, 1),
(12118, 20951, 0, 1.0, 1, 1, 0, 1, 1),
(12118, 30001, 30001, 10.0, 0, 1, 0, 1, 1),
(12118, 30357, 30357, 100.0, 0, 1, 0, 1, 1),
(12118, 30488, 30488, 100.0, 0, 1, 0, 1, 1);
DELETE FROM `reference_loot_template` WHERE `Entry` IN (30001, 30357, 30488);
INSERT INTO `reference_loot_template`(`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(30001, 18252, 0, 0.0, 0, 1, 1, 1, 1),
(30001, 18257, 0, 0.0, 0, 1, 1, 1, 1),
(30001, 18259, 0, 0.0, 0, 1, 1, 1, 1),
(30001, 18260, 0, 0.0, 0, 1, 1, 1, 1),
(30001, 18264, 0, 0.0, 0, 1, 1, 1, 1),
(30001, 18265, 0, 0.0, 0, 1, 1, 1, 1),
(30001, 18290, 0, 0.0, 0, 1, 1, 1, 1),
(30001, 18291, 0, 0.0, 0, 1, 1, 1, 1),
(30001, 18292, 0, 0.0, 0, 1, 1, 1, 1),
(30001, 21371, 0, 0.0, 0, 1, 1, 1, 1),
(30357, 16805, 0, 30.0, 0, 1, 1, 1, 1),
(30357, 16863, 0, 30.0, 0, 1, 1, 1, 1),
(30357, 17077, 0, 0.0, 0, 1, 1, 1, 1),
(30357, 18861, 0, 0.0, 0, 1, 1, 1, 1),
(30357, 18870, 0, 0.0, 0, 1, 1, 1, 1),
(30357, 18872, 0, 0.0, 0, 1, 1, 1, 1),
(30357, 18875, 0, 0.0, 0, 1, 1, 1, 1),
(30357, 18878, 0, 0.0, 0, 1, 1, 1, 1),
(30357, 18879, 0, 0.0, 0, 1, 1, 1, 1),
(30357, 19145, 0, 0.0, 0, 1, 1, 1, 1),
(30357, 19146, 0, 0.0, 0, 1, 1, 1, 1),
(30357, 19147, 0, 0.0, 0, 1, 1, 1, 1),
(30488, 16800, 0, 0.0, 0, 1, 1, 1, 1),
(30488, 16829, 0, 0.0, 0, 1, 1, 1, 1),
(30488, 16837, 0, 0.0, 0, 1, 1, 1, 1),
(30488, 16859, 0, 0.0, 0, 1, 1, 1, 1),
(30488, 17109, 0, 0.0, 0, 1, 1, 1, 1);
-- Magmadar ( 1 shared ref with lucifron)
DELETE FROM `creature_loot_template` WHERE `Entry` = 11982;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(11982, 20951, 0, 1.0, 1, 1, 0, 1, 1),
(11982, 30001, 30001, 10.0, 0, 1, 0, 1, 1),
(11982, 30338, 30338, 100.0, 0, 1, 0, 1, 1),
(11982, 30339, 30339, 100.0, 0, 1, 0, 1, 1),
(11982, 30340, 30340, 100.0, 0, 1, 0, 1, 1);
DELETE FROM `reference_loot_template` WHERE `Entry` IN (30338, 30339, 30340);
INSERT INTO `reference_loot_template`(`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(30338, 16796, 0, 0, 0, 1, 1, 1, 1),
(30338, 16810, 0, 0, 0, 1, 1, 1, 1),
(30338, 16814, 0, 0, 0, 1, 1, 1, 1),
(30338, 16822, 0, 0, 0, 1, 1, 1, 1),
(30338, 17069, 0, 0, 0, 1, 1, 1, 1),
(30339, 16835, 0, 0, 0, 1, 1, 1, 1),
(30339, 16843, 0, 0, 0, 1, 1, 1, 1),
(30339, 16847, 0, 0, 0, 1, 1, 1, 1),
(30339, 16855, 0, 0, 0, 1, 1, 1, 1),
(30339, 16867, 0, 0, 0, 1, 1, 1, 1),
(30339, 17065, 0, 0, 0, 1, 1, 1, 1),
(30340, 17073, 0, 20,0, 1, 1, 1, 1),
(30340, 18203, 0, 20,0, 1, 1, 1, 1),
(30340, 18820, 0, 0,0, 1, 1, 1, 1),
(30340, 18821, 0, 0,0, 1, 1, 1, 1),
(30340, 18822, 0, 0,0, 1, 1, 1, 1),
(30340, 18823, 0, 0,0, 1, 1, 1, 1),
(30340, 18824, 0, 0,0, 1, 1, 1, 1),
(30340, 18829, 0, 0,0, 1, 1, 1, 1),
(30340, 18861, 0, 0,0, 1, 1, 1, 1),
(30340, 19136, 0, 0,0, 1, 1, 1, 1),
(30340, 19142, 0, 0,0, 1, 1, 1, 1),
(30340, 19143, 0, 0,0, 1, 1, 1, 1),
(30340, 19144, 0, 0,0, 1, 1, 1, 1);
-- Gehennas (shared ref with lucifron)
DELETE FROM `creature_loot_template` WHERE `Entry` = 12259;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(12259, 7068, 0, 30.0, 0, 1, 0, 1, 6),
(12259, 7077, 0, 30.0, 0, 1, 0, 1, 3),
(12259, 7078, 0, 40.0, 0, 1, 0, 1, 2),
(12259, 17331,0, 100, 1, 1, 0, 1, 1),
(12259, 20951,0, 1.0, 1, 1, 0, 1, 1),
(12259, 30001, 30001, 10.0, 0, 1, 0, 1, 1),
(12259, 30365, 30365, 100.0,0, 1, 0, 1, 1),
(12259, 30366, 30366, 100.0,0, 1, 0, 1, 1);
DELETE FROM `reference_loot_template` WHERE `Entry` IN (30365, 30366);
INSERT INTO `reference_loot_template`(`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(30365, 16849, 0, 25.0, 0, 1, 1, 1, 1),
(30365, 16862, 0, 25.0, 0, 1, 1, 1, 1),
(30365, 17077, 0, 0.0, 0, 1, 1, 1, 1),
(30365, 18861, 0, 0.0, 0, 1, 1, 1, 1),
(30365, 18870, 0, 0.0, 0, 1, 1, 1, 1),
(30365, 18872, 0, 0.0, 0, 1, 1, 1, 1),
(30365, 18875, 0, 0.0, 0, 1, 1, 1, 1),
(30365, 18878, 0, 0.0, 0, 1, 1, 1, 1),
(30365, 18879, 0, 0.0, 0, 1, 1, 1, 1),
(30365, 19145, 0, 0.0, 0, 1, 1, 1, 1),
(30365, 19146, 0, 0.0, 0, 1, 1, 1, 1),
(30365, 19147, 0, 0.0, 0, 1, 1, 1, 1),
(30366, 16812, 0, 0.0, 0, 1, 1, 1, 1),
(30366, 16826, 0, 0.0, 0, 1, 1, 1, 1),
(30366, 16839, 0, 0.0, 0, 1, 1, 1, 1),
(30366, 16860, 0, 0.0, 0, 1, 1, 1, 1);
-- Shazzrah (shared ref with Lucifron)
DELETE FROM `creature_loot_template` WHERE `Entry` = 12264;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(12264, 7068, 0, 30.0, 0, 1, 0, 1, 6),
(12264, 7077, 0, 30.0, 0, 1, 0, 1, 3),
(12264, 7078, 0, 40.0, 0, 1, 0, 1, 2),
(12264, 17332,0, 100.0, 1, 1, 0, 1, 1),
(12264, 20951,0, 1.0, 1, 1, 0, 1, 1),
(12264, 30001,30001, 10.0, 0, 1, 0, 1, 1),
(12264, 30367,30367, 100.0, 0, 1, 0, 1, 1),
(12264, 30368,30368, 100.0, 0, 1, 0, 1, 1);
DELETE FROM `reference_loot_template` WHERE `Entry` IN (30367, 30368);
INSERT INTO `reference_loot_template`(`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(30367, 16803, 0, 25.0, 0, 1, 1, 1, 1),
(30367, 16811, 0, 25.0, 0, 1, 1, 1, 1),
(30367, 16824, 0, 25.0, 0, 1, 1, 1, 1),
(30367, 17077, 0, 0.0, 0, 1, 1, 1, 1),
(30367, 18861, 0, 0.0, 0, 1, 1, 1, 1),
(30367, 18870, 0, 0.0, 0, 1, 1, 1, 1),
(30367, 18872, 0, 0.0, 0, 1, 1, 1, 1),
(30367, 18875, 0, 0.0, 0, 1, 1, 1, 1),
(30367, 18878, 0, 0.0, 0, 1, 1, 1, 1),
(30367, 18879, 0, 0.0, 0, 1, 1, 1, 1),
(30367, 19145, 0, 0.0, 0, 1, 1, 1, 1),
(30367, 19146, 0, 0.0, 0, 1, 1, 1, 1),
(30367, 19147, 0, 0.0, 0, 1, 1, 1, 1),
(30368, 16801, 0, 0.0, 0, 1, 1, 1, 1),
(30368, 16831, 0, 0.0, 0, 1, 1, 1, 1),
(30368, 16852, 0, 0.0, 0, 1, 1, 1, 1);
-- Sulfuron Harbinger
DELETE FROM `creature_loot_template` WHERE `Entry` = 12098;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(12098, 7068, 0, 30.0, 0, 1, 0, 1, 6),
(12098, 7077, 0, 30.0, 0, 1, 0, 1, 3),
(12098, 7078, 0, 40.0, 0, 1, 0, 1, 2),
(12098, 17330,0, 100.0,1, 1, 0, 1, 1),
(12098, 20951,0, 1.0, 1, 1, 0, 1, 1),
(12098, 30355, 30355, 100.0,0, 1, 0, 1, 1),
(12098, 30356, 30356, 100.0,0, 1, 0, 1, 1);
DELETE FROM `reference_loot_template` WHERE `Entry` IN (30355, 30356);
INSERT INTO `reference_loot_template`(`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(30355, 16823, 0, 30.0,0,1, 1, 1, 1),
(30355, 16868, 0, 30.0,0,1, 1, 1, 1),
(30355, 17077, 0, 0.0, 0,1, 1, 1, 1),
(30355, 18861, 0, 0.0, 0,1, 1, 1, 1),
(30355, 18870, 0, 0.0, 0,1, 1, 1, 1),
(30355, 18872, 0, 0.0, 0,1, 1, 1, 1),
(30355, 18875, 0, 0.0, 0,1, 1, 1, 1),
(30355, 18878, 0, 0.0, 0,1, 1, 1, 1),
(30355, 18879, 0, 0.0, 0,1, 1, 1, 1),
(30355, 19145, 0, 0.0, 0,1, 1, 1, 1),
(30355, 19146, 0, 0.0, 0,1, 1, 1, 1),
(30355, 19147, 0, 0.0, 0,1, 1, 1, 1),
(30356, 16816, 0, 0.0, 0,1, 1, 1, 1),
(30356, 16848, 0, 0.0, 0,1, 1, 1, 1),
(30356, 17074, 0, 0.0, 0,1, 1, 1, 1);
-- Garr (shared ref with lucifron)
DELETE FROM `creature_loot_template` WHERE `Entry` = 12057;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(12057, 7075, 0, 30.0, 0, 1, 0, 1, 3),
(12057, 7076, 0, 40.0, 0, 1, 0, 1, 2),
(12057, 8150, 0, 30.0, 0, 1, 0, 1, 12),
(12057, 17011, 0, 14.0, 0, 1, 0, 1, 1),
(12057, 18564, 0, 3.0, 0, 1, 0, 1, 1),
(12057, 20951, 0, 1.0, 1, 1, 0, 1, 1),
(12057, 30001, 30001, 10.0, 0, 1, 0, 1, 1),
(12057, 30352, 30352, 100.0, 0, 1, 0, 1, 1),
(12057, 30353, 30353, 100.0, 0, 1, 0, 1, 1),
(12057, 30354, 30354, 100.0, 0, 1, 0, 1, 1);
DELETE FROM `reference_loot_template` WHERE `Entry` IN (30352, 30353, 30354);
INSERT INTO `reference_loot_template`(`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(30352, 16834, 0, 0.0, 0, 1, 1, 1, 1),
(30352, 16842, 0, 0.0, 0, 1, 1, 1, 1),
(30352, 16846, 0, 0.0, 0, 1, 1, 1, 1),
(30352, 16854, 0, 0.0, 0, 1, 1, 1, 1),
(30352, 16866, 0, 0.0, 0, 1, 1, 1, 1),
(30352, 17066, 0, 0.0, 0, 1, 1, 1, 1),
(30353, 16795, 0, 0.0, 0, 1, 1, 1, 1),
(30353, 16808, 0, 0.0, 0, 1, 1, 1, 1),
(30353, 16813, 0, 0.0, 0, 1, 1, 1, 1),
(30353, 16821, 0, 0.0, 0, 1, 1, 1, 1),
(30353, 17071, 0, 0.0, 0, 1, 1, 1, 1),
(30354, 17105, 0, 20.0, 0, 1, 1, 1, 1),
(30354, 18820, 0, 0.0, 0, 1, 1, 1, 1),
(30354, 18821, 0, 0.0, 0, 1, 1, 1, 1),
(30354, 18822, 0, 0.0, 0, 1, 1, 1, 1),
(30354, 18823, 0, 0.0, 0, 1, 1, 1, 1),
(30354, 18824, 0, 0.0, 0, 1, 1, 1, 1),
(30354, 18829, 0, 0.0, 0, 1, 1, 1, 1),
(30354, 18832, 0, 20.0, 0, 1, 1, 1, 1),
(30354, 18861, 0, 0.0, 0, 1, 1, 1, 1),
(30354, 19136, 0, 0.0, 0, 1, 1, 1, 1),
(30354, 19142, 0, 0.0, 0, 1, 1, 1, 1),
(30354, 19143, 0, 0.0, 0, 1, 1, 1, 1),
(30354, 19144, 0, 0.0, 0, 1, 1, 1, 1);
-- Baron Geddon (shared ref with Lucifron)
DELETE FROM `creature_loot_template` WHERE `Entry` = 12056;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(12056, 4787, 0, 40.0, 0, 1, 0, 1, 5),
(12056, 7068, 0, 30.0, 0, 1, 0, 1, 6),
(12056, 7077, 0, 30.0, 0, 1, 0, 1, 3),
(12056, 7078, 0, 50.0, 0, 1, 0, 1, 2),
(12056, 17010,0, 14.0, 0, 1, 0, 1, 1),
(12056, 18563,0, 3.0, 0, 1, 0, 1, 1),
(12056, 20951,0, 1.0, 1, 1, 0, 1, 1),
(12056, 30001, 30001, 10.0, 0, 1, 0, 1, 1),
(12056, 30349, 30349, 100.0, 0, 1, 0, 1, 1),
(12056, 30350, 30350, 100.0, 0, 1, 0, 1, 1);
DELETE FROM `reference_loot_template` WHERE `Entry` IN (30349, 30350, 30351);
INSERT INTO `reference_loot_template`(`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(30349, 16836, 0, 20.0, 0, 1, 1, 1, 1),
(30349, 16844, 0, 20.0, 0, 1, 1, 1, 1),
(30349, 16856, 0, 20.0, 0, 1, 1, 1, 1),
(30349, 18820, 0, 0.0, 0, 1, 1, 1, 1),
(30349, 18821, 0, 0.0, 0, 1, 1, 1, 1),
(30349, 18822, 0, 0.0, 0, 1, 1, 1, 1),
(30349, 18823, 0, 0.0, 0, 1, 1, 1, 1),
(30349, 18829, 0, 0.0, 0, 1, 1, 1, 1),
(30349, 18861, 0, 0.0, 0, 1, 1, 1, 1),
(30349, 19136, 0, 0.0, 0, 1, 1, 1, 1),
(30349, 19142, 0, 0.0, 0, 1, 1, 1, 1),
(30349, 19143, 0, 0.0, 0, 1, 1, 1, 1),
(30349, 19144, 0, 0.0, 0, 1, 1, 1, 1),
(30350, 16797, 0, 0.0, 0, 1, 1, 1, 1),
(30350, 16807, 0, 0.0, 0, 1, 1, 1, 1),
(30350, 17110, 0, 0.0, 0, 1, 1, 1, 1);
-- Golemagg (shared ref with Lucifron)
DELETE FROM `creature_loot_template` WHERE `Entry` = 11988;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(11988, 7075, 0, 30.0, 0, 1, 0, 1, 3),
(11988, 7076, 0, 40.0, 0, 1, 0, 1, 2),
(11988, 7077, 0, 30.0, 0, 1, 0, 1, 3),
(11988, 7078, 0, 40.0, 0, 1, 0, 1, 2),
(11988, 17011, 0, 14.0, 0, 1, 0, 1, 1),
(11988, 17203, 0, 20.0, 0, 1, 0, 1, 1),
(11988, 20951, 0, 1.0, 1, 1, 0, 1, 1),
(11988, 30001, 30001, 10.0, 0, 1, 0, 1, 1),
(11988, 30343, 30343, 100.0, 0, 1, 0, 1, 1),
(11988, 30344, 30344, 100.0, 0, 1, 0, 1, 1),
(11988, 30345, 30345, 100.0, 0, 1, 0, 1, 1);
DELETE FROM `reference_loot_template` WHERE `Entry` IN (30343, 30344, 30345);
INSERT INTO `reference_loot_template`(`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(30343, 16798, 0, 0.0, 0, 1, 1, 1, 1),
(30343, 16809, 0, 0.0, 0, 1, 1, 1, 1),
(30343, 16815, 0, 0.0, 0, 1, 1, 1, 1),
(30343, 16820, 0, 0.0, 0, 1, 1, 1, 1),
(30344, 16833, 0, 0.0, 0, 1, 1, 1, 1),
(30344, 16841, 0, 0.0, 0, 1, 1, 1, 1),
(30344, 16845, 0, 0.0, 0, 1, 1, 1, 1),
(30344, 16853, 0, 0.0, 0, 1, 1, 1, 1),
(30344, 16865, 0, 0.0, 0, 1, 1, 1, 1),
(30345, 17072, 0, 25.0, 0, 1, 1, 1, 1),
(30345, 17103, 0, 25.0, 0, 1, 1, 1, 1),
(30345, 18820, 0, 0.0, 0, 1, 1, 1, 1),
(30345, 18821, 0, 0.0, 0, 1, 1, 1, 1),
(30345, 18822, 0, 0.0, 0, 1, 1, 1, 1),
(30345, 18823, 0, 0.0, 0, 1, 1, 1, 1),
(30345, 18824, 0, 0.0, 0, 1, 1, 1, 1),
(30345, 18829, 0, 0.0, 0, 1, 1, 1, 1),
(30345, 18842, 0, 25.0, 0, 1, 1, 1, 1),
(30345, 18861, 0, 0.0, 0, 1, 1, 1, 1),
(30345, 19136, 0, 0.0, 0, 1, 1, 1, 1),
(30345, 19142, 0, 0.0, 0, 1, 1, 1, 1),
(30345, 19143, 0, 0.0, 0, 1, 1, 1, 1),
(30345, 19144, 0, 0.0, 0, 1, 1, 1, 1);
-- Majordomo Executus Cache of the Firelord
DELETE FROM `gameobject_loot_template` WHERE (`Entry` = 16719);
INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(16719, 12000, 12000, 100.0, 0, 1, 0, 1, 1),
(16719, 18646, 0, 50.0, 0, 1, 1, 1, 1),
(16719, 18703, 0, 50.0, 0, 1, 1, 1, 1),
(16719, 20951, 0, 1.0, 1, 1, 0, 1, 1);
DELETE FROM `reference_loot_template` WHERE `Entry` = 12000;
INSERT INTO `reference_loot_template`(`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(12000, 18806, 0, 0.0, 0, 1, 1, 1, 1),
(12000, 18809, 0, 0.0, 0, 1, 1, 1, 1),
(12000, 18810, 0, 0.0, 0, 1, 1, 1, 1),
(12000, 18812, 0, 0.0, 0, 1, 1, 1, 1),
(12000, 19140, 0, 0.0, 0, 1, 1, 1, 1),
(12000, 18803, 0, 0.0, 0, 1, 2, 1, 1),
(12000, 18805, 0, 0.0, 0, 1, 2, 1, 1),
(12000, 18808, 0, 0.0, 0, 1, 2, 1, 1),
(12000, 18811, 0, 0.0, 0, 1, 2, 1, 1),
(12000, 19139, 0, 0.0, 0, 1, 2, 1, 1);
-- Ragnaros
DELETE FROM `creature_loot_template` WHERE `Entry` = 11502;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(11502, 7078, 0, 40, 0, 1, 0, 1, 9),
(11502, 17204, 0, 3, 0, 1, 0, 1, 1),
(11502, 17982, 0, 95, 0, 1, 0, 1, 1),
(11502, 19017, 0, 100, 1, 1, 0, 1, 1),
(11502, 20951, 0, 1, 1, 1, 0, 1, 1),
(11502, 21110, 0, 100, 0, 1, 0,1, 1),
(11502, 30171, 30171, 100, 0, 1, 0, 1, 2),
(11502, 30484, 30484, 100, 0, 1, 0, 1, 1),
(11502, 30485, 30485, 100, 0, 1, 0, 1, 1),
(11502, 30547, 30547, 100, 0, 1, 0, 1, 1),
(11502, 30549, 30549, 100, 0, 1, 0, 1, 1),
(11502, 30550, 30550, 100, 0, 1, 0, 1, 1);
DELETE FROM `reference_loot_template` WHERE `Entry` IN (30171, 30484, 30485, 30547, 30549, 30550, 34011, 34012, 34013, 34014, 34015, 34026, 34027, 34028, 34029, 34030);
INSERT INTO `reference_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(30171,1203 ,0,0,0,1,1,1,1),
(30171,1973 ,0,0,0,1,1,1,1),
(30171,2564 ,0,0,0,1,1,1,1),
(30171,4696 ,0,0,0,1,1,1,1),
(30171,5266 ,0,0,0,1,1,1,1),
(30171,5267 ,0,0,0,1,1,1,1),
(30171,6622 ,0,0,0,1,1,1,1),
(30171,7734 ,0,0,0,1,1,1,1),
(30171,7976 ,0,0,0,1,1,1,1),
(30171,7991 ,0,0,0,1,1,1,1),
(30171,8028 ,0,0,0,1,1,1,1),
(30171,9402 ,0,0,0,1,1,1,1),
(30171,10605,0,0,0,1,1,1,1),
(30171,10608,0,0,0,1,1,1,1),
(30171,11302,0,0,0,1,1,1,1),
(30171,12698,0,0,0,1,1,1,1),
(30171,12711,0,0,0,1,1,1,1),
(30171,12717,0,0,0,1,1,1,1),
(30171,12720,0,0,0,1,1,1,1),
(30171,12728,0,0,0,1,1,1,1),
(30171,13000,0,0,0,1,1,1,1),
(30171,13001,0,0,0,1,1,1,1),
(30171,13002,0,0,0,1,1,1,1),
(30171,13003,0,0,0,1,1,1,1),
(30171,13004,0,0,0,1,1,1,1),
(30171,13006,0,0,0,1,1,1,1),
(30171,13007,0,0,0,1,1,1,1),
(30171,13008,0,0,0,1,1,1,1),
(30171,13009,0,0,0,1,1,1,1),
(30171,13013,0,0,0,1,1,1,1),
(30171,13015,0,0,0,1,1,1,1),
(30171,13030,0,0,0,1,1,1,1),
(30171,13036,0,0,0,1,1,1,1),
(30171,13040,0,0,0,1,1,1,1),
(30171,13047,0,0,0,1,1,1,1),
(30171,13053,0,0,0,1,1,1,1),
(30171,13060,0,0,0,1,1,1,1),
(30171,13066,0,0,0,1,1,1,1),
(30171,13067,0,0,0,1,1,1,1),
(30171,13070,0,0,0,1,1,1,1),
(30171,13072,0,0,0,1,1,1,1),
(30171,13073,0,0,0,1,1,1,1),
(30171,13075,0,0,0,1,1,1,1),
(30171,13077,0,0,0,1,1,1,1),
(30171,13083,0,0,0,1,1,1,1),
(30171,13085,0,0,0,1,1,1,1),
(30171,13091,0,0,0,1,1,1,1),
(30171,13096,0,0,0,1,1,1,1),
(30171,13107,0,0,0,1,1,1,1),
(30171,13111,0,0,0,1,1,1,1),
(30171,13113,0,0,0,1,1,1,1),
(30171,13116,0,0,0,1,1,1,1),
(30171,13118,0,0,0,1,1,1,1),
(30171,13120,0,0,0,1,1,1,1),
(30171,13123,0,0,0,1,1,1,1),
(30171,13125,0,0,0,1,1,1,1),
(30171,13126,0,0,0,1,1,1,1),
(30171,13130,0,0,0,1,1,1,1),
(30171,13133,0,0,0,1,1,1,1),
(30171,13135,0,0,0,1,1,1,1),
(30171,13144,0,0,0,1,1,1,1),
(30171,13146,0,0,0,1,1,1,1),
(30171,14501,0,0,0,1,1,1,1),
(30171,14509,0,0,0,1,1,1,1),
(30171,14511,0,0,0,1,1,1,1),
(30171,17413,0,0,0,1,1,1,1),
(30171,17414,0,0,0,1,1,1,1),
(30171,17682,0,0,0,1,1,1,1),
(30171,17683,0,0,0,1,1,1,1),
(30171,18600,0,0,0,1,1,1,1),
(30171,22388,0,0,0,1,1,1,1),
(30171,22389,0,0,0,1,1,1,1),
(30171,22390,0,0,0,1,1,1,1),
(30171,22393,0,0,0,1,1,1,1),
(30171,22890,0,0,0,1,1,1,1),
(30171,22891,0,0,0,1,1,1,1),
(30547,16901,0,0,0,1,1,1,1),
(30547,16909,0,0,0,1,1,1,1),
(30547,16915,0,0,0,1,1,1,1),
(30547,16922,0,0,0,1,1,1,1),
(30547,16930,0,0,0,1,1,1,1),
(30547,16938,0,0,0,1,1,1,1),
(30547,16946,0,0,0,1,1,1,1),
(30547,16962,0,0,0,1,1,1,1),
(30485,18814,0,0,0,1,1,1,1),
(30485,18815,0,0,0,1,1,1,1),
(30485,18816,0,0,0,1,1,1,1),
(30485,18817,0,0,0,1,1,1,1),
(30485,19138,0,0,0,1,1,1,1),
(30484,16901,0,0,0,1,1,1,1),
(30484,16922,0,0,0,1,1,1,1),
(30484,16915,0,0,0,1,1,1,1),
(30484,16909,0,0,0,1,1,1,1),
(30484,16930,0,0,0,1,1,1,1),
(30484,16938,0,0,0,1,1,1,1),
(30484,16954,0,0,0,1,1,1,1),
(30484,16962,0,0,0,1,1,1,1),
(30549,17063,0,0,0,1,1,1,1),
(30549,17102,0,0,0,1,1,1,1),
(30549,17106,0,0,0,1,1,1,1),
(30549,17107,0,0,0,1,1,1,1),
(30549,19137,0,0,0,1,1,1,1),
(30550,17076,0,8,0,1,1,1,1),
(30550,17082,0,8,0,1,1,1,1),
(30550,17104,0,8,0,1,1,1,1);
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_03_23_02' WHERE sql_rev = '1647689221083701700';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -801,11 +801,11 @@ uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
{
if (type == DAMAGE_FALL) // DealDamage not apply item durability loss at self damage
{
LOG_DEBUG("entities.player", "We are fall to death, loosing 10 percents durability");
DurabilityLossAll(0.10f, false);
LOG_DEBUG("entities.player", "Player::EnvironmentalDamage: Player '{}' ({}) fall to death, losing {} durability",
GetName(), GetGUID().ToString(), sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH), false);
// durability lost message
WorldPacket data2(SMSG_DURABILITY_DAMAGE_DEATH, 0);
GetSession()->SendPacket(&data2);
SendDurabilityLoss();
}
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM, 1, type);
@@ -4592,6 +4592,11 @@ Corpse* Player::GetCorpse() const
return GetMap()->GetCorpseByPlayer(GetGUID());
}
void Player::SendDurabilityLoss()
{
SendDirectMessage(WorldPackets::Misc::DurabilityDamageDeath().Write());
}
void Player::DurabilityLossAll(double percent, bool inventory)
{
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++)

View File

@@ -1976,6 +1976,7 @@ public:
void BuildPlayerRepop();
void RepopAtGraveyard();
void SendDurabilityLoss();
void DurabilityLossAll(double percent, bool inventory);
void DurabilityLoss(Item* item, double percent);
void DurabilityPointsLossAll(int32 points, bool inventory);

View File

@@ -17343,8 +17343,7 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
LOG_DEBUG("entities.unit", "We are dead, losing {} percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
plrVictim->DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH), false);
// durability lost message
WorldPacket data(SMSG_DURABILITY_DAMAGE_DEATH, 0);
plrVictim->GetSession()->SendPacket(&data);
plrVictim->SendDurabilityLoss();
}
// Call KilledUnit for creatures
if (killer && killer->GetTypeId() == TYPEID_UNIT && killer->IsAIEnabled)

View File

@@ -114,6 +114,14 @@ namespace WorldPackets
ObjectGuid Roller;
};
class DurabilityDamageDeath final : public ServerPacket
{
public:
DurabilityDamageDeath() : ServerPacket(SMSG_DURABILITY_DAMAGE_DEATH, 0) { }
WorldPacket const* Write() override { return &_worldPacket; }
};
class CrossedInebriationThreshold final : public ServerPacket
{
public:
@@ -124,6 +132,7 @@ namespace WorldPackets
ObjectGuid Guid;
uint32 Threshold = 0;
uint32 ItemID = 0;
};
}
}

View File

@@ -1051,7 +1051,7 @@ public:
if (show == "off")
{
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_CREATURE_BY_ID);
stmt->SetData(0, 1);
stmt->SetArguments(1, 1, 1);
PreparedQueryResult result = WorldDatabase.Query(stmt);
if (!result)

View File

@@ -2471,6 +2471,7 @@ DurabilityLoss.InPvP = 0
#
# DurabilityLoss.OnDeath
# Description: Durability loss percentage on death.
# Note: On 3.3.5 client always shows log message "Your items have lost 10% durability"
# Default: 10
DurabilityLoss.OnDeath = 10