diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp index 0bf9b4221..9aff47c1a 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp @@ -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 ); diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character.h b/code/ryzom/server/src/entities_game_service/player_manager/character.h index 885942e6d..3a3d6cd96 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/character.h @@ -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(); diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp index 0956773f2..1c474f78c 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character_inventory_manipulation.cpp @@ -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); } // ****************************************************************************