GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/eathena/auctionrecv.cpp Lines: 0 33 0.0 %
Date: 2017-11-29 Branches: 0 4 0.0 %

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