Hello, I would have a question, how do I add l2jacis rev 368, a starting lvl 80 for created characters to my project? I know this can be easily added in clientpackect / chatactercreate.java I tried all the ways and it doesn't work.
Quote
newChar.setExpAndSp(Experience.LEVEL[80], 0);
I tried that also doesn't work, I have something like that in all the code.
}
// The class id related to this template is post-newbie.
final PlayerTemplate template = PlayerData.getInstance().getTemplate(_classId);
if (template == null || template.getClassBaseLevel() > 80)
{
sendPacket(CharCreateFail.REASON_CREATION_FAILED);
return;
}
// Create the player Object.
final Player player = Player.create(IdFactory.getInstance().getNextId(), template, getClient().getAccountName(), _name, _hairStyle, _hairColor, _face, Sex.values()[_sex]);
if (player == null)
{
sendPacket(CharCreateFail.REASON_CREATION_FAILED);
return;
}
// Set default values.
player.setCurrentCp(player.getMaxCp());
player.setCurrentHp(player.getMaxHp());
player.setCurrentMp(player.getMaxMp());
Question
TreVor
Hello, I would have a question, how do I add l2jacis rev 368, a starting lvl 80 for created characters to my project? I know this can be easily added in clientpackect / chatactercreate.java I tried all the ways and it doesn't work.
I tried that also doesn't work, I have something like that in all the code.
} // The class id related to this template is post-newbie. final PlayerTemplate template = PlayerData.getInstance().getTemplate(_classId); if (template == null || template.getClassBaseLevel() > 80) { sendPacket(CharCreateFail.REASON_CREATION_FAILED); return; } // Create the player Object. final Player player = Player.create(IdFactory.getInstance().getNextId(), template, getClient().getAccountName(), _name, _hairStyle, _hairColor, _face, Sex.values()[_sex]); if (player == null) { sendPacket(CharCreateFail.REASON_CREATION_FAILED); return; } // Set default values. player.setCurrentCp(player.getMaxCp()); player.setCurrentHp(player.getMaxHp()); player.setCurrentMp(player.getMaxMp());
2 answers to this question
Recommended Posts