From e1d93bd00f676701b1de87f86a1f2fc5cfc11438 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 1 Jul 2009 18:07:20 -0500 Subject: *Backup your DB! [8098] Support uint32 spell ids in code. Author: VladimirMangos * Propertly work with uint32 spell ids in player action bar * Fix in same time bug with not save equipment set button with id==0 * Merge misc field in character_action and playercreateinfo_action to action field as 3 byte * Propertly load uint32 spell ids from character_spell * Fixed types for some pet/creature related structure for spell id storing. --HG-- branch : trunk --- sql/updates/4346_8098_characters.sql | 27 +++++++++++++++++++++++++++ sql/updates/4346_8098_world.sql | 10 ++++++++++ 2 files changed, 37 insertions(+) create mode 100644 sql/updates/4346_8098_characters.sql create mode 100644 sql/updates/4346_8098_world.sql (limited to 'sql/updates') diff --git a/sql/updates/4346_8098_characters.sql b/sql/updates/4346_8098_characters.sql new file mode 100644 index 00000000000..158e36500d9 --- /dev/null +++ b/sql/updates/4346_8098_characters.sql @@ -0,0 +1,27 @@ +-- ALTER TABLE character_db_version CHANGE COLUMN required_8072_02_characters_characters required_8098_01_characters_character_action bit; + +ALTER TABLE character_action + CHANGE COLUMN action action int(11) unsigned NOT NULL default '0'; + +UPDATE character_action + SET action = action | ( misc < 16 ); + +ALTER TABLE character_action + DROP COLUMN misc; + + +UPDATE character_pet + SET abdata = CONCAT( + (SUBSTRING(abdata, 1, length(SUBSTRING_INDEX(abdata, ' ', 1))) >> 8),' ', + SUBSTRING(abdata, length(SUBSTRING_INDEX(abdata, ' ', 1))+2, length(SUBSTRING_INDEX(abdata, ' ', 2))-length(SUBSTRING_INDEX(abdata, ' ', 1))-1),' ', + (SUBSTRING(abdata, length(SUBSTRING_INDEX(abdata, ' ', 2))+2, length(SUBSTRING_INDEX(abdata, ' ', 3))-length(SUBSTRING_INDEX(abdata, ' ', 2))-1) >> 8),' ', + SUBSTRING(abdata, length(SUBSTRING_INDEX(abdata, ' ', 3))+2, length(SUBSTRING_INDEX(abdata, ' ', 4))-length(SUBSTRING_INDEX(abdata, ' ', 3))-1),' ', + (SUBSTRING(abdata, length(SUBSTRING_INDEX(abdata, ' ', 4))+2, length(SUBSTRING_INDEX(abdata, ' ', 5))-length(SUBSTRING_INDEX(abdata, ' ', 4))-1) >> 8),' ', + SUBSTRING(abdata, length(SUBSTRING_INDEX(abdata, ' ', 5))+2, length(SUBSTRING_INDEX(abdata, ' ', 6))-length(SUBSTRING_INDEX(abdata, ' ', 5))-1),' ', + (SUBSTRING(abdata, length(SUBSTRING_INDEX(abdata, ' ', 6))+2, length(SUBSTRING_INDEX(abdata, ' ', 7))-length(SUBSTRING_INDEX(abdata, ' ', 6))-1) >> 8),' ', + SUBSTRING(abdata, length(SUBSTRING_INDEX(abdata, ' ', 7))+2, length(SUBSTRING_INDEX(abdata, ' ', 8))-length(SUBSTRING_INDEX(abdata, ' ', 7))-1),' ' + ); + + +UPDATE pet_spell + SET active = ( active >> 8); diff --git a/sql/updates/4346_8098_world.sql b/sql/updates/4346_8098_world.sql new file mode 100644 index 00000000000..36e0dd7a3e7 --- /dev/null +++ b/sql/updates/4346_8098_world.sql @@ -0,0 +1,10 @@ +-- ALTER TABLE db_version CHANGE COLUMN required_8071_01_mangos_command required_8098_02_mangos_playercreateinfo_action bit; + +ALTER TABLE playercreateinfo_action + CHANGE COLUMN action action int(11) unsigned NOT NULL default '0'; + +UPDATE playercreateinfo_action + SET action = action | ( misc < 16 ); + +ALTER TABLE playercreateinfo_action + DROP COLUMN misc; -- cgit v1.2.3