diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index ee84c79..932bb6b 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1241,8 +1241,11 @@ static int npc_parse_shop(char *w1,char *w2,char *w3,char *w4) } else break; nd->u.shop_item[pos].nameid = nameid; if (value < 0) { + int temp = abs(value); if (id == NULL) id = itemdb_search(nameid); value = id->value_buy; + if (temp % 2) value = value / ((temp + 1) / 2); + else value = value * (temp / 2); } nd->u.shop_item[pos].value = value; pos++; |