From b7c6f652d37d1a5711dfa3b451731510a6cec5de Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Wed, 8 Apr 2020 07:57:27 +0200 Subject: Use pc_(un)hide() in pc_setoption() --- src/map/pc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/pc.c b/src/map/pc.c index ded87f368..d8bae7b87 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -9365,7 +9365,13 @@ static int pc_setoption(struct map_session_data *sd, int type) //Option has to be changed client-side before the class sprite or it won't always work (eg: Wedding sprite) [Skotlex] sd->sc.option=type; - clif->changeoption(&sd->bl); + + if ((p_type & OPTION_INVISIBLE) != 0 && (type & OPTION_INVISIBLE) == 0) // Unhide character. + pc->unhide(sd, false); + else if ((p_type & OPTION_INVISIBLE) == 0 && (type & OPTION_INVISIBLE) != 0) // Hide character. + pc->hide(sd, false); + else + clif->changeoption(&sd->bl); if( (type&OPTION_RIDING && !(p_type&OPTION_RIDING)) || (type&OPTION_DRAGON && !(p_type&OPTION_DRAGON) && pc->checkskill(sd,RK_DRAGONTRAINING) > 0) ) { // Mounting -- cgit v1.2.3-70-g09d2