Experimental alternate fix for ryzomclassic/#31

ryzomclassic-develop
kaetemi 5 years ago
parent 8f1d0ebf23
commit 35a9e747f7

@ -7936,13 +7936,11 @@ void CCharacter::endHarvest(bool sendCloseTempImpulsion)
_DepositSearchSkill = SKILLS::unknown;
_MpIndex = 0xff;
_DepositHarvestInformation.DepositIndex = 0xffffffff;
bool sendCloseTemp = false;
if ( _DepositHarvestInformation.Sheet != CSheetId::Unknown/*_DepositHarvestInformation.EndCherchingTime != 0xffffffff && _DepositHarvestInformation.EndCherchingTime > CTickEventHandler::getGameCycle()*/ )
{
if ( sendCloseTempImpulsion )
{
sendCloseTempInventoryImpulsion();
}
sendCloseTemp = true;
}
if ( _MpSourceId != CEntityId::Unknown || _MpSourceSheetId != CSheetId::Unknown )
@ -7953,8 +7951,7 @@ void CCharacter::endHarvest(bool sendCloseTempImpulsion)
{
creature->resetHarvesterRowId();
// only send interupt message if some rm remains on the corpse
if ( sendCloseTempImpulsion )
sendCloseTempInventoryImpulsion();
sendCloseTemp = true;
}
// send end loot behaviour
@ -7966,6 +7963,11 @@ void CCharacter::endHarvest(bool sendCloseTempImpulsion)
}
clearHarvestDB();
if (sendCloseTemp && sendCloseTempImpulsion)
{
sendCloseTempInventoryImpulsion();
}
} // endHarvest //
@ -14485,7 +14487,7 @@ void CCharacter::sendCloseTempInventoryImpulsion()
BOMB_IF(isRecursing,"CCharacter::sendCloseTempInventoryImpulsion is recursing!",return); // **** Temp Fix 2/4 **** //
isRecursing= true; // **** Temp Fix 3/4 **** //
getAllTempInventoryItems(false);
getAllTempInventoryItems(); // false);
CMessage msgout( "IMPULSION_ID" );
msgout.serial( _Id );

@ -2671,13 +2671,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, bool sendCloseTempImpulsion = true);
void itemTempInventoryToBag(uint32 scrSlot); // , bool sendCloseTempImpulsion = true);
/// clear temp inventory
void clearTempInventory();
/// get all items in temp inventory
void getAllTempInventoryItems(bool sendCloseTempImpulsion = true);
void getAllTempInventoryItems(); // bool sendCloseTempImpulsion = true);
/// return true if temp inventory is empty
bool tempInventoryEmpty();

@ -1834,7 +1834,7 @@ CGameItemPtr CCharacter::createItemInInventoryFreeSlot(INVENTORIES::TInventory i
}
// ****************************************************************************
void CCharacter::itemTempInventoryToBag(uint32 srcSlot, bool sendCloseTempImpulsion)
void CCharacter::itemTempInventoryToBag(uint32 srcSlot) // , bool sendCloseTempImpulsion)
{
H_AUTO(CCharacter_itemTempInventoryToBag);
@ -1859,7 +1859,7 @@ void CCharacter::itemTempInventoryToBag(uint32 srcSlot, bool sendCloseTempImpuls
endForageSession();
if (lastMaterial)
{
endHarvest(sendCloseTempImpulsion);
endHarvest(); // sendCloseTempImpulsion);
// inform IA that everything was looted
CCreatureDespawnMsg msg;
@ -2008,7 +2008,7 @@ void CCharacter::itemTempInventoryToBag(uint32 srcSlot, bool sendCloseTempImpuls
CWorldInstances::instance().msgToAIInstance(getInstanceNumber(), msg);
}
endHarvest(sendCloseTempImpulsion);
endHarvest(); // sendCloseTempImpulsion);
leaveTempInventoryMode();
}
@ -2101,12 +2101,12 @@ void CCharacter::itemTempInventoryToBag(uint32 srcSlot, bool sendCloseTempImpuls
}
// ****************************************************************************
void CCharacter::getAllTempInventoryItems(bool sendCloseTempImpulsion)
void CCharacter::getAllTempInventoryItems() // bool sendCloseTempImpulsion)
{
H_AUTO(CCharacter_getAllTempInventoryItems);
for (uint i = 0 ; i < INVENTORIES::NbTempInvSlots; ++i)
itemTempInventoryToBag(i, sendCloseTempImpulsion);
itemTempInventoryToBag(i); // , sendCloseTempImpulsion);
}
// ****************************************************************************

Loading…
Cancel
Save