summaryrefslogtreecommitdiff
path: root/src/plugins/db2sql.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-09-05 00:07:08 +0200
committerHaru <haru@dotalux.com>2017-09-17 17:48:11 +0200
commita98b2d93f3727d18d8add5cb5c35830cbb171114 (patch)
tree39eda9621cf0a0f5f734a2d0d9360db3eeff73ff /src/plugins/db2sql.c
parent00570591031eb6fc99c7c26ba58a2a7efb144e7f (diff)
downloadhercules-a98b2d93f3727d18d8add5cb5c35830cbb171114.tar.gz
hercules-a98b2d93f3727d18d8add5cb5c35830cbb171114.tar.bz2
hercules-a98b2d93f3727d18d8add5cb5c35830cbb171114.tar.xz
hercules-a98b2d93f3727d18d8add5cb5c35830cbb171114.zip
Split 'View' in two different fields in the item database
- The field was used both for sprite view IDs and for weapon or ammunition subtypes. Now the fields 'ViewSprite' and 'Subtype' are used respectively. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/plugins/db2sql.c')
-rw-r--r--src/plugins/db2sql.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index 33a62757a..cb8660df9 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -255,6 +255,9 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source)
// type
StrBuf->Printf(&buf, "'%d',", it->flag.delay_consume ? IT_DELAYCONSUME : it->type);
+ // subtype
+ StrBuf->Printf(&buf, "'%d',", it->subtype);
+
// price_buy
StrBuf->Printf(&buf, "'%d',", it->value_buy);
@@ -324,8 +327,8 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source)
// disable_options
StrBuf->Printf(&buf, "'%d',", it->flag.no_options?1:0);
- // view
- StrBuf->Printf(&buf, "'%d',", it->look);
+ // view_sprite
+ StrBuf->Printf(&buf, "'%d',", it->view_sprite);
// bindonequip
StrBuf->Printf(&buf, "'%d',", it->flag.bindonequip?1:0);
@@ -449,6 +452,7 @@ void itemdb2sql_tableheader(void)
" `name_english` varchar(50) NOT NULL DEFAULT '',\n"
" `name_japanese` varchar(50) NOT NULL DEFAULT '',\n"
" `type` tinyint(2) UNSIGNED NOT NULL DEFAULT '0',\n"
+ " `subtype` tinyint(2) UNSIGNED DEFAULT NULL,\n"
" `price_buy` mediumint(10) DEFAULT NULL,\n"
" `price_sell` mediumint(10) DEFAULT NULL,\n"
" `weight` smallint(5) UNSIGNED DEFAULT NULL,\n"
@@ -466,7 +470,7 @@ void itemdb2sql_tableheader(void)
" `equip_level_max` smallint(5) UNSIGNED DEFAULT NULL,\n"
" `refineable` tinyint(1) UNSIGNED DEFAULT NULL,\n"
" `disable_options` tinyint(1) UNSIGNED DEFAULT NULL,\n"
- " `view` smallint(3) UNSIGNED DEFAULT NULL,\n"
+ " `view_sprite` smallint(3) UNSIGNED DEFAULT NULL,\n"
" `bindonequip` tinyint(1) UNSIGNED DEFAULT NULL,\n"
" `forceserial` tinyint(1) UNSIGNED DEFAULT NULL,\n"
" `buyingstore` tinyint(1) UNSIGNED DEFAULT NULL,\n"