mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(component): add CCharacterComponent::AddItem
This commit is contained in:
parent
9b46d51508
commit
15a5eb6f57
@ -440,6 +440,20 @@ void CCharacterComponent::UpdateBaseTexture(EGxTexCommand cmd, uint32_t width, u
|
||||
}
|
||||
}
|
||||
|
||||
void CCharacterComponent::AddItem(ITEM_SLOT itemSlot, int32_t displayID, int32_t a4) {
|
||||
if (displayID <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto displayRec = g_itemDisplayInfoDB.GetRecord(displayID);
|
||||
|
||||
if (!displayRec) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->AddItem(itemSlot, displayRec, a4);
|
||||
}
|
||||
|
||||
void CCharacterComponent::AddItem(ITEM_SLOT itemSlot, const ItemDisplayInfoRec* displayRec, int32_t a4) {
|
||||
this->m_flags |= 0x4;
|
||||
|
||||
|
||||
@ -73,6 +73,7 @@ class CCharacterComponent {
|
||||
int32_t m_items[NUM_ITEM_SLOT] = {};
|
||||
|
||||
// Member functions
|
||||
void AddItem(ITEM_SLOT itemSlot, int32_t displayID, int32_t a4);
|
||||
void AddItem(ITEM_SLOT itemSlot, const ItemDisplayInfoRec* displayRec, int32_t a4);
|
||||
void ClearItemDisplay(COMPONENT_SECTIONS section, int32_t priority);
|
||||
void CreateBaseTexture();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user