From 15b8b48c727faee82d5b41dcfc5fd9b4da76a2de Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 22:08:00 +0000 Subject: [PATCH] Decompile fn_15014 (EnchantUI::CUIEnchantPage::SetItem) Batch #8884 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_15014 EnchantUI::CUIEnchantPage::SetItem: logic confirmed by peer review Peer-reviewed-by: Romain, System4z, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Enchant/UIEnchantUI.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Source/UI/Enchant/UIEnchantUI.cpp b/Source/UI/Enchant/UIEnchantUI.cpp index bfc35d5e..f25a3983 100644 --- a/Source/UI/Enchant/UIEnchantUI.cpp +++ b/Source/UI/Enchant/UIEnchantUI.cpp @@ -1618,6 +1618,34 @@ bool CUIReset::Slot56() { } // OFFSET: 0x00A079E0 +// FUNCTION: fn_15014 +bool CUIEnchantPage::SetItem(const ITEM_INFO& item) { + if (item.unknown_0000[1] == 0) { + return false; + } + + this->gameItem->SetItem(item); + for (const auto& entry : this->unknown_0088) { + CUISlot* slot = entry.second; + int card = 0; + if (entry.first < 4) { + std::memcpy(&card, item.unknown_001C + entry.first * 4, sizeof(card)); + } + if (card > 0) { + ITEM_INFO cardInfo; + cardInfo.SetItemId(card); + cardInfo.identified = 1; + slot->itemIcon->SetItem(cardInfo); + slot->radioButton->tooltip = slot->itemIcon->name; + slot->description->Clear(); + slot->description->AddLine(cardInfo.DisplayName(0)); + slot->Show(1); + } else { + slot->Show(0); + } + } + return true; +} // OFFSET: 0x00A07BA0 // FUNCTION: fn_15015