diff options
Diffstat (limited to 'hercules/code/servertoclient/monsters.py')
-rw-r--r-- | hercules/code/servertoclient/monsters.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/hercules/code/servertoclient/monsters.py b/hercules/code/servertoclient/monsters.py index 32255a3..782b449 100644 --- a/hercules/code/servertoclient/monsters.py +++ b/hercules/code/servertoclient/monsters.py @@ -23,8 +23,6 @@ def convertMonsters(isNonFree = False, idtofile = None): 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": @@ -36,9 +34,12 @@ def convertMonsters(isNonFree = False, idtofile = None): if len(rows) < 5: continue monsterId = rows[0] - if isNonFree == True: - if monsterId in idtofile: - convertSprite("rodata/data/sprite/ёуЅєЕН/" + idtofile[monsterId]) + if isNonFree == True and monsterId in idtofile: + convertSprite("rodata/data/sprite/ёуЅєЕН/", idtofile[monsterId]) + monsterSprite = "<sprite>monsters/{0}.xml</sprite>".format(idtofile[monsterId]) + else: + monsterSprite = """<sprite>monsters/blub.xml</sprite> + <sprite>accessories/blub-tentacle.xml|#3e4164,3a3968,544a82,64437a,7d6db4,a26392,8f99c4,d294ab,b3cdcd,e7b8b8,d9ecd1,f0e8c5</sprite>"""; name = strToXml(stripQuotes(rows[2])) data = data + tpl.format(monsterId, name, monsterSprite) |