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) {