Browse Source

saetor skills

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
39b235963a
  1. 21
      src/engine/db/handlers/dbCharacterSkillHandler.java
  2. 1
      src/engine/net/client/msg/TrainMsg.java
  3. 24
      src/engine/objects/CharacterSkill.java

21
src/engine/db/handlers/dbCharacterSkillHandler.java

@ -115,27 +115,6 @@ public class dbCharacterSkillHandler extends dbHandlerBase {
characterSkills.put(cs.getSkillsBase().getName(), cs); 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) { } catch (SQLException e) {
Logger.error(e); Logger.error(e);
} }

1
src/engine/net/client/msg/TrainMsg.java

@ -94,7 +94,6 @@ public class TrainMsg extends ClientNetMsg {
if (sk == null) if (sk == null)
return; return;
if (sk.getSkillsBase().getToken() == 40661438) { if (sk.getSkillsBase().getToken() == 40661438) {
int maxValue = 15; int maxValue = 15;

24
src/engine/objects/CharacterSkill.java

@ -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());

Loading…
Cancel
Save