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