20 #ifndef PS_CLIENT_CHAR_H    21 #define PS_CLIENT_CHAR_H    25 #include <csutil/ref.h>    26 #include <iutil/document.h>    27 #include <csutil/refarr.h>    28 #include <imesh/spritecal3d.h>    29 #include <csgeom/vector4.h>    44 struct iObjectRegistry;
    46 struct iMeshObjectFactory;
    60     void Load( iDocumentNode * node);
    94     virtual void HandleMessage( 
MsgEntry* me );
   106     void SetTarget(
GEMClientObject *newTarget, 
const char *action, 
bool notifyServer=
true);
   111     void LockTarget(
bool state);
   131     void HandleEffectStop(
MsgEntry* me);
   134     void HandleRejectCharMessage(
MsgEntry* me);
   140     void HandleTargetUpdate(
MsgEntry* me);
   167 #define REQUESTING_CP -1   174     void Load( iDocumentNode* node );
   190     void Load( iDocumentNode* node );
   277     int GetRaceCP( 
int race );
   286     const char* GetRaceDescription( 
int race );
   292     PathIterator GetPathIterator();
   303     void GetParentData();
   304     void GetChildhoodData();
   305     void GetLifeEventData();
   321     const char* GetModelName( 
int race, 
int gender );
   332     const char* GetDescription( 
int choiceID );
   338     void SetRace( 
int selectedRace );
   344     void UploadChar( 
bool doVerify = 
false );
   345     void SetName( 
const char* newName );
   350     void AddChoice( 
int choice, 
int modifier = 1 );
   351     void RemoveChoice( uint32_t choice, 
int modifier = 1 );
   354     void AddLifeEvent( 
int event );
   355     void RemoveLifeEvent( uint32_t event );
   359     int GetCost(
int idChoice);
   360     int GetLifeCost( 
int id );
   362     void SetCustomization( 
int face, 
int hairStyle, 
int beardStyle, 
int hairColour, 
int skinColour );
   370     void GetCustomization( 
int& face, 
int& hairStyle, 
int& beardStyle, 
int& hairColour, 
int& skinColour);
   372     void GenerateName(
int type,csString &namebuffer,
int max_low,
int max_high)
   373     { nameGenerator->GenerateName( type, namebuffer, max_low, max_high ); }
   375     const char* GetLifeEventDescription( 
int id );
   377     bool IsAvailable(
int id,
int gender);
   381     const char *
GetFatherModAsText( 
void ) { 
switch (fatherMod) { 
case 2: 
return "Famous "; 
case 3: 
return "Exceptional "; 
default: 
return "";} }
   382     const char *
GetMotherModAsText( 
void ) { 
switch (motherMod) { 
case 2: 
return "Famous "; 
case 3: 
return "Exceptional "; 
default: 
return "";} }
   387     iObjectRegistry* objectReg;
   393     void LoadRaceInformation();
   399     csPDelArray<RaceDefinition> raceDescriptions;    
   402     csPDelArray<PathDefinition> pathDefinitions;
   405     csPDelArray<Trait> traits;    
   407     csRef<MsgHandler> msgHandler;
   411     bool hasChildhoodData;
   412     bool hasLifeEventData;
   416     void HandleParentsData( 
MsgEntry* me );  
   417     void HandleChildhoodData( 
MsgEntry* me );
   418     void HandleLifeEventData( 
MsgEntry* me );
   419     void HandleTraitData( 
MsgEntry* me );
   426     csString selectedName;
   430     csArray<uint32_t> choicesMade;
   431     csArray<uint32_t> lifeEventsMade;     
   434     int selectedHairStyle;
   435     int selectedBeardStyle;
   436     int selectedHairColour;
   437     int selectedSkinColour;  
 Manages character details for the client. 
 
Defines the structure needed to send a life event across the network. 
 
void SetCurrentCP(int value)
 
void GenerateName(int type, csString &namebuffer, int max_low, int max_high)
 
A Creation Choice that the client can make. 
 
psCreationManager * GetCreation()
 
Defines a character trait. 
 
const char * GetName(int id)
 
PSCHARACTER_GENDER gender
 
The structure of 1 queue entry (pointer to a message) 
 
csArray< CreationChoice > childhoodData
Holds data for the childhood data screen. 
 
csPDelArray< Bonus > statBonuses
 
csArray< CreationChoice > parentData
A list of all the choices that are for the parent screen. 
 
static const char * locationString[]
 
PSTRAIT_LOCATION
Define the player controled base customization that their model can have. 
 
Client version of the Cel Manager Requests world loading. 
 
csString description
Description of race ( for character creation ) 
 
const char * GetFatherModAsText(void)
 
bool HasParentData()
returns true if the parent data is cached. 
 
bool lockedTarget
stores if target is locked 
 
csPDelArray< Trait >::Iterator TraitIterator
 
unsigned int targetEffect
keeps track of the target effect ID 
 
const char * GetMotherModAsText(void)
 
bool Ready()
Returns true when the character has been acked on the server. 
 
Used to define a path in character creation. 
 
iObjectRegistry * objectReg
 
unsigned int next_trait_uid
 
csArray< uint32_t > GetChoicesMade()
 
psCreationManager * charCreation
 
PSTRAIT_LOCATION location
 
void void Initialize(iObjectRegistry *object_reg)
 
An object that the client knows about. 
 
This class is the client's and server's main interface for either sending network messages out or get...
 
csPDelArray< PathDefinition >::Iterator PathIterator
 
csPDelArray< CustomChoice > materials
 
GEMClientObject * target
keeps track of what object you have targetted 
 
void Load(iDocumentNode *node)
 
csArray< LifeEventChoice > lifeEventData
 
Defines a character creation choice for change of appearance. 
 
const char * GetLocationString() const 
 
PSCHARACTER_GENDER gender
 
csHash< unsigned int, uint32_t > effectMapper
 
csArray< uint32_t > GetLifeChoices()
 
void SetPath(const char *name)
 
void SetFatherMod(int mod)
 
csRef< MsgHandler > msghandler
 
csVector3 shader
The shader colour set for this trait. 
 
csPDelArray< Bonus > skillBonuses
 
size_t GetNumberOfLifeChoices()
 
PSCHARACTER_GENDER gender
 
TraitIterator GetTraitIterator()
 
PSTRAIT_LOCATION ConvertTraitLocationString(const char *locationstring)
 
Handles all the details of the character creation on the client side. 
 
GEMClientObject * GetTarget()
Gets the target of the character. 
 
void SetMotherMod(int mod)
 
void SetGender(int gender)