summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-11-30 02:58:47 +0100
committerHaru <haru@dotalux.com>2016-12-03 15:38:55 +0100
commitcfa4ae95efca5557d085c56815259f47e6f380fb (patch)
treee08b55a2c9fb546f7f2ed41977f1e0bb8041e445 /src/map/atcommand.c
parentb0fde17b0ee155f1123e9ae6148ddd2df88cd965 (diff)
downloadhercules-cfa4ae95efca5557d085c56815259f47e6f380fb.tar.gz
hercules-cfa4ae95efca5557d085c56815259f47e6f380fb.tar.bz2
hercules-cfa4ae95efca5557d085c56815259f47e6f380fb.tar.xz
hercules-cfa4ae95efca5557d085c56815259f47e6f380fb.zip
Clarify some Job Class vs MapID confusion (1/2)
This commit ensures that `sd->status.class` and related variables only contain Job Classes (i.e. the client-compatible values, where High Novice 4001) and are never checked against the bitmask-based MapID values. As a rule of thumb, from now on, when a variable is named `class`, it is intended to contain a Job Class ID and not a MapID. The type of such variable shall be a signed `int16` or `int`. To ensure that related third party code is also verified when this commit is merged, the variable `struct mmo_charstatus::class_ (i.e. `sd->status.class_`) is renamed to `class`. Some issues in related lines are also fixed, including: - A wrong check in the char server would prevent the correct detection of babies in code related to the family exp sharing. - Baby Arch Bishops would not be affected by Eucharistica. - A wrong check would cause the `questinfo()` script command not to display its information for most classes (except 1-1 classes). - Map IDs and Job Classes were mixed up in `itemdb_jobid2mapid()` and `itemdb_jobmask2mapid()` for 1-1 classes (causing currently no harm, since they just happen to coincide). - The Baby Sura class would not cause parties to be marked as containing a monk type character (for SLS Team Up purposes). - Baby Geneticists would bypass the cart check when trying to equip ammunitions. - Baby Mechanics would bypass the Mado Gear check when trying to equip ammunitions. - Transcendent Shadow Chasers would lose the Stalkers' ability to clone transcendent skills. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3f916eb42..0da3b7729 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -639,7 +639,7 @@ ACMD(who) {
if (pc_get_group_id(pl_sd) > 0) // Player title, if exists
StrBuf->Printf(&buf, msg_fd(fd,344), pcg->get_name(pl_sd->group)); // "(%s) "
StrBuf->Printf(&buf, msg_fd(fd,347), pl_sd->status.base_level, pl_sd->status.job_level,
- pc->job_name(pl_sd->status.class_)); // "| Lv:%d/%d | Job: %s"
+ pc->job_name(pl_sd->status.class)); // "| Lv:%d/%d | Job: %s"
break;
}
case 3: {
@@ -748,7 +748,7 @@ ACMD(whogm)
safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,915), // BLvl: %d | Job: %s (Lvl: %d)
pl_sd->status.base_level,
- pc->job_name(pl_sd->status.class_), pl_sd->status.job_level);
+ pc->job_name(pl_sd->status.class), pl_sd->status.job_level);
clif->message(fd, atcmd_output);
p = party->search(pl_sd->status.party_id);
@@ -937,7 +937,7 @@ ACMD(hide) {
if (sd->disguise != -1 )
status->set_viewdata(&sd->bl, sd->disguise);
else
- status->set_viewdata(&sd->bl, sd->status.class_);
+ status->set_viewdata(&sd->bl, sd->status.class);
clif->message(fd, msg_fd(fd,10)); // Invisible: Off
// increment the number of pvp players on the map
@@ -8210,7 +8210,7 @@ ACMD(stats)
output_table[14].value = sd->change_level_2nd;
output_table[15].value = sd->change_level_3rd;
- sprintf(job_jobname, "Job - %s %s", pc->job_name(sd->status.class_), "(level %d)");
+ sprintf(job_jobname, "Job - %s %s", pc->job_name(sd->status.class), "(level %d)");
sprintf(output, msg_fd(fd,53), sd->status.name); // '%s' stats:
clif->message(fd, output);