25 #include <csutil/csstring.h> 26 #include <csutil/weakreferenced.h> 40 #define QUEST_OPT_SAVEONCOMPLETE 0x01 43 #define PSQUEST_DISABLED_QUEST 0x00000001 67 class psQuest :
public CS::Utility::WeakReferenced
76 psQuest(
int id = 0,
const char* name =
"");
83 bool Load(iResultRow &row);
122 return task.Length() > 0;
142 return infinitePlayerLockout;
146 return player_lockout_time;
150 return quest_lockout_time;
154 return quest_last_activated;
158 quest_last_activated=when;
161 bool AddPrerequisite(csString prerequisitescript);
162 bool AddPrerequisite(csRef<psQuestPrereqOp> op);
212 csString GetPrerequisiteStr();
228 return active ? (parent_quest ? parent_quest->Active() : active) : active;
const char * GetName() const
Pure virtual base quest prerequisite operator class.
bool Active()
Check if the quest is active (and also it's parents).
unsigned int player_lockout_time
void SetQuestLastActivatedTime(unsigned int when)
bool HasInfinitePlayerLockout() const
csArray< int > & GetSubQuests()
Returns an ordered list of the subquests of this quest (so it's steps).
unsigned int quest_lockout_time
This class holds all information for one quest with its reference to parent quest, list of steps, lockoutime, sub quests, ...
int step_id
natoka: never used, though i suppose it was ment for the substep number
const char * GetImage() const
csArray< int > subquests
list of IDs of the subquests of this quest
psQuest * GetParentQuest() const
bool LoadPrerequisiteXML(csRef< psQuestPrereqOp > &prerequisite, psQuest *self, csString script)
Utility function to parse prerequisite scripts.
int GetID() const
The id can be defined by the database or dynamically created.
csArray< TriggerResponse > triggerPairs
list of trigger-response pairs added for the quest
const csString & GetCategory() const
bool infinitePlayerLockout
csString name
unique quest name
bool hasTaskText()
Gets if the task (quest description/note) contains some text.
int id
quest id - either as stored in the database or as assigned by CacheManager::AddDynamicQuest ...
csRef< psQuestPrereqOp > & GetPrerequisite()
Return the prerequisite for this quest.
csRef< psQuestPrereqOp > prerequisite
This class holds several possible responses and an action script for the npc to run whenever an appro...
unsigned int quest_last_activated
void Active(bool state)
Sets activation status of the quest.
void AddSubQuest(int id)
Adds a pointer to a menu.
void SetTask(csString mytask)
unsigned int GetPlayerLockoutTime() const
unsigned int GetQuestLastActivatedTime() const
unsigned int GetQuestLockoutTime() const
const char * GetTask() const
void SetParentQuest(psQuest *parent)
psQuest * parent_quest
parent quest of this quest (or NULL if there is none)