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

Line Branch Exec Source
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-2017  The ManaPlus Developers
6
 *
7
 *  This file is part of The ManaPlus Client.
8
 *
9
 *  This program is free software; you can redistribute it and/or modify
10
 *  it under the terms of the GNU General Public License as published by
11
 *  the Free Software Foundation; either version 2 of the License, or
12
 *  any later version.
13
 *
14
 *  This program is distributed in the hope that it will be useful,
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 *  GNU General Public License for more details.
18
 *
19
 *  You should have received a copy of the GNU General Public License
20
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
 */
22
23
#include "net/tmwa/skillhandler.h"
24
25
#include "net/tmwa/messageout.h"
26
#include "net/tmwa/protocolout.h"
27
28
#include "debug.h"
29
30
namespace TmwAthena
31
{
32
33
SkillHandler::SkillHandler() :
34
    Ea::SkillHandler()
35
{
36
    skillHandler = this;
37
}
38
39
SkillHandler::~SkillHandler()
40
{
41
    skillHandler = nullptr;
42
}
43
44
void SkillHandler::useBeing(const int id, const int level,
45
                            const BeingId beingId) const
46
{
47
    createOutPacket(CMSG_SKILL_USE_BEING);
48
    outMsg.writeInt16(CAST_S16(id), "skill id");
49
    outMsg.writeInt16(CAST_S16(level), "level");
50
    outMsg.writeBeingId(beingId, "target id");
51
}
52
53
void SkillHandler::usePos(const int id, const int level,
54
                          const int x, const int y) const
55
{
56
    createOutPacket(CMSG_SKILL_USE_POSITION);
57
    outMsg.writeInt16(CAST_S16(level), "skill level");
58
    outMsg.writeInt16(CAST_S16(id), "skill id");
59
    outMsg.writeInt16(CAST_S16(x), "x");
60
    outMsg.writeInt16(CAST_S16(y), "y");
61
}
62
63
void SkillHandler::usePos(const int id, const int level,
64
                          const int x, const int y,
65
                          const std::string &text) const
66
{
67
    createOutPacket(CMSG_SKILL_USE_POSITION_MORE);
68
    outMsg.writeInt16(CAST_S16(level), "skill level");
69
    outMsg.writeInt16(CAST_S16(id), "skill id");
70
    outMsg.writeInt16(CAST_S16(x), "x");
71
    outMsg.writeInt16(CAST_S16(y), "y");
72
    outMsg.writeString(text, 80, "text");
73
}
74
75
void SkillHandler::useMap(const int id, const std::string &map) const
76
{
77
    createOutPacket(CMSG_SKILL_USE_MAP);
78
    outMsg.writeInt16(CAST_S16(id), "skill id");
79
    outMsg.writeString(map, 16, "map name");
80
}
81
82
void SkillHandler::getAlchemistRanks() const
83
{
84
}
85
86
void SkillHandler::getBlacksmithRanks() const
87
{
88
}
89
90
void SkillHandler::getPkRanks() const
91
{
92
}
93
94
void SkillHandler::getTaekwonRanks() const
95
{
96
}
97
98
void SkillHandler::feelSaveOk(const int which A_UNUSED) const
99
{
100
}
101
102
void SkillHandler::lessEffects(const bool isLess A_UNUSED) const
103
{
104
}
105
106
}  // namespace TmwAthena