mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-13 17:55:21 +03:00
feat(component): add CCharacterComponent::AddItem
This commit is contained in:
2 files changed
+15
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user