Planeshift
|
A general message class for sending a character creation choice. More...
#include <charmessages.h>
Public Member Functions | |
void | AddChoice (int id, const char *name, const char *description, int area, int cost) |
Add a new choice the the message payload. | |
void | ConstructMessage () |
Resize the message to the right size. | |
psCreationChoiceMsg (int clientTo, int totalChoices, int listener) | |
Create a new message that will be list of choices. | |
psCreationChoiceMsg (MsgEntry *me) | |
Crack open the message and get any data in the message. | |
psCreationChoiceMsg (int listener) | |
Create a new message destined for server. | |
PSF_DECLARE_MSG_FACTORY () | |
virtual csString | ToString (NetBase::AccessPointers *accessPointers) |
Convert the message into human readable string. | |
Public Attributes | |
csArray< CreationChoice > | choices |
Holds a list of all the choices in this message. |
A general message class for sending a character creation choice.
Since all the choices fit this profile we have a shared message type to send a choice. They are seperated by using different listener's so subscribers can listen for different types of choice requests.
This can be a single choice or a list of choices.
Definition at line 241 of file charmessages.h.
psCreationChoiceMsg::psCreationChoiceMsg | ( | int | listener | ) |
Create a new message destined for server.
listener | the subscribers that should get this message. |
psCreationChoiceMsg::psCreationChoiceMsg | ( | MsgEntry * | me | ) |
Crack open the message and get any data in the message.
Create a new message that will be list of choices.
This should only really be done by the server.
clientTo | the destination of this message. |
totalChoices | The total number of choices that this message will carry. |
listener | The subscribers that should get this message. |
void psCreationChoiceMsg::AddChoice | ( | int | id, |
const char * | name, | ||
const char * | description, | ||
int | area, | ||
int | cost | ||
) |
Add a new choice the the message payload.
id | The unique ID for this choice ( the database id in this case ) |
name | The name of this choice. |
description | The description of this creation choice. |
area | The Creation area for this choice. Should be one of the CreationAreas enums. |
cost | The CP cost of the choice. |
void psCreationChoiceMsg::ConstructMessage | ( | ) |
Resize the message to the right size.
psCreationChoiceMsg::PSF_DECLARE_MSG_FACTORY | ( | ) |
virtual csString psCreationChoiceMsg::ToString | ( | NetBase::AccessPointers * | accessPointers | ) | [virtual] |
Convert the message into human readable string.
accessPointers | A struct to a number of access pointers. |
Implements psMessageCracker.
Holds a list of all the choices in this message.
Definition at line 288 of file charmessages.h.