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 } |
![]() | |
typedef void(TutorialManager::* | FunctionPointer) (MsgEntry *, Client *) |
Public Member Functions | |
void | HandleScriptMessage (uint32_t client, unsigned int which) |
Specifically handle the message sent by a script. More... | |
TutorialManager (ClientConnectionSet *pCCS) | |
virtual | ~TutorialManager () |
![]() | |
void | HandleMessage (MsgEntry *msg, Client *client) |
Transfers the message to the manager specific function. More... | |
void | Subscribe (FunctionPointer fpt, msgtype type, uint32_t flags=0x01) |
Subscribes this manager to a specific message type with a custom callback. More... | |
bool | Unsubscribe (msgtype type) |
Unsubscribes this manager from a specific message type. More... | |
bool | Unsubscribe (FunctionPointer handler, msgtype type) |
Unsubscribes a specific handler from a specific message type. More... | |
bool | UnsubscribeAll () |
Unsubscribes this manager from all message types. More... | |
virtual | ~MessageManager () |
Unsubscribes all messages then destroys this object. More... | |
![]() | |
csArray< csString > | DecodeCommandArea (Client *client, csString target) |
Decodes an area: expression. More... | |
gemObject * | FindObjectByString (const csString &str, gemActor *me) const |
Find the object we are referring to in str. More... | |
Client * | FindPlayerClient (const char *name) |
Finds Client* of character with given name. More... | |
virtual bool | Verify (MsgEntry *pMsg, unsigned int flags, Client *&client) |
Protected Member Functions | |
void | HandleConnect (MsgEntry *pMsg, Client *client) |
Specifically handle the Connect event in the tutorial. More... | |
void | HandleDamage (MsgEntry *pMsg, Client *client) |
Specifically handle the Damage event in the tutorial. More... | |
void | HandleDeath (MsgEntry *pMsg, Client *client) |
Specifically handle the Death event in the tutorial. More... | |
void | HandleGeneric (MsgEntry *pMsg, Client *client) |
Handle tutorial events which come from events which do not have specific msgtypes. More... | |
void | HandleMovement (MsgEntry *pMsg, Client *client) |
Specifically handle the Movement event in the tutorial. More... | |
void | HandleTarget (MsgEntry *pMsg, Client *client) |
Specifically handle the Target event in the tutorial. More... | |
bool | LoadTutorialStrings () |
Preload all tutorial strings from the Tips db table. More... | |
void | SendTutorialMessage (int which, Client *client, const char *instrs) |
Package up the current event string for the client receiving the tutorial. More... | |
void | SendTutorialMessage (int which, uint32_t clientnum, const char *instrs) |
Protected Attributes | |
ClientConnectionSet * | clients |
csArray< csString > | tutorialMsg |
Stores all the messages in the database above id 1001 (biased to 1001 so 1001 is 0). More... | |
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.
Enumerator | |
---|---|
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 |
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.
|
protected |
Preload all tutorial strings from the Tips db table.
|
protected |
Package up the current event string for the client receiving the tutorial.
|
protected |
|
protected |
Definition at line 99 of file tutorialmanager.h.
|
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.