From 68913b02eb4bf57b7e73f3f752196fab5ceadb3a Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 29 Oct 2026 21:41:48 +0000 Subject: [PATCH] Decompile fn_06598 (IsBookItem) Batch #3227 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review. - fn_06598 IsBookItem: logic confirmed by peer review Peer-reviewed-by: eAthena, meitogi, superintelligence Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Items/ItemDescription.h | 2 ++ Source/Contents/Items/ItemNaming.cpp | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/Source/Contents/Items/ItemDescription.h b/Source/Contents/Items/ItemDescription.h index 32c535c5..b79c5779 100644 --- a/Source/Contents/Items/ItemDescription.h +++ b/Source/Contents/Items/ItemDescription.h @@ -37,11 +37,13 @@ struct ItemDescriptions { extern std::map g_itemDescriptions; extern std::map> g_metalProcessItems; +extern std::map> g_bookItemNames; ITEM_DESC& FindItemDescription(int id); ItemCardName& EnsureItemCardName(int id, std::map& values); std::vector& EnsureItemDescriptionLines(int id, std::map>& values); const std::vector& FindMetalProcessItems(int id); +bool IsBookItem(int id); #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(ITEM_DESC) == 68); diff --git a/Source/Contents/Items/ItemNaming.cpp b/Source/Contents/Items/ItemNaming.cpp index ee24edca..2dc48347 100644 --- a/Source/Contents/Items/ItemNaming.cpp +++ b/Source/Contents/Items/ItemNaming.cpp @@ -18,6 +18,9 @@ std::map> g_metalProcessItems; // GLOBAL: gl_24675 std::map g_itemCardNames; +// GLOBAL: gl_24727 +std::map> g_bookItemNames; + namespace { // OFFSET: 0x006D8810 // FUNCTION: fn_06597 @@ -412,6 +415,12 @@ std::vector ITEM_INFO::Serialize() const { return result; } +// OFFSET: 0x006D8850 +// FUNCTION: fn_06598 +bool IsBookItem(int id) { + return g_bookItemNames.find(id) != g_bookItemNames.end(); +} + // OFFSET: 0x006D7660 // FUNCTION: fn_06591 const char* ItemResourcePath(const ITEM_INFO& item) {