Planeshift
Classes | Public Types | Public Member Functions | Public Attributes

psFactionMessage Class Reference

Faction Message to get faction info from the server. More...

#include <messages.h>

List of all members.

Classes

struct  FactionPair

Public Types

enum  { MSG_FULL_LIST, MSG_UPDATE }
 

The different commands that this message can be.

More...

Public Member Functions

void AddFaction (csString factionName, int rating)
 Adds a faction to the list to deliver.
void BuildMsg ()
 Build the messasge to prepare for it to be sent.
 PSF_DECLARE_MSG_FACTORY ()
 psFactionMessage (MsgEntry *message)
 Parse incoming messages.
 psFactionMessage (int cnum, int cmd)
 Construct the faction message.
virtual csString ToString (NetBase::AccessPointers *accessPointers)
 Converts the message into human readable string.

Public Attributes

int client
 The command type of message.
int cmd
csPDelArray< FactionPairfactionInfo
 Destination client.

Detailed Description

Faction Message to get faction info from the server.

This is used to either get the full faction information or any updated faction info.

Definition at line 5820 of file messages.h.


Member Enumeration Documentation

anonymous enum

The different commands that this message can be.

Enumerator:
MSG_FULL_LIST 
MSG_UPDATE 

Definition at line 5831 of file messages.h.


Constructor & Destructor Documentation

psFactionMessage::psFactionMessage ( int  cnum,
int  cmd 
)

Construct the faction message.

Parameters:
cnumThe client destination for the message.
cmdWhat the data inside will be. [ MSG_FULL_LIST | MSG_UPDATE ]
psFactionMessage::psFactionMessage ( MsgEntry message)

Parse incoming messages.


Member Function Documentation

void psFactionMessage::AddFaction ( csString  factionName,
int  rating 
)

Adds a faction to the list to deliver.

Parameters:
factionNameThe name of the faction.
ratingThe rating with that faction.
void psFactionMessage::BuildMsg ( )

Build the messasge to prepare for it to be sent.

psFactionMessage::PSF_DECLARE_MSG_FACTORY ( )
virtual csString psFactionMessage::ToString ( NetBase::AccessPointers accessPointers) [virtual]

Converts the message into human readable string.

Used when a message is Logged. Every message should implement a version of this function that print all data that was decoded when the message was initiated from a NetEntry. See psDRMessage::ToString for an example.

Parameters:
accessPointersA struct to a number of access pointers.
Returns:
Return a human readable string for the message.

Implements psMessageCracker.


Member Data Documentation

The command type of message.

Definition at line 5859 of file messages.h.

Definition at line 5858 of file messages.h.

Destination client.

Definition at line 5860 of file messages.h.


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