From b80647dacebd450ca85616044503f9da9d0ddceb Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sat, 7 Feb 2009 12:46:28 +0000 Subject: Add ability to use multiples of item base prices You can now do simple multiples of the base price of items. You cac do base price * n, or base price / n: -1 base price -2 base price -3 base price / 2 -4 base prive * 2 -5 base price / 3 -6 base price * 3 ... --- src/map/npc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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++; -- cgit v1.2.3-60-g2f50