diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-15 16:27:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-11 17:34:54 +0300 |
commit | 7269e2b52a6b9e435bf765cf0ac3d750657a119f (patch) | |
tree | 2bafb11e65cb320c0dc1c49d83a07a2a1de48f78 | |
parent | 7b44f8704e57ee430b1cde8b1c8c85d8961eb9d0 (diff) | |
download | hercules-7269e2b52a6b9e435bf765cf0ac3d750657a119f.tar.gz hercules-7269e2b52a6b9e435bf765cf0ac3d750657a119f.tar.bz2 hercules-7269e2b52a6b9e435bf765cf0ac3d750657a119f.tar.xz hercules-7269e2b52a6b9e435bf765cf0ac3d750657a119f.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 3a0b4d4c7..50d924cef 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -414,8 +414,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) { |