summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-03-09 17:14:12 -0300
committerJesusaves <cpntb1@ymail.com>2021-03-09 17:14:12 -0300
commit321c67c633a664f133b60bad079782ba4eae170c (patch)
treed14de81f72fe32d96f4fa0df094b16ab04472ff5
parent05c1c0552fe6c94d8835a58f4608d0402614ce39 (diff)
downloadhercules-321c67c633a664f133b60bad079782ba4eae170c.tar.gz
hercules-321c67c633a664f133b60bad079782ba4eae170c.tar.bz2
hercules-321c67c633a664f133b60bad079782ba4eae170c.tar.xz
hercules-321c67c633a664f133b60bad079782ba4eae170c.zip
[TMW2] Prevent rodex mails from being sent on maps with nostorage mapflag.
-rw-r--r--src/map/rodex.c6
1 files changed, 6 insertions, 0 deletions
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;