From 9438625a19c070ec20d392fa57f1de6a61b7b985 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 3 Jan 2009 11:06:51 -0600 Subject: [7015] Implement support -1 in item_template.stackable and item_template.maxcount fields. By VladimirMangos. --HG-- branch : trunk --- sql/updates/7015_01_mangos_item_template.sql | 14 ++++++++++++++ sql/updates/TBC-WLK_world.sql | 9 +++++++++ 2 files changed, 23 insertions(+) create mode 100644 sql/updates/7015_01_mangos_item_template.sql (limited to 'sql/updates') diff --git a/sql/updates/7015_01_mangos_item_template.sql b/sql/updates/7015_01_mangos_item_template.sql new file mode 100644 index 00000000000..bdf9a92e796 --- /dev/null +++ b/sql/updates/7015_01_mangos_item_template.sql @@ -0,0 +1,14 @@ +ALTER TABLE db_version CHANGE COLUMN required_7002_01_mangos_spell_chain required_7015_01_mangos_item_template bit; + +UPDATE item_template + SET maxcount = 0 WHERE maxcount > 32000; + +UPDATE item_template + SET stackable = 0 WHERE stackable > 32000; + +ALTER TABLE item_template + CHANGE COLUMN maxcount maxcount smallint(5) NOT NULL default '-1', + CHANGE COLUMN stackable stackable smallint(5) NOT NULL default '1'; + +UPDATE item_template + SET stackable = -1 WHERE stackable = 0; diff --git a/sql/updates/TBC-WLK_world.sql b/sql/updates/TBC-WLK_world.sql index 56292c12504..7106fecc508 100644 --- a/sql/updates/TBC-WLK_world.sql +++ b/sql/updates/TBC-WLK_world.sql @@ -19,6 +19,15 @@ alter table `item_template` add column `StatsCount` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `ContainerSlots`, CHANGE COLUMN `TotemCategory` `TotemCategory` mediumint(9) NOT NULL default '0'; +UPDATE item_template + SET maxcount = 0 WHERE maxcount > 32000; +UPDATE item_template + SET stackable = 0 WHERE stackable > 32000; +ALTER TABLE item_template + CHANGE COLUMN maxcount maxcount smallint(5) NOT NULL default '-1', + CHANGE COLUMN stackable stackable smallint(5) NOT NULL default '1'; +UPDATE item_template + SET stackable = -1 WHERE stackable = 0; alter table `quest_template` add column `PlayersSlain` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `CharTitleId`, -- cgit v1.2.3