From 11822d9e89c7f895b2b2d44e31ca77edaf704c9b Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Mon, 2 Nov 2026 15:36:19 +0000 Subject: [PATCH] Decompile fn_05257 (AdventureGuideEntry::IsAvailable) Batch #10083 by dori: 0 byte-identical, 1 confirmed by peer review. - fn_05257 AdventureGuideEntry::IsAvailable: logic confirmed by peer review Peer-reviewed-by: Qwenkler3.8, Montyla, cremane, doczeira, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/AdventureGuideMgr.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Source/Contents/AdventureGuideMgr.cpp b/Source/Contents/AdventureGuideMgr.cpp index 5fa70e1e..49ea9a8f 100644 --- a/Source/Contents/AdventureGuideMgr.cpp +++ b/Source/Contents/AdventureGuideMgr.cpp @@ -1619,18 +1619,9 @@ bool AdventureGuideEntry::IsAvailable(int itemId) const { } int code = 0; - g_luaScript->Call("GetEquipJob", "d>d", itemId, &code); + g_session.m_hotkeyScript->Call("GetEquipJob", "d>d", itemId, &code); if (!CJobCodeForItem::s_instance) { CJobCodeForItem::s_instance = new (std::nothrow) CJobCodeForItem; } - CJobCodeForItem* jobs = CJobCodeForItem::s_instance; - if (code == 0xFFFFE) { - const auto group = jobs->m_jobGroups.find(0); - return group != jobs->m_jobGroups.end() && group->second.find(g_session.m_job) == group->second.end(); - } - if (code == 0xFFFFF) { - return true; - } - const auto found = jobs->m_jobCodes.find(code); - return found != jobs->m_jobCodes.end() && found->second.find(g_session.m_job) != found->second.end(); + return CJobCodeForItem::s_instance->IsJobAllowed(g_session.m_job, code); }