From 219f17583f160987fc4e83c4a57a9a899c7d7112 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Fri, 31 Oct 2025 00:34:13 -0500 Subject: [PATCH] feat(component): implement CCharacterComponent::UpdateItemAL --- src/component/CCharacterComponent.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/component/CCharacterComponent.cpp b/src/component/CCharacterComponent.cpp index bc48a98..587c9e4 100644 --- a/src/component/CCharacterComponent.cpp +++ b/src/component/CCharacterComponent.cpp @@ -1442,7 +1442,31 @@ void CCharacterComponent::SetSkinColor(int32_t skinColorID, bool a3, bool a4, co } void CCharacterComponent::UpdateItemAL(ITEM_SLOT itemSlot, const ItemDisplayInfoRec* displayRec, bool update) { - // TODO + auto priority = s_itemPriority[itemSlot][SECTION_ARM_LOWER]; + + if (displayRec && displayRec->m_geosetGroup[0]) { + if (itemSlot == ITEMSLOT_3) { + priority = 5; + } else if (itemSlot == ITEMSLOT_8) { + priority = 6; + } + } + + if (update) { + if (!this->UpdateItemDisplay(SECTION_ARM_LOWER, displayRec, priority)) { + return; + } + } else { + this->ClearItemDisplay(SECTION_ARM_LOWER, priority); + } + + if (priority != -1) { + this->m_sectionDirty |= (1 << SECTION_ARM_LOWER); + + // TODO component request logic + + this->m_flags &= ~0x8; + } } void CCharacterComponent::UpdateItemAU(ITEM_SLOT itemSlot, const ItemDisplayInfoRec* displayRec, bool update) {