mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-30 13:03:39 +00:00
32 lines
738 B
C++
32 lines
738 B
C++
#pragma once
|
|
|
|
// 4J ADDED PACKET
|
|
|
|
#include <iostream>
|
|
#include <memory>
|
|
|
|
#include "Packet.h"
|
|
#include "PacketListener.h"
|
|
#include "minecraft/network/packet/Packet.h"
|
|
|
|
class TradeItemPacket : public Packet,
|
|
public std::enable_shared_from_this<TradeItemPacket> {
|
|
public:
|
|
int containerId;
|
|
int offer;
|
|
|
|
TradeItemPacket();
|
|
TradeItemPacket(int containerId, int offer);
|
|
|
|
virtual void handle(PacketListener* listener);
|
|
virtual void read(DataInputStream* dis);
|
|
virtual void write(DataOutputStream* dos);
|
|
virtual int getEstimatedSize();
|
|
|
|
public:
|
|
static std::shared_ptr<Packet> create() {
|
|
return std::make_shared<TradeItemPacket>();
|
|
}
|
|
virtual int getId() { return 151; }
|
|
};
|