mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(glue): add items in CharacterSelectionDisplay::CreateModelData
This commit is contained in:
parent
ed3b9ac628
commit
9bfe4428e3
@ -43,6 +43,93 @@ void CharacterSelectionDisplay::CreateModelData() {
|
|||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
for (int32_t invSlot = INVSLOT_FIRST; invSlot < NUM_INVENTORY_SLOTS; invSlot++) {
|
||||||
|
auto displayID = this->m_info.inventoryItemDisplayID[invSlot];
|
||||||
|
auto visualID = this->m_info.inventoryItemVisualID[invSlot];
|
||||||
|
|
||||||
|
// Only honor ranged slot for hunters
|
||||||
|
if (invSlot == INVSLOT_RANGED && displayID && this->m_info.classID != 3) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (invSlot == INVSLOT_HEAD && (this->m_info.flags & 0x400)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (invSlot == INVSLOT_BACK && (this->m_info.flags & 0x800)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto displayRec = g_itemDisplayInfoDB.GetRecord(displayID);
|
||||||
|
|
||||||
|
if (!displayRec) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Item visuals in database override item visuals in character info
|
||||||
|
if (g_itemVisualsDB.GetRecord(displayRec->m_itemVisual)) {
|
||||||
|
visualID = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bags
|
||||||
|
|
||||||
|
if (invSlot >= INVSLOT_BAGFIRST) {
|
||||||
|
if (*displayRec->m_modelName[0]) {
|
||||||
|
this->m_component->AddItem(ITEMSLOT_11, displayRec, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Main hand and off hand
|
||||||
|
|
||||||
|
if (invSlot == INVSLOT_MAINHAND || invSlot == INVSLOT_OFFHAND) {
|
||||||
|
CCharacterComponent::AddHandItem(
|
||||||
|
this->m_component->m_data.model,
|
||||||
|
displayRec,
|
||||||
|
static_cast<INVENTORY_SLOTS>(invSlot),
|
||||||
|
SHEATHE_0,
|
||||||
|
false,
|
||||||
|
this->m_info.inventoryItemType[invSlot] == 14,
|
||||||
|
false,
|
||||||
|
visualID
|
||||||
|
);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranged
|
||||||
|
|
||||||
|
if (invSlot == INVSLOT_RANGED) {
|
||||||
|
CCharacterComponent::AddHandItem(
|
||||||
|
this->m_component->m_data.model,
|
||||||
|
displayRec,
|
||||||
|
static_cast<INVENTORY_SLOTS>(invSlot),
|
||||||
|
SHEATHE_0,
|
||||||
|
false,
|
||||||
|
this->m_info.inventoryItemType[invSlot] == 14,
|
||||||
|
false,
|
||||||
|
visualID
|
||||||
|
);
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tabard
|
||||||
|
|
||||||
|
if (invSlot == INVSLOT_TABARD) {
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// All other slots
|
||||||
|
|
||||||
|
this->m_component->AddItemBySlot(static_cast<INVENTORY_SLOTS>(invSlot), displayID, visualID);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO load pet model
|
// TODO load pet model
|
||||||
|
|
||||||
CCharacterSelection::s_characterCount++;
|
CCharacterSelection::s_characterCount++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user