summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-28 21:52:08 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-28 21:52:08 +0300
commit20601d8d891e120cc649db9022795299e4c006fb (patch)
treee399e02718b7ded6655101a0a3959c208843b3f9
parent9f8ebd2ccf85f0a92ceb3770f1e1c109c443f75a (diff)
downloadevol-tools-20601d8d891e120cc649db9022795299e4c006fb.tar.gz
evol-tools-20601d8d891e120cc649db9022795299e4c006fb.tar.bz2
evol-tools-20601d8d891e120cc649db9022795299e4c006fb.tar.xz
evol-tools-20601d8d891e120cc649db9022795299e4c006fb.zip
hercules: Remove npc name from xml.
-rw-r--r--hercules/code/servertoclient/npcs.py4
-rw-r--r--hercules/templates/npc.tpl4
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>