Add grant missing skills feature

This commit is contained in:
blitzmann
2017-04-13 22:53:13 -04:00
parent e28bf545e9
commit 283aba4f85
4 changed files with 53 additions and 7 deletions

View File

@@ -378,9 +378,13 @@ class Character(object):
eos.db.commit()
@staticmethod
def changeLevel(charID, skillID, level, persist=False):
def changeLevel(charID, skillID, level, persist=False, ifHigher=False):
char = eos.db.getCharacter(charID)
skill = char.getSkill(skillID)
if ifHigher and level < skill.level:
return
if isinstance(level, basestring) or level > 5 or level < 0:
skill.level = None
else: