Automatically check on character load that the character at least has all skills in the database for it (#1645)

This commit is contained in:
blitzmann
2018-06-14 22:52:33 -04:00
parent 4fd54ca74a
commit 5a085b6e27

View File

@@ -57,8 +57,15 @@ class Character(object):
def init(self):
self.__skillIdMap = {}
for skill in self.__skills:
self.__skillIdMap[skill.itemID] = skill
# get a list of skills that the character does no have, and add them (removal of old skills happens in the
# Skill loading)
for skillID in set(self.getSkillIDMap().keys()).difference(set(self.__skillIdMap.keys())):
self.addSkill(Skill(self, skillID, self.defaultLevel))
self.dirtySkills = set()
self.alphaClone = None