Planeshift
|
Faction Message to get faction info from the server. More...
#include <messages.h>
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< FactionPair > | factionInfo |
Destination client. |
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.
anonymous enum |
The different commands that this message can be.
Definition at line 5831 of file messages.h.
Construct the faction message.
cnum | The client destination for the message. |
cmd | What the data inside will be. [ MSG_FULL_LIST | MSG_UPDATE ] |
psFactionMessage::psFactionMessage | ( | MsgEntry * | message | ) |
Parse incoming messages.
void psFactionMessage::AddFaction | ( | csString | factionName, |
int | rating | ||
) |
Adds a faction to the list to deliver.
factionName | The name of the faction. |
rating | The 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.
accessPointers | A struct to a number of access pointers. |
Implements psMessageCracker.
The command type of message.
Definition at line 5859 of file messages.h.
Definition at line 5858 of file messages.h.
csPDelArray<FactionPair> psFactionMessage::factionInfo |
Destination client.
Definition at line 5860 of file messages.h.