diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-16 20:55:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-16 20:55:28 +0300 |
commit | d27db8cca78e06582d8372a9d05f6483202c26ba (patch) | |
tree | b0cd0384dc86d822ecf5a233ddbe2d046ea19585 /hercules/code/servertoclient/monsters.py | |
parent | d71aa7d6d7203e5408730cfd86d5f402e0e17a4a (diff) | |
download | evol-tools-d27db8cca78e06582d8372a9d05f6483202c26ba.tar.gz evol-tools-d27db8cca78e06582d8372a9d05f6483202c26ba.tar.bz2 evol-tools-d27db8cca78e06582d8372a9d05f6483202c26ba.tar.xz evol-tools-d27db8cca78e06582d8372a9d05f6483202c26ba.zip |
Add parsing for some RO formats.
Parsing act files and start of parsing spr files (for monsters)
Diffstat (limited to 'hercules/code/servertoclient/monsters.py')
-rw-r--r-- | hercules/code/servertoclient/monsters.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hercules/code/servertoclient/monsters.py b/hercules/code/servertoclient/monsters.py index d08ce66..32255a3 100644 --- a/hercules/code/servertoclient/monsters.py +++ b/hercules/code/servertoclient/monsters.py @@ -9,7 +9,9 @@ from sets import Set from code.fileutils import * from code.stringutils import * -def convertMonsters(): +from code.servertoclient.sprites import * + +def convertMonsters(isNonFree = False, idtofile = None): destDir = "clientdata/" templatesDir = "templates/" monstersDbFile = "serverdata/sql-files/mob_db_re.sql" @@ -20,6 +22,7 @@ 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: @@ -33,6 +36,10 @@ def convertMonsters(): if len(rows) < 5: continue monsterId = rows[0] + if isNonFree == True: + if monsterId in idtofile: + convertSprite("rodata/data/sprite/ёуЅєЕН/" + idtofile[monsterId]) + name = strToXml(stripQuotes(rows[2])) data = data + tpl.format(monsterId, name, monsterSprite) |