1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

47 lines
1019 B
C++
Raw Normal View History

2012-08-11 12:02:51 +02:00
#ifndef GAME_MWDIALOG_QUEST_H
2011-04-26 20:08:37 +02:00
#define GAME_MWDIALOG_QUEST_H
#include "topic.hpp"
2011-04-26 20:08:37 +02:00
2013-12-03 14:28:46 +01:00
namespace ESM
{
struct QuestState;
}
2011-04-26 20:08:37 +02:00
namespace MWDialogue
{
2013-11-30 12:02:56 +01:00
/// \brief A quest in progress or a completed quest
class Quest : public Topic
2011-04-26 20:08:37 +02:00
{
int mIndex;
bool mFinished;
public:
Quest();
Quest (const std::string& topic);
2013-12-03 14:28:46 +01:00
Quest (const ESM::QuestState& state);
virtual std::string getName() const;
2011-04-26 20:08:37 +02:00
///< May be an empty string
int getIndex() const;
void setIndex (int index);
2013-11-30 12:02:56 +01:00
///< Calling this function with a non-existent index will throw an exception.
2011-04-26 20:08:37 +02:00
bool isFinished() const;
virtual void addEntry (const JournalEntry& entry);
2011-04-26 20:08:37 +02:00
///< Add entry and adjust index accordingly.
///
/// \note Redundant entries are ignored, but the index is still adjusted.
2013-12-03 14:28:46 +01:00
void write (ESM::QuestState& state) const;
2011-04-26 20:08:37 +02:00
};
}
#endif