Planeshift
|
This class holds several possible responses and an action script for the npc to run whenever an appropriate trigger is triggered. More...
#include <dictionary.h>
Public Types | |
enum | { VALID_RESPONSE, ERROR_RESPONSE } |
Public Member Functions | |
bool | AddPrerequisite (psQuestPrereqOp *op, bool insertBeginning=false) |
Add a prerequisite to the prerequisite for this response. | |
bool | CheckPrerequisite (psCharacter *character) |
Check if the prerequisite for this response is valid. | |
csTicks | ExecuteScript (gemActor *player, gemNPC *target) |
Returns SIZET_NOT_FOUND (-1) if it fails, or csTicks of response duration if successful. | |
int | GetActiveQuest () |
psQuestPrereqOp * | GetPrerequisiteScript () |
const char * | GetResponse (int &number) |
const char * | GetResponse () |
Used for when a response number is unneeded (debug printf around in psnpcdialog) | |
csString | GetResponseScript () |
const char * | GetVoiceFile (int &number) |
Returns the VFS path to the audio file which represents this response on the server, or NULL if one was not specified. | |
bool | HasPublicResponse () |
Check for SayResponseOp with public flag set, which tells chat whether it is public or private. | |
bool | Load (iResultRow &row) |
NpcResponse () | |
bool | ParsePrerequisiteScript (const char *xmlstr, bool insertBeginning=false) |
Pars and append the xml based prerequisite script to the prerequisite for this Response. | |
bool | ParseResponseScript (const char *xmlstr, bool insertBeginning=false) |
void | SetActiveQuest (int max) |
virtual | ~NpcResponse () |
Public Attributes | |
int | active_quest |
which one should be run. this is actually set by check quest avail op | |
int | id |
xref from trigger response | |
NpcDialogMenu * | menu |
List of possible player trigger replies for this response, for display to the player. | |
csRef< psQuestPrereqOp > | prerequisite |
prerequisite for this Response to be available | |
psQuest * | quest |
Quest that this respons is part of. | |
csString | response [MAX_RESP] |
possible alternative answers for this response | |
csPDelArray< ResponseOperation > | script |
list of ops in script to execute when triggered | |
csTicks | timeDelay |
This tracks the current time delay for chat msgs in the responses, so a single script can have a sequence of things that take a while. | |
csString | triggerText |
This is the text that triggered the response. | |
int | type |
record the type of response | |
csString | voiceAudioPath [MAX_RESP] |
Optional vfs path to audio file to stream on demand to the client. | |
record antecedents for next question pronouns | |
csString | him |
csString | her |
csString | it |
csString | them |
This class holds several possible responses and an action script for the npc to run whenever an appropriate trigger is triggered.
Definition at line 394 of file dictionary.h.
anonymous enum |
Definition at line 412 of file dictionary.h.
NpcResponse::NpcResponse | ( | ) |
virtual NpcResponse::~NpcResponse | ( | ) | [virtual] |
bool NpcResponse::AddPrerequisite | ( | psQuestPrereqOp * | op, |
bool | insertBeginning = false |
||
) |
Add a prerequisite to the prerequisite for this response.
op | The prerequisite op to add |
insertBeginning | Insert at beginning or at end (Default at end). |
bool NpcResponse::CheckPrerequisite | ( | psCharacter * | character | ) |
Check if the prerequisite for this response is valid.
character | The Character trying to get the response |
Returns SIZET_NOT_FOUND (-1) if it fails, or csTicks of response duration if successful.
int NpcResponse::GetActiveQuest | ( | ) | [inline] |
Definition at line 424 of file dictionary.h.
psQuestPrereqOp* NpcResponse::GetPrerequisiteScript | ( | ) | [inline] |
Definition at line 454 of file dictionary.h.
const char* NpcResponse::GetResponse | ( | int & | number | ) |
const char* NpcResponse::GetResponse | ( | ) | [inline] |
Used for when a response number is unneeded (debug printf around in psnpcdialog)
Definition at line 431 of file dictionary.h.
csString NpcResponse::GetResponseScript | ( | ) |
const char* NpcResponse::GetVoiceFile | ( | int & | number | ) | [inline] |
Returns the VFS path to the audio file which represents this response on the server, or NULL if one was not specified.
Definition at line 438 of file dictionary.h.
bool NpcResponse::HasPublicResponse | ( | ) |
Check for SayResponseOp with public flag set, which tells chat whether it is public or private.
bool NpcResponse::Load | ( | iResultRow & | row | ) |
bool NpcResponse::ParsePrerequisiteScript | ( | const char * | xmlstr, |
bool | insertBeginning = false |
||
) |
Pars and append the xml based prerequisite script to the prerequisite for this Response.
bool NpcResponse::ParseResponseScript | ( | const char * | xmlstr, |
bool | insertBeginning = false |
||
) |
void NpcResponse::SetActiveQuest | ( | int | max | ) |
which one should be run. this is actually set by check quest avail op
Definition at line 406 of file dictionary.h.
csString NpcResponse::her |
Definition at line 401 of file dictionary.h.
csString NpcResponse::him |
Definition at line 401 of file dictionary.h.
xref from trigger response
Definition at line 397 of file dictionary.h.
csString NpcResponse::it |
Definition at line 401 of file dictionary.h.
List of possible player trigger replies for this response, for display to the player.
Definition at line 410 of file dictionary.h.
prerequisite for this Response to be available
Definition at line 409 of file dictionary.h.
Quest that this respons is part of.
Definition at line 405 of file dictionary.h.
csString NpcResponse::response[MAX_RESP] |
possible alternative answers for this response
Definition at line 398 of file dictionary.h.
csPDelArray<ResponseOperation> NpcResponse::script |
list of ops in script to execute when triggered
Definition at line 408 of file dictionary.h.
csString NpcResponse::them |
Definition at line 401 of file dictionary.h.
csTicks NpcResponse::timeDelay |
This tracks the current time delay for chat msgs in the responses, so a single script can have a sequence of things that take a while.
Definition at line 407 of file dictionary.h.
csString NpcResponse::triggerText |
This is the text that triggered the response.
Definition at line 402 of file dictionary.h.
record the type of response
Definition at line 404 of file dictionary.h.
csString NpcResponse::voiceAudioPath[MAX_RESP] |
Optional vfs path to audio file to stream on demand to the client.
Definition at line 403 of file dictionary.h.