From 79f5139dbe5f9b8c16051bcfd4efefce19a2cb46 Mon Sep 17 00:00:00 2001 From: "Jan M. D. Hansen" <53914190+jamadaha@users.noreply.github.com> Date: Fri, 23 Jul 2021 15:09:36 +0200 Subject: [PATCH] fix(DB/GO): chest pooling to battered chests in Elwynn Forest (#7052) - Closes #6460 --- .../rev_1626825033504612600.sql | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1626825033504612600.sql diff --git a/data/sql/updates/pending_db_world/rev_1626825033504612600.sql b/data/sql/updates/pending_db_world/rev_1626825033504612600.sql new file mode 100644 index 000000000..5f82bee69 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1626825033504612600.sql @@ -0,0 +1,69 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1626825033504612600'); + +-- Remove the nodes from any existing nodes then add them to their distinct pool + +-- ME = Murloc Encampment +-- BP = Blackwell Pumpin +-- JL = Jarod's Landing +-- FM = Fargodeep Mine +-- FE = Forest's Edge + +SET +@POOL_ENTRY_ME = 11665, +@POOL_ENTRY_BP = 11666, +@POOL_ENTRY_JL = 11667, +@POOL_ENTRY_FM = 11668, +@POOL_ENTRY_FE = 11669, +@POOL_SIZE = 1, +@CHANCE = 0, +@RESPAWN = 3600, +@POOL_DESCRIPTION_ME = 'Battered Chests - Murloc Encampment near Goldshire', +@POOL_DESCRIPTION_BP = 'Battered Chests - Brackwell Pumpin Patch', +@POOL_DESCRIPTION_JL = 'Battered Chests - Jerods Landing', +@POOL_DESCRIPTION_FM = 'Battered Chests - Fargodepp Mine Entrance', +@POOL_DESCRIPTION_FE = 'Battered Chests - Forests Edge'; + +-- Create temp table with pool entries +CREATE TABLE TEMP_POOL_ENTRIES (guid int, pool_entry int, description char(64)); +INSERT INTO TEMP_POOL_ENTRIES VALUES +(33616, @POOL_ENTRY_ME, 'Battered Chest, Murloc Encampment near Goldshire, Node 1'), +(26234, @POOL_ENTRY_ME, 'Battered Chest, Murloc Encampment near Goldshire, Node 2'), +(26978, @POOL_ENTRY_ME, 'Battered Chest, Murloc Encampment near Goldshire, Node 3'), +(85756, @POOL_ENTRY_BP, 'Battered Chest, Brackwell Pumpin Patch, Node 1'), +(85879, @POOL_ENTRY_BP, 'Battered Chest, Brackwell Pumpin Patch, Node 2'), +(85745, @POOL_ENTRY_BP, 'Battered Chest, Brackwell Pumpin Patch, Node 3'), +(26916, @POOL_ENTRY_BP, 'Battered Chest, Brackwell Pumpin Patch, Node 4'), +(26895, @POOL_ENTRY_JL, 'Battered Chest, Jerods Landing, Node 1'), +(87390, @POOL_ENTRY_JL, 'Battered Chest, Jerods Landing, Node 2'), +(85746, @POOL_ENTRY_JL, 'Battered Chest, Jerods Landing, Node 3'), +(30950, @POOL_ENTRY_FM, 'Battered Chest, Fargodepp Mine Entrance, Node 1'), +(85770, @POOL_ENTRY_FM, 'Battered Chest, Fargodepp Mine Entrance, Node 2'), +(26865, @POOL_ENTRY_FE, 'Battered Chest, Forests Edge, Node 1'), +(85747, @POOL_ENTRY_FE, 'Battered Chest, Forests Edge, Node 2'), +(34032, @POOL_ENTRY_FE, 'Battered Chest, Forests Edge, Node 3'); + +-- General Winterspring Zone +DELETE FROM `pool_template` WHERE `entry` IN (SELECT DISTINCT `pool_entry` FROM TEMP_POOL_ENTRIES); + + +INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES +(@POOL_ENTRY_ME, @POOL_SIZE, @POOL_DESCRIPTION_ME), +(@POOL_ENTRY_BP, @POOL_SIZE, @POOL_DESCRIPTION_BP), +(@POOL_ENTRY_JL, @POOL_SIZE, @POOL_DESCRIPTION_JL), +(@POOL_ENTRY_FM, @POOL_SIZE, @POOL_DESCRIPTION_FM), +(@POOL_ENTRY_FE, @POOL_SIZE, @POOL_DESCRIPTION_FE); + + +-- Delete from any existing pools +DELETE FROM `pool_gameobject` WHERE `guid` IN (SELECT `guid` FROM TEMP_POOL_ENTRIES); + +-- Add to new pool +INSERT INTO `pool_gameobject` +(`guid`, `pool_entry`, `chance`, `description`) +SELECT `guid`, `pool_entry`, @CHANCE, `description` FROM TEMP_POOL_ENTRIES; + +-- Set spawn time +UPDATE `gameobject` SET `spawntimesecs` = @RESPAWN WHERE `guid` IN (SELECT `guid` FROM TEMP_POOL_ENTRIES); + +-- Drop temp table +DROP TABLE TEMP_POOL_ENTRIES;