Does anyone know why skills keep resetting every time I change job? When I switch from job to job like Phantom to Jett or Jett to something else some someskills reset to 0 and get keyboard wiped. This is a concern because this happens upon rebirthing as well. I looked at the changeJob function and found nothing leading to skills being reset or anything about keyboard. I have tried searching for a solution for a while and came up with nothing, would really appreciate a tip on this.
Edit: Some skills get reset to 0 while others stay at max level, which is really weird...
This is the method:
PHP Code:public void changeJob(short newJob) {
try {
cancelEffectFromBuffStat(MapleBuffStat.SHADOWPARTNER);
this.job = newJob;
updateSingleStat(MapleStat.JOB, newJob);
if (!GameConstants.isBeginnerJob(newJob)) {
if (GameConstants.isEvan(newJob) || GameConstants.isResist(newJob) || GameConstants.isMercedes(newJob) || GameConstants.isJett(newJob) || GameConstants.isPhantom(newJob) || GameConstants.isMihile(newJob)) {
if (GameConstants.isPhantom(job)) {
client.getSession().write(CField.updateCardStack(0));
resetRunningStack();
}
int changeSp = (newJob == 2200 || newJob == 2210 || newJob == 2211 || newJob == 2213 ? 3 : 5);
if (GameConstants.isResist(job) && newJob != 3100 && newJob != 3200 && newJob != 3300 && newJob != 3500) {
changeSp = 3;
}
remainingSp[GameConstants.getSkillBook(newJob)] += changeSp;
client.getSession().write(InfoPacket.getSPMsg((byte) changeSp, (short) newJob));
} else {
remainingSp[GameConstants.getSkillBook(newJob)]++;
if (newJob % 10 >= 2) {
remainingSp[GameConstants.getSkillBook(newJob)] += 2;
}
}
if (newJob % 10 >= 1 && level >= 70) { //3rd job or higher. lucky for evans who get 80, 100, 120, 160 ap...
remainingAp += 5;
updateSingleStat(MapleStat.AVAILABLEAP, remainingAp);
}
if (!isGM()) {
resetStatsByJob(true);
if (!GameConstants.isEvan(newJob)) {
if (getLevel() > (newJob == 200 ? 8 : 10) && newJob % 100 == 0 && (newJob % 1000) / 100 > 0) { //first job
remainingSp[GameConstants.getSkillBook(newJob)] += 3 * (getLevel() - (newJob == 200 ? 8 : 10));
}
} else if (newJob == 2200) {
MapleQuest.getInstance(22100).forceStart(this, 0, null);
MapleQuest.getInstance(22100).forceComplete(this, 0);
expandInventory((byte) 1, 4);
expandInventory((byte) 2, 4);
expandInventory((byte) 3, 4);
expandInventory((byte) 4, 4);
client.getSession().write(NPCPacket.getEvanTutorial("UI/tutorial/evan/14/0"));
dropMessage(5, "The baby Dragon hatched and appears to have something to tell you. Click the baby Dragon to start a conversation.");
}
}
updateSingleStat(MapleStat.AVAILABLESP, 0); // we don't care the value here
}
int maxhp = stats.getMaxHp(), maxmp = stats.getMaxMp();
switch (job) {
case 100: // Warrior
case 1100: // Soul Master
case 2100: // Aran
case 3200:
case 5100: // Mihile
maxhp += Randomizer.rand(200, 250);
break;
case 3100:
maxhp += Randomizer.rand(200, 250);
break;
case 3110:
maxhp += Randomizer.rand(300, 350);
break;
case 200: // Magician
case 2200: //evan
case 2210: //evan
maxmp += Randomizer.rand(100, 150);
break;
case 300: // Bowman
case 400: // Thief
case 500: // Pirate
case 2300:
case 3300:
case 3500:
maxhp += Randomizer.rand(100, 150);
maxmp += Randomizer.rand(25, 50);
break;
case 110: // Fighter
case 120: // Page
case 130: // Spearman
case 1110: // Soul Master
case 2110: // Aran
case 3210:
case 5110: // Mihile
maxhp += Randomizer.rand(300, 350);
break;
case 210: // FP
case 220: // IL
case 230: // Cleric
maxmp += Randomizer.rand(400, 450);
break;
case 310: // Bowman
case 320: // Crossbowman
case 410: // Assasin
case 420: // Bandit
case 430: // Semi Dualer
case 510:
case 520:
case 530:
case 2310:
case 1310: // Wind Breaker
case 1410: // Night Walker
case 3310:
case 3510:
maxhp += Randomizer.rand(200, 250);
maxhp += Randomizer.rand(150, 200);
break;
case 900: // GM
case 800: // Manager
maxhp += 99999;
maxmp += 99999;
break;
}
if (maxhp >= 99999) {
maxhp = 99999;
}
if (maxmp >= 99999) {
maxmp = 99999;
}
if (GameConstants.isDemon(job)) {
maxmp = GameConstants.getMPByJob(job);
}
stats.setInfo(maxhp, maxmp, maxhp, maxmp);
Map<MapleStat, Integer> statup = new EnumMap<MapleStat, Integer>(MapleStat.class);
statup.put(MapleStat.MAXHP, Integer.valueOf(maxhp));
statup.put(MapleStat.MAXMP, Integer.valueOf(maxmp));
statup.put(MapleStat.HP, Integer.valueOf(maxhp));
statup.put(MapleStat.MP, Integer.valueOf(maxmp));
characterCard.recalcLocalStats(this);
stats.recalcLocalStats(this);
client.getSession().write(CWvsContext.updatePlayerStats(statup, this));
map.broadcastMessage(this, EffectPacket.showForeignEffect(getId(), 11), false);
silentPartyUpdate();
guildUpdate();
familyUpdate();
if (dragon != null) {
map.broadcastMessage(CField.removeDragon(this.id));
dragon = null;
}
baseSkills();
if (newJob >= 2200 && newJob <= 2218) { //make new
if (getBuffedValue(MapleBuffStat.MONSTER_RIDING) != null) {
cancelBuffStats(MapleBuffStat.MONSTER_RIDING);
}
makeDragon();
}
} catch (Exception e) {
FileoutputUtil.outputFileError(FileoutputUtil.ScriptEx_Log, e); //all jobs throw errors :(
}
}



Reply With Quote![[Help] Exiled v117.1 Retarded Reset](http://ragezone.com/hyper728.png)


