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. More... | |
void | BuildMsg () |
Build the messasge to prepare for it to be sent. More... | |
PSF_DECLARE_MSG_FACTORY () | |
psFactionMessage (int cnum, int cmd) | |
Construct the faction message. More... | |
psFactionMessage (MsgEntry *message) | |
Parse incoming messages. More... | |
virtual csString | ToString (NetBase::AccessPointers *accessPointers) |
Converts the message into human readable string. More... | |
![]() | |
void | FireEvent () |
Publishes the message to the local program. More... | |
virtual csString | GetMessageTypeName () const =0 |
Gets the name of the message type. More... | |
void | Multicast (csArray< PublishDestination > &multi, uint32_t except, float range) |
Multicasts the message to all current connections. More... | |
psMessageCracker () | |
void | SendMessage () |
Sends the message to the client/server. More... | |
virtual | ~psMessageCracker () |
Public Attributes | |
int | client |
The command type of message. More... | |
int | cmd |
csPDelArray< FactionPair > | factionInfo |
Destination client. More... | |
![]() | |
int | filterNumber |
csRef< MsgEntry > | msg |
bool | valid |
Additional Inherited Members | |
![]() | |
static MsgHandler * | msghandler |
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 5827 of file messages.h.
anonymous enum |
The different commands that this message can be.
Enumerator | |
---|---|
MSG_FULL_LIST | |
MSG_UPDATE |
Definition at line 5838 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 |
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.
int psFactionMessage::client |
The command type of message.
Definition at line 5866 of file messages.h.
int psFactionMessage::cmd |
Definition at line 5865 of file messages.h.
csPDelArray<FactionPair> psFactionMessage::factionInfo |
Destination client.
Definition at line 5867 of file messages.h.