From 2452dcf6d7a55fbccccfd7ea426d0e976023a52a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 6 Jan 2015 13:50:52 +0300 Subject: eathena: add packet CMSG_AUCTION_SET_ITEM 0x024c. --- src/net/eathena/auctionhandler.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/net/eathena/auctionhandler.cpp') diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp index 679786bb6..bcdc94aea 100644 --- a/src/net/eathena/auctionhandler.cpp +++ b/src/net/eathena/auctionhandler.cpp @@ -20,6 +20,10 @@ #include "net/eathena/auctionhandler.h" +#include "item.h" + +#include "net/ea/eaprotocol.h" + #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" @@ -106,4 +110,13 @@ void AuctionHandler::cancelRequest() const outMsg.writeInt16(0, "type"); // unused } +void AuctionHandler::setItem(const Item *const item, + const int amount) const +{ + createOutPacket(CMSG_AUCTION_SET_ITEM); + outMsg.writeInt16(static_cast( + item->getInvIndex() + INVENTORY_OFFSET), "index"); + outMsg.writeInt32(amount, "amount"); // always 1 +} + } // namespace EAthena -- cgit v1.2.3-60-g2f50