1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/apps/openmw/mwdialogue/quest.hpp

47 lines
1019 B
C++
Raw Normal View History

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