GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/eathena/rouletterecv.cpp Lines: 0 32 0.0 %
Date: 2017-11-29 Branches: 0 2 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/rouletterecv.h"
22
23
#include "logger.h"
24
25
#include "net/messagein.h"
26
27
#include "debug.h"
28
29
namespace EAthena
30
{
31
32
void RouletteRecv::processRouletteInfoAckType(Net::MessageIn &msg)
33
{
34
    UNIMPLEMENTEDPACKET;
35
    const int count = (msg.readInt16("len") - 8) / 8;
36
    msg.readInt32("serial");
37
38
    for (int f = 0; f < count; f ++)
39
    {
40
        msg.readInt16("row");
41
        msg.readInt16("position");
42
        msg.readInt16("item id");
43
        msg.readInt16("count");
44
    }
45
}
46
47
void RouletteRecv::processRouletteItemAck(Net::MessageIn &msg)
48
{
49
    UNIMPLEMENTEDPACKET;
50
    msg.readUInt8("result");
51
    msg.readInt16("item id");
52
}
53
54
void RouletteRecv::processRouletteGenerateAckType(Net::MessageIn &msg)
55
{
56
    UNIMPLEMENTEDPACKET;
57
    msg.readUInt8("result");
58
    msg.readInt16("step");
59
    msg.readInt16("idx");
60
    msg.readInt16("item id");
61
    msg.readInt32("remain gold");
62
    msg.readInt32("remain silver");
63
    msg.readInt32("remain bronze");
64
}
65
66
void RouletteRecv::processRouletteOpenAck(Net::MessageIn &msg)
67
{
68
    UNIMPLEMENTEDPACKET;
69
    msg.readUInt8("result");
70
    msg.readInt32("serial");
71
    msg.readUInt8("step");
72
    msg.readUInt8("idx");
73
    msg.readInt16("additional item id");
74
    msg.readInt32("gold point");
75
    msg.readInt32("silver point");
76
    msg.readInt32("bronze point");
77
}
78
79
}  // namespace EAthena