Orxonox  0.0.5 Codename: Arcturus
QuestHint.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) 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, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * Damian 'Mozork' Frick
24  * Co-authors:
25  * ...
26  *
27  */
28 
35 #ifndef _QuestHint_H__
36 #define _QuestHint_H__
37 
39 
40 #include <map>
41 #include "QuestItem.h"
42 
43 namespace orxonox // tolua_export
44 { // tolua_export
45 
52  enum class QuestHintStatus
53  {
54  Inactive,
55  Active
56  };
57 
76  class _QuestsystemExport QuestHint // tolua_export
77  : public QuestItem
78  { // tolua_export
79 
80  public:
81  QuestHint(Context* context);
82  virtual ~QuestHint();
83 
84  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
85 
86  bool isActive(const PlayerInfo* player) const;
87 
88  bool setActive(PlayerInfo* player);
89  bool setQuest(Quest* quest);
90 
95  inline Quest* getQuest(void)
96  { return this->quest_; }
97 
98  private:
100  std::map<const PlayerInfo*, QuestHintStatus> playerStatus_;
101 
102  }; // tolua_export
103 
104 } // tolua_export
105 
106 #endif /* _QuestHint_H__ */
QuestHintStatus
The state of the QuestHint.
Definition: QuestHint.h:52
Definition of the QuestItem class.
std::map< const PlayerInfo *, QuestHintStatus > playerStatus_
List of the states for each player, with the Player-pointer as key.
Definition: QuestHint.h:100
Represents a Quest in the game.
Definition: Quest.h:77
xmlelement
Definition: Super.h:519
The Quest is inactive.
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Mode
Definition: CorePrereqs.h:102
Quest * quest_
The Quest the QuestHint belongs to.
Definition: QuestHint.h:99
Shared library macros, enums, constants and forward declarations for the questsystem module ...
Definition: Context.h:45
The Quest is active.
Definition: PlayerInfo.h:39
Quest * getQuest(void)
Returns the Quest the QuestHint is attached to.
Definition: QuestHint.h:95
Represents a hint in the game that gives aid towards completing a Quest.
Definition: QuestHint.h:76
Functions as a base class for quest classes such as Quest or QuestHint.
Definition: QuestItem.h:58
#define _QuestsystemExport
Definition: QuestsystemPrereqs.h:60