From 2f35d8d73b9db341a642ad7ce3b45e62d6ebea6b Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Mon, 9 Nov 2026 18:38:01 +0000 Subject: [PATCH] Decompile 14 functions in Source/Contents/AdventureGuideMgr.cpp, Source/Contents/AdventureGuideMgr.h Batch #15241 by codeplay: 14 byte-identical, 0 confirmed by peer review. - fn_05250 CAdventureGuideMgr::InsertGuideMenu: byte-identical - fn_05246 CAdventureGuideMgr::InsertEntryContents: byte-identical - fn_05240 CAdventureGuideMgr::InsertDungeonContents: byte-identical - fn_05243 CAdventureGuideMgr::InsertEpisodeContents: byte-identical - fn_05253 CAdventureGuideMgr::InsertQuestContents: byte-identical - fn_05249 CAdventureGuideMgr::InsertIntroContents: byte-identical - fn_05281 InsertMonsterContents: byte-identical - fn_05282 InsertMonsterReward: byte-identical - fn_05280 InsertMonster: byte-identical - fn_05283 InsertQuest: byte-identical - fn_05287 InsertWeapon: byte-identical - fn_05266 InsertArmor: byte-identical - fn_05274 InsertEpisode: byte-identical - fn_05270 InsertDungeon: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Contents/AdventureGuideMgr.cpp | 127 +++++++++++++++++--------- Source/Contents/AdventureGuideMgr.h | 5 +- 2 files changed, 83 insertions(+), 49 deletions(-) diff --git a/Source/Contents/AdventureGuideMgr.cpp b/Source/Contents/AdventureGuideMgr.cpp index 00da59553..117a97471 100644 --- a/Source/Contents/AdventureGuideMgr.cpp +++ b/Source/Contents/AdventureGuideMgr.cpp @@ -120,16 +120,17 @@ int InsertEpisode(lua_State* state) { const int id = static_cast(lua_tonumber(state, -3)); const std::string name = lua_tostring(state, -2); const std::string text = lua_tostring(state, -1); - const AdventureGuideResult result = g_adventureGuideMgr->InsertGuideMenu(1, id, name, text); + CAdventureGuideMgr* const manager = g_adventureGuideMgr; + const AdventureGuideResult result = manager->InsertGuideMenu(1, id, name, text); if (!result.ok) { lua_pushboolean(state, 0); lua_pushstring(state, FormatString("InsertEpisode : %s", result.message.c_str())); - } else { - lua_pushboolean(state, 1); - lua_pushstring(state, "good"); + return 2; } + lua_pushboolean(state, 1); + lua_pushstring(state, "good"); return 2; } @@ -310,16 +311,17 @@ int InsertMonster(lua_State* state) { const int id = static_cast(lua_tonumber(state, -3)); const std::string name = lua_tostring(state, -2); const std::string text = lua_tostring(state, -1); - const AdventureGuideResult result = g_adventureGuideMgr->InsertGuideMenu(2, id, name, text); + CAdventureGuideMgr* const manager = g_adventureGuideMgr; + const AdventureGuideResult result = manager->InsertGuideMenu(2, id, name, text); if (!result.ok) { lua_pushboolean(state, 0); lua_pushstring(state, FormatString("InsertMonster : %s", result.message.c_str())); - } else { - lua_pushboolean(state, 1); - lua_pushstring(state, "good"); + return 2; } + lua_pushboolean(state, 1); + lua_pushstring(state, "good"); return 2; } @@ -347,16 +349,17 @@ int InsertMonsterContents(lua_State* state) { const std::string name = lua_tostring(state, -3); const int minLevel = static_cast(lua_tonumber(state, -2)); const int maxLevel = static_cast(lua_tonumber(state, -1)); - const AdventureGuideResult result = g_adventureGuideMgr->InsertMonsterContents(name, minLevel, maxLevel); + CAdventureGuideMgr* const manager = g_adventureGuideMgr; + const AdventureGuideResult result = manager->InsertMonsterContents(name, minLevel, maxLevel); if (!result.ok) { lua_pushboolean(state, 0); lua_pushstring(state, FormatString("InsertMonsterContents : %s", result.message.c_str())); - } else { - lua_pushboolean(state, 1); - lua_pushstring(state, "good"); + return 2; } + lua_pushboolean(state, 1); + lua_pushstring(state, "good"); return 2; } @@ -377,16 +380,17 @@ int InsertMonsterReward(lua_State* state) { const std::string name = lua_tostring(state, -2); const std::string text = lua_tostring(state, -1); - const AdventureGuideResult result = g_adventureGuideMgr->InsertMonsterReward(name, text); + CAdventureGuideMgr* const manager = g_adventureGuideMgr; + const AdventureGuideResult result = manager->InsertMonsterReward(name, text); if (!result.ok) { lua_pushboolean(state, 0); lua_pushstring(state, FormatString("InsertMonsterReward : %s", result.message.c_str())); - } else { - lua_pushboolean(state, 1); - lua_pushstring(state, "good"); + return 2; } + lua_pushboolean(state, 1); + lua_pushstring(state, "good"); return 2; } @@ -414,16 +418,17 @@ int InsertQuest(lua_State* state) { const int id = static_cast(lua_tonumber(state, -3)); const std::string name = lua_tostring(state, -2); const std::string text = lua_tostring(state, -1); - const AdventureGuideResult result = g_adventureGuideMgr->InsertGuideMenu(3, id, name, text); + CAdventureGuideMgr* const manager = g_adventureGuideMgr; + const AdventureGuideResult result = manager->InsertGuideMenu(3, id, name, text); if (!result.ok) { lua_pushboolean(state, 0); lua_pushstring(state, FormatString("InsertQuest : %s", result.message.c_str())); - } else { - lua_pushboolean(state, 1); - lua_pushstring(state, "good"); + return 2; } + lua_pushboolean(state, 1); + lua_pushstring(state, "good"); return 2; } @@ -592,16 +597,17 @@ int InsertDungeon(lua_State* state) { const int id = static_cast(lua_tonumber(state, -3)); const std::string name = lua_tostring(state, -2); const std::string text = lua_tostring(state, -1); - const AdventureGuideResult result = g_adventureGuideMgr->InsertGuideMenu(4, id, name, text); + CAdventureGuideMgr* const manager = g_adventureGuideMgr; + const AdventureGuideResult result = manager->InsertGuideMenu(4, id, name, text); if (!result.ok) { lua_pushboolean(state, 0); lua_pushstring(state, FormatString("InsertDungeon : %s", result.message.c_str())); - } else { - lua_pushboolean(state, 1); - lua_pushstring(state, "good"); + return 2; } + lua_pushboolean(state, 1); + lua_pushstring(state, "good"); return 2; } @@ -768,16 +774,17 @@ int InsertWeapon(lua_State* state) { const int id = static_cast(lua_tonumber(state, -3)); const std::string name = lua_tostring(state, -2); const std::string text = lua_tostring(state, -1); - const AdventureGuideResult result = g_adventureGuideMgr->InsertGuideMenu(5, id, name, text); + CAdventureGuideMgr* const manager = g_adventureGuideMgr; + const AdventureGuideResult result = manager->InsertGuideMenu(5, id, name, text); if (!result.ok) { lua_pushboolean(state, 0); lua_pushstring(state, FormatString("InsertWeapon : %s", result.message.c_str())); - } else { - lua_pushboolean(state, 1); - lua_pushstring(state, "good"); + return 2; } + lua_pushboolean(state, 1); + lua_pushstring(state, "good"); return 2; } @@ -954,16 +961,17 @@ int InsertArmor(lua_State* state) { const int id = static_cast(lua_tonumber(state, -3)); const std::string name = lua_tostring(state, -2); const std::string text = lua_tostring(state, -1); - const AdventureGuideResult result = g_adventureGuideMgr->InsertGuideMenu(6, id, name, text); + CAdventureGuideMgr* const manager = g_adventureGuideMgr; + const AdventureGuideResult result = manager->InsertGuideMenu(6, id, name, text); if (!result.ok) { lua_pushboolean(state, 0); lua_pushstring(state, FormatString("InsertArmor : %s", result.message.c_str())); - } else { - lua_pushboolean(state, 1); - lua_pushstring(state, "good"); + return 2; } + lua_pushboolean(state, 1); + lua_pushstring(state, "good"); return 2; } @@ -1271,8 +1279,14 @@ void CAdventureGuideMgr::GetEntryList(std::list