From 98546749a9c8cf8f09d4c3667536e70771bfda1f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 1 Mar 2015 22:04:08 +0300 Subject: map: dont leak map packets from invisible players. --- src/map/clif.c | 8 ++++++-- 1 file 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); } -- cgit v1.2.3-70-g09d2