From 19a9355ec566fcab79f0039f496a420d79d29c80 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 11 Dec 2008 17:39:01 +0000 Subject: Fix ItemDB loading to use the correct buy/sell --- src/map/itemdb.c | 13 +++++++------ 1 file 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]); -- cgit v1.2.3-70-g09d2