mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(component): partially implement CCharacterComponent::AddHandItem
This commit is contained in:
parent
bb4824cb02
commit
9acffa737e
@ -99,8 +99,31 @@ CStatus s_status;
|
|||||||
|
|
||||||
#define TEXTURE_INDEX(section, texture) (3 * section + texture)
|
#define TEXTURE_INDEX(section, texture) (3 * section + texture)
|
||||||
|
|
||||||
void CCharacterComponent::AddHandItem(CM2Model* model, const ItemDisplayInfoRec* displayRec, INVENTORY_SLOTS invSlot, SHEATHE_TYPE sheatheType, bool a5, bool a6, bool a7, int32_t a8) {
|
int32_t CCharacterComponent::AddHandItem(CM2Model* model, const ItemDisplayInfoRec* displayRec, INVENTORY_SLOTS invSlot, SHEATHE_TYPE sheatheType, bool a5, bool a6, bool a7, int32_t a8) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
GEOCOMPONENTLINKS itemLink;
|
||||||
|
GEOCOMPONENTLINKS sheatheLink;
|
||||||
|
|
||||||
|
if (invSlot == INVSLOT_MAINHAND) {
|
||||||
|
itemLink = ATTACH_HANDR;
|
||||||
|
sheatheLink = CCharacterComponent::GetSheatheLink(sheatheType, true);
|
||||||
|
} else if (invSlot == INVSLOT_OFFHAND) {
|
||||||
|
itemLink = ATTACH_HANDL;
|
||||||
|
sheatheLink = CCharacterComponent::GetSheatheLink(sheatheType, false);
|
||||||
|
} else if (invSlot == INVSLOT_RANGED) {
|
||||||
|
if (a7) {
|
||||||
|
itemLink = ATTACH_HANDR;
|
||||||
|
sheatheLink = CCharacterComponent::GetSheatheLink(sheatheType, true);
|
||||||
|
} else {
|
||||||
|
itemLink = ATTACH_HANDL;
|
||||||
|
sheatheLink = CCharacterComponent::GetSheatheLink(sheatheType, false);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
CCharacterComponent* CCharacterComponent::AllocComponent() {
|
CCharacterComponent* CCharacterComponent::AllocComponent() {
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class CCharacterComponent {
|
|||||||
static uint32_t s_textureSize;
|
static uint32_t s_textureSize;
|
||||||
|
|
||||||
// Static functions
|
// Static functions
|
||||||
static void AddHandItem(CM2Model* model, const ItemDisplayInfoRec* displayRec, INVENTORY_SLOTS invSlot, SHEATHE_TYPE sheatheType, bool a5, bool a6, bool a7, int32_t a8);
|
static int32_t AddHandItem(CM2Model* model, const ItemDisplayInfoRec* displayRec, INVENTORY_SLOTS invSlot, SHEATHE_TYPE sheatheType, bool a5, bool a6, bool a7, int32_t a8);
|
||||||
static CCharacterComponent* AllocComponent();
|
static CCharacterComponent* AllocComponent();
|
||||||
static HTEXTURE CreateTexture(const char* fileName, CStatus* status);
|
static HTEXTURE CreateTexture(const char* fileName, CStatus* status);
|
||||||
static GEOCOMPONENTLINKS GetSheatheLink(SHEATHE_TYPE sheatheType, bool a2);
|
static GEOCOMPONENTLINKS GetSheatheLink(SHEATHE_TYPE sheatheType, bool a2);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user