diff options
| author | Shauren <shauren.trinity@gmail.com> | 2016-03-13 20:18:05 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2016-03-13 20:18:05 +0100 |
| commit | 1925778e44a370b26ae8f16b76279f62d20fb5be (patch) | |
| tree | 34d538fc88ec955f250f6c060bf8659de7565d8b /sql/updates/characters | |
| parent | 895878010e7dc3fb342bcae5e216bc1543828213 (diff) | |
Core/Players: Split playerBytes fields in characters table
(cherry picked from commit 2a6f65fddcdbe074ace6cd08ab27ec73a64ffe76)
Diffstat (limited to 'sql/updates/characters')
| -rw-r--r-- | sql/updates/characters/2016_03_13_2016_01_05_00_characters.sql | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/updates/characters/2016_03_13_2016_01_05_00_characters.sql b/sql/updates/characters/2016_03_13_2016_01_05_00_characters.sql new file mode 100644 index 00000000000..11850067be9 --- /dev/null +++ b/sql/updates/characters/2016_03_13_2016_01_05_00_characters.sql @@ -0,0 +1,19 @@ +ALTER TABLE `characters` + ADD `skin` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `money`, + ADD `face` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `skin`, + ADD `hairStyle` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `face`, + ADD `hairColor` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `hairStyle`, + ADD `facialStyle` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `hairColor`, + ADD `bankSlots` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `facialStyle`, + ADD `restState` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `bankSlots`; + +UPDATE `characters` SET + `skin`=`playerBytes`&0xFF, + `face`=(`playerBytes`>>8)&0xFF, + `hairStyle`=(`playerBytes`>>16)&0xFF, + `hairColor`=(`playerBytes`>>24)&0xFF, + `facialStyle`=`playerBytes2`&0xFF, + `bankSlots`=(`playerBytes2`>>16)&0xFF, + `restState`=(`playerBytes2`>>24)&0xFF; + +ALTER TABLE `characters` DROP `playerBytes`, DROP `playerBytes2`; |
