diff options
author | Dastgir <dastgirp@gmail.com> | 2017-12-18 19:06:46 +0530 |
---|---|---|
committer | Dastgir <dastgirp@gmail.com> | 2017-12-18 19:06:46 +0530 |
commit | d3a2983a04084ea549c928c094c65eade3b10aa5 (patch) | |
tree | 6b0f3b0c2a5a9db6cd540692868f986363ec7768 /src/map/rodex.c | |
parent | 99c34eb5637fc48eba2998e304697b96ad6e89bf (diff) | |
download | hercules-d3a2983a04084ea549c928c094c65eade3b10aa5.tar.gz hercules-d3a2983a04084ea549c928c094c65eade3b10aa5.tar.bz2 hercules-d3a2983a04084ea549c928c094c65eade3b10aa5.tar.xz hercules-d3a2983a04084ea549c928c094c65eade3b10aa5.zip |
RoDEX Update:
* Will not open if NPC is attached.
* Will not send mail if NPC is attached.
Fixes #1934
Diffstat (limited to 'src/map/rodex.c')
-rw-r--r-- | src/map/rodex.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/rodex.c b/src/map/rodex.c index dcecb6b8f..02e757a10 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; |