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 17:37:16 +07:00
shared_ptr < ItemInstance > item ;
2026-03-01 12:16:08 +08:00
public :
SetEquippedItemPacket ( ) ;
2026-03-02 17:37:16 +07:00
SetEquippedItemPacket ( int entity , int slot , 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 17:37:16 +07:00
virtual bool isInvalidatedBy ( 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 17:37:16 +07:00
shared_ptr < ItemInstance > getItem ( ) ;
2026-03-01 12:16:08 +08:00
public :
2026-03-02 17:37:16 +07:00
static shared_ptr < Packet > create ( ) { return shared_ptr < Packet > ( new SetEquippedItemPacket ( ) ) ; }
2026-03-01 12:16:08 +08:00
virtual int getId ( ) { return 5 ; }
} ;