GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/playerhandler.h Lines: 1 1 100.0 %
Date: 2019-10-15 Branches: 0 0 0.0 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2009  The Mana World Development Team
4
 *  Copyright (C) 2009-2010  The Mana Developers
5
 *  Copyright (C) 2011-2019  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
#ifndef NET_PLAYERHANDLER_H
24
#define NET_PLAYERHANDLER_H
25
26
#include "being/flooritem.h"
27
28
#include "enums/being/attributes.h"
29
#include "enums/being/beingaction.h"
30
31
#include "enums/simpletypes/keep.h"
32
#include "enums/simpletypes/notify.h"
33
34
#include "net/messagein.h"
35
36
namespace Net
37
{
38
39
class PlayerHandler notfinal
40
{
41
    public:
42
        PlayerHandler()
43
77
        { }
44
45
        A_DELETE_COPY(PlayerHandler)
46
47
        virtual ~PlayerHandler()
48
        { }
49
50
        virtual void attack(const BeingId id,
51
                            const Keep keep) const = 0;
52
53
        virtual void stopAttack() const = 0;
54
55
        virtual void emote(const uint8_t emoteId) const = 0;
56
57
        virtual void increaseAttribute(const AttributesT attr,
58
                                       const int amount) const = 0;
59
60
        virtual void increaseSkill(const uint16_t skillId) const = 0;
61
62
        virtual void pickUp(const FloorItem *const floorItem) const = 0;
63
64
        virtual void setDirection(const unsigned char direction) const = 0;
65
66
        virtual void setDestination(const int x, const int y,
67
                                    const int direction) const = 0;
68
69
        virtual void changeAction(const BeingActionT &action) const = 0;
70
71
        virtual void respawn() const = 0;
72
73
        virtual void ignorePlayer(const std::string &player,
74
                                  const bool ignore) const = 0;
75
76
        virtual void ignoreAll(const bool ignore) const = 0;
77
78
        virtual bool canUseMagic() const = 0;
79
80
        virtual int getDefaultWalkSpeed() const A_WARN_UNUSED = 0;
81
82
        virtual void requestOnlineList() const = 0;
83
84
        virtual void updateStatus(const uint8_t status) const = 0;
85
86
        virtual void setShortcut(const int idx,
87
                                 const int tab,
88
                                 const uint8_t type,
89
                                 const int id,
90
                                 const int level) const = 0;
91
92
        virtual void shortcutShiftRow(const int row,
93
                                      const int tab) const = 0;
94
95
        virtual void removeOption() const = 0;
96
97
        virtual void changeCart(const int type) const = 0;
98
99
        virtual void setMemo() const = 0;
100
101
        virtual void doriDori() const = 0;
102
103
        virtual void explosionSpirits() const = 0;
104
105
        virtual void requestPvpInfo() const = 0;
106
107
        virtual void revive() const = 0;
108
109
        virtual void setConfigOption(const int id A_UNUSED,
110
                                     const int data A_UNUSED) const = 0;
111
112
        virtual void setStat(Net::MessageIn &msg,
113
                             const int type,
114
                             const int64_t base,
115
                             const int mod,
116
                             const Notify notify) const = 0;
117
118
        virtual void selectStyle(const int headColor,
119
                                 const int headStyle,
120
                                 const int bodyColor,
121
                                 const int topStyle,
122
                                 const int middleStyle,
123
                                 const int bottomStyle,
124
                                 const int bodyStyle) const = 0;
125
126
        virtual void setTitle(const int titleId) const = 0;
127
128
        virtual void closeStyleWindow() const = 0;
129
};
130
131
}  // namespace Net
132
133
extern Net::PlayerHandler *playerHandler;
134
135
#endif  // NET_PLAYERHANDLER_H