From cc2dcda6c77936634cec00a56649c2898cafd4f1 Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Thu, 25 Jun 2020 08:16:14 +0200 Subject: Enable sending Megaphone message if character is dead --- src/map/clif.c | 2 +- src/map/pc.c | 4 ++-- 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 .W .L .?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; -- cgit v1.2.3-60-g2f50