summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-15 16:27:33 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-25 22:52:33 +0300
commitf074ef849fba462a2233ed1c738582722d8251a4 (patch)
treed72b4de5af478f9a1f3d73c84d6a49bbbd37a154
parent45d2d465591d89d927aadf398cdb6166afe9cd9a (diff)
downloadhercules-f074ef849fba462a2233ed1c738582722d8251a4.tar.gz
hercules-f074ef849fba462a2233ed1c738582722d8251a4.tar.bz2
hercules-f074ef849fba462a2233ed1c738582722d8251a4.tar.xz
hercules-f074ef849fba462a2233ed1c738582722d8251a4.zip
Hide area packets from hidden players/gms.
-rw-r--r--src/map/clif.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 905b6a3ce..8816cf094 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) {