ManaPlus
buysellhandler.cpp
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2004-2009 The Mana World Development Team
4  * Copyright (C) 2009-2010 The Mana Developers
5  * Copyright (C) 2011-2019 The ManaPlus Developers
6  * Copyright (C) 2019-2021 Andrei Karas
7  *
8  * This file is part of The ManaPlus Client.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
25 
26 #include "net/ea/buysellrecv.h"
27 
28 #include "net/eathena/messageout.h"
30 
31 #include "debug.h"
32 
33 extern int packetVersion;
34 
35 namespace EAthena
36 {
37 
40 {
41  buySellHandler = this;
43 }
44 
46 {
47  buySellHandler = nullptr;
48 }
49 
50 void BuySellHandler::requestSellList(const std::string &nick A_UNUSED) const
51 {
52 }
53 
54 void BuySellHandler::requestBuyList(const std::string &nick A_UNUSED) const
55 {
56 }
57 
58 void BuySellHandler::sendBuyRequest(const std::string &nick A_UNUSED,
59  const ShopItem *const item A_UNUSED,
60  const int amount A_UNUSED) const
61 {
62 }
63 
64 void BuySellHandler::sendSellRequest(const std::string &nick A_UNUSED,
65  const ShopItem *const item A_UNUSED,
66  const int amount A_UNUSED) const
67 {
68 }
69 
71 {
72  if (packetVersion < 20131218)
73  return;
74 
75  createOutPacket(CMSG_NPC_SHOP_CLOSE);
76 }
77 
78 } // namespace EAthena
Net::BuySellHandler * buySellHandler
Definition: net.cpp:100
void requestBuyList(const std::string &nick) const
void sendBuyRequest(const std::string &nick, const ShopItem *const item, const int amount) const
void sendSellRequest(const std::string &nick, const ShopItem *const item, const int amount) const
void requestSellList(const std::string &nick) const
int packetVersion
Definition: client.cpp:125
#define A_UNUSED
Definition: localconsts.h:160
#define createOutPacket(name)
Definition: messageout.h:37
BuyDialog * mBuyDialog
Definition: buysellrecv.cpp:53