Planeshift
|
This manager catches events posted by the rest of the server and decides whether each client needs to be notified about them, in order to show a tutorial page about that event. More...
#include <tutorialmanager.h>
Public Types | |
enum | TutorEventType { CONNECT = 0, MOVEMENT = 1, NPC_SELECT = 2, NPC_TALK = 3, QUEST_ASSIGN = 4, DAMAGE_SELF = 5, DAMAGE_FALL = 6, DEATH_SELF = 7, SPAWN_MOVE = 8, TUTOREVENTTYPE_COUNT } |
Public Member Functions | |
void | HandleScriptMessage (uint32_t client, unsigned int which) |
Specifically handle the message sent by a script. | |
TutorialManager (ClientConnectionSet *pCCS) | |
virtual | ~TutorialManager () |
Protected Member Functions | |
void | HandleConnect (MsgEntry *pMsg, Client *client) |
Specifically handle the Connect event in the tutorial. | |
void | HandleDamage (MsgEntry *pMsg, Client *client) |
Specifically handle the Damage event in the tutorial. | |
void | HandleDeath (MsgEntry *pMsg, Client *client) |
Specifically handle the Death event in the tutorial. | |
void | HandleGeneric (MsgEntry *pMsg, Client *client) |
Handle tutorial events which come from events which do not have specific msgtypes. | |
void | HandleMovement (MsgEntry *pMsg, Client *client) |
Specifically handle the Movement event in the tutorial. | |
void | HandleTarget (MsgEntry *pMsg, Client *client) |
Specifically handle the Target event in the tutorial. | |
bool | LoadTutorialStrings () |
Preload all tutorial strings from the Tips db table. | |
void | SendTutorialMessage (int which, uint32_t clientnum, const char *instrs) |
void | SendTutorialMessage (int which, Client *client, const char *instrs) |
Package up the current event string for the client receiving the tutorial. | |
Protected Attributes | |
ClientConnectionSet * | clients |
csArray< csString > | tutorialMsg |
Stores all the messages in the database above id 1001 (biased to 1001 so 1001 is 0). |
This manager catches events posted by the rest of the server and decides whether each client needs to be notified about them, in order to show a tutorial page about that event.
Definition at line 41 of file tutorialmanager.h.
CONNECT | |
MOVEMENT | |
NPC_SELECT | |
NPC_TALK | |
QUEST_ASSIGN | |
DAMAGE_SELF | |
DAMAGE_FALL | |
DEATH_SELF | |
SPAWN_MOVE | |
TUTOREVENTTYPE_COUNT |
Definition at line 45 of file tutorialmanager.h.
TutorialManager::TutorialManager | ( | ClientConnectionSet * | pCCS | ) |
virtual TutorialManager::~TutorialManager | ( | ) | [virtual] |
Specifically handle the Connect event in the tutorial.
Specifically handle the Damage event in the tutorial.
Specifically handle the Death event in the tutorial.
Handle tutorial events which come from events which do not have specific msgtypes.
Specifically handle the Movement event in the tutorial.
Specifically handle the message sent by a script.
client | The client where the message has to be sent. |
which | The ID of the tip from the database |
Specifically handle the Target event in the tutorial.
bool TutorialManager::LoadTutorialStrings | ( | ) | [protected] |
Preload all tutorial strings from the Tips db table.
void TutorialManager::SendTutorialMessage | ( | int | which, |
Client * | client, | ||
const char * | instrs | ||
) | [protected] |
Package up the current event string for the client receiving the tutorial.
void TutorialManager::SendTutorialMessage | ( | int | which, |
uint32_t | clientnum, | ||
const char * | instrs | ||
) | [protected] |
ClientConnectionSet* TutorialManager::clients [protected] |
Definition at line 99 of file tutorialmanager.h.
csArray<csString> TutorialManager::tutorialMsg [protected] |
Stores all the messages in the database above id 1001 (biased to 1001 so 1001 is 0).
Definition at line 107 of file tutorialmanager.h.