2026-03-01 12:16:08 +08:00
# pragma once
using namespace std ;
# include "Packet.h"
class SetEquippedItemPacket : public Packet , public enable_shared_from_this < SetEquippedItemPacket >
{
public :
int entity ;
int slot ;
private :
// 4J Stu - Brought forward from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game
2026-03-02 15:58:20 +07:00
std : : shared_ptr < ItemInstance > item ;
2026-03-01 12:16:08 +08:00
public :
SetEquippedItemPacket ( ) ;
2026-03-02 15:58:20 +07:00
SetEquippedItemPacket ( int entity , int slot , std : : shared_ptr < ItemInstance > item ) ;
2026-03-01 12:16:08 +08:00
virtual void read ( DataInputStream * dis ) ;
virtual void write ( DataOutputStream * dos ) ;
virtual void handle ( PacketListener * listener ) ;
virtual int getEstimatedSize ( ) ;
virtual bool canBeInvalidated ( ) ;
2026-03-02 15:58:20 +07:00
virtual bool isInvalidatedBy ( std : : shared_ptr < Packet > packet ) ;
2026-03-01 12:16:08 +08:00
// 4J Stu - Brought forward from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game
2026-03-02 15:58:20 +07:00
std : : shared_ptr < ItemInstance > getItem ( ) ;
2026-03-01 12:16:08 +08:00
public :
2026-03-02 15:58:20 +07:00
static std : : shared_ptr < Packet > create ( ) { return std : : shared_ptr < Packet > ( new SetEquippedItemPacket ( ) ) ; }
2026-03-01 12:16:08 +08:00
virtual int getId ( ) { return 5 ; }
} ;