diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-24 01:27:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-24 01:27:54 +0300 |
commit | 77dec55fb286637d4bc1ebbc7f44779af9371fee (patch) | |
tree | cd7069d4d4b9d10949be63488895bb3c3521be87 /hercules/code/server/itemdb.py | |
parent | 779f08bf7944c2e42caa726306939eaaefc6cfca (diff) | |
download | evol-tools-77dec55fb286637d4bc1ebbc7f44779af9371fee.tar.gz evol-tools-77dec55fb286637d4bc1ebbc7f44779af9371fee.tar.bz2 evol-tools-77dec55fb286637d4bc1ebbc7f44779af9371fee.tar.xz evol-tools-77dec55fb286637d4bc1ebbc7f44779af9371fee.zip |
hercules: fix shop conversion.
Diffstat (limited to 'hercules/code/server/itemdb.py')
-rw-r--r-- | hercules/code/server/itemdb.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hercules/code/server/itemdb.py b/hercules/code/server/itemdb.py index 5bdc53a..b86b848 100644 --- a/hercules/code/server/itemdb.py +++ b/hercules/code/server/itemdb.py @@ -15,6 +15,7 @@ def convertItemDb(): constsFile = "newserverdata/db/const.txt" fieldsSplit = re.compile(",") scriptsSplit = re.compile("{") + items = dict() with open(srcFile, "r") as r: with open(dstFile, "w") as w: with open(constsFile, "a") as c: @@ -36,6 +37,8 @@ def convertItemDb(): if rows[4] == "2": rows[4] = "0" rows[3] = str(int(rows[3]) | 4) + + items[rows[1]] = rows[0] w.write("{\n") c.write("{0}\t{1}\n".format(rows[1], rows[0])) writeIntField(w, "Id", rows[0]) @@ -99,3 +102,4 @@ def convertItemDb(): w.write("},\n") w.write(")\n") + return items |