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 // Observer on DB equipment branch

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

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

Loading…
Cancel
Save