summaryrefslogtreecommitdiff
path: root/hercules
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-20 13:29:05 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-20 13:29:05 +0300
commit7113c2d2c52c670067704a8f4e9d8b45da14fc52 (patch)
tree85493261cba89af9d89ea67430982937ade5274e /hercules
parent5438c5cb3b98c0085201014975212ebe19b90bb9 (diff)
downloadtools-7113c2d2c52c670067704a8f4e9d8b45da14fc52.tar.gz
tools-7113c2d2c52c670067704a8f4e9d8b45da14fc52.tar.bz2
tools-7113c2d2c52c670067704a8f4e9d8b45da14fc52.tar.xz
tools-7113c2d2c52c670067704a8f4e9d8b45da14fc52.zip
hercules: allow use many sprites for monster.
Diffstat (limited to 'hercules')
-rwxr-xr-xhercules/maptool.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/hercules/maptool.py b/hercules/maptool.py
index af8b55b..6d9d51a 100755
--- a/hercules/maptool.py
+++ b/hercules/maptool.py
@@ -353,6 +353,8 @@ def convertMonsters():
monsters = readFile(templatesDir + "monsters.xml")
data = ""
ids = Set()
+ monsterSprite = """<sprite>monsters/blub.xml</sprite>
+ <sprite>accessories/blub-tentacle.xml|#3e4164,3a3968,544a82,64437a,7d6db4,a26392,8f99c4,d294ab,b3cdcd,e7b8b8,d9ecd1,f0e8c5</sprite>""";
with open(monstersDbFile, "r") as f:
for line in f:
if len(line) < 10 or line[0:2] == "//" or line[0:12] != "REPLACE INTO":
@@ -365,7 +367,7 @@ def convertMonsters():
continue
monsterId = rows[0]
name = strToXml(stripQuotes(rows[2]))
- data = data + tpl.format(monsterId, name)
+ data = data + tpl.format(monsterId, name, monsterSprite)
saveFile(destDir + "monsters.xml", monsters.format(data))