From 896fe153ac3dbd9a850fde43475e7399f27e2415 Mon Sep 17 00:00:00 2001 From: 0O0o0oOoO00 <11174151+0o0o0oooo00@users.noreply.github.com> Date: Mon, 16 Mar 2026 20:26:27 +0800 Subject: [PATCH] fix: do AUTO_RETIRE before SKIP_SHIP_GAIN_SHOW to avoid incorrect process flow when the game undergoes battle settlement --- blcrack/cracker/cracker.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/blcrack/cracker/cracker.cpp b/blcrack/cracker/cracker.cpp index 278e93b77..933acde56 100644 --- a/blcrack/cracker/cracker.cpp +++ b/blcrack/cracker/cracker.cpp @@ -1093,20 +1093,7 @@ void Cracker::hook_all_lua_functions() { return; } - bool callback_called = false; - - if (enabled_SKIP_SHIP_GAIN_SHOW) { - Lua::Function callback = args[2]; - callback(L); - callback_called = true; - } if (enabled_AUTO_RETIRE) { - if (!callback_called) { - Lua::Function callback = args[2]; - callback(L); - callback_called = true; - } - Lua::Object retire_timer = m_lua_res.Timer_New(L, [this](sol::this_state l, Lua::VariadicArgs ags) { std::optional playerProxy = m_lua_res.getProxy(l, m_lua_res.PlayerProxy); std::optional bayProcy = m_lua_res.getProxy(l, m_lua_res.BayProxy); @@ -1118,6 +1105,12 @@ void Cracker::hook_all_lua_functions() { }, 1.5, 1); m_lua_res.Timer_Start(L, retire_timer); } + if (enabled_SKIP_SHIP_GAIN_SHOW) { + Lua::Function callback = args[2]; + callback(L); + } else { + m_original.NewBattleResultDisplayAwardPage_ShowShips(L, args); + } }; m_state["BaseUI"]["emit"] = [this](sol::this_state L, Lua::VariadicArgs args) {