From 9438cc42d708801b73ebe1083e5a9043bdb4a29a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 28 Oct 2015 03:43:19 +0300 Subject: Fix sending player flags to other players. --- src/emap/clif.c | 10 ++++++++++ src/emap/clif.h | 1 + src/emap/init.c | 1 + src/emap/send.c | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/emap/clif.c b/src/emap/clif.c index 24265e4..0c913e9 100644 --- a/src/emap/clif.c +++ b/src/emap/clif.c @@ -243,9 +243,19 @@ void eclif_getareachar_unit_post(TBL_PC* sd, struct block_list *bl) { eclif_send_additional_slots(sd, (TBL_PC *)bl); eclif_send_additional_slots((TBL_PC *)bl, sd); + send_pc_info(bl, &sd->bl, SELF); } } +bool eclif_spawn_post(bool retVal, struct block_list *bl) +{ + if (retVal == true && bl->type == BL_PC) + { + send_pc_info(bl, bl, AREA); + } + return retVal; +} + void eclif_authok_post(TBL_PC *sd) { if (!sd) diff --git a/src/emap/clif.h b/src/emap/clif.h index b03208e..64bdaef 100644 --- a/src/emap/clif.h +++ b/src/emap/clif.h @@ -8,6 +8,7 @@ void eclif_quest_send_list(TBL_PC *sd); void eclif_quest_add(TBL_PC *sd, struct quest *qd); void eclif_charnameack(int *fdPtr, struct block_list *bl); void eclif_getareachar_unit_post(TBL_PC* sd, struct block_list *bl); +bool eclif_spawn_post(bool retVal, struct block_list *bl); void eclif_sendlook(struct block_list *bl, int *id, int *type, int *val, int *val2, enum send_target *target); bool eclif_send(const void* buf, int *len, struct block_list* bl, enum send_target *type); diff --git a/src/emap/init.c b/src/emap/init.c index 5251cbc..fbe18d6 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -212,6 +212,7 @@ HPExport void plugin_init (void) addHookPost("clif->changemap", eclif_changemap_post); addHookPost("clif->set_unit_idle", eclif_set_unit_idle_post); addHookPost("clif->pLoadEndAck", eclif_parse_LoadEndAck_post); + addHookPost("clif->spawn", eclif_spawn_post); addHookPost("status->set_viewdata", estatus_set_viewdata_post); addHookPost("status->read_job_db_sub", estatus_read_job_db_sub); addHookPost("status->calc_pc_", estatus_calc_pc__post); diff --git a/src/emap/send.c b/src/emap/send.c index 3984421..981d585 100644 --- a/src/emap/send.c +++ b/src/emap/send.c @@ -187,7 +187,7 @@ void send_pc_info(struct block_list* bl1, if (tsd) { struct SessionExt *tdata = session_get_bysd(tsd); - if (!tdata || tdata->clientVersion < 4) + if (!tdata || (bl1 != bl2 && tdata->clientVersion < 4)) return; } -- cgit v1.2.3-60-g2f50