Skill color goes back to normal when saving/reverting skill.

This commit is contained in:
blitzmann
2015-09-24 22:44:48 -04:00
parent a0f9fb6ad6
commit 2a88e3114b
3 changed files with 29 additions and 9 deletions

View File

@@ -240,6 +240,9 @@ class Character(object):
skill = eos.db.getCharacter(charID).getSkill(skillID)
return (skill.level if skill.learned else "Not learned", skill.isDirty)
def getDirtySkills(self, charID):
return eos.db.getCharacter(charID).dirtySkills
def getCharName(self, charID):
return eos.db.getCharacter(charID).name
@@ -315,7 +318,7 @@ class Character(object):
char.apiUpdateCharSheet(skills)
eos.db.commit()
def changeLevel(self, charID, skillID, level):
def changeLevel(self, charID, skillID, level, persist=False):
char = eos.db.getCharacter(charID)
skill = char.getSkill(skillID)
if isinstance(level, basestring) or level > 5 or level < 0:
@@ -323,6 +326,11 @@ class Character(object):
else:
skill.level = level
if persist:
skill.saveLevel()
eos.db.commit()
def revertLevel(self, charID, skillID):
char = eos.db.getCharacter(charID)
skill = char.getSkill(skillID)