summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 777d777a2..bc76859e9 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1001,14 +1001,24 @@ ACMD_FUNC(jobchange)
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %d", &job, &upper) < 1) {
- int i, found = 0;
-
- for (i = JOB_NOVICE; i < JOB_MAX; ++i) {
- if (strncmpi(message, job_name(i), 16) == 0) {
- job = i;
- upper = 0;
- found = 1;
- break;
+ int i;
+ bool found = false;
+
+ upper = 0;
+
+ // Normal Jobs
+ for( i = JOB_NOVICE; i < JOB_MAX_BASIC && !found; i++ ){
+ if (strncmpi(message, job_name(i), 16) == 0) {
+ job = i;
+ found = true;
+ }
+ }
+
+ // High Jobs, Babys and Third
+ for( i = JOB_NOVICE_HIGH; i < JOB_MAX && !found; i++ ){
+ if (strncmpi(message, job_name(i), 16) == 0) {
+ job = i;
+ found = true;
}
}