Skip to content

Commit

Permalink
Fix issue with adding multiples of the same skill to character via ch…
Browse files Browse the repository at this point in the history
…aracter import (#563)
  • Loading branch information
blitzmann committed Apr 30, 2016
1 parent 87a354a commit fe9139a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions eos/saveddata/character.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ def skills(self):
return self.__skills

def addSkill(self, skill):
if skill.itemID in self.__skillIdMap:
oldSkill = self.__skillIdMap[skill.itemID]
if skill.level > oldSkill.level:
# if new skill is higher, remove old skill (new skill will still append)
self.__skills.remove(oldSkill)
else:
return

self.__skills.append(skill)
self.__skillIdMap[skill.itemID] = skill

Expand Down

0 comments on commit fe9139a

Please sign in to comment.