diff options
author | Haru <haru@dotalux.com> | 2016-12-03 04:20:55 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-12-03 15:38:58 +0100 |
commit | c1b4b0b2fb1066087e928e9440b40edd185b188e (patch) | |
tree | 61fb624792d54db3668601df7f95f03eb30d8baf /src/map/pc.c | |
parent | a222f21b459eb6abc0862695526c1d15361a99e0 (diff) | |
download | hercules-c1b4b0b2fb1066087e928e9440b40edd185b188e.tar.gz hercules-c1b4b0b2fb1066087e928e9440b40edd185b188e.tar.bz2 hercules-c1b4b0b2fb1066087e928e9440b40edd185b188e.tar.xz hercules-c1b4b0b2fb1066087e928e9440b40edd185b188e.zip |
Remove the platform-dependent variables from struct status_data
`struct status_data::class_` was platform dependent since
c30bb75ec50624429bff7b4106db4be0fda366d6 in order to silence some
compile warnings (uint32 on 64 bit builds and uint16 on 32 bit builds).
It's now been changed to the correct type, int32, on all platforms.
Since the change has potential to silently break third party code, the
variable was renamed to `class`.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 8d6910ce4..2cf5d75b4 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1492,7 +1492,7 @@ int pc_reg_received(struct map_session_data *sd) } if (pc_isinvisible(sd)) { - sd->vd.class_ = INVISIBLE_CLASS; + sd->vd.class = INVISIBLE_CLASS; clif->message(sd->fd, msg_sd(sd,11)); // Invisible: On // decrement the number of pvp players on the map map->list[sd->bl.m].users_pvp--; @@ -1945,7 +1945,7 @@ int pc_disguise(struct map_session_data *sd, int class) clif->changeoption(&sd->bl); // We need to update the client so it knows that a costume is being used if( sd->sc.option&OPTION_COSTUME ) { - clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_); + clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); clif->changelook(&sd->bl,LOOK_WEAPON,0); clif->changelook(&sd->bl,LOOK_SHIELD,0); clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); @@ -8679,7 +8679,7 @@ int pc_jobchange(struct map_session_data *sd, int class, int upper) pc->disguise(sd, -1); status->set_viewdata(&sd->bl, class); - clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_); // move sprite update to prevent client crashes with incompatible equipment [Valaris] + clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); // move sprite update to prevent client crashes with incompatible equipment [Valaris] if(sd->vd.cloth_color) clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); if (sd->vd.body_style) @@ -8779,7 +8779,7 @@ int pc_changelook(struct map_session_data *sd,int type,int val) switch(type){ case LOOK_BASE: status->set_viewdata(&sd->bl, val); - clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_); + clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); clif->changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon); if (sd->vd.cloth_color) clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); @@ -8926,7 +8926,7 @@ int pc_setoption(struct map_session_data *sd,int type) if (new_look < 0) { //Restore normal look. status->set_viewdata(&sd->bl, sd->status.class); - new_look = sd->vd.class_; + new_look = sd->vd.class; } pc_stop_attack(sd); //Stop attacking on new view change (to prevent wedding/santa attacks. @@ -11743,7 +11743,7 @@ void pc_update_idle_time(struct map_session_data* sd, enum e_battle_config_idlet } //Checks if the given class value corresponds to a player class. [Skotlex] -//JOB_NOVICE isn't checked for class_ is supposed to be unsigned +//JOB_NOVICE isn't checked for class is supposed to be unsigned bool pc_db_checkid(int class) { return class < JOB_MAX_BASIC |