Skip to content

Commit e56a8db

Browse files
committed
0.2.8
1 parent 7481977 commit e56a8db

File tree

3 files changed

+26
-9
lines changed

3 files changed

+26
-9
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
setup(
3535
name="xlc",
36-
version="0.2.7",
36+
version="0.2.8",
3737
url='http://zengrong.net/',
3838
author='zrong',
3939
author_email='zrongzrong@gmail.com',

xlc/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,18 @@ def callEtc(heroPath, sszPath, exportPath):
6262
import hhlc.etc as etc
6363
# import etc
6464
etc.call(heroPath, sszPath, exportPath)
65+
66+
# if __name__ == '__main__':
67+
# callDt(
68+
# "D:\\works\\hhl\\projects\\config\\xls",
69+
# "D:\\works\\hhl\\projects\\client\\src\\conf",
70+
# "D:\\works\\hhl\\projects\\config\\templates",
71+
# ["skill"],
72+
# "lua")
73+
74+
# callEtc(
75+
# "D:\\works\\hhl\\projects\\resource\\art",
76+
# "D:\\works\\hhl\\projects\\resource\\art\\ssz",
77+
# "D:\\works\\hhl\\projects\\resource\\skill"
78+
# )
79+

xlc/etc.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ def getSkill(self, tab, id, obj):
9494
tmpStr = _tab + 'id=' + id + ',\n'
9595

9696
for val in self.tmpl["hero_action"]:
97-
tmpStr += _tab + \
98-
val[0] + '=' + \
99-
self.getValue(obj[val[0]], val[1]) + \
100-
',\n'
97+
if val[0] in obj:
98+
tmpStr += _tab + \
99+
val[0] + '=' + \
100+
self.getValue(obj[val[0]], val[1]) + \
101+
',\n'
101102

102103
return tmpStr[0:-2]
103104

@@ -106,10 +107,11 @@ def _parseEnemy_action(self, tab, obj):
106107
tmpStr = ',\n'
107108

108109
for val in self.tmpl["enemy_action"]:
109-
tmpStr += _tab + \
110-
val[0] + '=' + \
111-
self.getValue(obj[val[0]], val[1]) + \
112-
',\n'
110+
if val[0] in obj:
111+
tmpStr += _tab + \
112+
val[0] + '=' + \
113+
self.getValue(obj[val[0]], val[1]) + \
114+
',\n'
113115

114116
return tmpStr[0:-2] + '\n'
115117

0 commit comments

Comments
 (0)