summaryrefslogtreecommitdiff
path: root/hercules/code/server
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-25 22:31:10 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-25 22:31:10 +0300
commit2823a6f2c95d2194e4c8dd0fbb2a63828b746639 (patch)
treec63d8473e96bd7b3c4a4aca5b1a6459183acee8f /hercules/code/server
parent703023a7c455c35af4ba3374a6b40caf920cc51a (diff)
downloadevol-tools-2823a6f2c95d2194e4c8dd0fbb2a63828b746639.tar.gz
evol-tools-2823a6f2c95d2194e4c8dd0fbb2a63828b746639.tar.bz2
evol-tools-2823a6f2c95d2194e4c8dd0fbb2a63828b746639.tar.xz
evol-tools-2823a6f2c95d2194e4c8dd0fbb2a63828b746639.zip
hercules: fix different issues in item_db with wrong item types and other.
Diffstat (limited to 'hercules/code/server')
-rw-r--r--hercules/code/server/tmw/itemdb.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/hercules/code/server/tmw/itemdb.py b/hercules/code/server/tmw/itemdb.py
index f45d4ee..851f36d 100644
--- a/hercules/code/server/tmw/itemdb.py
+++ b/hercules/code/server/tmw/itemdb.py
@@ -187,9 +187,11 @@ def convertItemDb(isNew):
offset = 0
writeStrField(w, "Name", rows[offset + 2])
if rows[offset + 3] == "0":
- writeIntField(w, "Type", "2")
+ itemType = "2"
else:
- writeIntField(w, "Type", rows[offset + 3])
+ itemType = rows[offset + 3]
+ writeIntField(w, "Type", itemType)
+
writeIntField(w, "Buy", rows[offset + 4])
if int(rows[offset + 4])*.75 <= int(rows[offset + 5])*1.24:
writeIntField(w, "Sell", str(int(rows[offset + 4])*.75))
@@ -218,6 +220,8 @@ def convertItemDb(isNew):
writeIntField(w, "View", "11")
elif rows[offset + 13] == "32768":
writeIntField(w, "View", "1")
+ elif itemType == "4": # weapon
+ writeIntField(w, "View", "1")
else:
writeIntField(w, "View", rows[0])
writeIntField(w, "BindOnEquip", "false")
@@ -226,7 +230,11 @@ def convertItemDb(isNew):
writeIntField(w, "Sprite", "0")
scripts = ""
- for f in xrange(17, len(rows)):
+ if isNew == True:
+ offset = -1
+ else:
+ offset = 0
+ for f in xrange(offset + 17, len(rows)):
scripts = scripts + ", " + rows[f]
rows = scriptsSplit.split(scripts)
# Needs .split(';') and \n each