aboutsummaryrefslogtreecommitdiff
path: root/sql/updates/characters
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-12-04 15:13:20 +0100
committerShauren <shauren.trinity@gmail.com>2022-12-04 15:13:20 +0100
commite98e1283ea0034baf6be9aa2ffb386eb5582801b (patch)
treeb1dd854d88e6e049d26b208bb259cdc7d31f29f8 /sql/updates/characters
parentde7c03c8385780f05530c2b3cf952a712d5f8f00 (diff)
Core: Updated to 10.0.2
Diffstat (limited to 'sql/updates/characters')
-rw-r--r--sql/updates/characters/master/2022_12_16_00_characters.sql10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/updates/characters/master/2022_12_16_00_characters.sql b/sql/updates/characters/master/2022_12_16_00_characters.sql
new file mode 100644
index 00000000000..8a0dd2989cd
--- /dev/null
+++ b/sql/updates/characters/master/2022_12_16_00_characters.sql
@@ -0,0 +1,10 @@
+ALTER TABLE `character_inventory` ADD `newSlot` tinyint unsigned;
+ALTER TABLE `character_inventory` DROP INDEX `guid`;
+UPDATE `character_inventory` SET `newSlot`=`slot`;
+UPDATE `character_inventory` SET `newSlot`=`slot`+12 WHERE `slot`>=23 AND `bag`=0; -- free up space for reagent bag
+UPDATE `character_inventory` SET `newSlot`=`slot`+11 WHERE `slot` BETWEEN 19 AND 22 AND `bag`=0; -- free up space for profession equipment
+UPDATE `character_inventory` SET `slot`=`newSlot`;
+ALTER TABLE `character_inventory` ADD UNIQUE KEY `uk_location` (`guid`,`bag`,`slot`);
+ALTER TABLE `character_inventory` DROP `newSlot`;
+
+UPDATE `characters` SET `equipmentCache`=CONCAT(`equipmentCache`, '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ');