This commit is contained in:
blitzmann
2017-05-14 22:44:02 -04:00
parent 7a0ea759ef
commit bff44c46f8
3 changed files with 7 additions and 3 deletions

View File

@@ -218,8 +218,12 @@ class Character(object):
def isDirty(self):
return len(self.dirtySkills) > 0
@property
def ro(self):
return self == self.getAll5() or self == self.getAll0()
def saveLevels(self):
if self == self.getAll5() or self == self.getAll0():
if self.ro:
raise ReadOnlyException("This character is read-only")
for skill in self.dirtySkills.copy():