diff options
| author | megamage <none@none> | 2009-07-01 18:07:20 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-07-01 18:07:20 -0500 |
| commit | e1d93bd00f676701b1de87f86a1f2fc5cfc11438 (patch) | |
| tree | 092bc22e10ba60a13b5bf04ee351f614d8679b4c /sql/updates | |
| parent | 8122a15f467a8493cd5c49decc4fe09499b78af4 (diff) | |
*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
Diffstat (limited to 'sql/updates')
| -rw-r--r-- | sql/updates/4346_8098_characters.sql | 27 | ||||
| -rw-r--r-- | sql/updates/4346_8098_world.sql | 10 |
2 files changed, 37 insertions, 0 deletions
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; |
