diff options
author | wushin <pasekei@gmail.com> | 2015-02-15 13:07:21 -0600 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-15 22:09:08 +0300 |
commit | 3d47789c6a19655b0d46ab260f51d6d6c69d1bf2 (patch) | |
tree | c8e9d6042af1bb144a14fd00bb3aa0819f76283f | |
parent | 42bfac84a2518b027fd771d02e012a5d979a962f (diff) | |
download | evol-tools-3d47789c6a19655b0d46ab260f51d6d6c69d1bf2.tar.gz evol-tools-3d47789c6a19655b0d46ab260f51d6d6c69d1bf2.tar.bz2 evol-tools-3d47789c6a19655b0d46ab260f51d6d6c69d1bf2.tar.xz evol-tools-3d47789c6a19655b0d46ab260f51d6d6c69d1bf2.zip |
Hercules: tmw convertor: Fix Shop Prices
-rw-r--r-- | hercules/code/server/tmw/itemdb.py | 2 | ||||
-rw-r--r-- | hercules/code/server/tmw/npcs.py | 4 |
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): |