From 1e3fe5e9c22cd70a441161e2499329452a948b97 Mon Sep 17 00:00:00 2001 From: Lucy <44952533+Skyliegirl33@users.noreply.github.com> Date: Thu, 9 Feb 2023 05:22:05 +0100 Subject: [PATCH] Fix UpdateInventorySlot to use right opcode --- src/common/Network/PacketDef/Zone/ServerZoneDef.h | 6 ++++++ .../Network/PacketWrappers/UpdateInventorySlotPacket.h | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index 585b74db..fe9b938c 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -1145,6 +1145,12 @@ namespace Sapphire::Network::Packets::WorldPackets::Server ZoneProtoDownNormalItem item; }; + struct FFXIVIpcUpdateItem : FFXIVIpcBasePacket< UpdateItem > + { + uint32_t contextId; + ZoneProtoDownNormalItem item; + }; + struct FFXIVIpcItemSize : FFXIVIpcBasePacket< ItemSize > { uint32_t contextId; diff --git a/src/world/Network/PacketWrappers/UpdateInventorySlotPacket.h b/src/world/Network/PacketWrappers/UpdateInventorySlotPacket.h index c80c7fb0..3b843113 100644 --- a/src/world/Network/PacketWrappers/UpdateInventorySlotPacket.h +++ b/src/world/Network/PacketWrappers/UpdateInventorySlotPacket.h @@ -11,17 +11,17 @@ namespace Sapphire::Network::Packets::WorldPackets::Server /** * @brief The update inventory-slot packet. */ - class UpdateInventorySlotPacket : public ZoneChannelPacket< FFXIVIpcNormalItem > + class UpdateInventorySlotPacket : public ZoneChannelPacket< FFXIVIpcUpdateItem > { public: UpdateInventorySlotPacket( uint32_t playerId, uint16_t slot, uint16_t storageId, const Item& item, uint32_t contextId ) : - ZoneChannelPacket< FFXIVIpcNormalItem >( playerId, playerId ) + ZoneChannelPacket< FFXIVIpcUpdateItem >( playerId, playerId ) { initialize( slot, storageId, item, contextId ); }; UpdateInventorySlotPacket( uint32_t playerId, uint16_t slot, uint16_t storageId, uint32_t contextId ) : - ZoneChannelPacket< FFXIVIpcNormalItem >( playerId, playerId ) + ZoneChannelPacket< FFXIVIpcUpdateItem >( playerId, playerId ) { initialize( slot, storageId, contextId ); }; @@ -37,6 +37,7 @@ namespace Sapphire::Network::Packets::WorldPackets::Server m_data.item.flags = static_cast< uint8_t >( item.isHq() ? 1 : 0 ); m_data.item.refine = item.getSpiritbond(); m_data.item.stain = static_cast< uint8_t >( item.getStain() ); + m_data.item.durability = item.getDurability(); m_data.item.signatureId = 0; };