From 277bd144533cbb7e50507e2d31e2f3fc5339a0cf Mon Sep 17 00:00:00 2001 From: blitzmann Date: Tue, 11 Jul 2017 19:23:08 -0400 Subject: [PATCH] See #1234 - temporarily add conditional to ensure we run the skill level checking code only when a character exists to prevent error. This may cause some issues with the alpha characters since that may not get checked anymore. --- eos/saveddata/character.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/eos/saveddata/character.py b/eos/saveddata/character.py index 9ab92c15c..0105add30 100644 --- a/eos/saveddata/character.py +++ b/eos/saveddata/character.py @@ -333,13 +333,16 @@ class Skill(HandledItem): @property def level(self): - # Ensure that All 5/0 character have proper skill levels (in case database gets corrupted) - if self.character.name == "All 5": - self.activeLevel = self.__level = 5 - elif self.character.name == "All 0": - self.activeLevel = self.__level = 0 - elif self.character.alphaClone: - return min(self.activeLevel, self.character.alphaClone.getSkillLevel(self)) or 0 + # @todo: there is a phantom bug that keep popping up about skills not having a character... See #1234 + # Remove this at some point when the cause can be determined. + if self.character: + # Ensure that All 5/0 character have proper skill levels (in case database gets corrupted) + if self.character.name == "All 5": + self.activeLevel = self.__level = 5 + elif self.character.name == "All 0": + self.activeLevel = self.__level = 0 + elif self.character.alphaClone: + return min(self.activeLevel, self.character.alphaClone.getSkillLevel(self)) or 0 return self.activeLevel or 0