GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/eathena/refinerecv.cpp Lines: 0 20 0.0 %
Date: 2019-10-12 Branches: 0 4 0.0 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2011-2019  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/refinerecv.h"
22
23
#include "logger.h"
24
25
#include "net/messagein.h"
26
27
#include "debug.h"
28
29
extern int itemIdLen;
30
31
namespace EAthena
32
{
33
34
void RefineRecv::processRefineOpen(Net::MessageIn &msg)
35
{
36
    UNIMPLEMENTEDPACKET;
37
}
38
39
void RefineRecv::processRefineAddItem(Net::MessageIn &msg)
40
{
41
    UNIMPLEMENTEDPACKET;
42
    int blockSize = 7;
43
    if (itemIdLen == 4)
44
        blockSize += 2;
45
46
    const int count = (msg.readInt16("len") - 7) / blockSize;
47
    msg.readInt16("item index");
48
    msg.readUInt8("blacksmith blessing");
49
    for (int f = 0; f < count; f ++)
50
    {
51
        msg.readItemId("item id");
52
        msg.readUInt8("chance");
53
        msg.readInt32("money");
54
    }
55
}
56
57
void RefineRecv::processRefineAnnounce(Net::MessageIn &msg)
58
{
59
    UNIMPLEMENTEDPACKET;
60
    msg.readString(24, "char name");
61
    msg.readItemId("item id");
62
    msg.readInt8("refine level");
63
    msg.readInt8("status");
64
}
65
66
}  // namespace EAthena