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>2016-10-04 16:25:30 +0300
commit5cb184e7afe175584f32e96808277cb255f49dcf (patch)
tree830b8671fcc3e05cf4a8a4537276db03ae938916 /src
parentac94f6680069dcc682ed62dfe550f802b95a86ba (diff)
downloadhercules-5cb184e7afe175584f32e96808277cb255f49dcf.tar.gz
hercules-5cb184e7afe175584f32e96808277cb255f49dcf.tar.bz2
hercules-5cb184e7afe175584f32e96808277cb255f49dcf.tar.xz
hercules-5cb184e7afe175584f32e96808277cb255f49dcf.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 040f86a58..ceaa9babb 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) {