diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-15 16:27:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-12-20 23:46:50 +0300 |
commit | b3dd48c56706c9738b89b23f1e2e380561b91c5e (patch) | |
tree | d8c10d412b9fb7204fc824e26b02f787dfe6322c | |
parent | 99c34eb5637fc48eba2998e304697b96ad6e89bf (diff) | |
download | hercules-b3dd48c56706c9738b89b23f1e2e380561b91c5e.tar.gz hercules-b3dd48c56706c9738b89b23f1e2e380561b91c5e.tar.bz2 hercules-b3dd48c56706c9738b89b23f1e2e380561b91c5e.tar.xz hercules-b3dd48c56706c9738b89b23f1e2e380561b91c5e.zip |
Hide area packets from hidden players/gms.
-rw-r--r-- | src/map/clif.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 7edc1ec5a..1c2269719 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -419,8 +419,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) { |