diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-02-28 08:47:36 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-02-28 08:47:36 -0700 |
commit | e673349395f41aeb0ba18711d23f1cc7636ab52c (patch) | |
tree | ebea48fbfd2f3f0fc723df04755194130bd802d9 /src | |
parent | 02bd75d7617eb511db93e58eeb3a734d66d0c099 (diff) | |
download | tmwa-e673349395f41aeb0ba18711d23f1cc7636ab52c.tar.gz tmwa-e673349395f41aeb0ba18711d23f1cc7636ab52c.tar.bz2 tmwa-e673349395f41aeb0ba18711d23f1cc7636ab52c.tar.xz tmwa-e673349395f41aeb0ba18711d23f1cc7636ab52c.zip |
Simplify the negative shop price system
Now it just takes the DB price and multiplies it by the absolute value
of the sell price (if it's negative).
Diffstat (limited to 'src')
-rw-r--r-- | src/map/npc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 2cdcf00..cc0880a 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1245,9 +1245,8 @@ static int npc_parse_shop(char *w1,char *w2,char *w3,char *w4) 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); + value = id->value_buy; * temp + } nd->u.shop_item[pos].value = value; pos++; |