From 8134708f3880c6a23fd42262c4a1b4fe5bfbc5dc Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Mon, 11 Mar 2019 06:01:00 +0800 Subject: Apply temporary fix so Job_Super_Novice_E no longer crash client --- src/map/pc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/map') diff --git a/src/map/pc.c b/src/map/pc.c index ea18715bb..83e2affc0 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -12335,7 +12335,8 @@ static bool pc_has_second_costume(struct map_session_data *sd) { nullpo_retr(false, sd); - if ((sd->job & JOBL_THIRD) != 0) +// FIXME: JOB_SUPER_NOVICE_E(4190) is not supposed to be 3rd Job. (Issue#2383) + if ((sd->job & JOBL_THIRD) != 0 && (sd->job & MAPID_BASEMASK) != MAPID_NOVICE) return true; return false; } -- cgit v1.2.3-60-g2f50 From a9e2cd0b6216ae5dfdd8ae4701bb7a3f401a6bbd Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Mon, 11 Mar 2019 06:40:30 +0800 Subject: Fix atcommand "@jobchange" when the player changing from 3rd job having alternate body style into non-3rd job, crashing the client --- src/map/pc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/map') diff --git a/src/map/pc.c b/src/map/pc.c index 83e2affc0..79fa63bcf 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -9008,6 +9008,13 @@ static int pc_jobchange(struct map_session_data *sd, int class, int upper) if (sd->disguise != -1) pc->disguise(sd, -1); + // Fix atcommand @jobchange when the player changing from 3rd job having alternate body style into non-3rd job, crashing the client + if (pc->has_second_costume(sd) == false) { + sd->status.body = 0; + sd->vd.body_style = 0; + clif->changelook(&sd->bl, LOOK_BODY2, sd->vd.body_style); + } + 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] if(sd->vd.cloth_color) -- cgit v1.2.3-60-g2f50