From fe14a4a312f201aebbea7e50ef651a1063c2ffae Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 02:16:00 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/CheckAttendanceMgr.cpp, Source/Contents/CheckAttendanceMgr.h, ... Batch #4360 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_05385 CPetEvolutionMgr::L_InsertEvolutionRecipeLGU: logic confirmed by peer review - fn_05386 CPetEvolutionMgr::L_InsertPetAutoFeeding: logic confirmed by peer review Peer-reviewed-by: alisonrag, willerthal Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/PetEvolutionMgr.cpp | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/Source/Contents/PetEvolutionMgr.cpp b/Source/Contents/PetEvolutionMgr.cpp index 571d8e24..4a787d76 100644 --- a/Source/Contents/PetEvolutionMgr.cpp +++ b/Source/Contents/PetEvolutionMgr.cpp @@ -169,5 +169,69 @@ bool CPetEvolutionMgr::IsAutoFeeding(int petEgg) { } // OFFSET: 0x00673C50 +// FUNCTION: fn_05385 +int CPetEvolutionMgr::L_InsertEvolutionRecipeLGU(lua_State* state) { + if (!lua_isnumber(state, -4)) { + lua_pushboolean(state, 0); + lua_pushstring(state, "argment 1st is must number"); + } else if (!lua_isnumber(state, -3)) { + lua_pushboolean(state, 0); + lua_pushstring(state, "argment 2nd is must number"); + } else if (!lua_isnumber(state, -2)) { + lua_pushboolean(state, 0); + lua_pushstring(state, "argment 3th is must number"); + } else if (!lua_isnumber(state, -1)) { + lua_pushboolean(state, 0); + lua_pushstring(state, "argment 4th is must number"); + } else { + const int petEgg = static_cast(lua_tonumber(state, -4)); + const int target = static_cast(lua_tonumber(state, -3)); + const double material = lua_tonumber(state, -2); + const int count = static_cast(lua_tonumber(state, -1)); + if (!g_session.IsPetEgg(petEgg)) { + lua_pushboolean(state, 0); + lua_pushstring(state, FormatString("PetEgg Item %d not found or not petegg", petEgg)); + } else if (!g_session.IsPetEgg(target)) { + lua_pushboolean(state, 0); + lua_pushstring(state, FormatString("Revolutuion PetEgg Item %d not found or not petegg", target)); + } else if (count < 1) { + lua_pushboolean(state, 0); + lua_pushstring(state, FormatString("Material Item Cnt %d Error", count)); + } else { + const std::pair result = g_petEvolutionMgr->InsertRecipe(petEgg, target, static_cast(material), count); + if (!result.first) { + lua_pushboolean(state, 0); + lua_pushstring(state, FormatString("InsertRecipe : %s", result.second.c_str())); + } else { + lua_pushboolean(state, 1); + lua_pushstring(state, "good"); + } + } + } + return 2; +} // OFFSET: 0x00673E90 +// FUNCTION: fn_05386 +int CPetEvolutionMgr::L_InsertPetAutoFeeding(lua_State* state) { + if (!lua_isnumber(state, -1)) { + lua_pushboolean(state, 0); + lua_pushstring(state, "argment 1st is must number"); + } else { + const int petEgg = static_cast(lua_tonumber(state, -1)); + if (!g_session.IsPetEgg(petEgg)) { + lua_pushboolean(state, 0); + lua_pushstring(state, FormatString("PetEgg Item %d not found or not petegg", petEgg)); + } else { + const std::pair result = g_petEvolutionMgr->InsertPetAutoFeeding(petEgg); + if (!result.first) { + lua_pushboolean(state, 0); + lua_pushstring(state, FormatString("InsertPetAutoFeeding : %s", result.second.c_str())); + } else { + lua_pushboolean(state, 1); + lua_pushstring(state, "good"); + } + } + } + return 2; +}