summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-28 08:47:36 -0700
committerJared Adams <jaxad0127@gmail.com>2009-02-28 08:47:36 -0700
commite673349395f41aeb0ba18711d23f1cc7636ab52c (patch)
treeebea48fbfd2f3f0fc723df04755194130bd802d9
parent02bd75d7617eb511db93e58eeb3a734d66d0c099 (diff)
downloadtmwa-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).
-rw-r--r--src/map/npc.c5
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++;