|
|
@ -40,7 +40,6 @@ import engine.server.MBServerStatics; |
|
|
|
import engine.server.login.LoginServer; |
|
|
|
import engine.server.login.LoginServer; |
|
|
|
import engine.server.login.LoginServerMsgHandler; |
|
|
|
import engine.server.login.LoginServerMsgHandler; |
|
|
|
import engine.server.world.WorldServer; |
|
|
|
import engine.server.world.WorldServer; |
|
|
|
import engine.util.MiscUtils; |
|
|
|
|
|
|
|
import org.joda.time.DateTime; |
|
|
|
import org.joda.time.DateTime; |
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
|
|
|
|
|
|
|
@ -4206,26 +4205,7 @@ public class PlayerCharacter extends AbstractCharacter { |
|
|
|
//Call this function to recalculate granted skills and powers for player
|
|
|
|
//Call this function to recalculate granted skills and powers for player
|
|
|
|
public synchronized void calculateSkills() { |
|
|
|
public synchronized void calculateSkills() { |
|
|
|
|
|
|
|
|
|
|
|
if (this.race.getName().equals("Saetor")) { |
|
|
|
|
|
|
|
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(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
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(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
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(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//tell the player to applyBonuses because something has changed
|
|
|
|
//tell the player to applyBonuses because something has changed
|
|
|
|
|
|
|
|
|
|
|
|
runSkillCalc(); |
|
|
|
runSkillCalc(); |
|
|
@ -4237,7 +4217,6 @@ public class PlayerCharacter extends AbstractCharacter { |
|
|
|
//through SkillCalcJob. Designed to only run from one worker thread
|
|
|
|
//through SkillCalcJob. Designed to only run from one worker thread
|
|
|
|
public void runSkillCalc() { |
|
|
|
public void runSkillCalc() { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
//see if any new skills or powers granted
|
|
|
|
//see if any new skills or powers granted
|
|
|
|
CharacterSkill.calculateSkills(this); |
|
|
|
CharacterSkill.calculateSkills(this); |
|
|
|
// calculate granted Trains in powers.
|
|
|
|
// calculate granted Trains in powers.
|
|
|
|