Update executeReborn to take in a job id
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user