Fix online item GUID resolution, async terrain loading, and inventory enrichment

Enrich online inventory from local DB when server data is incomplete, add
resolveOnlineItemGuid fallback for sell/equip/use, use async enqueueTile for
initial terrain load, improve walk/run animation fallbacks, clear target on
loot close, and broaden equipability detection to include armor/subclass.
This commit is contained in:
Kelsi 2026-02-06 18:52:28 -08:00
parent db4a40a4e6
commit e38c0213e4
6 changed files with 119 additions and 8 deletions

View file

@ -1097,15 +1097,18 @@ void InventoryScreen::renderItemSlot(game::Inventory& inventory, const game::Ite
inventoryDirty = true;
}
} else if (kind == SlotKind::BACKPACK && backpackIndex >= 0) {
bool looksEquipable = (item.inventoryType > 0) ||
(item.armor > 0) ||
(!item.subclassName.empty());
if (gameHandler_ && !gameHandler_->isSinglePlayerMode()) {
if (item.inventoryType > 0) {
if (looksEquipable) {
// Auto-equip (online)
gameHandler_->autoEquipItemBySlot(backpackIndex);
} else {
// Use consumable (online)
gameHandler_->useItemBySlot(backpackIndex);
}
} else if (item.inventoryType > 0) {
} else if (looksEquipable) {
// Auto-equip (single-player)
uint8_t equippingType = item.inventoryType;
game::EquipSlot targetSlot = getEquipSlotForType(equippingType, inventory);