summaryrefslogtreecommitdiff
path: root/hercules/code/server/tmw
diff options
context:
space:
mode:
Diffstat (limited to 'hercules/code/server/tmw')
-rw-r--r--hercules/code/server/tmw/itemdb.py2
-rw-r--r--hercules/code/server/tmw/npcs.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/hercules/code/server/tmw/itemdb.py b/hercules/code/server/tmw/itemdb.py
index 52a0a27..96f5cd0 100644
--- a/hercules/code/server/tmw/itemdb.py
+++ b/hercules/code/server/tmw/itemdb.py
@@ -43,7 +43,7 @@ def convertItemDb():
for f in xrange(0, sz):
rows[f] = rows[f].strip()
- items[rows[1]] = rows[0]
+ items[rows[1]] = {'id':rows[0],'buy':rows[4]}
w.write("{\n")
c.write("{0}\t{1}\n".format(rows[1], rows[0]))
writeIntField(w, "Id", rows[0])
diff --git a/hercules/code/server/tmw/npcs.py b/hercules/code/server/tmw/npcs.py
index 0608ace..c7edea2 100644
--- a/hercules/code/server/tmw/npcs.py
+++ b/hercules/code/server/tmw/npcs.py
@@ -186,10 +186,10 @@ def itemsToShop(tracker, itemsStr):
for str2 in items:
parts = itemsSplit2.split(str2)
if parts[1][0] == "*":
- parts[1] = parts[1][1:]
+ parts[1] = str((int(parts[1][1:]) * int(itemsDict[parts[0].strip()]['buy'])))
if outStr != "":
outStr = outStr + ","
- outStr = outStr + itemsDict[parts[0].strip()] + ":" + parts[1]
+ outStr = outStr + itemsDict[parts[0].strip()]['id'] + ":" + parts[1]
return outStr
def processShop(tracker):