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).
This commit is contained in:
ragnarok-clanker 2026-10-31 22:08:00 +00:00
commit 15b8b48c72

View file

@ -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