diff options
author | Fate <fate-tmw@googlemail.com> | 2008-12-11 22:53:13 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-12-11 22:53:13 -0700 |
commit | dbd6ed3452751d45b866572fd42784bc8e7c8161 (patch) | |
tree | 531d07c67a325616044038219bb83d2d93664dad /src | |
parent | 5e32a6be59536a6810bf558ec07dd3a615569c39 (diff) | |
parent | 19a9355ec566fcab79f0039f496a420d79d29c80 (diff) | |
download | tmwa-dbd6ed3452751d45b866572fd42784bc8e7c8161.tar.gz tmwa-dbd6ed3452751d45b866572fd42784bc8e7c8161.tar.bz2 tmwa-dbd6ed3452751d45b866572fd42784bc8e7c8161.tar.xz tmwa-dbd6ed3452751d45b866572fd42784bc8e7c8161.zip |
Merge branch 'master' of git@gitorious.org:tmw-eathena/mainline
Diffstat (limited to 'src')
-rw-r--r-- | src/map/itemdb.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 2c247bb..6105279 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -348,12 +348,13 @@ static int itemdb_readdb(void) memcpy(id->jname,str[2],24); id->type=atoi(str[3]); // buy≠sell*2 は item_value_db.txt で指定してください。 - if (atoi(str[5])) { // sell値を優先とする - id->value_buy=atoi(str[5])*2; - id->value_sell=atoi(str[5]); - } else { - id->value_buy=atoi(str[4]); - id->value_sell=atoi(str[4])/2; + id->value_buy=atoi(str[4]); + id->value_sell=atoi(str[5]); + if (id->value_buy == 0 && id->value_sell == 0) { + } else if (id->value_buy == 0) { + id->value_buy=id->value_sell*2; + } else if (id->value_sell == 0) { + id->value_sell=id->value_buy/2; } id->weight=atoi(str[6]); id->atk=atoi(str[7]); |