diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-18 13:04:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-18 13:06:10 +0300 |
commit | 43989d89221a7fda3c6afed4c6621c5717b50fd4 (patch) | |
tree | 4f01dfb47a00edd74d5ce21d455447314beff1ed | |
parent | f8de9b9d7c1be9b90fce3729501268f20edf9d0c (diff) | |
download | evol-tools-43989d89221a7fda3c6afed4c6621c5717b50fd4.tar.gz evol-tools-43989d89221a7fda3c6afed4c6621c5717b50fd4.tar.bz2 evol-tools-43989d89221a7fda3c6afed4c6621c5717b50fd4.tar.xz evol-tools-43989d89221a7fda3c6afed4c6621c5717b50fd4.zip |
Hercules: replace item type 2 to 0, add nodelonuse and nostorage attributes.
Also fix trade closing block in itemdb.
-rw-r--r-- | hercules/code/server/itemdb.py | 10 | ||||
-rw-r--r-- | hercules/templates/item_db.tpl | 1 |
2 files changed, 10 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 = "" diff --git a/hercules/templates/item_db.tpl b/hercules/templates/item_db.tpl index 574a430..2971e60 100644 --- a/hercules/templates/item_db.tpl +++ b/hercules/templates/item_db.tpl @@ -42,6 +42,7 @@ item_db: ( nogstorage: true/false (boolean, defaults to false) nomail: true/false (boolean, defaults to false) noauction: true/false (boolean, defaults to false) + nodelonuse: true/false (boolean, defaults to false) } Nouse: { (defaults to no restrictions) override: GroupID (int, defaults to 100) |