Browse Source

saetor skills

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
74cf9d16c5
  1. 17
      src/engine/objects/PlayerCharacter.java

17
src/engine/objects/PlayerCharacter.java

@ -4207,18 +4207,21 @@ public class PlayerCharacter extends AbstractCharacter {
public synchronized void calculateSkills() { public synchronized void calculateSkills() {
if (this.race.getName().equals("Saetor")) { if (this.race.getName().equals("Saetor")) {
if(this.skills.containsKey("Staff") == false){ SkillsBase staff = SkillsBase.getFromCache("Staff");
CharacterSkill newSkill = new CharacterSkill(SkillsBase.getFromCache("Staff"),this); if(staff != null && this.skills.containsKey(staff.getName()) == false){
CharacterSkill newSkill = new CharacterSkill(staff,this); //staff
this.skills.put("Staff",newSkill); this.skills.put("Staff",newSkill);
newSkill.updateDatabase(); newSkill.updateDatabase();
} }
if(this.skills.containsKey("Staff Mastery") == false){ SkillsBase staffMastery = SkillsBase.getFromCache("Staff Mastery");
CharacterSkill newSkill = new CharacterSkill(SkillsBase.getFromCache("Staff Mastery"),this); if(staffMastery != null && this.skills.containsKey(staffMastery.getName()) == false){
this.skills.put("Staff Mastery",newSkill); CharacterSkill newSkill = new CharacterSkill(staffMastery,this); //staff mastery
this.skills.put(newSkill.getName(),newSkill);
newSkill.updateDatabase(); newSkill.updateDatabase();
} }
if(this.skills.containsKey("Parry") == false){ SkillsBase parry = SkillsBase.getFromCache("Parry");
CharacterSkill newSkill = new CharacterSkill(SkillsBase.getFromCache("Parry"),this); if(parry != null && this.skills.containsKey(parry.getName()) == false){
CharacterSkill newSkill = new CharacterSkill(parry,this); //parry
this.skills.put("Parry",newSkill); this.skills.put("Parry",newSkill);
newSkill.updateDatabase(); newSkill.updateDatabase();
} }

Loading…
Cancel
Save