diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index ac2a0f47..44973b53 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -4207,18 +4207,21 @@ public class PlayerCharacter extends AbstractCharacter { public synchronized void calculateSkills() { if (this.race.getName().equals("Saetor")) { - if(this.skills.containsKey("Staff") == false){ - CharacterSkill newSkill = new CharacterSkill(SkillsBase.getFromCache("Staff"),this); + SkillsBase staff = SkillsBase.getFromCache("Staff"); + if(staff != null && this.skills.containsKey(staff.getName()) == false){ + CharacterSkill newSkill = new CharacterSkill(staff,this); //staff this.skills.put("Staff",newSkill); newSkill.updateDatabase(); } - if(this.skills.containsKey("Staff Mastery") == false){ - CharacterSkill newSkill = new CharacterSkill(SkillsBase.getFromCache("Staff Mastery"),this); - this.skills.put("Staff Mastery",newSkill); + SkillsBase staffMastery = SkillsBase.getFromCache("Staff Mastery"); + if(staffMastery != null && this.skills.containsKey(staffMastery.getName()) == false){ + CharacterSkill newSkill = new CharacterSkill(staffMastery,this); //staff mastery + this.skills.put(newSkill.getName(),newSkill); newSkill.updateDatabase(); } - if(this.skills.containsKey("Parry") == false){ - CharacterSkill newSkill = new CharacterSkill(SkillsBase.getFromCache("Parry"),this); + SkillsBase parry = SkillsBase.getFromCache("Parry"); + if(parry != null && this.skills.containsKey(parry.getName()) == false){ + CharacterSkill newSkill = new CharacterSkill(parry,this); //parry this.skills.put("Parry",newSkill); newSkill.updateDatabase(); }