diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-14 23:33:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-25 01:43:47 +0300 |
commit | 4d11bf44c8c481045ce496669830b1990deca464 (patch) | |
tree | 3c3219a8ddfead11b739dfe0f45f8c3a97bbde70 /src/map/clif.c | |
parent | 4465180912d4757791b1365f7df0a8b889e9cafe (diff) | |
download | hercules-4d11bf44c8c481045ce496669830b1990deca464.tar.gz hercules-4d11bf44c8c481045ce496669830b1990deca464.tar.bz2 hercules-4d11bf44c8c481045ce496669830b1990deca464.tar.xz hercules-4d11bf44c8c481045ce496669830b1990deca464.zip |
Add packet 0xabd for send job and base levels to party members.
Also improve packets send on base level change.
Based on commit from rathena:
commit 816d8ab2d0934f823a1d26f7fcac244f8245f14b
Author: Lemongrass3110 <lemongrass@kstp.at>
Date: Mon Jun 5 23:07:09 2017 +0200
Fixed party window for 2017 clients
Thanks to @mrdiablo for his help again!
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index f91e58b89..4791451fb 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2984,13 +2984,6 @@ void clif_updatestatus(struct map_session_data *sd,int type) break; case SP_HP: WFIFOL(fd,4)=sd->battle_status.hp; - // TODO: Won't these overwrite the current packet? - if( map->list[sd->bl.m].hpmeter_visible ) - clif->hpmeter(sd); - if( !battle_config.party_hp_mode && sd->status.party_id ) - clif->party_hp(sd); - if( sd->bg_id ) - clif->bg_hp(sd); break; case SP_SP: WFIFOL(fd,4)=sd->battle_status.sp; @@ -3140,6 +3133,21 @@ void clif_updatestatus(struct map_session_data *sd,int type) return; } WFIFOSET(fd,len); + + // Additional update packets that should be sent right after + switch (type) { + case SP_BASELEVEL: + pc->update_job_and_level(sd); + break; + case SP_HP: + if (map->list[sd->bl.m].hpmeter_visible) + clif->hpmeter(sd); + if (!battle_config.party_hp_mode && sd->status.party_id) + clif->party_hp(sd); + if (sd->bg_id) + clif->bg_hp(sd); + break; + } } /// Notifies client of a parameter change of an another player (ZC_PAR_CHANGE_USER). @@ -6639,6 +6647,25 @@ void clif_party_info(struct party_data* p, struct map_session_data *sd) } } +/// Updates the job and level of a party member +/// 0abd <account id>.L <job>.W <level>.W +void clif_party_job_and_level(struct map_session_data *sd) +{ +// [4144] packet 0xabd added in client in 2017-02-15 because this probably it can works for clients older than 20170524 +#if PACKETVER >= 20170524 + unsigned char buf[10]; + + nullpo_retv(sd); + + WBUFW(buf, 0) = 0xabd; + WBUFL(buf, 2) = sd->status.account_id; + WBUFW(buf, 6) = sd->status.class; + WBUFW(buf, 8) = sd->status.base_level; + + clif_send(buf, packet_len(0xabd), &sd->bl, PARTY); +#endif +} + /// The player's 'party invite' state, sent during login (ZC_PARTY_CONFIG). /// 02c9 <flag>.B /// flag: @@ -19778,6 +19805,7 @@ void clif_defaults(void) { clif->party_created = clif_party_created; clif->party_member_info = clif_party_member_info; clif->party_info = clif_party_info; + clif->party_job_and_level = clif_party_job_and_level; clif->party_invite = clif_party_invite; clif->party_inviteack = clif_party_inviteack; clif->party_option = clif_party_option; |