Mana
Loading...
Searching...
No Matches
playerhandler.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2009 The Mana World Development Team
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana Client.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include "being.h"
25#include "flooritem.h"
26
27#include "resources/questdb.h"
28
29namespace Net {
30
32{
33 public:
34 virtual ~PlayerHandler() = default;
35
36 virtual void attack(int id) = 0;
37
38 virtual void emote(int emoteId) = 0;
39
40 virtual void increaseAttribute(int attr) = 0;
41
42 virtual void decreaseAttribute(int attr) = 0;
43
44 virtual void increaseSkill(int skillId) = 0;
45
46 virtual void pickUp(FloorItem *floorItem) = 0;
47
48 virtual void setDirection(char direction) = 0;
49
50 virtual void setDestination(int x, int y, int direction = -1) = 0;
51
52 virtual void changeAction(Being::Action action) = 0;
53
54 virtual void respawn() = 0;
55
56 virtual void ignorePlayer(const std::string &player, bool ignore) = 0;
57
58 virtual void ignoreAll(bool ignore) = 0;
59
60 virtual bool canUseMagic() = 0;
61
62 virtual bool canCorrectAttributes() = 0;
63
64 virtual int getJobLocation() = 0;
65
72 virtual Vector getDefaultMoveSpeed() const = 0;
73
78 Map *map = nullptr) = 0;
79
84 virtual bool usePixelPrecision() = 0;
85
86 const QuestVars &getQuestVars() const { return mQuestVars; }
87
88 protected:
90};
91
92} // namespace Net
Action
Action the being is currently performing WARNING: Has to be in sync with the same enum in the Being c...
Definition being.h:73
An item lying on the floor.
Definition flooritem.h:32
A tile map.
Definition map.h:147
virtual void increaseSkill(int skillId)=0
virtual void setDestination(int x, int y, int direction=-1)=0
virtual Vector getPixelsPerSecondMoveSpeed(const Vector &speed, Map *map=nullptr)=0
Convert the original server-dependant speed for internal use.
virtual void attack(int id)=0
virtual void decreaseAttribute(int attr)=0
virtual void emote(int emoteId)=0
virtual Vector getDefaultMoveSpeed() const =0
Get the original default movement speed.
virtual void ignorePlayer(const std::string &player, bool ignore)=0
virtual void respawn()=0
const QuestVars & getQuestVars() const
virtual void setDirection(char direction)=0
virtual void changeAction(Being::Action action)=0
virtual bool usePixelPrecision()=0
Tells whether the client has to use pixel paths.
virtual void ignoreAll(bool ignore)=0
virtual bool canCorrectAttributes()=0
virtual void increaseAttribute(int attr)=0
virtual int getJobLocation()=0
virtual ~PlayerHandler()=default
virtual bool canUseMagic()=0
virtual void pickUp(FloorItem *floorItem)=0
Vector class.
Definition vector.h:33
The network communication layer.