|
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. More... | |
| void | ConstructMessage () |
| Resize the message to the right size. More... | |
| psCreationChoiceMsg (int listener) | |
| Create a new message destined for server. More... | |
| psCreationChoiceMsg (MsgEntry *me) | |
| Crack open the message and get any data in the message. More... | |
| psCreationChoiceMsg (int clientTo, int totalChoices, int listener) | |
| Create a new message that will be list of choices. More... | |
| PSF_DECLARE_MSG_FACTORY () | |
| virtual csString | ToString (NetBase::AccessPointers *accessPointers) |
| Convert the message into human readable string. More... | |
Public Member Functions inherited from psMessageCracker | |
| 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 | |
| csArray< CreationChoice > | choices |
| Holds a list of all the choices in this message. More... | |
Public Attributes inherited from psMessageCracker | |
| int | filterNumber |
| csRef< MsgEntry > | msg |
| bool | valid |
Additional Inherited Members | |
Static Public Attributes inherited from psMessageCracker | |
| static MsgHandler * | msghandler |
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 |
Convert the message into human readable string.
| accessPointers | A struct to a number of access pointers. |
Implements psMessageCracker.
| csArray<CreationChoice> psCreationChoiceMsg::choices |
Holds a list of all the choices in this message.
Definition at line 288 of file charmessages.h.