summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-25 08:16:14 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-25 08:16:14 +0200
commitcc2dcda6c77936634cec00a56649c2898cafd4f1 (patch)
tree1a637958670ebb7218a230934630e1c545098070
parent90a72bc5eaae71d2ccdd4c1b6f859afb4c336fc6 (diff)
downloadhercules-cc2dcda6c77936634cec00a56649c2898cafd4f1.tar.gz
hercules-cc2dcda6c77936634cec00a56649c2898cafd4f1.tar.bz2
hercules-cc2dcda6c77936634cec00a56649c2898cafd4f1.tar.xz
hercules-cc2dcda6c77936634cec00a56649c2898cafd4f1.zip
Enable sending Megaphone message if character is dead
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/pc.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 6b5e4a80e..b0c8fe027 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -13330,7 +13330,7 @@ static void clif_parse_NpcStringInput(int fd, struct map_session_data *sd) __att
/// 01d5 <packet len>.W <npc id>.L <string>.?B
static void clif_parse_NpcStringInput(int fd, struct map_session_data *sd)
{
- if (((sd->state.trading != 0 || pc_isvending(sd)) && sd->state.using_megaphone == 0) || pc_isdead(sd))
+ if ((sd->state.trading != 0 || pc_isvending(sd) || pc_isdead(sd)) && sd->state.using_megaphone == 0)
return;
int len = RFIFOW(fd, 2);
diff --git a/src/map/pc.c b/src/map/pc.c
index bb7ace84f..085b7c6bb 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -8176,7 +8176,7 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src)
duel->reject(sd->duel_invite, sd);
}
- if (sd->npc_id != 0 && sd->st != NULL && sd->st->state != RUN)
+ if (sd->npc_id != 0 && sd->state.using_megaphone == 0 && sd->st != NULL && sd->st->state != RUN)
npc->event_dequeue(sd);
pc_setglobalreg(sd, script->add_variable("PC_DIE_COUNTER"), sd->die_counter + 1);
@@ -8199,7 +8199,7 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src)
npc->script_event(sd, NPCE_DIE);
// Clear anything NPC-related if character died while interacting with one.
- if ((sd->npc_id != 0 || sd->npc_shopid != 0) && sd->state.dialog != 0) {
+ if (((sd->npc_id != 0 && sd->state.using_megaphone == 0) || sd->npc_shopid != 0) && sd->state.dialog != 0) {
if (sd->state.using_fake_npc != 0) {
clif->clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
sd->state.using_fake_npc = 0;