mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-08 19:57:46 +00:00
Fix item count in container.
This commit is contained in:
parent
0d6a0719de
commit
5d6aa369dc
1 changed files with 5 additions and 2 deletions
|
@ -19,11 +19,14 @@ void Sapphire::World::Manager::InventoryMgr::sendInventoryContainer( Sapphire::E
|
|||
{
|
||||
auto sequence = player.getNextInventorySequence();
|
||||
auto pMap = container->getItemMap();
|
||||
uint32_t itemCount = 0;
|
||||
|
||||
for( auto itM = pMap.begin(); itM != pMap.end(); ++itM )
|
||||
{
|
||||
if( !itM->second )
|
||||
return;
|
||||
continue;
|
||||
|
||||
itemCount++;
|
||||
|
||||
if( container->getId() == Common::InventoryType::Currency || container->getId() == Common::InventoryType::Crystal )
|
||||
{
|
||||
|
@ -57,7 +60,7 @@ void Sapphire::World::Manager::InventoryMgr::sendInventoryContainer( Sapphire::E
|
|||
|
||||
auto containerInfoPacket = makeZonePacket< Server::FFXIVIpcContainerInfo >( player.getId() );
|
||||
containerInfoPacket->data().containerSequence = sequence;
|
||||
containerInfoPacket->data().numItems = container->getEntryCount();
|
||||
containerInfoPacket->data().numItems = itemCount;
|
||||
containerInfoPacket->data().containerId = container->getId();
|
||||
|
||||
player.queuePacket( containerInfoPacket );
|
||||
|
|
Loading…
Add table
Reference in a new issue