Add the ability to change a skill's level via right-click

This commit is contained in:
cncfanatics
2010-09-09 15:32:01 +02:00
parent ca80583001
commit d850aac7ad
3 changed files with 52 additions and 3 deletions

View File

@@ -55,6 +55,7 @@ class Character():
def getSkillLevel(self, charID, skillID):
skill = eos.db.getCharacter(charID).getSkill(skillID)
eos.db.commit()
return skill.level if skill.learned else "Not learned"
def rename(self, charID, newName):
@@ -93,3 +94,13 @@ class Character():
char = eos.db.getCharacter(charID)
char.apiFetch(charName)
eos.db.commit()
def changeLevel(self, charID, skillID, level):
char = eos.db.getCharacter(charID)
skill = char.getSkill(skillID)
if level == "Unlearned":
skill.learned = False
else:
skill.level = level
eos.db.commit()