mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-17 21:11:39 +00:00
avoid recursion problem when 'taking all' in quarter temp inventory in EGS
This commit is contained in:
parent
210f106cab
commit
69d749d3b2
4 changed files with 8 additions and 8 deletions
|
@ -188,7 +188,7 @@ protected:
|
|||
/// the harvestable Mps (4 per entity)
|
||||
std::vector< CCreatureRawMaterial> _Mps;
|
||||
|
||||
/// pointer on the harverting character
|
||||
/// pointer on the harvesting character
|
||||
TDataSetRow _HarvesterRowId;
|
||||
|
||||
/// 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 **** //
|
||||
isRecursing= true; // **** Temp Fix 3/4 **** //
|
||||
|
||||
getAllTempInventoryItems();
|
||||
getAllTempInventoryItems(false);
|
||||
|
||||
CMessage msgout( "IMPULSION_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);
|
||||
|
||||
/// 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
|
||||
void clearTempInventory();
|
||||
|
||||
/// get all items in temp inventory
|
||||
void getAllTempInventoryItems();
|
||||
void getAllTempInventoryItems(bool sendCloseTempImpulsion = true);
|
||||
|
||||
/// return true if temp inventory is empty
|
||||
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);
|
||||
|
||||
|
@ -2015,7 +2015,7 @@ void CCharacter::itemTempInventoryToBag(uint32 srcSlot)
|
|||
CWorldInstances::instance().msgToAIInstance(getInstanceNumber(), msg);
|
||||
}
|
||||
|
||||
endHarvest();
|
||||
endHarvest(sendCloseTempImpulsion);
|
||||
|
||||
leaveTempInventoryMode();
|
||||
}
|
||||
|
@ -2108,12 +2108,12 @@ void CCharacter::itemTempInventoryToBag(uint32 srcSlot)
|
|||
}
|
||||
|
||||
// ****************************************************************************
|
||||
void CCharacter::getAllTempInventoryItems()
|
||||
void CCharacter::getAllTempInventoryItems(bool sendCloseTempImpulsion)
|
||||
{
|
||||
H_AUTO(CCharacter_getAllTempInventoryItems);
|
||||
|
||||
for (uint i = 0 ; i < INVENTORIES::NbTempInvSlots; ++i)
|
||||
itemTempInventoryToBag(i);
|
||||
itemTempInventoryToBag(i, sendCloseTempImpulsion);
|
||||
}
|
||||
|
||||
// ****************************************************************************
|
||||
|
|
Loading…
Reference in a new issue