GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/npchandler.h Lines: 0 1 0.0 %
Date: 2017-11-29 Branches: 0 0 0.0 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2009  The Mana World Development Team
4
 *  Copyright (C) 2009-2010  The Mana Developers
5
 *  Copyright (C) 2011-2017  The ManaPlus Developers
6
 *
7
 *  This file is part of The ManaPlus Client.
8
 *
9
 *  This program is free software; you can redistribute it and/or modify
10
 *  it under the terms of the GNU General Public License as published by
11
 *  the Free Software Foundation; either version 2 of the License, or
12
 *  any later version.
13
 *
14
 *  This program is distributed in the hope that it will be useful,
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 *  GNU General Public License for more details.
18
 *
19
 *  You should have received a copy of the GNU General Public License
20
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
 */
22
23
#ifndef NET_NPCHANDLER_H
24
#define NET_NPCHANDLER_H
25
26
#include <iosfwd>
27
28
#include "enums/being/cookingtype.h"
29
30
#include "enums/net/npcaction.h"
31
32
#include "enums/simpletypes/beingid.h"
33
#include "enums/simpletypes/itemcolor.h"
34
35
#include "utils/vector.h"
36
37
#include "localconsts.h"
38
39
class Being;
40
class NpcDialog;
41
class ShopItem;
42
43
namespace Net
44
{
45
46
class MessageIn;
47
48
class NpcHandler notfinal
49
{
50
    public:
51
        NpcHandler()
52
        { }
53
54
        A_DELETE_COPY(NpcHandler)
55
56
        virtual ~NpcHandler()
57
        { }
58
59
        virtual BeingId getNpc(Net::MessageIn &msg,
60
                               const NpcActionT action) = 0;
61
62
        virtual void talk(const Being *const being) const = 0;
63
64
        virtual void nextDialog(const BeingId npcId) const = 0;
65
66
        virtual void closeDialog(const BeingId npcId) = 0;
67
68
        virtual void listInput(const BeingId npcId,
69
                               const unsigned char value) const = 0;
70
71
        virtual void integerInput(const BeingId npcId,
72
                                  const int value) const = 0;
73
74
        virtual void stringInput(const BeingId npcId,
75
                                 const std::string &value) const = 0;
76
77
        virtual void buy(const Being *const being) const = 0;
78
79
        virtual void buy(const BeingId beingId) const = 0;
80
81
        virtual void sell(const BeingId beingId) const = 0;
82
83
        virtual void buyItem(const BeingId beingId,
84
                             const int itemId,
85
                             const ItemColor color,
86
                             const int amount) const = 0;
87
88
        virtual void buyItems(STD_VECTOR<ShopItem*> &items) const = 0;
89
90
        virtual void sellItem(const BeingId beingId,
91
                              const int itemId,
92
                              const int amount) const = 0;
93
94
        virtual void sellItems(STD_VECTOR<ShopItem*> &items) const = 0;
95
96
        virtual void completeProgressBar() const = 0;
97
98
        virtual void produceMix(const int nameId,
99
                                const int materialId1,
100
                                const int materialId2,
101
                                const int materialId3) const  = 0;
102
103
        virtual void cooking(const CookingTypeT type,
104
                             const int nameId) const = 0;
105
106
        virtual void repair(const int index) const = 0;
107
108
        virtual void refine(const int index) const = 0;
109
110
        virtual void identify(const int index) const = 0;
111
112
        virtual void selectArrow(const int nameId) const = 0;
113
114
        virtual void selectAutoSpell(const int skillId) const = 0;
115
116
        virtual NpcDialog *getCurrentNpcDialog() const = 0;
117
};
118
119
}  // namespace Net
120
121
extern Net::NpcHandler *npcHandler;
122
123
#endif  // NET_NPCHANDLER_H