Planeshift
|
Server manager for character creation. More...
#include <creationmanager.h>
Public Member Functions | |
CharCreationManager (GEMSupervisor *gemsupervisor, CacheManager *cachemanager, EntityManager *entitymanager) | |
bool | Initialize () |
Caches the data from the database needed for character creation. More... | |
bool | Validate (psCharUploadMessage &mesg, csString &errorMsg) |
virtual | ~CharCreationManager () |
![]() | |
void | HandleMessage (MsgEntry *msg, Client *client) |
Transfers the message to the manager specific function. More... | |
void | Subscribe (FunctionPointer fpt, msgtype type, uint32_t flags=0x01) |
Subscribes this manager to a specific message type with a custom callback. More... | |
bool | Unsubscribe (msgtype type) |
Unsubscribes this manager from a specific message type. More... | |
bool | Unsubscribe (FunctionPointer handler, msgtype type) |
Unsubscribes a specific handler from a specific message type. More... | |
bool | UnsubscribeAll () |
Unsubscribes this manager from all message types. More... | |
virtual | ~MessageManager () |
Unsubscribes all messages then destroys this object. More... | |
![]() | |
csArray< csString > | DecodeCommandArea (Client *client, csString target) |
Decodes an area: expression. More... | |
gemObject * | FindObjectByString (const csString &str, gemActor *me) const |
Find the object we are referring to in str. More... | |
Client * | FindPlayerClient (const char *name) |
Finds Client* of character with given name. More... | |
virtual bool | Verify (MsgEntry *pMsg, unsigned int flags, Client *&client) |
Static Public Member Functions | |
static bool | FilterName (const char *name) |
static bool | IsLastNameAvailable (const char *lastname, AccountID requestingAcct=0) |
Check whether a given last name is available. More... | |
static bool | IsUnique (const char *playerName, bool dbUniqueness=false) |
Check to see a name is unique in the characters table. More... | |
Protected Member Functions | |
void | AssignScript (psCharacter *chardata) |
Assign a script to a character. More... | |
int | CalculateCPChoices (csArray< uint32_t > &choices, int fatherMod, int motherMod) |
int | CalculateCPLife (csArray< uint32_t > &events) |
int | ConvertAreaToInt (const char *area) |
Takes a string name of a choice and converts it to it's enum value. More... | |
void | HandleCharCreateCP (MsgEntry *me, Client *client) |
Handles the creation of a character from the char creation screen. More... | |
void | HandleCharDelete (MsgEntry *me, Client *client) |
Handles the deletion of a character from the char pick screen. More... | |
void | HandleChildhood (MsgEntry *me, Client *client) |
void | HandleLifeEvents (MsgEntry *me, Client *client) |
void | HandleName (MsgEntry *me, Client *client) |
Handles a check on a name. More... | |
void | HandleParents (MsgEntry *me, Client *client) |
Handle and incomming message from a client about parents. More... | |
void | HandleTraits (MsgEntry *me, Client *client) |
void | HandleUploadMessage (MsgEntry *me, Client *client) |
int | IsReserved (const char *playerName, AccountID acctID) |
Check to see if a name is on the reserve list for database migration. More... | |
bool | LoadCPValues () |
Cache in the data about the race CP starting values. More... | |
bool | LoadCreationChoices () |
Caches in creation choices from the database. More... | |
bool | LoadLifeEvents () |
bool | PlayerHasFinishedTutorial (AccountID acctID, uint32 tutorialsecid) |
Protected Attributes | |
int | raceCPValuesLength |
Additional Inherited Members | |
![]() | |
typedef void(CharCreationManager::* | FunctionPointer) (MsgEntry *, Client *) |
Server manager for character creation.
This guy loads all the data that may be needed to be sent to the client for the character creation. It loads data from these tables: race_info character_creation
Definition at line 47 of file creationmanager.h.
CharCreationManager::CharCreationManager | ( | GEMSupervisor * | gemsupervisor, |
CacheManager * | cachemanager, | ||
EntityManager * | entitymanager | ||
) |
|
virtual |
|
protected |
Assign a script to a character.
Takes whatever script is stored in the migration table and adds it to the character to be run on character login.
chardata | The character data class to append the script to. |
|
protected |
|
protected |
|
protected |
Takes a string name of a choice and converts it to it's enum value.
This is useful to have string names in the database ( ie human readable ) but then use them as ints in the application ( ie easier to use ).
area | The name of the area to convert. |
|
static |
Handles the creation of a character from the char creation screen.
Handles the deletion of a character from the char pick screen.
Handles a check on a name.
This will check the name against the migration and the current characters table. It will send back a message to the client to notify them of the name status. If rejected it will include a message why.
Handle and incomming message from a client about parents.
This handles a request from the client to send it all the data about choice areas in the parents screen.
bool CharCreationManager::Initialize | ( | ) |
Caches the data from the database needed for character creation.
|
static |
Check whether a given last name is available.
Last names are available if (a) unused, or (b) used by another character on the same account.
lastname | The lastname to check for availability. |
requestingAcct | The account requesting the last name (optional). |
|
protected |
Check to see if a name is on the reserve list for database migration.
playerName | The name to check to see if is on a the reserve list. |
acctID | The acct that is trying to create this character. |
|
static |
Check to see a name is unique in the characters table.
playerName | The name to check to see if it is unique. |
dbUniqueness | If false checks if it's still missing from the db, if true checks if there is only one entry in the db |
|
protected |
Cache in the data about the race CP starting values.
|
protected |
Caches in creation choices from the database.
|
protected |
|
protected |
bool CharCreationManager::Validate | ( | psCharUploadMessage & | mesg, |
csString & | errorMsg | ||
) |
|
protected |
Definition at line 87 of file creationmanager.h.