|
Planeshift
|
Handles minigame sessions. More...
#include <minigamemanager.h>
Public Member Functions | |
| psMiniGameBoardDef * | FindGameDef (csString gameName) |
| Find & return game board definition. More... | |
| psMiniGameSession * | GetSessionByID (uint32_t id) |
| returns session by its id. More... | |
| void | Idle () |
| Idle function to check for idle players and players too far away. More... | |
| bool | Initialise () |
| Initialise Mini Game manager. More... | |
| MiniGameManager () | |
| void | ResetAllGameSessions (void) |
| reset all sessions, prob due to reloading action locations More... | |
| ~MiniGameManager () | |
Public Member Functions inherited from MessageManager< MiniGameManager > | |
| 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... | |
Public Member Functions inherited from MessageManagerBase | |
| 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 | HandleGameUpdate (MsgEntry *me, Client *client) |
| handles a client that has made a move. More... | |
| void | HandleStartGameRequest (Client *client) |
| client requests start of game session. More... | |
| void | HandleStartStop (MsgEntry *me, Client *client) |
| Handle start and stop messages. More... | |
| void | HandleStopGameRequest (Client *client) |
| client handles stopping of game session. More... | |
| int16_t | ParseGameboardOptions (psString optionsStr) |
| function parses game options string from gameboards DB table. More... | |
| void | RemovePlayerFromSessions (psMiniGameSession *session, Client *client, uint32_t clientID) |
| a client is removed from a game session. More... | |
| void | ResetGameSession (psMiniGameSession *sessionToReset) |
| requests a session to be reset. More... | |
Protected Attributes | |
| csHash< psMiniGameBoardDef *, csString > | gameBoardDef |
| Minigame board definitions by name. More... | |
| csHash< psMiniGameSession *, uint32_t > | playerSessions |
| Maps players to game sessions for quicker access. More... | |
| csPDelArray< psMiniGameSession > | sessions |
| Game sessions. More... | |
Additional Inherited Members | |
Public Types inherited from MessageManager< MiniGameManager > | |
| typedef void(MiniGameManager::* | FunctionPointer) (MsgEntry *, Client *) |
Handles minigame sessions.
This is the manager class of mini-games, handling overall mini-game definitions, action-location gameboards and game sessions.
Definition at line 293 of file minigamemanager.h.
| MiniGameManager::MiniGameManager | ( | ) |
| MiniGameManager::~MiniGameManager | ( | ) |
| psMiniGameBoardDef* MiniGameManager::FindGameDef | ( | csString | gameName | ) |
Find & return game board definition.
| psMiniGameSession* MiniGameManager::GetSessionByID | ( | uint32_t | id | ) |
returns session by its id.
handles a client that has made a move.
|
protected |
client requests start of game session.
Handle start and stop messages.
|
protected |
client handles stopping of game session.
| void MiniGameManager::Idle | ( | ) |
Idle function to check for idle players and players too far away.
| bool MiniGameManager::Initialise | ( | ) |
Initialise Mini Game manager.
|
protected |
function parses game options string from gameboards DB table.
|
protected |
a client is removed from a game session.
| void MiniGameManager::ResetAllGameSessions | ( | void | ) |
reset all sessions, prob due to reloading action locations
|
protected |
requests a session to be reset.
|
protected |
Minigame board definitions by name.
Definition at line 346 of file minigamemanager.h.
|
protected |
Maps players to game sessions for quicker access.
Definition at line 343 of file minigamemanager.h.
|
protected |
Game sessions.
Definition at line 340 of file minigamemanager.h.