Planeshift
Public Member Functions | Public Attributes

psCreationChoiceMsg Class Reference

A general message class for sending a character creation choice. More...

#include <charmessages.h>

List of all members.

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< CreationChoicechoices
 Holds a list of all the choices in this message.

Detailed Description

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.


Constructor & Destructor Documentation

psCreationChoiceMsg::psCreationChoiceMsg ( int  listener)

Create a new message destined for server.

Parameters:
listenerthe subscribers that should get this message.
psCreationChoiceMsg::psCreationChoiceMsg ( MsgEntry me)

Crack open the message and get any data in the message.

psCreationChoiceMsg::psCreationChoiceMsg ( int  clientTo,
int  totalChoices,
int  listener 
)

Create a new message that will be list of choices.

This should only really be done by the server.

Parameters:
clientTothe destination of this message.
totalChoicesThe total number of choices that this message will carry.
listenerThe subscribers that should get this message.

Member Function Documentation

void psCreationChoiceMsg::AddChoice ( int  id,
const char *  name,
const char *  description,
int  area,
int  cost 
)

Add a new choice the the message payload.

Parameters:
idThe unique ID for this choice ( the database id in this case )
nameThe name of this choice.
descriptionThe description of this creation choice.
areaThe Creation area for this choice. Should be one of the CreationAreas enums.
costThe 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.

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

Implements psMessageCracker.


Member Data Documentation

Holds a list of all the choices in this message.

Definition at line 288 of file charmessages.h.


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