diff --git a/src/common/Network/PacketDef/Zone/ClientZoneDef.h b/src/common/Network/PacketDef/Zone/ClientZoneDef.h index 066261e3..8826e50c 100644 --- a/src/common/Network/PacketDef/Zone/ClientZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ClientZoneDef.h @@ -351,6 +351,7 @@ struct FFXIVIpcFindContent : FFXIVIpcBasePacket< FindContent > uint16_t territoryType; uint8_t acceptHalfway; uint8_t language; + uint8_t flags; }; struct FFXIVIpcFind5Contents : FFXIVIpcBasePacket< Find5Contents > diff --git a/src/world/Actor/Player.h b/src/world/Actor/Player.h index 10dfe28c..df7fea04 100644 --- a/src/world/Actor/Player.h +++ b/src/world/Actor/Player.h @@ -747,7 +747,7 @@ namespace Sapphire::Entity uint32_t getNextInventorySequence(); - bool findFirstItemWithId( uint32_t catalogId, Inventory::InventoryContainerPair& location ); + bool findFirstItemWithId( uint32_t catalogId, Inventory::InventoryContainerPair& location, std::initializer_list< Common::InventoryType > bags = { Common::Bag0, Common::Bag1, Common::Bag2, Common::Bag3 } ); uint16_t getFreeSlotsInBags(); diff --git a/src/world/Actor/PlayerInventory.cpp b/src/world/Actor/PlayerInventory.cpp index 44335086..b1112d47 100644 --- a/src/world/Actor/PlayerInventory.cpp +++ b/src/world/Actor/PlayerInventory.cpp @@ -1076,15 +1076,15 @@ void Sapphire::Entity::Player::insertInventoryItem( Sapphire::Common::InventoryT } bool Sapphire::Entity::Player::findFirstItemWithId( uint32_t catalogId, - Inventory::InventoryContainerPair& location ) + Inventory::InventoryContainerPair& location, std::initializer_list< InventoryType > bags ) { - for( auto bagId : { Bag0, Bag1, Bag2, Bag3 } ) + for( auto bagId : bags ) { auto& container = m_storageMap[ bagId ]; for( const auto& item : container->getItemMap() ) { - if( item.second->getId() != catalogId ) + if( ( item.second && item.second->getId() != catalogId ) || !item.second ) continue; location = std::make_pair( bagId, item.first ); @@ -1094,4 +1094,4 @@ bool Sapphire::Entity::Player::findFirstItemWithId( uint32_t catalogId, } return false; -} \ No newline at end of file +}