From fa438213238272cce9a120da849d6c6a7157e107 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 24 Aug 2015 15:10:32 +0300 Subject: Rename auction receive handler into auctionrecv. --- src/CMakeLists.txt | 4 +- src/Makefile.am | 4 +- src/net/eathena/auction.cpp | 83 -------------------------------------- src/net/eathena/auction.h | 43 -------------------- src/net/eathena/auctionhandler.cpp | 12 +++--- src/net/eathena/auctionrecv.cpp | 83 ++++++++++++++++++++++++++++++++++++++ src/net/eathena/auctionrecv.h | 43 ++++++++++++++++++++ 7 files changed, 136 insertions(+), 136 deletions(-) delete mode 100644 src/net/eathena/auction.cpp delete mode 100644 src/net/eathena/auction.h create mode 100644 src/net/eathena/auctionrecv.cpp create mode 100644 src/net/eathena/auctionrecv.h (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f4d3a0eaa..f388d94a3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1522,8 +1522,8 @@ SET(SRCS_EATHENA net/eathena/adminrecv.h net/eathena/adminhandler.cpp net/eathena/adminhandler.h - net/eathena/auction.cpp - net/eathena/auction.h + net/eathena/auctionrecv.cpp + net/eathena/auctionrecv.h net/eathena/auctionhandler.cpp net/eathena/auctionhandler.h net/eathena/bank.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 1a55783ed..1df31cea8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1368,8 +1368,8 @@ manaplus_SOURCES += gui/windows/bankwindow.cpp \ net/eathena/adminrecv.h \ net/eathena/adminhandler.cpp \ net/eathena/adminhandler.h \ - net/eathena/auction.cpp \ - net/eathena/auction.h \ + net/eathena/auctionrecv.cpp \ + net/eathena/auctionrecv.h \ net/eathena/auctionhandler.cpp \ net/eathena/auctionhandler.h \ net/eathena/bank.cpp \ diff --git a/src/net/eathena/auction.cpp b/src/net/eathena/auction.cpp deleted file mode 100644 index 558e822e0..000000000 --- a/src/net/eathena/auction.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * The ManaPlus Client - * Copyright (C) 2011-2015 The ManaPlus Developers - * - * This file is part of The ManaPlus Client. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "net/eathena/auction.h" - -#include "logger.h" - -#include "net/eathena/messagein.h" - -#include "debug.h" - -namespace EAthena -{ - -void Auction::processOpenWindow(Net::MessageIn &msg) -{ - UNIMPLIMENTEDPACKET; - msg.readInt32("flag"); // 0 - open, 1 - close -} - -void Auction::processAuctionResults(Net::MessageIn &msg) -{ - UNIMPLIMENTEDPACKET; - msg.readInt16("len"); - msg.readInt32("pages"); - const int itemCount = msg.readInt32("items count"); - for (int f = 0; f < itemCount; f ++) - { - msg.readInt32("auction id"); - msg.readString(24, "seller name"); - msg.readInt32("item id"); - msg.readInt32("auction type"); - msg.readInt16("item amount"); // always 1 - msg.readUInt8("identify"); - msg.readUInt8("attribute"); - msg.readUInt8("refine"); - for (int d = 0; d < 4; d ++) - msg.readInt16("card"); - msg.readInt32("price"); - msg.readInt32("buy now"); - msg.readString(24, "buyer name"); - msg.readInt32("timestamp"); - // +++ need use ItemColorManager for color - } -} - -void Auction::processAuctionSetItem(Net::MessageIn &msg) -{ - UNIMPLIMENTEDPACKET; - msg.readInt16("index"); - msg.readUInt8("flag"); -} - -void Auction::processAuctionMessage(Net::MessageIn &msg) -{ - UNIMPLIMENTEDPACKET; - msg.readUInt8("message"); -} - -void Auction::processAuctionClose(Net::MessageIn &msg) -{ - UNIMPLIMENTEDPACKET; - msg.readInt16("flag"); -} - -} // namespace EAthena diff --git a/src/net/eathena/auction.h b/src/net/eathena/auction.h deleted file mode 100644 index 675f7423d..000000000 --- a/src/net/eathena/auction.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * The ManaPlus Client - * Copyright (C) 2011-2015 The ManaPlus Developers - * - * This file is part of The ManaPlus Client. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef NET_EATHENA_AUCTION_H -#define NET_EATHENA_AUCTION_H - -#ifdef EATHENA_SUPPORT - -#include "net/auctionhandler.h" - -#include "net/eathena/messagehandler.h" - -namespace EAthena -{ - namespace Auction - { - void processOpenWindow(Net::MessageIn &msg); - void processAuctionResults(Net::MessageIn &msg); - void processAuctionSetItem(Net::MessageIn &msg); - void processAuctionMessage(Net::MessageIn &msg); - void processAuctionClose(Net::MessageIn &msg); - } // namespace Admin -} // namespace EAthena - -#endif // EATHENA_SUPPORT -#endif // NET_EATHENA_AUCTION_H diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp index 4ee007953..ddce77077 100644 --- a/src/net/eathena/auctionhandler.cpp +++ b/src/net/eathena/auctionhandler.cpp @@ -25,7 +25,7 @@ #include "net/ea/eaprotocol.h" -#include "net/eathena/auction.h" +#include "net/eathena/auctionrecv.h" #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" @@ -57,23 +57,23 @@ void AuctionHandler::handleMessage(Net::MessageIn &msg) switch (msg.getId()) { case SMSG_AUCTION_OPEN_WINDOW: - Auction::processOpenWindow(msg); + AuctionRecv::processOpenWindow(msg); break; case SMSG_AUCTION_RESULTS: - Auction::processAuctionResults(msg); + AuctionRecv::processAuctionResults(msg); break; case SMSG_AUCTION_SET_ITEM: - Auction::processAuctionSetItem(msg); + AuctionRecv::processAuctionSetItem(msg); break; case SMSG_AUCTION_MESSAGE: - Auction::processAuctionMessage(msg); + AuctionRecv::processAuctionMessage(msg); break; case SMSG_AUCTION_CLOSE: - Auction::processAuctionClose(msg); + AuctionRecv::processAuctionClose(msg); break; default: diff --git a/src/net/eathena/auctionrecv.cpp b/src/net/eathena/auctionrecv.cpp new file mode 100644 index 000000000..4f1beddec --- /dev/null +++ b/src/net/eathena/auctionrecv.cpp @@ -0,0 +1,83 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2015 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "net/eathena/auctionrecv.h" + +#include "logger.h" + +#include "net/eathena/messagein.h" + +#include "debug.h" + +namespace EAthena +{ + +void AuctionRecv::processOpenWindow(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + msg.readInt32("flag"); // 0 - open, 1 - close +} + +void AuctionRecv::processAuctionResults(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + msg.readInt16("len"); + msg.readInt32("pages"); + const int itemCount = msg.readInt32("items count"); + for (int f = 0; f < itemCount; f ++) + { + msg.readInt32("auction id"); + msg.readString(24, "seller name"); + msg.readInt32("item id"); + msg.readInt32("auction type"); + msg.readInt16("item amount"); // always 1 + msg.readUInt8("identify"); + msg.readUInt8("attribute"); + msg.readUInt8("refine"); + for (int d = 0; d < 4; d ++) + msg.readInt16("card"); + msg.readInt32("price"); + msg.readInt32("buy now"); + msg.readString(24, "buyer name"); + msg.readInt32("timestamp"); + // +++ need use ItemColorManager for color + } +} + +void AuctionRecv::processAuctionSetItem(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + msg.readInt16("index"); + msg.readUInt8("flag"); +} + +void AuctionRecv::processAuctionMessage(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + msg.readUInt8("message"); +} + +void AuctionRecv::processAuctionClose(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + msg.readInt16("flag"); +} + +} // namespace EAthena diff --git a/src/net/eathena/auctionrecv.h b/src/net/eathena/auctionrecv.h new file mode 100644 index 000000000..583e873b9 --- /dev/null +++ b/src/net/eathena/auctionrecv.h @@ -0,0 +1,43 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2015 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef NET_EATHENA_AUCTION_H +#define NET_EATHENA_AUCTION_H + +#ifdef EATHENA_SUPPORT + +#include "net/auctionhandler.h" + +#include "net/eathena/messagehandler.h" + +namespace EAthena +{ + namespace AuctionRecv + { + void processOpenWindow(Net::MessageIn &msg); + void processAuctionResults(Net::MessageIn &msg); + void processAuctionSetItem(Net::MessageIn &msg); + void processAuctionMessage(Net::MessageIn &msg); + void processAuctionClose(Net::MessageIn &msg); + } // namespace Admin +} // namespace EAthena + +#endif // EATHENA_SUPPORT +#endif // NET_EATHENA_AUCTION_H -- cgit v1.2.3-70-g09d2