diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-15 16:27:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-18 20:54:38 +0300 |
commit | 207c3641014afa13d41cf1ff4470b9c85e88c51d (patch) | |
tree | 7bdfbe94e547fd007b389ba0de30cb003d9169fd | |
parent | 5d4e353ad31b5c40748112f3ffbe63447ff55f48 (diff) | |
download | hercules-207c3641014afa13d41cf1ff4470b9c85e88c51d.tar.gz hercules-207c3641014afa13d41cf1ff4470b9c85e88c51d.tar.bz2 hercules-207c3641014afa13d41cf1ff4470b9c85e88c51d.tar.xz hercules-207c3641014afa13d41cf1ff4470b9c85e88c51d.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 07f394da4..b8c1f92d2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -415,8 +415,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) { |