ManaPlus
npchandler.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2004-2009 The Mana World Development Team
4  * Copyright (C) 2009-2010 The Mana Developers
5  * Copyright (C) 2011-2019 The ManaPlus Developers
6  * Copyright (C) 2019-2021 Andrei Karas
7  *
8  * This file is part of The ManaPlus Client.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef NET_TMWA_NPCHANDLER_H
25 #define NET_TMWA_NPCHANDLER_H
26 
27 #include "net/ea/npchandler.h"
28 
29 namespace TmwAthena
30 {
31 
33 {
34  public:
35  NpcHandler();
36 
38 
39  ~NpcHandler() override final;
40 
41  void talk(const Being *const being) const override final;
42 
43  void nextDialog(const BeingId npcId) const override final;
44 
45  void closeDialog(const BeingId npcId) override final;
46 
47  void listInput(const BeingId npcId,
48  const unsigned char value) const override final;
49 
50  void integerInput(const BeingId npcId,
51  const int value) const override final;
52 
53  void stringInput(const BeingId npcId,
54  const std::string &value) const override final;
55 
56  void buy(const Being *const being) const override final;
57 
58  void buy(const BeingId beingId) const override final;
59 
60  void sell(const BeingId beingId) const override final;
61 
62  void buyItem(const BeingId beingId,
63  const int itemId,
64  const ItemColor color,
65  const int amount) const override final;
66 
67  void buyItems(STD_VECTOR<ShopItem*> &items) const override final;
68 
69  void sellItem(const BeingId beingId,
70  const int itemId,
71  const int amount) const override final;
72 
73  void sellItems(STD_VECTOR<ShopItem*> &items) const override final;
74 
75  void completeProgressBar() const override final;
76 
78  const NpcActionT action) override final;
79 
80  void produceMix(const int nameId,
81  const int materialId1,
82  const int materialId2,
83  const int materialId3) const override final;
84 
85  void cooking(const CookingTypeT type,
86  const int nameId) const override final;
87 
88  void repair(const int index) const override final;
89 
90  void refine(const int index) const override final;
91 
92  void identify(const int index) const override final;
93 
94  void selectArrow(const int nameId) const override final;
95 
96  void selectAutoSpell(const int skillId) const override final;
97 
98  void requestAirship(const std::string &mapName,
99  const int itemId) const override final;
100 };
101 
102 } // namespace TmwAthena
103 
104 #endif // NET_TMWA_NPCHANDLER_H
int BeingId
Definition: beingid.h:30
Definition: being.h:96
void buyItem(const BeingId beingId, const int itemId, const ItemColor color, const int amount) const
Definition: npchandler.cpp:138
void repair(const int index) const
Definition: npchandler.cpp:184
void cooking(const CookingTypeT type, const int nameId) const
Definition: npchandler.cpp:179
void sellItem(const BeingId beingId, const int itemId, const int amount) const
Definition: npchandler.cpp:153
void refine(const int index) const
Definition: npchandler.cpp:188
void listInput(const BeingId npcId, const unsigned char value) const
Definition: npchandler.cpp:89
void nextDialog(const BeingId npcId) const
Definition: npchandler.cpp:66
void identify(const int index) const
Definition: npchandler.cpp:192
void talk(const Being *const being) const
Definition: npchandler.cpp:57
void completeProgressBar() const
Definition: npchandler.cpp:168
void produceMix(const int nameId, const int materialId1, const int materialId2, const int materialId3) const
Definition: npchandler.cpp:172
void integerInput(const BeingId npcId, const int value) const
Definition: npchandler.cpp:97
void requestAirship(const std::string &mapName, const int itemId) const
Definition: npchandler.cpp:246
void sellItems(std::vector< ShopItem * > &items) const
Definition: npchandler.cpp:164
void closeDialog(const BeingId npcId)
Definition: npchandler.cpp:72
BeingId getNpc(Net::MessageIn &msg, const NpcActionT action)
Definition: npchandler.cpp:204
void sell(const BeingId beingId) const
Definition: npchandler.cpp:131
void selectArrow(const int nameId) const
Definition: npchandler.cpp:196
void selectAutoSpell(const int skillId) const
Definition: npchandler.cpp:200
void buyItems(std::vector< ShopItem * > &items) const
Definition: npchandler.cpp:149
void stringInput(const BeingId npcId, const std::string &value) const
Definition: npchandler.cpp:105
void buy(const Being *const being) const
Definition: npchandler.cpp:115
CookingType ::T CookingTypeT
Definition: cookingtype.h:36
uint16_t ItemColor
Definition: itemcolor.h:30
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53
bool msg(InputEvent &event)
Definition: chat.cpp:39
NpcAction ::T NpcActionT
Definition: npcaction.h:33