summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-15 16:27:33 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-29 19:38:17 +0300
commitea4c78bd9641796aa8f1f33d01905b80cde14cbc (patch)
tree04c8d231e1aaffda1950657646eec572cdc3f7c2 /src
parentcb3e2f5f3b91d0a1f7711eff9c10ae9a655a74f2 (diff)
downloadhercules-ea4c78bd9641796aa8f1f33d01905b80cde14cbc.tar.gz
hercules-ea4c78bd9641796aa8f1f33d01905b80cde14cbc.tar.bz2
hercules-ea4c78bd9641796aa8f1f33d01905b80cde14cbc.tar.xz
hercules-ea4c78bd9641796aa8f1f33d01905b80cde14cbc.zip
Hide area packets from hidden players/gms.
Diffstat (limited to 'src')
-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 524378439..dbcf98511 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) {