diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index dd1e7d39..772aa6ae 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -266,6 +266,8 @@ namespace Sapphire::Network::Packets DailyQuests = 0x02D8, // updated 5.18 DailyQuestRepeatFlags = 0x03A3, // updated 5.18 + GetItemSoundEffect = 0x02FA, // 5.18, may have other uses. + /// Doman Mahjong ////////////////////////////////////// MahjongOpenGui = 0x02A4, // only available in mahjong instance MahjongNextRound = 0x02BD, // initial hands(baipai), # of riichi(wat), winds, honba, score and stuff diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index f2075f74..5d581dfc 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -2012,6 +2012,15 @@ namespace Sapphire::Network::Packets::Server char otherName[32]; }; + struct FFXIVIpcGetItemSoundEffect : FFXIVIpcBasePacket< GetItemSoundEffect > + { + uint32_t unk1; + uint16_t unk2; + uint16_t unk3; + uint32_t unk4; + uint32_t unk5; + }; + } #endif /*_CORE_NETWORK_PACKETS_SERVER_IPC_H*/ diff --git a/src/world/Actor/PlayerInventory.cpp b/src/world/Actor/PlayerInventory.cpp index fe680fc5..e63b84eb 100644 --- a/src/world/Actor/PlayerInventory.cpp +++ b/src/world/Actor/PlayerInventory.cpp @@ -607,6 +607,11 @@ Sapphire::ItemPtr Sapphire::Entity::Player::addItem( uint32_t catalogId, uint32_ { queuePacket( makeActorControlSelf( getId(), ItemObtainIcon, catalogId, originalQuantity ) ); + auto soundEffectPacket = makeZonePacket< FFXIVIpcGetItemSoundEffect >( getId() ); + soundEffectPacket->data().unk1 = 0xFFFFFFFF; + soundEffectPacket->data().unk2 = 6; // this seems to have to be 6 in order to make that sound (tried 5 or 7 no sound at all) + queuePacket( soundEffectPacket ); + return item; } @@ -638,6 +643,11 @@ Sapphire::ItemPtr Sapphire::Entity::Player::addItem( uint32_t catalogId, uint32_ queuePacket( invUpdate ); queuePacket( makeActorControlSelf( getId(), ItemObtainIcon, catalogId, originalQuantity ) ); + + auto soundEffectPacket = makeZonePacket< FFXIVIpcGetItemSoundEffect >( getId() ); + soundEffectPacket->data().unk1 = 0xFFFFFFFF; + soundEffectPacket->data().unk2 = 6; // this seems to have to be 6 in order to make that sound (tried 5 or 7 no sound at all) + queuePacket( soundEffectPacket ); } return item;