From e3e6b0b25b891b18e8e5d9f7c2cedfb1159caa08 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 13:27:06 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/JobCodeForItem.cpp Batch #13340 by cremane: 0 byte-identical, 2 confirmed by peer review. - fn_06465 CJobCodeForItem::InitJobCodes: logic confirmed by peer review (already on main) - fn_06467 CJobCodeForItem::IsJobAllowed: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, gordaoprogramas, Tanke, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/JobCodeForItem.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Source/Contents/JobCodeForItem.cpp b/Source/Contents/JobCodeForItem.cpp index ec322c13..c3c7323b 100644 --- a/Source/Contents/JobCodeForItem.cpp +++ b/Source/Contents/JobCodeForItem.cpp @@ -430,20 +430,22 @@ void CJobCodeForItem::Init() { // OFFSET: 0x006CCBE0 // FUNCTION: fn_06467 bool CJobCodeForItem::IsJobAllowed(int job, unsigned long code) { - if (code == 0xFFFFE) { + switch (code) { + case 0xFFFFE: { auto group = this->m_jobGroups.find(0); if (group == this->m_jobGroups.end()) { return false; } - return group->second.find(job) == group->second.end(); + return group->second.end() == group->second.find(job); } - if (code == 0xFFFFF) { + case 0xFFFFF: return true; + default: { + auto it = this->m_jobCodes.find(code); + if (it == this->m_jobCodes.end()) { + return false; + } + return it->second.end() != it->second.find(job); } - - auto it = this->m_jobCodes.find(code); - if (it == this->m_jobCodes.end()) { - return false; } - return it->second.find(job) != it->second.end(); }