1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-02 08:57:44 +00:00

should silent the sound effect as well

This commit is contained in:
collett 2020-05-12 04:15:52 +09:00
parent cc95097fbe
commit 228f9b0ef4

View file

@ -639,12 +639,13 @@ Sapphire::ItemPtr Sapphire::Entity::Player::addItem( ItemPtr itemToAdd, bool sil
lootMsg->data().param3 = originalQuantity; lootMsg->data().param3 = originalQuantity;
queuePacket( lootMsg ); queuePacket( lootMsg );
} }
if( !silent )
auto soundEffectPacket = makeZonePacket< FFXIVIpcInventoryActionAck >( getId() ); {
soundEffectPacket->data().sequence = 0xFFFFFFFF; auto soundEffectPacket = makeZonePacket< FFXIVIpcInventoryActionAck >( getId() );
soundEffectPacket->data().type = 6; soundEffectPacket->data().sequence = 0xFFFFFFFF;
queuePacket( soundEffectPacket ); soundEffectPacket->data().type = 6;
queuePacket( soundEffectPacket );
}
return item; return item;
} }
@ -670,6 +671,11 @@ Sapphire::ItemPtr Sapphire::Entity::Player::addItem( ItemPtr itemToAdd, bool sil
{ {
auto invUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), freeBagSlot.second, freeBagSlot.first, *itemToAdd ); auto invUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), freeBagSlot.second, freeBagSlot.first, *itemToAdd );
queuePacket( invUpdate ); queuePacket( invUpdate );
auto soundEffectPacket = makeZonePacket< FFXIVIpcInventoryActionAck >( getId() );
soundEffectPacket->data().sequence = 0xFFFFFFFF;
soundEffectPacket->data().type = 6;
queuePacket( soundEffectPacket );
} }
if( sendLootMessage ) if( sendLootMessage )
@ -682,11 +688,6 @@ Sapphire::ItemPtr Sapphire::Entity::Player::addItem( ItemPtr itemToAdd, bool sil
queuePacket( lootMsg ); queuePacket( lootMsg );
} }
auto soundEffectPacket = makeZonePacket< FFXIVIpcInventoryActionAck >( getId() );
soundEffectPacket->data().sequence = 0xFFFFFFFF;
soundEffectPacket->data().type = 6;
queuePacket( soundEffectPacket );
return itemToAdd; return itemToAdd;
} }