From e6e5f73fcd25dcdda88336e28d9980adf1dbd904 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 01:12:28 +0000 Subject: [PATCH] Decompile fn_04182 (UILapineBox_IngredientListWnd::CanUseIngredient) Batch #12664 by cremane: 0 byte-identical, 1 confirmed by peer review. - fn_04182 UILapineBox_IngredientListWnd::CanUseIngredient: logic confirmed by peer review Peer-reviewed-by: Yommy, Tanke, aDw Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/UILapineBoxWnd.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/UI/UILapineBoxWnd.cpp b/Source/UI/UILapineBoxWnd.cpp index 6db65111..fecf1ad9 100644 --- a/Source/UI/UILapineBoxWnd.cpp +++ b/Source/UI/UILapineBoxWnd.cpp @@ -273,10 +273,7 @@ bool UILapineBox_IngredientListWnd::CanUseIngredient(std::uint32_t identity) { this->parent->SendMsg(this, 0x6F, reinterpret_cast(LookupMessage(0xE3D)), 0, 0, 0); } - const std::uint32_t itemType = item.unknown_0000[0]; - const bool equipment = itemType == 4 || itemType == 5 || itemType == 8 || itemType == 9 || itemType == 11 || itemType == 12 || - itemType == 13 || itemType == 14 || itemType == 15 || itemType == 21; - if (equipment && !item.IsApprenticeItem() && !item.HasSpecialCard()) { + if (Equipment(item) && !item.IsApprenticeItem() && !item.HasSpecialCard()) { const int* cards = reinterpret_cast(item.unknown_001C); for (int index = 0; index < ItemSlotsCount(item); ++index) { if (index < 4 && cards[index] > 0) {