Update executeReborn to take in a job id

This commit is contained in:
Charlie Unfricht
2022-08-16 02:11:38 -04:00
parent 897679afc4
commit b0b197a7a5

View File

@@ -11137,6 +11137,16 @@ public class Character extends AbstractCharacterObject {
}
public void executeReborn() {
// default to beginner: job id = 0
// this prevents a breaking change
executeRebornAs(Job.BEGINNER);
}
public void executeRebornAsId(int jobId) {
executeRebornAs(Job.getById(jobId));
}
public void executeRebornAs(Job job) {
if (!YamlConfig.config.server.USE_REBIRTH_SYSTEM) {
yellowMessage("Rebirth system is not enabled!");
throw new NotEnabledException();
@@ -11145,7 +11155,7 @@ public class Character extends AbstractCharacterObject {
return;
}
addReborns();
changeJob(Job.BEGINNER);
changeJob(job);
setLevel(0);
levelUp(true);
}