diff options
author | Haru <haru@dotalux.com> | 2016-11-30 02:58:47 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-12-03 15:38:55 +0100 |
commit | cfa4ae95efca5557d085c56815259f47e6f380fb (patch) | |
tree | e08b55a2c9fb546f7f2ed41977f1e0bb8041e445 /src/map/guild.c | |
parent | b0fde17b0ee155f1123e9ae6148ddd2df88cd965 (diff) | |
download | hercules-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/guild.c')
-rw-r--r-- | src/map/guild.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 5de8d5d02..6e5b1c539 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -268,7 +268,7 @@ void guild_makemember(struct guild_member *m,struct map_session_data *sd) m->hair = sd->status.hair; m->hair_color = sd->status.hair_color; m->gender = sd->status.sex; - m->class_ = sd->status.class_; + m->class = sd->status.class; m->lv = sd->status.base_level; //m->exp = 0; //m->exp_payper = 0; @@ -977,7 +977,7 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online) return 0; intif->guild_memberinfoshort(g->guild_id, - sd->status.account_id,sd->status.char_id,online,sd->status.base_level,sd->status.class_); + sd->status.account_id,sd->status.char_id,online,sd->status.base_level,sd->status.class); if(!online){ int i = guild->getindex(g,sd->status.account_id,sd->status.char_id); @@ -996,7 +996,7 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online) return 0; } -int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int online,int lv,int class_) +int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { // cleaned up [LuzZza] int i, alv, c, idx = INDEX_NOT_FOUND, om = 0, oldonline = -1; struct guild *g = guild->search(guild_id); @@ -1011,7 +1011,7 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin oldonline=m->online; m->online=online; m->lv=lv; - m->class_=class_; + m->class = class; idx=i; } alv+=m->lv; |