summaryrefslogtreecommitdiff
path: root/hercules/code
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-18 13:04:08 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-18 13:06:10 +0300
commit43989d89221a7fda3c6afed4c6621c5717b50fd4 (patch)
tree4f01dfb47a00edd74d5ce21d455447314beff1ed /hercules/code
parentf8de9b9d7c1be9b90fce3729501268f20edf9d0c (diff)
downloadtools-43989d89221a7fda3c6afed4c6621c5717b50fd4.tar.gz
tools-43989d89221a7fda3c6afed4c6621c5717b50fd4.tar.bz2
tools-43989d89221a7fda3c6afed4c6621c5717b50fd4.tar.xz
tools-43989d89221a7fda3c6afed4c6621c5717b50fd4.zip
Hercules: replace item type 2 to 0, add nodelonuse and nostorage attributes.
Also fix trade closing block in itemdb.
Diffstat (limited to 'hercules/code')
-rw-r--r--hercules/code/server/itemdb.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/hercules/code/server/itemdb.py b/hercules/code/server/itemdb.py
index a47bb42..1b8c125 100644
--- a/hercules/code/server/itemdb.py
+++ b/hercules/code/server/itemdb.py
@@ -33,6 +33,9 @@ def convertItemDb():
sz = 19
for f in xrange(0, sz):
rows[f] = rows[f].strip()
+ if rows[4] == "2":
+ rows[4] = "0"
+ rows[3] = str(int(rows[3]) | 4)
w.write("{\n")
c.write("{0}\t{1}\n".format(rows[1], rows[0]))
writeIntField(w, "Id", rows[0])
@@ -65,11 +68,16 @@ def convertItemDb():
writeSubField(w, "nodrop", "true")
if trade & 2 == 2:
writeSubField(w, "notrade", "true")
+ if trade & 4 == 4:
+ writeSubField(w, "nodelonuse", "true")
if trade & 8 == 8:
writeSubField(w, "nostorage", "true")
+ if trade & 256 == 256:
+ writeSubField(w, "nogstorage", "true")
if trade & 512 == 512:
writeSubField(w, "noselltonpc", "true")
- writeEndBlock(w)
+ if trade != 0:
+ writeEndBlock(w)
writeIntField(w, "Sprite", "0")
scripts = ""