Planeshift
GroupManager Class Reference

Main PlayerGroup Manager that holds all the groups. More...

#include <groupmanager.h>

Public Member Functions

 GroupManager (ClientConnectionSet *pCCS, ChatManager *chat)
 
void HandleChallengeGroup (PendingGroupChallenge *invite)
 Handles the answer to the request of challenge. More...
 
void HandleJoinGroup (PendingGroupInvite *invite)
 
virtual ~GroupManager ()
 
- Public Member Functions inherited from MessageManager< GroupManager >
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...
 
gemObjectFindObjectByString (const csString &str, gemActor *me) const
 Find the object we are referring to in str. More...
 
ClientFindPlayerClient (const char *name)
 Finds Client* of character with given name. More...
 
virtual bool Verify (MsgEntry *pMsg, unsigned int flags, Client *&client)
 

Protected Member Functions

bool AddGroupChallenge (PlayerGroup *ChallengerGroup, PlayerGroup *ChallengedGroup)
 Makes two group be in challenge each other. More...
 
bool AddPlayerToGroup (PlayerGroup *group, gemActor *client)
 
void Challenge (psGroupCmdMessage &msg, Client *Challenger)
 Handles /groupchallenge and challenges another group after checking all requirements are in order. More...
 
void Disband (psGroupCmdMessage &msg, gemActor *client)
 
PlayerGroupFindGroup (int id)
 
void GroupChat (gemActor *client, const char *fmt,...)
 
void HandleGroupCommand (MsgEntry *pMsg, Client *client)
 
void Invite (psGroupCmdMessage &msg, Client *client)
 
void Leader (psGroupCmdMessage &msg, gemActor *client)
 
void Leave (psGroupCmdMessage &msg, gemActor *client)
 
void ListMembers (psGroupCmdMessage &msg, gemActor *client)
 
csPtr< PlayerGroupNewGroup (gemActor *leader)
 
void Remove (PlayerGroup *group)
 
void RemovePlayerFromGroup (psGroupCmdMessage &msg, gemActor *client)
 
void SendGroup (gemActor *client)
 
void SendLeave (gemActor *client)
 
void Yield (psGroupCmdMessage &msg, Client *Yielder)
 Handles /groupyield and yields to all the group in duel with the one requesting it after checking all requirements are in order. More...
 

Protected Attributes

ChatManagerchatserver
 
ClientConnectionSetclients
 
csRef< EventManagereventmanager
 
csRefArray< PlayerGroupgroups
 

Additional Inherited Members

- Public Types inherited from MessageManager< GroupManager >
typedef void(GroupManager::* FunctionPointer) (MsgEntry *, Client *)
 

Detailed Description

Main PlayerGroup Manager that holds all the groups.

This maintains all the groups on the servers and is responsible for all the group functions.

Definition at line 56 of file groupmanager.h.

Constructor & Destructor Documentation

GroupManager::GroupManager ( ClientConnectionSet pCCS,
ChatManager chat 
)
virtual GroupManager::~GroupManager ( )
virtual

Member Function Documentation

bool GroupManager::AddGroupChallenge ( PlayerGroup ChallengerGroup,
PlayerGroup ChallengedGroup 
)
protected

Makes two group be in challenge each other.

Parameters
ChallengerGroupthe group which is starting the challenge.
ChallengedGroupthe group which is being challenged.
bool GroupManager::AddPlayerToGroup ( PlayerGroup group,
gemActor client 
)
protected
void GroupManager::Challenge ( psGroupCmdMessage msg,
Client Challenger 
)
protected

Handles /groupchallenge and challenges another group after checking all requirements are in order.

Parameters
msgthe prepared message from the network.
ChallengerA pointer to the client which issued this command.
void GroupManager::Disband ( psGroupCmdMessage msg,
gemActor client 
)
protected
PlayerGroup* GroupManager::FindGroup ( int  id)
protected
void GroupManager::GroupChat ( gemActor client,
const char *  fmt,
  ... 
)
protected
void GroupManager::HandleChallengeGroup ( PendingGroupChallenge *  invite)

Handles the answer to the request of challenge.

Parameters
inviteThe class which handled the question to the challenged client.
void GroupManager::HandleGroupCommand ( MsgEntry pMsg,
Client client 
)
protected
void GroupManager::HandleJoinGroup ( PendingGroupInvite *  invite)
void GroupManager::Invite ( psGroupCmdMessage msg,
Client client 
)
protected
void GroupManager::Leader ( psGroupCmdMessage msg,
gemActor client 
)
protected
void GroupManager::Leave ( psGroupCmdMessage msg,
gemActor client 
)
protected
void GroupManager::ListMembers ( psGroupCmdMessage msg,
gemActor client 
)
protected
csPtr<PlayerGroup> GroupManager::NewGroup ( gemActor leader)
protected
void GroupManager::Remove ( PlayerGroup group)
protected
void GroupManager::RemovePlayerFromGroup ( psGroupCmdMessage msg,
gemActor client 
)
protected
void GroupManager::SendGroup ( gemActor client)
protected
void GroupManager::SendLeave ( gemActor client)
protected
void GroupManager::Yield ( psGroupCmdMessage msg,
Client Yielder 
)
protected

Handles /groupyield and yields to all the group in duel with the one requesting it after checking all requirements are in order.

Parameters
msgthe prepared message from the network.
YielderA pointer to the client which issued this command.

Member Data Documentation

ChatManager* GroupManager::chatserver
protected

Definition at line 115 of file groupmanager.h.

ClientConnectionSet* GroupManager::clients
protected

Definition at line 116 of file groupmanager.h.

csRef<EventManager> GroupManager::eventmanager
protected

Definition at line 117 of file groupmanager.h.

csRefArray<PlayerGroup> GroupManager::groups
protected

Definition at line 118 of file groupmanager.h.


The documentation for this class was generated from the following file: