From 321c67c633a664f133b60bad079782ba4eae170c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 9 Mar 2021 17:14:12 -0300 Subject: [TMW2] Prevent rodex mails from being sent on maps with nostorage mapflag. --- src/map/rodex.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/map/rodex.c b/src/map/rodex.c index 996576fd3..cc95a1c95 100644 --- a/src/map/rodex.c +++ b/src/map/rodex.c @@ -26,6 +26,7 @@ #include "map/intif.h" #include "map/itemdb.h" #include "map/pc.h" +#include "map/map.h" #include "common/nullpo.h" #include "common/sql.h" @@ -236,6 +237,11 @@ static int rodex_send_mail(struct map_session_data *sd, const char *receiver_nam return RODEX_SEND_MAIL_FATAL_ERROR; } + if (!pc_has_permission(sd, PC_PERM_BYPASS_NOSTORAGE) && (map->list[sd->bl.m].flag.nostorage & 2)) { + rodex->clean(sd, 1); + return RODEX_SEND_MAIL_FATAL_ERROR; + } + if (zeny < 0) { rodex->clean(sd, 1); return RODEX_SEND_MAIL_FATAL_ERROR; -- cgit v1.2.3-60-g2f50