summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2008-12-11 22:28:30 -0700
committerFate <fate-tmw@googlemail.com>2008-12-11 22:28:30 -0700
commit5e32a6be59536a6810bf558ec07dd3a615569c39 (patch)
tree8306d38892f6802ce7ce11541738cd947de568d8 /src/map/clif.c
parentc9e5567e98cf7e26c549f4a512eeece24a0d9c81 (diff)
downloadtmwa-5e32a6be59536a6810bf558ec07dd3a615569c39.tar.gz
tmwa-5e32a6be59536a6810bf558ec07dd3a615569c39.tar.bz2
tmwa-5e32a6be59536a6810bf558ec07dd3a615569c39.tar.xz
tmwa-5e32a6be59536a6810bf558ec07dd3a615569c39.zip
Added @invisible and @visible GM commands
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c24
1 files changed, 24 insertions, 0 deletions
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);