summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnnieRuru <jeankofannie2@gmail.com>2019-03-11 06:40:30 +0800
committerAnnieRuru <jeankofannie2@gmail.com>2019-03-11 06:40:30 +0800
commita9e2cd0b6216ae5dfdd8ae4701bb7a3f401a6bbd (patch)
tree6b9d95e222d5326466649bd0849487d613ddb326 /src
parent8134708f3880c6a23fd42262c4a1b4fe5bfbc5dc (diff)
downloadhercules-a9e2cd0b6216ae5dfdd8ae4701bb7a3f401a6bbd.tar.gz
hercules-a9e2cd0b6216ae5dfdd8ae4701bb7a3f401a6bbd.tar.bz2
hercules-a9e2cd0b6216ae5dfdd8ae4701bb7a3f401a6bbd.tar.xz
hercules-a9e2cd0b6216ae5dfdd8ae4701bb7a3f401a6bbd.zip
Fix atcommand "@jobchange" when the player changing from 3rd job
having alternate body style into non-3rd job, crashing the client
Diffstat (limited to 'src')
-rw-r--r--src/map/pc.c7
1 files changed, 7 insertions, 0 deletions
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)