diff options
author | Haru <haru@dotalux.com> | 2020-06-28 03:21:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-28 03:21:28 +0200 |
commit | 9b22213254d64b2c155c6700030303852fd5b912 (patch) | |
tree | 7eb4047ade3194749eee98d62beca06fdf820a39 /src/map/rodex.c | |
parent | 44513531ea39c6bdb464ef74ef60a21d70084904 (diff) | |
parent | 1d00e2268b7a20077d9d61dc8989b9f770344e59 (diff) | |
download | hercules-9b22213254d64b2c155c6700030303852fd5b912.tar.gz hercules-9b22213254d64b2c155c6700030303852fd5b912.tar.bz2 hercules-9b22213254d64b2c155c6700030303852fd5b912.tar.xz hercules-9b22213254d64b2c155c6700030303852fd5b912.zip |
Merge pull request #2775 from Kenpachi2k13/megaphone
Fix Megaphone behaviour
Diffstat (limited to 'src/map/rodex.c')
-rw-r--r-- | src/map/rodex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/rodex.c b/src/map/rodex.c index 1ebed0623..f2bb8a0d4 100644 --- a/src/map/rodex.c +++ b/src/map/rodex.c @@ -231,7 +231,7 @@ static int rodex_send_mail(struct map_session_data *sd, const char *receiver_nam nullpo_retr(RODEX_SEND_MAIL_FATAL_ERROR, body); nullpo_retr(RODEX_SEND_MAIL_FATAL_ERROR, title); - if (!rodex->isenabled() || sd->npc_id > 0) { + if (!rodex->isenabled() || (sd->npc_id != 0 && sd->state.using_megaphone == 0)) { rodex->clean(sd, 1); return RODEX_SEND_MAIL_FATAL_ERROR; } @@ -575,6 +575,7 @@ static void rodex_clean(struct map_session_data *sd, int8 flag) if (flag == 0) VECTOR_CLEAR(sd->rodex.messages); + sd->state.workinprogress &= ~2; memset(&sd->rodex.tmp, 0x0, sizeof(sd->rodex.tmp)); } |