diff --git a/common/database/database_update_manifest.cpp b/common/database/database_update_manifest.cpp index ae899a869..40e83a7cb 100644 --- a/common/database/database_update_manifest.cpp +++ b/common/database/database_update_manifest.cpp @@ -6422,8 +6422,8 @@ ADD PRIMARY KEY (`account_id`, `slot_id`); ManifestEntry{ .version = 9298, .description = "2024_10_24_inventory_changes.sql", - .check = "SHOW COLUMN FROM `inventory` LIKE 'charid'", - .condition = "empty", + .check = "SHOW COLUMNS FROM `inventory` LIKE 'character_id'", + .condition = "missing", .match = "", .sql = R"( ALTER TABLE `inventory` @@ -6450,6 +6450,8 @@ UPDATE `inventory` SET `slot_id` = ((`slot_id` - 311) + 5210) WHERE `slot_id` BE UPDATE `inventory` SET `slot_id` = ((`slot_id` - 321) + 5410) WHERE `slot_id` BETWEEN 321 AND 330; -- Bag 8 UPDATE `inventory` SET `slot_id` = ((`slot_id` - 331) + 5610) WHERE `slot_id` BETWEEN 331 AND 340; -- Bag 9 UPDATE `inventory` SET `slot_id` = ((`slot_id` - 341) + 5810) WHERE `slot_id` BETWEEN 341 AND 350; -- Bag 10 +UPDATE `inventory` SET `slot_id` = ((`slot_id` - 8000) + 6010) WHERE `slot_id` BETWEEN 8000 AND 8199; -- Cursor Overflow +DELETE FROM `inventory` WHERE `slot_id` BETWEEN 8200 AND 8999; -- Extreme Cursor Overflow UPDATE `inventory` SET `slot_id` = ((`slot_id` - 351) + 6010) WHERE `slot_id` BETWEEN 351 AND 360; -- Cursor Bag UPDATE `inventory` SET `slot_id` = ((`slot_id` - 2031) + 6210) WHERE `slot_id` BETWEEN 2031 AND 2040; -- Bank Bag 1 UPDATE `inventory` SET `slot_id` = ((`slot_id` - 2041) + 6410) WHERE `slot_id` BETWEEN 2041 AND 2050; -- Bank Bag 2 diff --git a/zone/corpse.cpp b/zone/corpse.cpp index 6d2a92da3..ce77061b1 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -366,8 +366,8 @@ Corpse::Corpse(Client *c, int32 rez_exp, KilledByTypes in_killed_by) : Mob( if (iter != removed_list.end()) { std::stringstream ss(""); - ss << "DELETE FROM `inventory` WHERE `charid` = " << c->CharacterID(); - ss << " AND `slotid` IN (" << (*iter); + ss << "DELETE FROM `inventory` WHERE `character_id` = " << c->CharacterID(); + ss << " AND `slot_id` IN (" << (*iter); ++iter; while (iter != removed_list.end()) { diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 455a45ed5..f95c4d7f9 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -1338,27 +1338,27 @@ bool ZoneDatabase::SaveCharacterInvSnapshot(uint32 character_id) { ") " "SELECT" " %u," - " `charid`," - " `slotid`," - " `itemid`," + " `character_id`," + " `slot_id`," + " `item_id`," " `charges`," " `color`," - " `augslot1`," - " `augslot2`," - " `augslot3`," - " `augslot4`," - " `augslot5`," - " `augslot6`," + " `augment_one`," + " `augment_two`," + " `augment_three`," + " `augment_four`," + " `augment_five`," + " `augment_six`," " `instnodrop`," " `custom_data`," - " `ornamenticon`," - " `ornamentidfile`," + " `ornament_icon`," + " `ornament_idfile`," " `ornament_hero_model`," " `guid` " "FROM" " `inventory` " "WHERE" - " `charid` = %u", + " `char_id` = %u", time_index, character_id ); @@ -1600,23 +1600,23 @@ bool ZoneDatabase::RestoreCharacterInvSnapshot(uint32 character_id, uint32 times "INSERT " "INTO" " `inventory` " - "(`charid`," - " `slotid`," - " `itemid`," + "(`char_id`," + " `slot_id`," + " `item_id`," " `charges`," " `color`," - " `augslot1`," - " `augslot2`," - " `augslot3`," - " `augslot4`," - " `augslot5`," - " `augslot6`," + " `augment_one`," + " `augment_two`," + " `augment_three`," + " `augment_four`," + " `augment_five`," + " `augment_six`," " `instnodrop`," " `custom_data`," - " `ornamenticon`," - " `ornamentidfile`," + " `ornament_icon`," + " `ornament_idfile`," " `ornament_hero_model`," - " `guid`" + " `guid` " ") " "SELECT" " `charid`,"