diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-15 16:27:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-03 00:51:35 +0300 |
commit | 4d5d0187d3b7f7e142ff83c761a8442d9a8cab44 (patch) | |
tree | d98c4ffbf761f334ed3bd1cab87b0c081f404894 | |
parent | c0a0472d069cc0c8706f897a1900df08fdf2b105 (diff) | |
download | hercules-4d5d0187d3b7f7e142ff83c761a8442d9a8cab44.tar.gz hercules-4d5d0187d3b7f7e142ff83c761a8442d9a8cab44.tar.bz2 hercules-4d5d0187d3b7f7e142ff83c761a8442d9a8cab44.tar.xz hercules-4d5d0187d3b7f7e142ff83c761a8442d9a8cab44.zip |
Hide area packets from hidden players/gms.
-rw-r--r-- | src/map/clif.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 8aa225878..fd1770366 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -406,8 +406,14 @@ bool clif_send(const void* buf, int len, struct block_list* bl, enum send_target sd = BL_CAST(BL_PC, bl); - switch(type) { + if (sd != NULL && pc_isinvisible(sd)) { + if (type == AREA || type == BG || type == BG_AREA) + type = SELF; + else if (type == AREA_WOS || type == BG_WOS || type == BG_AREA_WOS) + return true; + } + switch(type) { case ALL_CLIENT: //All player clients. iter = mapit_getallusers(); while ((tsd = BL_UCAST(BL_PC, mapit->next(iter))) != NULL) { |