summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-15 16:27:33 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-28 15:56:20 +0300
commit50c814f0ef96ad1c9325f39baeb812e391993d4c (patch)
tree9e67a18905dca1730dfee903362233de57662664
parent4ceef84285d750fde4b81f475e02befa55aed2e4 (diff)
downloadhercules-50c814f0ef96ad1c9325f39baeb812e391993d4c.tar.gz
hercules-50c814f0ef96ad1c9325f39baeb812e391993d4c.tar.bz2
hercules-50c814f0ef96ad1c9325f39baeb812e391993d4c.tar.xz
hercules-50c814f0ef96ad1c9325f39baeb812e391993d4c.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 13a7b0839..1af21bfbf 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) {