GameMaster Events manager class.
More...
#include <gmeventmanager.h>
List of all members.
Classes |
struct | GMEvent |
struct | PlayerData |
Public Member Functions |
bool | AddNewGMEvent (Client *client, csString eventName, csString eventDescription) |
| GM attempts to add new event.
|
bool | AssumeControlOfGMEvent (Client *client, csString eventName) |
| GM attempts to assume control of an event, after originator has absconded.
|
bool | CompleteGMEvent (Client *client, csString eventName) |
| A player completes an event.
|
bool | CompleteGMEvent (Client *client, PID gmID, bool byTheControllerGM=true) |
| A player completes an event.
|
bool | EraseGMEvent (Client *client, csString eventName) |
| GM discards an event of theirs by name; participants are removed, and it is wiped from the DB.
|
int | GetAllGMEventsForPlayer (PID playerID, csArray< int > &completedEvents, int &runningEventAsGM, csArray< int > &completedEventsAsGM) |
| Returns all events for a player.
|
GMEventStatus | GetGMEventDetailsByID (int id, csString &name, csString &description) |
| Returns event details for a particular event.
|
| GMEventManager () |
virtual void | HandleGMEventCommand (MsgEntry *me, Client *client) |
| handle message from client
|
bool | Initialise (void) |
bool | ListGMEvents (Client *client) |
| Sends a list of all events to client.
|
bool | RegisterPlayerInGMEvent (Client *client, Client *target) |
| GM registers player into his/her event.
|
bool | RegisterPlayersInRangeInGMEvent (Client *client, float range) |
| GM registers all players in range.
|
bool | RemovePlayerFromGMEvent (Client *client, Client *target) |
| A player is removed from a running event.
|
bool | RemovePlayerFromGMEvents (PID playerID) |
| Removes a player from any GM event they maybe involved with (eg player being deleted)
|
bool | RewardPlayersInGMEvent (Client *client, RangeSpecifier rewardRecipient, float range, Client *target, psRewardData *reward) |
| Reward players who complete an event.
|
| ~GMEventManager () |
Detailed Description
GameMaster Events manager class.
Definition at line 72 of file gmeventmanager.h.
Constructor & Destructor Documentation
GMEventManager::GMEventManager |
( |
| ) |
|
GMEventManager::~GMEventManager |
( |
| ) |
|
Member Function Documentation
bool GMEventManager::AddNewGMEvent |
( |
Client * |
client, |
|
|
csString |
eventName, |
|
|
csString |
eventDescription |
|
) |
| |
GM attempts to add new event.
- Parameters:
-
client | client pointer. |
eventName | event name. |
eventDescription | event description. |
- Returns:
- true = success, false = failed.
bool GMEventManager::AssumeControlOfGMEvent |
( |
Client * |
client, |
|
|
csString |
eventName |
|
) |
| |
GM attempts to assume control of an event, after originator has absconded.
- Parameters:
-
client | client pointer. |
eventName | event name. |
- Returns:
- true = success, false = failed.
bool GMEventManager::CompleteGMEvent |
( |
Client * |
client, |
|
|
PID |
gmID, |
|
|
bool |
byTheControllerGM = true |
|
) |
| |
A player completes an event.
- Parameters:
-
client | client pointer. |
gmID | Game Master player ID. |
byTheControllerGM | true if it is the controlling GM |
- Returns:
- true = success, false = failed.
bool GMEventManager::CompleteGMEvent |
( |
Client * |
client, |
|
|
csString |
eventName |
|
) |
| |
A player completes an event.
- Parameters:
-
client | client pointer. |
eventName | Name of the event. |
- Returns:
- true = success, false = failed.
bool GMEventManager::EraseGMEvent |
( |
Client * |
client, |
|
|
csString |
eventName |
|
) |
| |
GM discards an event of theirs by name; participants are removed, and it is wiped from the DB.
- Parameters:
-
client | client pointer. |
eventName | event name. |
- Returns:
- true = success, false = failed.
int GMEventManager::GetAllGMEventsForPlayer |
( |
PID |
playerID, |
|
|
csArray< int > & |
completedEvents, |
|
|
int & |
runningEventAsGM, |
|
|
csArray< int > & |
completedEventsAsGM |
|
) |
| |
Returns all events for a player.
- Parameters:
-
playerID | the player identity. |
completedEvents | array of event ids of completed events player. |
runningEventAsGM | running event id as GM. |
completedEventsAsGM | array of ids of completed events as GM. |
- Returns:
- int running event id.
GMEventStatus GMEventManager::GetGMEventDetailsByID |
( |
int |
id, |
|
|
csString & |
name, |
|
|
csString & |
description |
|
) |
| |
Returns event details for a particular event.
- Parameters:
-
id | event id. |
name | name of event. |
description | description of event. |
- Returns:
- GMEventStatus status of event.
virtual void GMEventManager::HandleGMEventCommand |
( |
MsgEntry * |
me, |
|
|
Client * |
client |
|
) |
| [virtual] |
handle message from client
bool GMEventManager::Initialise |
( |
void |
| ) |
|
bool GMEventManager::ListGMEvents |
( |
Client * |
client | ) |
|
Sends a list of all events to client.
- Parameters:
-
- Returns:
- true = success, false = failed.
bool GMEventManager::RegisterPlayerInGMEvent |
( |
Client * |
client, |
|
|
Client * |
target |
|
) |
| |
GM registers player into his/her event.
- Parameters:
-
client | client pointer. |
target | registeree player client. |
- Returns:
- true = success, false = failed.
bool GMEventManager::RegisterPlayersInRangeInGMEvent |
( |
Client * |
client, |
|
|
float |
range |
|
) |
| |
GM registers all players in range.
- Parameters:
-
client | client pointer. |
range | required range. |
- Returns:
- true = success, false = failed.
bool GMEventManager::RemovePlayerFromGMEvent |
( |
Client * |
client, |
|
|
Client * |
target |
|
) |
| |
A player is removed from a running event.
A player can be excused from finishing an event.
- Parameters:
-
client | client pointer. |
target | registeree player client to be removed. |
- Returns:
- true = success, false = failed.
bool GMEventManager::RemovePlayerFromGMEvents |
( |
PID |
playerID | ) |
|
Removes a player from any GM event they maybe involved with (eg player being deleted)
- Parameters:
-
playerID | id of player being removed |
- Returns:
- true = success
Reward players who complete an event.
Event *must* be live at the time of reward).
- Parameters:
-
client | client pointer. |
rewardRecipient | who will receive the reward. |
range | required range of winners (NO_RANGE = all participants). |
target | specific individual winner. |
reward | The reward. |
- Returns:
- true = success, false = failed.
The documentation for this class was generated from the following file: