From 5e32a6be59536a6810bf558ec07dd3a615569c39 Mon Sep 17 00:00:00 2001 From: Fate Date: Thu, 11 Dec 2008 22:28:30 -0700 Subject: Added @invisible and @visible GM commands --- src/map/clif.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 653865b..82860e5 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -286,6 +286,27 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) { if (type != ALL_CLIENT) { nullpo_retr(0, bl); + + if (bl->type == BL_PC) { + struct map_session_data *sd = (struct map_session_data *) bl; + if (sd->status.option & OPTION_INVISIBILITY) { + // Obscure hidden GMs + + switch (type) { + case AREA: + case AREA_WOC: + type = SELF; + break; + + case AREA_WOS: + case AREA_WOSC: + return; + + default: + break; + } + } + } } switch(type) { @@ -3565,6 +3586,9 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds { int len; + if (dstsd->status.option & OPTION_INVISIBILITY) + return; + nullpo_retv(sd); nullpo_retv(dstsd); -- cgit v1.2.3-60-g2f50