summaryrefslogtreecommitdiff
path: root/hercules/code/server/itemdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'hercules/code/server/itemdb.py')
-rw-r--r--hercules/code/server/itemdb.py4
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