Fix issue in which exception happened because of a bad type check
This commit is contained in:
@@ -378,7 +378,7 @@ class SkillTreeView(wx.Panel):
|
||||
iconId = self.skillBookImageId
|
||||
childId = tree.AppendItem(root, name, iconId, data=wx.TreeItemData(id))
|
||||
level, dirty = sChar.getSkillLevel(char.ID, id)
|
||||
tree.SetItemText(childId, "Level %d" % level if isinstance(level, int) else level, 1)
|
||||
tree.SetItemText(childId, "Level %d" % level if isinstance(level, float) else level, 1)
|
||||
if dirty:
|
||||
tree.SetItemTextColour(childId, wx.BLUE)
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ class Character(object):
|
||||
@staticmethod
|
||||
def getSkillLevel(charID, skillID):
|
||||
skill = eos.db.getCharacter(charID).getSkill(skillID)
|
||||
return skill.level if skill.learned else "Not learned", skill.isDirty
|
||||
return float(skill.level) if skill.learned else "Not learned", skill.isDirty
|
||||
|
||||
@staticmethod
|
||||
def getDirtySkills(charID):
|
||||
|
||||
Reference in New Issue
Block a user