ManaPlus
playerhandler.h
Go to the documentation of this file.
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-2018 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"
30 
31 #include "enums/simpletypes/keep.h"
33 
34 #include "net/messagein.h"
35 
36 namespace Net
37 {
38 
40 {
41  public:
43  { }
44 
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 setConfigOption(const int id A_UNUSED,
108  const int data A_UNUSED) const = 0;
109 
110  virtual void setStat(Net::MessageIn &msg,
111  const int type,
112  const int64_t base,
113  const int mod,
114  const Notify notify) const = 0;
115  virtual void selectStyle(const int headColor,
116  const int headStyle,
117  const int bodyColor,
118  const int topStyle,
119  const int middleStyle,
120  const int bottomStyle,
121  const int bodyStyle) const = 0;
122 
123  virtual void setTitle(const int titleId) const = 0;
124 };
125 
126 } // namespace Net
127 
129 
130 #endif // NET_PLAYERHANDLER_H
#define A_DELETE_COPY(func)
Definition: localconsts.h:52
virtual void emote(const uint8_t emoteId) const =0
virtual void updateStatus(const uint8_t status) const =0
BeingAction ::T BeingActionT
Definition: beingaction.h:40
virtual void setShortcut(const int idx, const uint8_t type, const int id, const int level) const =0
virtual void increaseSkill(const uint16_t skillId) const =0
virtual void setMemo() const =0
virtual void attack(const BeingId id, const Keep keep) const =0
virtual void requestOnlineList() const =0
virtual void increaseAttribute(const AttributesT attr, const int amount) const =0
virtual bool canUseMagic() const =0
#define A_WARN_UNUSED
Definition: localconsts.h:160
virtual void explosionSpirits() const =0
int BeingId
Definition: beingid.h:29
bool msg(InputEvent &event)
Definition: chat.cpp:38
virtual void respawn() const =0
void notify(const unsigned int message)
virtual void pickUp(const FloorItem *const floorItem) const =0
virtual void removeOption() const =0
virtual void setDirection(const unsigned char direction) const =0
uint32_t data
#define notfinal
Definition: localconsts.h:260
virtual void changeAction(const BeingActionT &action) const =0
virtual void setDestination(const int x, const int y, const int direction) const =0
virtual void setTitle(const int titleId) const =0
virtual void shortcutShiftRow(const int row) const =0
virtual void ignorePlayer(const std::string &player, const bool ignore) const =0
virtual void selectStyle(const int headColor, const int headStyle, const int bodyColor, const int topStyle, const int middleStyle, const int bottomStyle, const int bodyStyle) const =0
virtual void stopAttack() const =0
#define A_UNUSED
Definition: localconsts.h:159
Net::PlayerHandler * playerHandler
Definition: net.cpp:93
Attributes ::T AttributesT
Definition: attributes.h:117
virtual void revive() const =0
virtual void doriDori() const =0
virtual void ignoreAll(const bool ignore) const =0
virtual void setStat(Net::MessageIn &msg, const int type, const int64_t base, const int mod, const Notify notify) const =0
virtual void requestPvpInfo() const =0
virtual void changeCart(const int type) const =0
virtual void setConfigOption(const int id, const int data) const =0
virtual int getDefaultWalkSpeed() const =0