summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-15 16:27:33 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-19 21:38:14 +0300
commit38a55f6872ca553ad6ca429901c2b880a9fa2dac (patch)
treeb3f4f322a0465f8864067625eaa1c7fa82a442d6
parentc5e18dae832240f1e6046ea35266d691e9009f5f (diff)
downloadhercules-38a55f6872ca553ad6ca429901c2b880a9fa2dac.tar.gz
hercules-38a55f6872ca553ad6ca429901c2b880a9fa2dac.tar.bz2
hercules-38a55f6872ca553ad6ca429901c2b880a9fa2dac.tar.xz
hercules-38a55f6872ca553ad6ca429901c2b880a9fa2dac.zip
Hide area packets from hidden players/gms.
-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 68d2bbc48..f04e97b8f 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) {