diff --git a/conf/map/battle/feature.conf b/conf/map/battle/feature.conf index 946bd00ed20..71601ee675e 100644 --- a/conf/map/battle/feature.conf +++ b/conf/map/battle/feature.conf @@ -61,10 +61,9 @@ features: { rodex: true // Allow usage of "Account Mail" box in RoDEX? - // Requires: 2016-03-16aRagexeRE or later - // This is disabled in client-side in some client versions - // Disabled by default - rodex_use_accountmail: false + // Requires: 2016-03-16aRagexeRE (+ patch) or later, 2016-03-23aRagexe or later, any zero client + // For RE clients, it requires client patching and you must also uncomment ENABLE_RODEX_ACCOUNT_MAIL_RE_PATCH in src/config/core.h + rodex_use_accountmail: true // Allow Homunculus autofeeding // true: enable (Default) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index ac1c5071129..08ddf2b376d 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -9718,6 +9718,9 @@ For examples of usage, see /doc/sample/npc_rodex.txt rodex_sendmail2 and rodex_sendmail_acc2 are more flexible versions. Check getitem2 command for more information of the extra parameters. +Important: rodex_sendmail_acc (and rodex_sendmail_acc2) requires clients from 2016-03-23 or newer. + Additionally, it requires enabling "rodex_use_accountmail" on conf/map/battle/feature.conf. + --------------------------------------- //===================================== 7 - Instance-Related Commands diff --git a/src/config/core.h b/src/config/core.h index 534a10b74fa..72b0a6cc5f9 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -100,6 +100,10 @@ /// Uncomment for use with Nemo patch ExtendOldCashShopPreview //#define ENABLE_OLD_CASHSHOP_PREVIEW_PATCH +/// Uncomment to allow RE clients to enable RoDEX "Account Mail". +/// RE clients requires Nemo patch for RoDEX Account Mail to work. +//#define ENABLE_RODEX_ACCOUNT_MAIL_RE_PATCH + /// Uncomment to allow flinch animation and walk delay to be synced /// Reduces positional lag when getting hit //#define WALKDELAY_SYNC diff --git a/src/map/battle.c b/src/map/battle.c index c2847c5ad29..290c8317e3c 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -8013,6 +8013,18 @@ static void battle_adjust_conf(void) } #endif +#if !(PACKETVER_MAIN_NUM >= 20160323 || (PACKETVER_RE_NUM >= 20160316 && defined(ENABLE_RODEX_ACCOUNT_MAIL_RE_PATCH)) || defined(PACKETVER_ZERO)) + if (battle_config.feature_rodex_use_accountmail == 1) { +#ifndef BUILDBOT /* Don't show these warnings to CI */ + ShowWarning("conf/map/battle/feature.conf:features/rodex_use_accountmail RoDEX account mail is enabled but it requires 2016-03-16 RagexeRE / 2016-03-23 Ragexe or newer, disabling...\n"); +#ifdef PACKETVER_RE + ShowWarning("conf/map/battle/feature.conf:features/rodex_use_accountmail For RE clients, you should also enable ENABLE_RODEX_ACCOUNT_MAIL_RE_PATCH\n"); +#endif // PACKETVER_RE +#endif // !BUILDBOT + battle_config.feature_rodex_use_accountmail = 0; + } +#endif // date check + #if !(PACKETVER_MAIN_NUM >= 20161130 || PACKETVER_RE_NUM >= 20161109 || defined(PACKETVER_ZERO)) if (battle_config.enable_refinery_ui == 1) { ShowWarning("conf/map/battle/feature.conf refinery ui is enabled but it requires PACKETVER 2016-11-09 RagexeRE/2016-11-30 Ragexe or newer, disabling...\n"); diff --git a/src/map/script.c b/src/map/script.c index 54fa7993f1b..3bd61ee1a2f 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -27269,6 +27269,9 @@ static bool buildin_rodex_sendmail_sub(struct script_state *st, struct rodex_mes int receiver_id = script_getnum(st, 2); if (strcmp(func_name, "rodex_sendmail_acc") == 0 || strcmp(func_name, "rodex_sendmail_acc2") == 0) { + if (battle_config.feature_rodex_use_accountmail == 0) + ShowWarning("script:rodex_sendmail_acc: You are sending an account mail while \"feature_rodex_use_accountmail\" is disabled. Players may not be able to view it.\n"); + if (receiver_id < START_ACCOUNT_NUM || receiver_id > END_ACCOUNT_NUM) { ShowError("script:rodex_sendmail: Invalid receiver account ID %d passed!\n", receiver_id); return false;