first commit

This commit is contained in:
murdle
2026-03-01 02:38:58 +02:00
commit 19250b9db4
19111 changed files with 4358159 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
#include "stdafx.h"
#include <iostream>
#include "InputOutputStream.h"
#include "PacketListener.h"
#include "TradeItemPacket.h"
TradeItemPacket::TradeItemPacket()
{
containerId = 0;
offer = 0;
}
TradeItemPacket::TradeItemPacket(int containerId, int offer)
{
this->containerId = containerId;
this->offer = offer;
}
void TradeItemPacket::handle(PacketListener *listener)
{
listener->handleTradeItem(shared_from_this());
}
void TradeItemPacket::read(DataInputStream *dis) //throws IOException
{
containerId = dis->readInt();
offer = dis->readInt();
}
void TradeItemPacket::write(DataOutputStream *dos) //throws IOException
{
dos->writeInt(containerId);
dos->writeInt(offer);
}
int TradeItemPacket::getEstimatedSize()
{
return 8;
}