Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

GroupManager Class Reference

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

#include <groupmanager.h>

List of all members.

Public Member Functions

 GroupManager (ClientConnectionSet *pCCS, ChatManager *chat)
void HandleChallengeGroup (PendingGroupChallenge *invite)
 Handles the answer to the request of challenge.
void HandleJoinGroup (PendingGroupInvite *invite)
virtual ~GroupManager ()

Protected Member Functions

bool AddGroupChallenge (PlayerGroup *ChallengerGroup, PlayerGroup *ChallengedGroup)
 Makes two group be in challenge each other.
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.
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.

Protected Attributes

ChatManagerchatserver
ClientConnectionSetclients
csRef< EventManagereventmanager
csRefArray< PlayerGroupgroups

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

Definition at line 115 of file groupmanager.h.

Definition at line 116 of file groupmanager.h.

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: