diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-01 22:04:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-01 22:04:08 +0300 |
commit | 98546749a9c8cf8f09d4c3667536e70771bfda1f (patch) | |
tree | cb429df22863553242121e5b2675a91fce050691 /src/map/clif.c | |
parent | 89b521023a1bef1ee7c0d8d901d0c9efab767d53 (diff) | |
download | evol-hercules-98546749a9c8cf8f09d4c3667536e70771bfda1f.tar.gz evol-hercules-98546749a9c8cf8f09d4c3667536e70771bfda1f.tar.bz2 evol-hercules-98546749a9c8cf8f09d4c3667536e70771bfda1f.tar.xz evol-hercules-98546749a9c8cf8f09d4c3667536e70771bfda1f.zip |
map: dont leak map packets from invisible players.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 4efe576..57b8596 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -298,10 +298,14 @@ void eclif_set_unit_idle_post(struct block_list* bl, struct map_session_data *ts void eclif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, struct unit_data* ud, enum send_target *target) { - send_advmoving(ud, tsd ? &tsd->bl : bl, *target); + struct map_session_data *sd = BL_CAST(BL_PC, ud->bl); + if (!sd || !pc_isinvisible(sd)) + send_advmoving(ud, tsd ? &tsd->bl : bl, *target); } void eclif_move(struct unit_data *ud) { - send_advmoving(ud, ud->bl, AREA_WOS); + struct map_session_data *sd = BL_CAST(BL_PC, ud->bl); + if (!sd || !pc_isinvisible(sd)) + send_advmoving(ud, ud->bl, AREA_WOS); } |