summaryrefslogtreecommitdiff
path: root/src/map/rodex.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-03-11 15:39:42 +0100
committerGitHub <noreply@github.com>2018-03-11 15:39:42 +0100
commitcd56f7302cfe7c64e5a2e15ed2f0bed745d03b9e (patch)
treeb54690050afa974c6834636727900a76a34bd238 /src/map/rodex.c
parentf7ca209c044d4c08e932beac8580ddc2c2d7a924 (diff)
parentd3a2983a04084ea549c928c094c65eade3b10aa5 (diff)
downloadhercules-cd56f7302cfe7c64e5a2e15ed2f0bed745d03b9e.tar.gz
hercules-cd56f7302cfe7c64e5a2e15ed2f0bed745d03b9e.tar.bz2
hercules-cd56f7302cfe7c64e5a2e15ed2f0bed745d03b9e.tar.xz
hercules-cd56f7302cfe7c64e5a2e15ed2f0bed745d03b9e.zip
Merge pull request #1936 from dastgir/2017-3_rodex
RoDEX Update
Diffstat (limited to 'src/map/rodex.c')
-rw-r--r--src/map/rodex.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/rodex.c b/src/map/rodex.c
index 8626f76e1..0e9e4ee2a 100644
--- a/src/map/rodex.c
+++ b/src/map/rodex.c
@@ -231,6 +231,11 @@ int rodex_send_mail(struct map_session_data *sd, const char *receiver_name, cons
nullpo_retr(RODEX_SEND_MAIL_FATAL_ERROR, body);
nullpo_retr(RODEX_SEND_MAIL_FATAL_ERROR, title);
+ if (!rodex->isenabled() || sd->npc_id > 0) {
+ rodex->clean(sd, 1);
+ return RODEX_SEND_MAIL_FATAL_ERROR;
+ }
+
if (zeny < 0) {
rodex->clean(sd, 1);
return RODEX_SEND_MAIL_FATAL_ERROR;