diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 1b1d639b94..1179ccd28d 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -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 .L .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 .L .W .W void clif_party_job_and_level(struct map_session_data *sd){ diff --git a/src/map/clif.hpp b/src/map/clif.hpp index 5290bcd932..ba1170011f 100644 --- a/src/map/clif.hpp +++ b/src/map/clif.hpp @@ -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); diff --git a/src/map/clif_packetdb.hpp b/src/map/clif_packetdb.hpp index fd619e0360..70d803951f 100644 --- a/src/map/clif_packetdb.hpp +++ b/src/map/clif_packetdb.hpp @@ -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 diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 2f4a99c6fe..2255a7c7fd 100755 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -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; }