summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c15
-rw-r--r--src/map/clif.h1
-rw-r--r--src/map/packets_struct.h6
-rw-r--r--src/map/pc.c10
4 files changed, 31 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 3dae902cb..50d6e00a7 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -21611,6 +21611,20 @@ static void clif_parse_changeDress(int fd, struct map_session_data *sd)
atcommand->exec(fd, sd, command, true);
}
+static void clif_party_dead_notification(struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20170524 || PACKETVER_RE_NUM >= 20170502 || defined(PACKETVER_ZERO)
+ struct PACKET_ZC_GROUP_ISALIVE p;
+
+ nullpo_retv(sd);
+
+ p.packetType = 0xab2;
+ p.AID = sd->bl.id;
+ p.isDead = pc_isdead(sd);
+ clif->send(&p, sizeof(p), &sd->bl, PARTY_WOS);
+#endif
+}
+
/*==========================================
* Main client packet processing function
*------------------------------------------*/
@@ -22734,6 +22748,7 @@ void clif_defaults(void)
// -- Hat Effect
clif->hat_effect = clif_hat_effect;
clif->hat_effect_single = clif_hat_effect_single;
+ clif->party_dead_notification = clif_party_dead_notification;
clif->pAttendanceDB = clif_parse_attendance_db;
clif->attendancedb_libconfig_sub = clif_attendancedb_libconfig_sub;
diff --git a/src/map/clif.h b/src/map/clif.h
index 1bbe6e147..4c9061c5a 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -1517,6 +1517,7 @@ struct clif_interface {
void (*style_change_response) (struct map_session_data *sd, enum stylist_shop flag);
void (*pPetEvolution) (int fd, struct map_session_data *sd);
void (*petEvolutionResult) (int fd, enum pet_evolution_result result);
+ void (*party_dead_notification) (struct map_session_data *sd);
};
#ifdef HERCULES_CORE
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 08f8d7881..b95c5ad91 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -2680,6 +2680,12 @@ struct PACKET_ZC_WARPLIST {
#endif
} __attribute__((packed));
+struct PACKET_ZC_GROUP_ISALIVE {
+ int16 packetType;
+ uint32 AID;
+ uint8 isDead;
+} __attribute__((packed));
+
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
#pragma pack(pop)
#endif // not NetBSD < 6 / Solaris
diff --git a/src/map/pc.c b/src/map/pc.c
index f3150bbdf..0aad00a56 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -8099,6 +8099,9 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src)
}
pc_setdead(sd);
+
+ clif->party_dead_notification(sd);
+
//Reset menu skills/item skills
if (sd->skillitem)
sd->skillitem = sd->skillitemlv = 0;
@@ -10995,7 +10998,12 @@ static void pc_setstand(struct map_session_data *sd)
clif->sc_end(&sd->bl,sd->bl.id,SELF,SI_SIT);
//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_notification(sd);
+ } else {
+ sd->state.dead_sit = sd->vd.dead_sit = 0;
+ }
}
/**