GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/playerhandler.h Lines: 1 1 100.0 %
Date: 2017-11-29 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-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
#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
152
        { }
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 uint8_t type,
88
                                 const int id,
89
                                 const int level) const = 0;
90
91
        virtual void shortcutShiftRow(const int row) const = 0;
92
93
        virtual void removeOption() const = 0;
94
95
        virtual void changeCart(const int type) const = 0;
96
97
        virtual void setMemo() const = 0;
98
99
        virtual void doriDori() const = 0;
100
101
        virtual void explosionSpirits() const = 0;
102
103
        virtual void requestPvpInfo() const = 0;
104
105
        virtual void revive() const = 0;
106
107
        virtual void setViewEquipment(const bool allow) const = 0;
108
109
        virtual void setStat(Net::MessageIn &msg,
110
                             const int type,
111
                             const int64_t base,
112
                             const int mod,
113
                             const Notify notify) const = 0;
114
};
115
116
}  // namespace Net
117
118
extern Net::PlayerHandler *playerHandler;
119
120
#endif  // NET_PLAYERHANDLER_H