diff options
-rw-r--r-- | hercules/code/servertoclient/npcs.py | 4 | ||||
-rw-r--r-- | hercules/templates/npc.tpl | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/hercules/code/servertoclient/npcs.py b/hercules/code/servertoclient/npcs.py index 1c0d76f..be5cb46 100644 --- a/hercules/code/servertoclient/npcs.py +++ b/hercules/code/servertoclient/npcs.py @@ -30,5 +30,7 @@ def convertNpcsNonFree(idtofile): for key in getNpcIds(idtofile): npcSprite = "<sprite>sprites/{0}.xml</sprite>".format(idtofile[key]) - data = data + tpl.format(key, idtofile[key], npcSprite) + data = data + tpl.format( + id = key, + sprite = npcSprite) saveFile(destDir + "npcs.xml", npcs.format(data)) diff --git a/hercules/templates/npc.tpl b/hercules/templates/npc.tpl index 9c345eb..a201d64 100644 --- a/hercules/templates/npc.tpl +++ b/hercules/templates/npc.tpl @@ -1,3 +1,3 @@ - <npc id="{0}" name="{1}"> - {2} + <npc id="{id}"> + {sprite} </npc> |