diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-15 16:27:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-11-07 18:25:06 +0300 |
commit | 169c7ec0890103c49a54accadac6c44087d37e53 (patch) | |
tree | 75cfc17e4d114fe63632d4d8f316f6dab6bbd2e1 /src/map | |
parent | 14ca1ab7a98d3c6df94b967159d4dd2df555d7e7 (diff) | |
download | hercules-169c7ec0890103c49a54accadac6c44087d37e53.tar.gz hercules-169c7ec0890103c49a54accadac6c44087d37e53.tar.bz2 hercules-169c7ec0890103c49a54accadac6c44087d37e53.tar.xz hercules-169c7ec0890103c49a54accadac6c44087d37e53.zip |
Hide area packets from hidden players/gms.
Diffstat (limited to 'src/map')
-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 4dc36be6d..9e15fb0a2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -419,8 +419,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) { |