Fixing party death icon in newer clients

Fixes #2356

Thanks to @admkakaroto and @4144
This commit is contained in:
Lemongrass3110 2018-07-23 23:05:18 +02:00
parent 9313922656
commit 95c3aed810
4 changed files with 26 additions and 1 deletions

View File

@ -7706,6 +7706,22 @@ void clif_party_hp(struct map_session_data *sd)
clif_send(buf,packet_len(cmd),&sd->bl,PARTY_AREA_WOS);
}
/// Notifies the party members of a character's death or revival.
/// 0AB2 <GID>.L <dead>.B
void clif_party_dead( struct map_session_data *sd ){
#if PACKETVER >= 20170502
unsigned char buf[7];
nullpo_retv(sd);
WBUFW(buf, 0) = 0xab2;
WBUFL(buf, 2) = sd->status.account_id;
WBUFB(buf, 6) = pc_isdead(sd);
clif_send(buf, packet_len(0xab2), &sd->bl, PARTY);
#endif
}
/// 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){

View File

@ -758,6 +758,7 @@ void clif_party_xy_single(int fd, struct map_session_data *sd);
void clif_party_hp(struct map_session_data *sd);
void clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp);
void clif_party_job_and_level(struct map_session_data *sd);
void clif_party_dead( struct map_session_data *sd );
// guild
void clif_guild_created(struct map_session_data *sd,int flag);

View File

@ -2354,6 +2354,7 @@
#if PACKETVER >= 20170502
packet(0x0A43,85);
packet(0x0A44,-1);
packet(0x0AB2,7);
packet(0x0ABD,10);
parseable_packet(0x0ACE,4,clif_parse_dull,0);
#endif

View File

@ -7812,6 +7812,8 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
pc_setdead(sd);
clif_party_dead( sd );
pc_setglobalreg(sd, add_str(PCDIECOUNTER_VAR), sd->die_counter+1);
pc_setparam(sd, SP_KILLERRID, src?src->id:0);
@ -10651,7 +10653,12 @@ bool pc_setstand(struct map_session_data *sd, bool force){
clif_standing(&sd->bl); //Inform area PC is standing
//Reset sitting tick.
sd->ssregen.tick.hp = sd->ssregen.tick.sp = 0;
sd->state.dead_sit = sd->vd.dead_sit = 0;
if( pc_isdead( sd ) ){
sd->state.dead_sit = sd->vd.dead_sit = 0;
clif_party_dead( sd );
}else{
sd->state.dead_sit = sd->vd.dead_sit = 0;
}
return true;
}