Mana
Loading...
Searching...
No Matches
gamehandler.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/gamehandler.h"
25
27
29
30namespace ManaServ {
31
32class GameHandler final : public MessageHandler, public Net::GameHandler
33{
34 public:
36
37 void handleMessage(MessageIn &msg) override;
38
39 void connect() override;
40
41 bool isConnected() override;
42
43 void disconnect() override;
44
45 void quit(bool reconnectAccount);
46
47 void quit() override { quit(false); }
48
49 bool removeDeadBeings() const override { return false; }
50
51 void clear();
52
53 void gameLoading();
54
56 bool canUseMagicBar() const override { return false; }
57
58 int getPickupRange() const override { return PICKUP_RANGE; }
59
60 int getNpcTalkRange() const override { return NPC_TALK_RANGE; }
61};
62
63} // namespace ManaServ
int getPickupRange() const override
Tells the range is pixel where the player can pickup items from.
Definition gamehandler.h:58
void quit() override
Definition gamehandler.h:47
bool canUseMagicBar() const override
The ManaServ protocol doesn't use the MP status bar.
Definition gamehandler.h:56
bool removeDeadBeings() const override
Definition gamehandler.h:49
void handleMessage(MessageIn &msg) override
int getNpcTalkRange() const override
Tells the range is pixel where the player can talk to an NPC from.
Definition gamehandler.h:60
void connect() override
bool isConnected() override
void disconnect() override
Used for parsing an incoming message from manaserv.
Definition messagein.h:37
const int PICKUP_RANGE
The permited range to pick up an item.
const int NPC_TALK_RANGE
The permited range to to talk to a NPC.