mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
avoid recursion problem when 'taking all' in quarter temp inventory in EGS
--HG-- branch : develop
This commit is contained in:
parent
4f648ba736
commit
6c28bfb459
4 changed files with 8 additions and 8 deletions
|
@ -188,7 +188,7 @@ protected:
|
||||||
/// the harvestable Mps (4 per entity)
|
/// the harvestable Mps (4 per entity)
|
||||||
std::vector< CCreatureRawMaterial> _Mps;
|
std::vector< CCreatureRawMaterial> _Mps;
|
||||||
|
|
||||||
/// pointer on the harverting character
|
/// pointer on the harvesting character
|
||||||
TDataSetRow _HarvesterRowId;
|
TDataSetRow _HarvesterRowId;
|
||||||
|
|
||||||
/// skill used to harvest this creature
|
/// skill used to harvest this creature
|
||||||
|
|
|
@ -14167,7 +14167,7 @@ void CCharacter::sendCloseTempInventoryImpulsion()
|
||||||
BOMB_IF(isRecursing,"CCharacter::sendCloseTempInventoryImpulsion is recursing!",return); // **** Temp Fix 2/4 **** //
|
BOMB_IF(isRecursing,"CCharacter::sendCloseTempInventoryImpulsion is recursing!",return); // **** Temp Fix 2/4 **** //
|
||||||
isRecursing= true; // **** Temp Fix 3/4 **** //
|
isRecursing= true; // **** Temp Fix 3/4 **** //
|
||||||
|
|
||||||
getAllTempInventoryItems();
|
getAllTempInventoryItems(false);
|
||||||
|
|
||||||
CMessage msgout( "IMPULSION_ID" );
|
CMessage msgout( "IMPULSION_ID" );
|
||||||
msgout.serial( _Id );
|
msgout.serial( _Id );
|
||||||
|
|
|
@ -2623,13 +2623,13 @@ public:
|
||||||
CGameItemPtr createItemInInventoryFreeSlot(INVENTORIES::TInventory invId, uint16 obtainedQuality, uint32 quantity, const NLMISC::CSheetId & obtainedItem, const NLMISC::CEntityId & creatorId = NLMISC::CEntityId::Unknown, const std::string * phraseId = NULL);
|
CGameItemPtr createItemInInventoryFreeSlot(INVENTORIES::TInventory invId, uint16 obtainedQuality, uint32 quantity, const NLMISC::CSheetId & obtainedItem, const NLMISC::CEntityId & creatorId = NLMISC::CEntityId::Unknown, const std::string * phraseId = NULL);
|
||||||
|
|
||||||
/// action on an item in the temp inventory (move it to bag)
|
/// action on an item in the temp inventory (move it to bag)
|
||||||
void itemTempInventoryToBag(uint32 scrSlot);
|
void itemTempInventoryToBag(uint32 scrSlot, bool sendCloseTempImpulsion = true);
|
||||||
|
|
||||||
/// clear temp inventory
|
/// clear temp inventory
|
||||||
void clearTempInventory();
|
void clearTempInventory();
|
||||||
|
|
||||||
/// get all items in temp inventory
|
/// get all items in temp inventory
|
||||||
void getAllTempInventoryItems();
|
void getAllTempInventoryItems(bool sendCloseTempImpulsion = true);
|
||||||
|
|
||||||
/// return true if temp inventory is empty
|
/// return true if temp inventory is empty
|
||||||
bool tempInventoryEmpty();
|
bool tempInventoryEmpty();
|
||||||
|
|
|
@ -1841,7 +1841,7 @@ CGameItemPtr CCharacter::createItemInInventoryFreeSlot(INVENTORIES::TInventory i
|
||||||
}
|
}
|
||||||
|
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
void CCharacter::itemTempInventoryToBag(uint32 srcSlot)
|
void CCharacter::itemTempInventoryToBag(uint32 srcSlot, bool sendCloseTempImpulsion)
|
||||||
{
|
{
|
||||||
H_AUTO(CCharacter_itemTempInventoryToBag);
|
H_AUTO(CCharacter_itemTempInventoryToBag);
|
||||||
|
|
||||||
|
@ -2015,7 +2015,7 @@ void CCharacter::itemTempInventoryToBag(uint32 srcSlot)
|
||||||
CWorldInstances::instance().msgToAIInstance(getInstanceNumber(), msg);
|
CWorldInstances::instance().msgToAIInstance(getInstanceNumber(), msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
endHarvest();
|
endHarvest(sendCloseTempImpulsion);
|
||||||
|
|
||||||
leaveTempInventoryMode();
|
leaveTempInventoryMode();
|
||||||
}
|
}
|
||||||
|
@ -2108,12 +2108,12 @@ void CCharacter::itemTempInventoryToBag(uint32 srcSlot)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
void CCharacter::getAllTempInventoryItems()
|
void CCharacter::getAllTempInventoryItems(bool sendCloseTempImpulsion)
|
||||||
{
|
{
|
||||||
H_AUTO(CCharacter_getAllTempInventoryItems);
|
H_AUTO(CCharacter_getAllTempInventoryItems);
|
||||||
|
|
||||||
for (uint i = 0 ; i < INVENTORIES::NbTempInvSlots; ++i)
|
for (uint i = 0 ; i < INVENTORIES::NbTempInvSlots; ++i)
|
||||||
itemTempInventoryToBag(i);
|
itemTempInventoryToBag(i, sendCloseTempImpulsion);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
|
|
Loading…
Reference in a new issue