Planeshift
|
Handles all the details of the character creation on the client side. More...
#include <psclientchar.h>
Public Types | |
typedef csPDelArray < PathDefinition >::Iterator | PathIterator |
typedef csPDelArray< Trait > ::Iterator | TraitIterator |
Public Member Functions | |
void | AddChoice (int choice, int modifier=1) |
void | AddLifeEvent (int event) |
void | ClearChoices () |
LifeEventChoice * | FindLifeEvent (int idNumber) |
void | GenerateName (int type, csString &namebuffer, int max_low, int max_high) |
void | GetChildhoodData () |
CreationChoice * | GetChoice (int id) |
csArray< uint32_t > | GetChoicesMade () |
int | GetCost (int idChoice) |
int | GetCurrentCP () |
void | GetCustomization (int &face, int &hairStyle, int &beardStyle, int &hairColour, int &skinColour) |
Gets the costumizations done and set with SetCostumization. | |
const char * | GetDescription (int choiceID) |
const char * | GetFatherModAsText (void) |
csArray< uint32_t > | GetLifeChoices () |
int | GetLifeCost (int id) |
void | GetLifeEventData () |
const char * | GetLifeEventDescription (int id) |
const char * | GetModelName (int race, int gender) |
Gets the model file name for a race. | |
const char * | GetMotherModAsText (void) |
const char * | GetName () |
size_t | GetNumberOfLifeChoices () |
void | GetParentData () |
This requests the data needed to create the parent screen. | |
PathDefinition * | GetPath (int i) |
PathIterator | GetPathIterator () |
RaceDefinition * | GetRace (int race) |
RaceDefinition * | GetRace (const char *name) |
int | GetRaceCP (int race) |
Get the starting CP value for a race ( as defined in the enums ). | |
const char * | GetRaceDescription (int race) |
Get a race desciption for a race. | |
int | GetSelectedGender () |
int | GetSelectedRace () |
Trait * | GetTrait (unsigned int uid) |
void | GetTraitData () |
TraitIterator | GetTraitIterator () |
void | HandleMessage (MsgEntry *me) |
bool | HasChildhoodData () |
bool | HasLifeEventData () |
bool | HasParentData () |
returns true if the parent data is cached. | |
bool | IsAvailable (int id, int gender) |
psCreationManager (iObjectRegistry *objectreg) | |
void | RemoveChoice (uint32_t choice, int modifier=1) |
void | RemoveLifeEvent (uint32_t event) |
void | SetCurrentCP (int value) |
void | SetCustomization (int face, int hairStyle, int beardStyle, int hairColour, int skinColour) |
void | SetFatherMod (int mod) |
void | SetGender (int gender) |
void | SetMotherMod (int mod) |
void | SetName (const char *newName) |
void | SetPath (const char *name) |
void | SetRace (int selectedRace) |
Return the selected Race. | |
void | UploadChar (bool doVerify=false) |
virtual | ~psCreationManager () |
Public Attributes | |
csArray< CreationChoice > | childhoodData |
Holds data for the childhood data screen. | |
csArray< LifeEventChoice > | lifeEventData |
csArray< CreationChoice > | parentData |
A list of all the choices that are for the parent screen. |
Handles all the details of the character creation on the client side.
This class maintains the players choices, as well as the relevant information that is needed on the screens. This class communicates with the server to get any information that it needs to show the client. It caches this data as well so only new data needs to be requested from the server.
This class also sends the final 'create' message to the server once the creation has been complete on the client.
Definition at line 261 of file psclientchar.h.
typedef csPDelArray<PathDefinition>::Iterator psCreationManager::PathIterator |
Definition at line 291 of file psclientchar.h.
typedef csPDelArray<Trait>::Iterator psCreationManager::TraitIterator |
Definition at line 296 of file psclientchar.h.
psCreationManager::psCreationManager | ( | iObjectRegistry * | objectreg | ) |
virtual psCreationManager::~psCreationManager | ( | ) | [virtual] |
void psCreationManager::AddLifeEvent | ( | int | event | ) |
void psCreationManager::ClearChoices | ( | ) |
LifeEventChoice* psCreationManager::FindLifeEvent | ( | int | idNumber | ) |
void psCreationManager::GenerateName | ( | int | type, |
csString & | namebuffer, | ||
int | max_low, | ||
int | max_high | ||
) | [inline] |
Definition at line 372 of file psclientchar.h.
void psCreationManager::GetChildhoodData | ( | ) |
CreationChoice* psCreationManager::GetChoice | ( | int | id | ) |
csArray<uint32_t> psCreationManager::GetChoicesMade | ( | ) | [inline] |
Definition at line 352 of file psclientchar.h.
int psCreationManager::GetCurrentCP | ( | ) | [inline] |
Definition at line 334 of file psclientchar.h.
void psCreationManager::GetCustomization | ( | int & | face, |
int & | hairStyle, | ||
int & | beardStyle, | ||
int & | hairColour, | ||
int & | skinColour | ||
) |
Gets the costumizations done and set with SetCostumization.
face | Gives the trait uid of the face costumization done or zero if none. |
hairStyle | Gives the trait uid of the hair style costumization done or zero if none. |
beardStyle | Gives the trait uid of the beard style costumization done or zero if none. |
hairColour | Gives the trait uid of the hair colour costumization done or zero if none. |
skinColour | Gives the trait uid of the skin colour costumization done or zero if none. |
const char* psCreationManager::GetDescription | ( | int | choiceID | ) |
const char* psCreationManager::GetFatherModAsText | ( | void | ) | [inline] |
Definition at line 381 of file psclientchar.h.
csArray<uint32_t> psCreationManager::GetLifeChoices | ( | ) | [inline] |
Definition at line 356 of file psclientchar.h.
void psCreationManager::GetLifeEventData | ( | ) |
const char* psCreationManager::GetLifeEventDescription | ( | int | id | ) |
Gets the model file name for a race.
race | One of the 12 race model files |
gender | One of the 3 genders. |
const char* psCreationManager::GetMotherModAsText | ( | void | ) | [inline] |
Definition at line 382 of file psclientchar.h.
const char* psCreationManager::GetName | ( | ) |
size_t psCreationManager::GetNumberOfLifeChoices | ( | ) | [inline] |
Definition at line 357 of file psclientchar.h.
void psCreationManager::GetParentData | ( | ) |
This requests the data needed to create the parent screen.
If the data is already on the client then does nothing.
PathDefinition* psCreationManager::GetPath | ( | int | i | ) |
PathIterator psCreationManager::GetPathIterator | ( | ) |
RaceDefinition* psCreationManager::GetRace | ( | int | race | ) |
RaceDefinition* psCreationManager::GetRace | ( | const char * | name | ) |
Get the starting CP value for a race ( as defined in the enums ).
This information is requested from the server. If not yet ready it will return REQUESTING to let the caller know that it is not ready.
race | The race id to get the CP value from. |
const char* psCreationManager::GetRaceDescription | ( | int | race | ) |
Get a race desciption for a race.
This information is stored on the client in /data/races/descriptions.xml and should be available upon request ( ie no request to server ).
race | The race ID to find the description of. |
int psCreationManager::GetSelectedGender | ( | ) | [inline] |
Definition at line 342 of file psclientchar.h.
int psCreationManager::GetSelectedRace | ( | ) | [inline] |
Definition at line 339 of file psclientchar.h.
void psCreationManager::GetTraitData | ( | ) |
TraitIterator psCreationManager::GetTraitIterator | ( | ) | [inline] |
Definition at line 297 of file psclientchar.h.
void psCreationManager::HandleMessage | ( | MsgEntry * | me | ) | [virtual] |
Implements psClientNetSubscriber.
bool psCreationManager::HasChildhoodData | ( | ) | [inline] |
Definition at line 311 of file psclientchar.h.
bool psCreationManager::HasLifeEventData | ( | ) | [inline] |
Definition at line 312 of file psclientchar.h.
bool psCreationManager::HasParentData | ( | ) | [inline] |
returns true if the parent data is cached.
Definition at line 310 of file psclientchar.h.
void psCreationManager::RemoveChoice | ( | uint32_t | choice, |
int | modifier = 1 |
||
) |
void psCreationManager::RemoveLifeEvent | ( | uint32_t | event | ) |
void psCreationManager::SetCurrentCP | ( | int | value | ) | [inline] |
Definition at line 335 of file psclientchar.h.
void psCreationManager::SetCustomization | ( | int | face, |
int | hairStyle, | ||
int | beardStyle, | ||
int | hairColour, | ||
int | skinColour | ||
) |
void psCreationManager::SetFatherMod | ( | int | mod | ) | [inline] |
Definition at line 379 of file psclientchar.h.
void psCreationManager::SetGender | ( | int | gender | ) | [inline] |
Definition at line 341 of file psclientchar.h.
void psCreationManager::SetMotherMod | ( | int | mod | ) | [inline] |
Definition at line 380 of file psclientchar.h.
void psCreationManager::SetName | ( | const char * | newName | ) |
void psCreationManager::SetPath | ( | const char * | name | ) | [inline] |
Definition at line 385 of file psclientchar.h.
void psCreationManager::SetRace | ( | int | selectedRace | ) |
Return the selected Race.
void psCreationManager::UploadChar | ( | bool | doVerify = false | ) |
Holds data for the childhood data screen.
Definition at line 327 of file psclientchar.h.
Definition at line 330 of file psclientchar.h.
A list of all the choices that are for the parent screen.
Definition at line 324 of file psclientchar.h.