Mana
Loading...
Searching...
No Matches
playerhandler.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2004-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 "net/playerhandler.h"
25
27
28#include <guichan/actionlistener.hpp>
29
30namespace ManaServ {
31
32struct RespawnRequestListener final : public gcn::ActionListener
33{
34 void action(const gcn::ActionEvent &event) override;
35};
36static RespawnRequestListener respawnListener;
37
39{
40 public:
42
43 void handleMessage(MessageIn &msg) override;
44
45 void attack(int id) override;
46 void emote(int emoteId) override;
47
48 void increaseAttribute(int attr) override;
49 void decreaseAttribute(int attr) override;
50 void increaseSkill(int skillId) override;
51
52 void pickUp(FloorItem *floorItem) override;
53 void setDirection(char direction) override;
54 void setDestination(int x, int y, int direction = -1) override;
55 void changeAction(Being::Action action) override;
56
57 void respawn() override;
58
59 void ignorePlayer(const std::string &player, bool ignore) override;
60 void ignoreAll(bool ignore) override;
61
62 bool canUseMagic() override;
63 bool canCorrectAttributes() override;
64
65 int getJobLocation() override;
66
67 Vector getDefaultMoveSpeed() const override;
68
69 Vector getPixelsPerSecondMoveSpeed(const Vector &speed, Map *map = nullptr) override;
70
71 bool usePixelPrecision() override
72 { return true; }
73
74 private:
76};
77
78} // namespace ManaServ
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
Used for parsing an incoming message from manaserv.
Definition messagein.h:37
void decreaseAttribute(int attr) override
void emote(int emoteId) override
void attack(int id) override
void setDestination(int x, int y, int direction=-1) override
Vector getPixelsPerSecondMoveSpeed(const Vector &speed, Map *map=nullptr) override
Convert the original server-dependant speed for internal use.
void handleMessage(MessageIn &msg) override
void handleMapChangeMessage(MessageIn &msg)
bool usePixelPrecision() override
Tells whether the client has to use pixel paths.
void increaseAttribute(int attr) override
void ignoreAll(bool ignore) override
bool canCorrectAttributes() override
bool canUseMagic() override
void ignorePlayer(const std::string &player, bool ignore) override
void setDirection(char direction) override
void changeAction(Being::Action action) override
void pickUp(FloorItem *floorItem) override
Vector getDefaultMoveSpeed() const override
Get the original default movement speed.
int getJobLocation() override
void increaseSkill(int skillId) override
A tile map.
Definition map.h:147
Vector class.
Definition vector.h:33
void action(const gcn::ActionEvent &event) override