Mana
Loading...
Searching...
No Matches
npchandler.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/npchandler.h"
25
27
28namespace ManaServ {
29
30class NpcHandler final : public MessageHandler, public Net::NpcHandler
31{
32 public:
33 NpcHandler();
34
35 void handleMessage(MessageIn &msg) override;
36
37 void startShopping(int beingId) override;
38
39 void buy(int beingId) override;
40
41 void sell(int beingId) override;
42
43 void buyItem(int beingId, int itemId, int amount) override;
44
45 void sellItem(int beingId, int itemId, int amount) override;
46
47 void endShopping(int beingId) override;
48
49 void talk(int npcId) override;
50
51 void nextDialog(int npcId) override;
52
53 void closeDialog(int npcId) override;
54
55 void menuSelect(int npcId, int choice) override;
56
57 void integerInput(int npcId, int value) override;
58
59 void stringInput(int npcId, const std::string &value) override;
60
61 void sendLetter(int npcId, const std::string &recipient,
62 const std::string &text) override;
63
64};
65
66} // namespace ManaServ
Used for parsing an incoming message from manaserv.
Definition messagein.h:37
void sell(int beingId) override
void sendLetter(int npcId, const std::string &recipient, const std::string &text) override
void endShopping(int beingId) override
void handleMessage(MessageIn &msg) override
void buy(int beingId) override
void closeDialog(int npcId) override
void startShopping(int beingId) override
void integerInput(int npcId, int value) override
void stringInput(int npcId, const std::string &value) override
void buyItem(int beingId, int itemId, int amount) override
void menuSelect(int npcId, int choice) override
void sellItem(int beingId, int itemId, int amount) override
void nextDialog(int npcId) override
void talk(int npcId) override