From e9184f246a1742770b0801a537c2fa874151d9d5 Mon Sep 17 00:00:00 2001 From: killerwife Date: Sun, 11 Feb 2024 00:30:33 +0100 Subject: [PATCH] [s2473] Item: Adjust itemTextId in item_instance to correspond to packet, load and item_text width --- sql/base/characters.sql | 4 ++-- .../s2473_01_characters_item_instance_text_id_fix.sql | 6 ++++++ src/shared/revision_sql.h | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 sql/updates/characters/s2473_01_characters_item_instance_text_id_fix.sql diff --git a/sql/base/characters.sql b/sql/base/characters.sql index f6a91cd2a3..66ea31ea4c 100644 --- a/sql/base/characters.sql +++ b/sql/base/characters.sql @@ -21,7 +21,7 @@ DROP TABLE IF EXISTS `character_db_version`; CREATE TABLE `character_db_version` ( - `required_s2452_01_characters_fishingSteps` bit(1) DEFAULT NULL + `required_s2473_01_characters_item_instance_text_id_fix` bit(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Last applied sql update to DB'; -- @@ -1420,7 +1420,7 @@ CREATE TABLE `item_instance` ( `enchantments` text NOT NULL, `randomPropertyId` smallint(5) NOT NULL default '0', `durability` int(5) unsigned NOT NULL default '0', - `itemTextId` mediumint(8) unsigned NOT NULL default '0', + `itemTextId` int(8) unsigned NOT NULL default '0', PRIMARY KEY (`guid`), KEY `idx_owner_guid` (`owner_guid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Item System'; diff --git a/sql/updates/characters/s2473_01_characters_item_instance_text_id_fix.sql b/sql/updates/characters/s2473_01_characters_item_instance_text_id_fix.sql new file mode 100644 index 0000000000..ec51d6ee1e --- /dev/null +++ b/sql/updates/characters/s2473_01_characters_item_instance_text_id_fix.sql @@ -0,0 +1,6 @@ +ALTER TABLE character_db_version CHANGE COLUMN required_s2452_01_characters_fishingSteps required_s2473_01_characters_item_instance_text_id_fix bit; + + +-- did not correspond to core load and item_text column and packet field width +ALTER TABLE item_instance MODIFY `itemTextId` INT UNSIGNED NOT NULL DEFAULT 0; + diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 9f0acf9b42..221e4ecc4b 100644 --- a/src/shared/revision_sql.h +++ b/src/shared/revision_sql.h @@ -2,6 +2,6 @@ #define __REVISION_SQL_H__ #define REVISION_DB_REALMD "required_s2455_01_realmd_platform" #define REVISION_DB_LOGS "required_s2433_01_logs_anticheat" - #define REVISION_DB_CHARACTERS "required_s2452_01_characters_fishingSteps" + #define REVISION_DB_CHARACTERS "required_s2473_01_characters_item_instance_text_id_fix" #define REVISION_DB_MANGOS "required_s2472_01_mangos_precision_decimal" #endif // __REVISION_SQL_H__