Merge branch 'inventory-fixes' into 'main/gingo-test'

Inventory fixes

See merge request ryzom/ryzom-core!12
25-remove-lock-option-from-item-menu-in-guild-inventory
Nuno Gonçalves (Ulukyn) 3 years ago
commit b6781af51e

@ -1960,16 +1960,15 @@ class CHandlerItemMenuCheck : public IActionHandler
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
{
if (pMoveToPa[i])
pMoveToPa[i]->setActive(invId!=INVENTORIES::guild &&
(uint)invId!=INVENTORIES::pet_animal+i &&
pMoveToPa[i]->setActive((uint)invId!=INVENTORIES::pet_animal+i &&
invMngr.isInventoryPresent((INVENTORIES::TInventory)(INVENTORIES::pet_animal+i)) );
}
if (pMoveToGuild)
pMoveToGuild->setActive(invId==INVENTORIES::bag && invMngr.isInventoryPresent(INVENTORIES::guild));
pMoveToGuild->setActive(invId!=INVENTORIES::guild && invMngr.isInventoryPresent(INVENTORIES::guild));
if (pMoveToRoom)
pMoveToRoom->setActive(invId==INVENTORIES::bag && invMngr.isInventoryPresent(INVENTORIES::player_room));
pMoveToRoom->setActive(invId!=INVENTORIES::player_room && invMngr.isInventoryPresent(INVENTORIES::player_room));
// std case: can drop / destroy
if(pDrop) pDrop->setActive(invId!=INVENTORIES::guild);

@ -799,7 +799,11 @@ static DECLARE_INTERFACE_USER_FCT(getAnimalInventoryStateText)
// According to server status, change the inventory text
uint status= (uint)args[0].getInteger();
if(ANIMAL_STATUS::isInStable((ANIMAL_STATUS::EAnimalStatus)status))
if(ANIMAL_STATUS::isInBag((ANIMAL_STATUS::EAnimalStatus)status))
{
result.setString("uiAnimalInBag");
}
else if(ANIMAL_STATUS::isInStable((ANIMAL_STATUS::EAnimalStatus)status))
{
result.setString("uiAnimalInStable");
}

Loading…
Cancel
Save