Planeshift
Public Member Functions

PlayerGroup Class Reference

An existing group. More...

#include <playergroup.h>

List of all members.

Public Member Functions

void Add (gemActor *new_member)
 Add a new client to the existing group.
bool AddDuelGroup (PlayerGroup *OtherGroup)
 Add a new group to the list of those in duel with this.
void Broadcast (MsgEntry *me)
 Send a message to all members in this group.
void BroadcastMemberList ()
void Disband ()
void DuelYield ()
 Yield to all groups in duel with this.
int GetGroupID ()
 Return the ID of this group.
gemActorGetLeader ()
gemActorGetMember (size_t which)
size_t GetMemberCount ()
bool HasMember (gemActor *member, bool IncludePets=false)
bool IsEmpty ()
bool IsInDuel ()
 Checks if the group is in duel with any other group.
bool IsInDuelWith (PlayerGroup *OtherGroup)
 Check if we are in duel with another group.
bool IsLeader (gemActor *client)
void ListMembers (gemActor *client)
void NotifyDuelYield (PlayerGroup *OtherGroup)
 Notify the group of the yielding of another group.
int operator< (PlayerGroup &other)
int operator== (PlayerGroup &other)
 PlayerGroup (GroupManager *mgr, gemActor *leader)
void Remove (gemActor *member)
 Remove a client from this group.
void RemoveDuelGroup (PlayerGroup *OtherGroup)
 Remove a group from the list of those in duel with this.
void SetLeader (gemActor *new_leader)
 Change the leader of this group.
 ~PlayerGroup ()

Detailed Description

An existing group.

This defines a 'group' of players on the server.

Definition at line 36 of file playergroup.h.


Constructor & Destructor Documentation

PlayerGroup::PlayerGroup ( GroupManager mgr,
gemActor leader 
)
PlayerGroup::~PlayerGroup ( )

Member Function Documentation

void PlayerGroup::Add ( gemActor new_member)

Add a new client to the existing group.

bool PlayerGroup::AddDuelGroup ( PlayerGroup OtherGroup)

Add a new group to the list of those in duel with this.

Parameters:
OtherGroupA pointer to the PlayerGroup we are adding in the duel groups.
Returns:
false if the group was already in the list else true.
void PlayerGroup::Broadcast ( MsgEntry me)

Send a message to all members in this group.

void PlayerGroup::BroadcastMemberList ( )
void PlayerGroup::Disband ( )
void PlayerGroup::DuelYield ( )

Yield to all groups in duel with this.

int PlayerGroup::GetGroupID ( ) [inline]

Return the ID of this group.

Definition at line 57 of file playergroup.h.

gemActor* PlayerGroup::GetLeader ( )
gemActor* PlayerGroup::GetMember ( size_t  which) [inline]

Definition at line 120 of file playergroup.h.

size_t PlayerGroup::GetMemberCount ( ) [inline]

Definition at line 116 of file playergroup.h.

bool PlayerGroup::HasMember ( gemActor member,
bool  IncludePets = false 
)
bool PlayerGroup::IsEmpty ( )
bool PlayerGroup::IsInDuel ( )

Checks if the group is in duel with any other group.

Useful to quickly check if the group might be dangerous to who joins.

Returns:
True if the group is currently in duel.
bool PlayerGroup::IsInDuelWith ( PlayerGroup OtherGroup)

Check if we are in duel with another group.

Parameters:
OtherGroupA pointer to the PlayerGroup we are checking if it's in duel with this group.
Returns:
false if it's not in duel with this group, true if it is.
bool PlayerGroup::IsLeader ( gemActor client)
void PlayerGroup::ListMembers ( gemActor client)
void PlayerGroup::NotifyDuelYield ( PlayerGroup OtherGroup)

Notify the group of the yielding of another group.

Parameters:
OtherGroupA pointer to the PlayerGroup which is yielding to this group.
int PlayerGroup::operator< ( PlayerGroup other) [inline]

Definition at line 131 of file playergroup.h.

int PlayerGroup::operator== ( PlayerGroup other) [inline]

Definition at line 126 of file playergroup.h.

void PlayerGroup::Remove ( gemActor member)

Remove a client from this group.

void PlayerGroup::RemoveDuelGroup ( PlayerGroup OtherGroup)

Remove a group from the list of those in duel with this.

Parameters:
OtherGroupA pointer to the PlayerGroup we are removing from the duel groups.
void PlayerGroup::SetLeader ( gemActor new_leader)

Change the leader of this group.


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