|
|
@ -490,6 +490,26 @@ public class CharacterSkill extends AbstractGameObject { |
|
|
|
|
|
|
|
|
|
|
|
ConcurrentHashMap<String, CharacterSkill> skills = pc.getSkills(); |
|
|
|
ConcurrentHashMap<String, CharacterSkill> 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
|
|
|
|
//First add skills that don't exist
|
|
|
|
Race race = pc.getRace(); |
|
|
|
Race race = pc.getRace(); |
|
|
|
if (race != null) { |
|
|
|
if (race != null) { |
|
|
@ -538,6 +558,10 @@ public class CharacterSkill extends AbstractGameObject { |
|
|
|
continue; |
|
|
|
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 skill doesn't belong to any runes, then remove it
|
|
|
|
if (!valid) { |
|
|
|
if (!valid) { |
|
|
|
DbManager.CharacterSkillQueries.DELETE_SKILL(cs.getObjectUUID()); |
|
|
|
DbManager.CharacterSkillQueries.DELETE_SKILL(cs.getObjectUUID()); |
|
|
|