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