ManaPlus
auctionrecv.cpp
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2011-2019 The ManaPlus Developers
4  * Copyright (C) 2019-2021 Andrei Karas
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
23 
24 #include "logger.h"
25 
27 
28 #include "net/messagein.h"
29 
30 #include "debug.h"
31 
32 namespace EAthena
33 {
34 
36 {
38  msg.readInt32("flag"); // 0 - open, 1 - close
39 }
40 
42 {
44  msg.readInt16("len");
45  msg.readInt32("pages");
46  const int itemCount = msg.readInt32("items count");
47  for (int f = 0; f < itemCount; f ++)
48  {
49  msg.readInt32("auction id");
50  msg.readString(24, "seller name");
51  msg.readInt16("item id"); // here item always 16 bit
52  msg.readInt32("auction type");
53  msg.readInt16("item amount"); // always 1
54  msg.readUInt8("identify");
55  msg.readUInt8("attribute");
56  msg.readUInt8("refine");
57  for (int d = 0; d < maxCards; d ++)
58  msg.readUInt16("card"); // here item always 16 bit
59  msg.readInt32("price");
60  msg.readInt32("buy now");
61  msg.readString(24, "buyer name");
62  msg.readInt32("timestamp");
63  // +++ need use ItemColorManager for color
64  }
65 }
66 
68 {
70  msg.readInt16("index");
71  msg.readUInt8("flag");
72 }
73 
75 {
77  msg.readUInt8("message");
78 }
79 
81 {
83  msg.readInt16("flag");
84 }
85 
86 } // namespace EAthena
#define maxCards
Definition: cards.h:25
#define UNIMPLEMENTEDPACKET
Definition: logger.h:56
bool msg(InputEvent &event)
Definition: chat.cpp:39
void processAuctionSetItem(Net::MessageIn &msg)
Definition: auctionrecv.cpp:67
void processAuctionResults(Net::MessageIn &msg)
Definition: auctionrecv.cpp:41
void processOpenWindow(Net::MessageIn &msg)
Definition: auctionrecv.cpp:35
void processAuctionClose(Net::MessageIn &msg)
Definition: auctionrecv.cpp:80
void processAuctionMessage(Net::MessageIn &msg)
Definition: auctionrecv.cpp:74