add Ep3 proxy option for infinite time
This commit is contained in:
@@ -38,6 +38,7 @@ ClientOptions::ClientOptions()
|
||||
suppress_remote_login(false),
|
||||
zero_remote_guild_card(false),
|
||||
ep3_infinite_meseta(false),
|
||||
ep3_infinite_time(false),
|
||||
red_name(false),
|
||||
blank_name(false),
|
||||
function_call_return_value(-1) {}
|
||||
|
||||
@@ -43,6 +43,7 @@ struct ClientOptions {
|
||||
bool suppress_remote_login;
|
||||
bool zero_remote_guild_card;
|
||||
bool ep3_infinite_meseta;
|
||||
bool ep3_infinite_time;
|
||||
bool red_name;
|
||||
bool blank_name;
|
||||
int64_t function_call_return_value; // -1 = don't block function calls
|
||||
|
||||
+16
-15
@@ -58,21 +58,22 @@ constexpr uint32_t GO_BACK = 0x99FFFF99;
|
||||
|
||||
namespace ProxyOptionsMenuItemID {
|
||||
constexpr uint32_t GO_BACK = 0xAAFFFFAA;
|
||||
constexpr uint32_t CHAT_COMMANDS = 0xAA0000AA;
|
||||
constexpr uint32_t CHAT_FILTER = 0xAA1111AA;
|
||||
constexpr uint32_t PLAYER_NOTIFICATIONS = 0xAA2222AA;
|
||||
constexpr uint32_t BLOCK_PINGS = 0xAA3333AA;
|
||||
constexpr uint32_t INFINITE_HP = 0xAA4444AA;
|
||||
constexpr uint32_t INFINITE_TP = 0xAA5555AA;
|
||||
constexpr uint32_t SWITCH_ASSIST = 0xAA6666AA;
|
||||
constexpr uint32_t BLOCK_EVENTS = 0xAA7777AA;
|
||||
constexpr uint32_t BLOCK_PATCHES = 0xAA8888AA;
|
||||
constexpr uint32_t SAVE_FILES = 0xAA9999AA;
|
||||
constexpr uint32_t RED_NAME = 0xAAAAAAAA;
|
||||
constexpr uint32_t BLANK_NAME = 0xAABBBBAA;
|
||||
constexpr uint32_t SUPPRESS_LOGIN = 0xAACCCCAA;
|
||||
constexpr uint32_t SKIP_CARD = 0xAADDDDAA;
|
||||
constexpr uint32_t EP3_INFINITE_MESETA = 0xAAEEEEAA;
|
||||
constexpr uint32_t CHAT_COMMANDS = 0xAA0101AA;
|
||||
constexpr uint32_t CHAT_FILTER = 0xAA0202AA;
|
||||
constexpr uint32_t PLAYER_NOTIFICATIONS = 0xAA0303AA;
|
||||
constexpr uint32_t BLOCK_PINGS = 0xAA0404AA;
|
||||
constexpr uint32_t INFINITE_HP = 0xAA0505AA;
|
||||
constexpr uint32_t INFINITE_TP = 0xAA0606AA;
|
||||
constexpr uint32_t SWITCH_ASSIST = 0xAA0707AA;
|
||||
constexpr uint32_t BLOCK_EVENTS = 0xAA0808AA;
|
||||
constexpr uint32_t BLOCK_PATCHES = 0xAA0909AA;
|
||||
constexpr uint32_t SAVE_FILES = 0xAA0A0AAA;
|
||||
constexpr uint32_t RED_NAME = 0xAA0B0BAA;
|
||||
constexpr uint32_t BLANK_NAME = 0xAA0C0CAA;
|
||||
constexpr uint32_t SUPPRESS_LOGIN = 0xAA0D0DAA;
|
||||
constexpr uint32_t SKIP_CARD = 0xAA0E0EAA;
|
||||
constexpr uint32_t EP3_INFINITE_MESETA = 0xAA0F0FAA;
|
||||
constexpr uint32_t EP3_INFINITE_TIME = 0xAA1010AA;
|
||||
} // namespace ProxyOptionsMenuItemID
|
||||
|
||||
struct MenuItem {
|
||||
|
||||
@@ -916,6 +916,24 @@ static HandlerResult S_6x(shared_ptr<ProxyServer::LinkedSession> ses, uint16_t,
|
||||
set_mask_for_ep3_game_command(data.data(), data.size(), 0);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (ses->options.ep3_infinite_time && (header.subcommand == 0xB4)) {
|
||||
if (header.subsubcommand == 0x3D) {
|
||||
auto& cmd = check_size_t<G_SetTournamentPlayerDecks_GC_Ep3_6xB4x3D>(data);
|
||||
if (cmd.rules.overall_time_limit || cmd.rules.phase_time_limit) {
|
||||
cmd.rules.overall_time_limit = 0;
|
||||
cmd.rules.phase_time_limit = 0;
|
||||
modified = true;
|
||||
}
|
||||
} else if (header.subsubcommand == 0x05) {
|
||||
auto& cmd = check_size_t<G_UpdateMap_GC_Ep3_6xB4x05>(data);
|
||||
if (cmd.state.rules.overall_time_limit || cmd.state.rules.phase_time_limit) {
|
||||
cmd.state.rules.overall_time_limit = 0;
|
||||
cmd.state.rules.phase_time_limit = 0;
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (data[0] == 0x46) {
|
||||
|
||||
@@ -62,6 +62,8 @@ static shared_ptr<const Menu> proxy_options_menu_for_client(shared_ptr<const Cli
|
||||
// Note: This option's text is the maximum possible length for any menu item
|
||||
add_option(ProxyOptionsMenuItemID::EP3_INFINITE_MESETA, c->options.ep3_infinite_meseta,
|
||||
u"Infinite Meseta", u"Fix Meseta value\nat 1,000,000");
|
||||
add_option(ProxyOptionsMenuItemID::EP3_INFINITE_TIME, c->options.ep3_infinite_time,
|
||||
u"Infinite time", u"Disable overall and\nper-phase time limits\nin battle");
|
||||
}
|
||||
}
|
||||
add_option(ProxyOptionsMenuItemID::BLOCK_EVENTS, (c->options.override_lobby_event >= 0),
|
||||
@@ -1830,6 +1832,9 @@ static void on_10(shared_ptr<Client> c, uint16_t, uint32_t, const string& data)
|
||||
case ProxyOptionsMenuItemID::EP3_INFINITE_MESETA:
|
||||
c->options.ep3_infinite_meseta = !c->options.ep3_infinite_meseta;
|
||||
goto resend_proxy_options_menu;
|
||||
case ProxyOptionsMenuItemID::EP3_INFINITE_TIME:
|
||||
c->options.ep3_infinite_time = !c->options.ep3_infinite_time;
|
||||
goto resend_proxy_options_menu;
|
||||
case ProxyOptionsMenuItemID::BLOCK_EVENTS:
|
||||
if (c->options.override_lobby_event >= 0) {
|
||||
c->options.override_lobby_event = -1;
|
||||
|
||||
Reference in New Issue
Block a user