Planeshift
QuestAssignment Struct Reference

This structure tracks assigned quests. More...

#include <pscharquestmgr.h>

Public Member Functions

csWeakRef< psQuest > & GetQuest ()
 Since "quest" member can be nulled without notice, this accessor function attempts to refresh it if NULL. More...
 
bool IsCompleted ()
 Checks if the quest(/step) assignment is marked as complete. More...
 
void SetQuest (psQuest *q)
 

Public Attributes

PID assigner_id
 Character id of player who assigned quest to this player. This is used to make sure you cannot get two quests from the same guy at the same time. More...
 
unsigned int completionOrder
 In case this questassignment was completed it will contain the order of completion. More...
 
bool dirty
 Dirty flag determines minimal save on exit. More...
 
int last_response
 To avoid losing a chain of responses in a quest, last responses are stored per assigned quest. More...
 
PID last_response_from_npc_pid
 To avoid losing a chain of responses in a quest, last responses are stored per assigned quest. More...
 
unsigned long lockout_end
 When a quest is completed, often it cannot immediately be repeated. This indicate the time when it can be started again. More...
 
char status
 This status determines whether the quest was assigned, completed, or is marked for deletion. More...
 

Protected Attributes

csWeakRef< psQuestquest
 Weak pointer to the underlying quest relevant here. More...
 
int quest_id
 Quest ID saved in case quest gets nulled out from us. More...
 

Detailed Description

This structure tracks assigned quests.

Definition at line 48 of file pscharquestmgr.h.

Member Function Documentation

csWeakRef<psQuest>& QuestAssignment::GetQuest ( )

Since "quest" member can be nulled without notice, this accessor function attempts to refresh it if NULL.

bool QuestAssignment::IsCompleted ( )

Checks if the quest(/step) assignment is marked as complete.

Returns
True if the quest assignment is marked as complete.
void QuestAssignment::SetQuest ( psQuest q)

Member Data Documentation

PID QuestAssignment::assigner_id

Character id of player who assigned quest to this player. This is used to make sure you cannot get two quests from the same guy at the same time.

Definition at line 51 of file pscharquestmgr.h.

unsigned int QuestAssignment::completionOrder

In case this questassignment was completed it will contain the order of completion.

Definition at line 64 of file pscharquestmgr.h.

bool QuestAssignment::dirty

Dirty flag determines minimal save on exit.

Definition at line 55 of file pscharquestmgr.h.

int QuestAssignment::last_response

To avoid losing a chain of responses in a quest, last responses are stored per assigned quest.

Definition at line 59 of file pscharquestmgr.h.

PID QuestAssignment::last_response_from_npc_pid

To avoid losing a chain of responses in a quest, last responses are stored per assigned quest.

Definition at line 61 of file pscharquestmgr.h.

unsigned long QuestAssignment::lockout_end

When a quest is completed, often it cannot immediately be repeated. This indicate the time when it can be started again.

Definition at line 57 of file pscharquestmgr.h.

csWeakRef<psQuest> QuestAssignment::quest
protected

Weak pointer to the underlying quest relevant here.

Definition at line 83 of file pscharquestmgr.h.

int QuestAssignment::quest_id
protected

Quest ID saved in case quest gets nulled out from us.

Definition at line 80 of file pscharquestmgr.h.

char QuestAssignment::status

This status determines whether the quest was assigned, completed, or is marked for deletion.

Definition at line 53 of file pscharquestmgr.h.


The documentation for this struct was generated from the following file: