Compare commits

...

1 Commits

@ -1168,6 +1168,19 @@ void CInventoryManager::unequip(const std::string &invPath)
}
}
void CInventoryManager::onUpdateEquipHands()
{
// update hands slots after initial BAG inventory has received
CCDBNodeLeaf *pNL;
pNL = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":HAND:0:INDEX_IN_BAG", false);
if (pNL && pNL->getValue32() != 0)
_DBEquipObs.update(pNL);
pNL = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":HAND:1:INDEX_IN_BAG", false);
if (pNL && pNL->getValue32() != 0)
_DBEquipObs.update(pNL);
}
// ***************************************************************************
// Observer on DB equipment branch

@ -305,6 +305,7 @@ public:
// Called on impulse
void onReceiveItemInfo(const CItemInfos &itemInfo);
void onRefreshItemInfoVersion(uint16 slotId, uint8 infoVersion);
void onUpdateEquipHands();
// Log for debug
void debugItemInfoWaiters();
void debugItemInfoCache() const;

@ -2890,6 +2890,8 @@ void impulseInitInventory (NLMISC::CBitMemStream &impulse)
impulseUpdateInventory( impulse );
IngameDbMngr.setInitPacketReceived();
nlinfo( "DB_INIT:INV done (%u bytes)", impulse.getPos()-p );
getInventory().onUpdateEquipHands();
}
//-----------------------------------------------

Loading…
Cancel
Save