diff --git a/src/engine/db/handlers/dbCharacterSkillHandler.java b/src/engine/db/handlers/dbCharacterSkillHandler.java index f6db2a05..8867987d 100644 --- a/src/engine/db/handlers/dbCharacterSkillHandler.java +++ b/src/engine/db/handlers/dbCharacterSkillHandler.java @@ -115,27 +115,6 @@ public class dbCharacterSkillHandler extends dbHandlerBase { characterSkills.put(cs.getSkillsBase().getName(), cs); } - if (playerCharacter.getRace().getName().equals("Saetor")) { - SkillsBase staff = SkillsBase.getFromCache(71438003); - if(staff != null && !characterSkills.containsKey(staff.getName())){ - CharacterSkill newSkill = new CharacterSkill(staff,playerCharacter); //staff - playerCharacter.getSkills().put(staff.getName(),newSkill); - newSkill.updateDatabase(); - } - SkillsBase staffMastery = SkillsBase.getFromCache(-61022283); - if(staffMastery != null && !characterSkills.containsKey(staffMastery.getName())){ - CharacterSkill newSkill = new CharacterSkill(staffMastery,playerCharacter); //staff mastery - playerCharacter.getSkills().put(staffMastery.getName(),newSkill); - newSkill.updateDatabase(); - } - SkillsBase parry = SkillsBase.getFromCache(95961104); - if(parry != null && !characterSkills.containsKey(parry.getName())){ - CharacterSkill newSkill = new CharacterSkill(parry,playerCharacter); //parry - playerCharacter.getSkills().put(parry.getName(),newSkill); - newSkill.updateDatabase(); - } - } - } catch (SQLException e) { Logger.error(e); } diff --git a/src/engine/net/client/msg/TrainMsg.java b/src/engine/net/client/msg/TrainMsg.java index cb778dcf..3f3545d2 100644 --- a/src/engine/net/client/msg/TrainMsg.java +++ b/src/engine/net/client/msg/TrainMsg.java @@ -94,7 +94,6 @@ public class TrainMsg extends ClientNetMsg { if (sk == null) return; - if (sk.getSkillsBase().getToken() == 40661438) { int maxValue = 15; diff --git a/src/engine/objects/CharacterSkill.java b/src/engine/objects/CharacterSkill.java index a4cb9588..e789c416 100644 --- a/src/engine/objects/CharacterSkill.java +++ b/src/engine/objects/CharacterSkill.java @@ -490,6 +490,26 @@ public class CharacterSkill extends AbstractGameObject { ConcurrentHashMap skills = pc.getSkills(); + if (pc.getRace().getName().equals("Saetor")) { + SkillsBase staff = SkillsBase.getFromCache(71438003); + if(staff != null && !skills.containsKey(staff.getName())){ + CharacterSkill newSkill = new CharacterSkill(staff,pc); //staff + skills.put(staff.getName(),newSkill); + //newSkill.updateDatabase(); + } + SkillsBase staffMastery = SkillsBase.getFromCache(-61022283); + if(staffMastery != null && !skills.containsKey(staffMastery.getName())){ + CharacterSkill newSkill = new CharacterSkill(staffMastery,pc); //staff mastery + skills.put(staffMastery.getName(),newSkill); + //newSkill.updateDatabase(); + } + SkillsBase parry = SkillsBase.getFromCache(95961104); + if(parry != null && !skills.containsKey(parry.getName())){ + CharacterSkill newSkill = new CharacterSkill(parry,pc); //parry + skills.put(parry.getName(),newSkill); + //newSkill.updateDatabase(); + } + } //First add skills that don't exist Race race = pc.getRace(); if (race != null) { @@ -538,6 +558,10 @@ public class CharacterSkill extends AbstractGameObject { continue; } } + if (pc.getRace().getName().equals("Saetor")) { + if (cs.getSkillsBase().getName().equals("Parry") || cs.getSkillsBase().getName().equals("Staff") || cs.getSkillsBase().getName().equals("Staff Mastery")) + valid = true; + } //if skill doesn't belong to any runes, then remove it if (!valid) { DbManager.CharacterSkillQueries.DELETE_SKILL(cs.getObjectUUID());