diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-28 03:43:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-28 03:43:19 +0300 |
commit | 9438cc42d708801b73ebe1083e5a9043bdb4a29a (patch) | |
tree | 9d355aaa0fa4c8391ca7dd3ffd3c642f3142fe25 | |
parent | 2a1492c2bdc85f2917775987d4f72660fcfed4b0 (diff) | |
download | plugin-9438cc42d708801b73ebe1083e5a9043bdb4a29a.tar.gz plugin-9438cc42d708801b73ebe1083e5a9043bdb4a29a.tar.bz2 plugin-9438cc42d708801b73ebe1083e5a9043bdb4a29a.tar.xz plugin-9438cc42d708801b73ebe1083e5a9043bdb4a29a.zip |
Fix sending player flags to other players.
-rw-r--r-- | src/emap/clif.c | 10 | ||||
-rw-r--r-- | src/emap/clif.h | 1 | ||||
-rw-r--r-- | src/emap/init.c | 1 | ||||
-rw-r--r-- | src/emap/send.c | 2 |
4 files changed, 13 insertions, 1 deletions
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; } |