diff options
author | Haru <haru@dotalux.com> | 2018-02-03 23:40:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-03 23:40:57 +0100 |
commit | a928f009f5a7bad77eda090ec7af551c2f647d5b (patch) | |
tree | b54cc1caddc7497728d0017efc590fec7f354087 /src/map/clif.c | |
parent | 6542b3dc2da7f5a450abcc9d5c71af4a66e15963 (diff) | |
parent | 8a95ae140fc41fb008968b305d552002587dfc29 (diff) | |
download | hercules-a928f009f5a7bad77eda090ec7af551c2f647d5b.tar.gz hercules-a928f009f5a7bad77eda090ec7af551c2f647d5b.tar.bz2 hercules-a928f009f5a7bad77eda090ec7af551c2f647d5b.tar.xz hercules-a928f009f5a7bad77eda090ec7af551c2f647d5b.zip |
Merge pull request #1200 from 4144/hidefix
Hide area packets from hidden players/gms.
Diffstat (limited to 'src/map/clif.c')
-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 988e821e7..877a723fd 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) { |