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-03-06 18:23:17 +0300
commitac5e7c0602c6192242e7abafcc6565d59c8af10d (patch)
tree5c94db24fe5282cb2a5a239e016800bf21c5744e /src
parent8a5446eb2763355ce1a4513e30debbd86b7d0d75 (diff)
downloadhercules-ac5e7c0602c6192242e7abafcc6565d59c8af10d.tar.gz
hercules-ac5e7c0602c6192242e7abafcc6565d59c8af10d.tar.bz2
hercules-ac5e7c0602c6192242e7abafcc6565d59c8af10d.tar.xz
hercules-ac5e7c0602c6192242e7abafcc6565d59c8af10d.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 6897c357a..b9d849452 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) {