summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-04-08 07:57:27 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-04-08 08:09:55 +0200
commitb7c6f652d37d1a5711dfa3b451731510a6cec5de (patch)
treeb38b6f24c981b00374bdfdf8d1befeb43da4b417
parentdf6075407ae9434a2179d9d7bf75a9e341bcd595 (diff)
downloadhercules-b7c6f652d37d1a5711dfa3b451731510a6cec5de.tar.gz
hercules-b7c6f652d37d1a5711dfa3b451731510a6cec5de.tar.bz2
hercules-b7c6f652d37d1a5711dfa3b451731510a6cec5de.tar.xz
hercules-b7c6f652d37d1a5711dfa3b451731510a6cec5de.zip
Use pc_(un)hide() in pc_setoption()
-rw-r--r--src/map/pc.c8
1 files changed, 7 insertions, 1 deletions
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