19 #ifndef __GMEVENTMANAGER_H__ 20 #define __GMEVENTMANAGER_H__ 24 #include <csutil/ref.h> 25 #include <csutil/csstring.h> 26 #include <csutil/array.h> 41 #define MAX_PLAYERS_PER_EVENT 100 42 #define MAX_EVENT_NAME_LENGTH 40 43 #define MAX_REGISTER_RANGE 100.0 44 #define EVAL_LOCKOUT_TIME 24*60*60*1000 46 #define UNDEFINED_GMID 0 48 #define SUPPORT_GM_LEVEL GM_LEVEL_4 174 csArray<int> &completedEvents,
175 int &runningEventAsGM,
176 csArray<int> &completedEventsAsGM);
188 csString &description);
236 csString eventDescription;
237 csArray<PlayerData> Player;
239 csArray<GMEvent*> gmEvents;
247 GMEvent* GetGMEventByID(
int id);
257 GMEvent* GetGMEventByGM(PID gmID,
GMEventStatus status,
int &startIndex);
267 GMEvent* GetGMEventByName(csString eventName,
GMEventStatus status,
int &startIndex);
281 GMEvent* GetGMEventByPlayer(PID playerID,
GMEventStatus status,
int &startIndex);
290 size_t GetPlayerFromEvent(PID &PlayerID, GMEvent* Event);
301 bool CheckEvalStatus(PID PlayerID, GMEvent* Event);
311 void SetEvalStatus(PID PlayerID, GMEvent* Event,
bool NewStatus);
316 int GetNextEventID(
void);
324 void DiscardGMEvent(
Client* client,
int eventID);
334 bool RemovePlayerRefFromGMEvent(GMEvent* gmEvent,
Client* client, PID playerID);
353 void WriteGMEventEvaluation(
Client* client, GMEvent* Event, csString XmlStr);
bool EraseGMEvent(Client *client, csString eventName)
GM discards an event of theirs by name; participants are removed, and it is wiped from the DB...
bool RemovePlayerFromGMEvent(Client *client, Client *target)
A player is removed from a running event.
bool RegisterPlayersInRangeInGMEvent(Client *client, float range)
GM registers all players in range.
The structure of 1 queue entry (pointer to a message)
bool RemovePlayerFromGMEvents(PID playerID)
Removes a player from any GM event they maybe involved with (eg player being deleted) ...
bool CompleteGMEvent(Client *client, PID gmID, bool byTheControllerGM=true)
A player completes an event.
GameMaster Events manager class.
int GetAllGMEventsForPlayer(PID playerID, csArray< int > &completedEvents, int &runningEventAsGM, csArray< int > &completedEventsAsGM)
Returns all events for a player.
bool RegisterPlayerInGMEvent(Client *client, Client *target)
GM registers player into his/her event.
bool AssumeControlOfGMEvent(Client *client, csString eventName)
GM attempts to assume control of an event, after originator has absconded.
This class collects data of a netclient.
GMEventStatus GetGMEventDetailsByID(int id, csString &name, csString &description)
Returns event details for a particular event.
bool ListGMEvents(Client *client)
Sends a list of all events to client.
bool AddNewGMEvent(Client *client, csString eventName, csString eventDescription)
GM attempts to add new event.
bool RewardPlayersInGMEvent(Client *client, RangeSpecifier rewardRecipient, float range, Client *target, psRewardData *reward)
Reward players who complete an event.
This huge class stores all the properties of any object a player can have in the game.
virtual void HandleGMEventCommand(MsgEntry *me, Client *client)
handle message from client
Reward Data is an abstract structure for all kinds of rewards.
Provides a manager to facilitate subscriptions.