diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-05 21:27:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-05 21:27:48 +0300 |
commit | 3bf3c1375fcf65755e360ad8108afdb758a89c0a (patch) | |
tree | f6eb57893a12e113098ec3ca4e50e7c6a79bb361 /hercules | |
parent | 1c6c8889704dc1d7c733a225a8b3cecba8f405e9 (diff) | |
download | evol-tools-3bf3c1375fcf65755e360ad8108afdb758a89c0a.tar.gz evol-tools-3bf3c1375fcf65755e360ad8108afdb758a89c0a.tar.bz2 evol-tools-3bf3c1375fcf65755e360ad8108afdb758a89c0a.tar.xz evol-tools-3bf3c1375fcf65755e360ad8108afdb758a89c0a.zip |
hercules: update db cnverter for support new db fields.
Diffstat (limited to 'hercules')
-rw-r--r-- | hercules/code/server/db/char.py | 18 | ||||
-rw-r--r-- | hercules/templates/char.sql | 12 | ||||
-rw-r--r-- | hercules/templates/login.sql | 4 |
3 files changed, 20 insertions, 14 deletions
diff --git a/hercules/code/server/db/char.py b/hercules/code/server/db/char.py index 45a0918..eaf9df5 100644 --- a/hercules/code/server/db/char.py +++ b/hercules/code/server/db/char.py @@ -26,12 +26,12 @@ def saveCharTable(users): "{str},{agi},{vit},{INT},{dex},{luk},{max_hp},{hp},{max_sp}," + "{sp},{status_point},{skill_point},{option},{karma},{manner}," + "{party_id},{guild_id},{pet_id},{homun_id},{elemental_id}," + - "{hair},{hair_color},{clothes_color},{weapon},{shield}," + + "{hair},{hair_color},{clothes_color},{body},{weapon},{shield}," + "{head_top},{head_mid},{head_bottom},{robe}," + "'{last_map}',{last_x},{last_y},'{save_map}',{save_x},{save_y}," + "{partner_id},{online},{father},{mother},{child},{fame}," + "{rename},{delete_date},{slotchange},{char_opt},{font}," + - "{unban_time},{uniqueitem_counter},'{sex}')").format( + "{unban_time},{uniqueitem_counter},'{sex}',{hotkey_rowshift})").format( char_id = user.char_id, account_id = user.account_id, char_num = user.char_num, @@ -65,6 +65,7 @@ def saveCharTable(users): hair = user.hair, hair_color = user.hair_color, clothes_color = user.clothes_color, + body = 0, weapon = user.weapon, shield = user.shield, head_top = user.head_top, @@ -90,7 +91,8 @@ def saveCharTable(users): font = "0", unban_time = "0", uniqueitem_counter = len(user.inventory), - sex = "U" + sex = "U", + hotkey_rowshift = 0 )) w.write("\n") @@ -114,17 +116,17 @@ def saveCharTableCustom(users): "{str},{agi},{vit},{INT},{dex},{luk},{max_hp},{hp},{max_sp}," + "{sp},{status_point},{skill_point},{option},{karma},{manner}," + "{party_id},{guild_id},{pet_id},{homun_id},{elemental_id}," + - "{hair},{hair_color},{clothes_color},{weapon},{shield}," + + "{hair},{hair_color},{clothes_color},{body},{weapon},{shield}," + "{head_top},{head_mid},{head_bottom},{robe}," + "'{last_map}',{last_x},{last_y},'{save_map}',{save_x},{save_y}," + "{partner_id},{online},{father},{mother},{child},{fame}," + "{rename},{delete_date},{slotchange},{char_opt},{font}," + - "{unban_time},{uniqueitem_counter},'{sex}')").format( + "{unban_time},{uniqueitem_counter},'{sex}',{hotkey_rowshift})").format( char_id = user.char_id, account_id = user.account_id, char_num = user.char_num, name = escapeSqlStr(user.char_name), - CLASS = user.char_class, + CLASS = 0, base_level = user.base_level, job_level = user.job_level, base_exp = user.base_exp, @@ -153,6 +155,7 @@ def saveCharTableCustom(users): hair = user.hair, hair_color = user.hair_color, clothes_color = user.clothes_color, + body = 0, weapon = user.weapon, shield = user.shield, head_top = user.head_top, @@ -178,6 +181,7 @@ def saveCharTableCustom(users): font = "0", unban_time = "0", uniqueitem_counter = len(user.inventory), - sex = "U" + sex = "U", + hotkey_rowshift = 0 )) w.write("\n") diff --git a/hercules/templates/char.sql b/hercules/templates/char.sql index 37a1d55..0f75eb5 100644 --- a/hercules/templates/char.sql +++ b/hercules/templates/char.sql @@ -14,13 +14,13 @@ CREATE TABLE IF NOT EXISTS `char` ( `str` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', `agi` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', `vit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', - `INT` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `int` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', `dex` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', `luk` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', - `max_hp` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `hp` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `max_sp` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0', - `sp` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0', + `max_hp` INT(9) UNSIGNED NOT NULL DEFAULT '0', + `hp` INT(9) UNSIGNED NOT NULL DEFAULT '0', + `max_sp` INT(9) UNSIGNED NOT NULL DEFAULT '0', + `sp` INT(9) UNSIGNED NOT NULL DEFAULT '0', `status_point` INT(11) UNSIGNED NOT NULL DEFAULT '0', `skill_point` INT(11) UNSIGNED NOT NULL DEFAULT '0', `option` INT(11) NOT NULL DEFAULT '0', @@ -34,6 +34,7 @@ CREATE TABLE IF NOT EXISTS `char` ( `hair` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', `hair_color` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', `clothes_color` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', + `body` SMALLINT(5) unsigned NOT NULL default '0', `weapon` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', `shield` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', `head_top` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', @@ -60,6 +61,7 @@ CREATE TABLE IF NOT EXISTS `char` ( `unban_time` INT(11) UNSIGNED NOT NULL DEFAULT '0', `uniqueitem_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', `sex` ENUM('M','F','U') NOT NULL DEFAULT 'U', + `hotkey_rowshift` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`char_id`), UNIQUE KEY `name_key` (`name`), KEY `account_id` (`account_id`), diff --git a/hercules/templates/login.sql b/hercules/templates/login.sql index fdc9f91..e64de4a 100644 --- a/hercules/templates/login.sql +++ b/hercules/templates/login.sql @@ -11,9 +11,9 @@ CREATE TABLE IF NOT EXISTS `login` ( `unban_time` INT(11) UNSIGNED NOT NULL DEFAULT '0', `expiration_time` INT(11) UNSIGNED NOT NULL DEFAULT '0', `logincount` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', - `lastlogin` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastlogin` DATETIME NULL, `last_ip` VARCHAR(100) NOT NULL DEFAULT '', - `birthdate` DATE NOT NULL DEFAULT '0000-00-00', + `birthdate` DATE NULL, `character_slots` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', `pincode` VARCHAR(4) NOT NULL DEFAULT '', `pincode_change` INT(11) UNSIGNED NOT NULL DEFAULT '0', |