summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-15 16:27:33 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-23 19:41:41 +0300
commit4185d39c50b036162506a96d4dbab984e5353b80 (patch)
tree1c6e347b5acb389dbb54936bce49c9ad1a785958 /src/map
parentca5cf26192649c9f6b7944fae718d6ad85f86782 (diff)
downloadhercules-4185d39c50b036162506a96d4dbab984e5353b80.tar.gz
hercules-4185d39c50b036162506a96d4dbab984e5353b80.tar.bz2
hercules-4185d39c50b036162506a96d4dbab984e5353b80.tar.xz
hercules-4185d39c50b036162506a96d4dbab984e5353b80.zip
Hide area packets from hidden players/gms.
Diffstat (limited to 'src/map')
-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 259bc7253..17b2912df 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -388,8 +388,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) {