PlayerBytes fields in characters table

This commit is contained in:
Nefertumm
2018-01-14 02:07:31 -03:00
parent 90ed2548c0
commit 13d09b6590
4 changed files with 145 additions and 116 deletions

View File

@@ -0,0 +1,21 @@
INSERT INTO version_db_characters (`sql_rev`) VALUES ('1515873371010860000');
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`;