|
My Project
|
it contains all functions to access the character database. More...
#include <CharacterDB.h>
Public Member Functions | |
| void | CloseDB () |
| clean up. More... | |
| bool | CheckLoad () |
| check if database is valid or not. More... | |
| void | ResetDataBase () |
| TODO: recreate a blank database. More... | |
| bool | GetRaceIDbyName (const string &racename, int &id) |
| Get race ID from name return true if the record is found in database. More... | |
| bool | GetRaceShortNamebyRaceID (int id, string &racename) |
| Get race short name from race id return true if the record is found in database. More... | |
| bool | GetModelIDfromModelFile (const string &sModelFile, int &modelid, int &modeltype) |
| get the model ID from model asset file name return true if the record is found in database. More... | |
| bool | GetReplaceTexturesByModelIDAndSkinID (int modelid, int skinIndex, string &sReplaceTexture0, string &sReplaceTexture1, string &sReplaceTexture2, bool &bFound) |
| get the replaceable texture group for the specified index. More... | |
| bool | GetCharacterSkins (int race, int gender, int nSectionType, int nSection, int skinColor, string &sSkinTexture0, string &sSkinTexture1, string &sSkinTexture2) |
| get the character's skin textures with a specified section type and section number. More... | |
| bool | GetFacialHairGeosets (int race, int gender, int facialHair, int &geoset1, int &geoset2, int &geoset3) |
| get the facial hair's geosets ids. More... | |
| bool | GetHairGeosets (int race, int gender, int hairStyle, int &geoset) |
| get the hair style geoset. More... | |
| bool | GetModelIDfromItemID (int itemid, int &nItemType, int &nItemModelID) |
| get item's model type and model id by its item id. More... | |
| bool | GetModelDisplayInfo (int nItemModelID, int &GeosetA, int &GeosetB, int &GeosetC, int &GeosetD, int &GeosetE, int &flags, int &GeosetVisID1, int &GeosetVisID2, string &skin, string &skin2, string &TexArmUpper, string &TexArmLower, string &TexHands, string &TexChestUpper, string &TexChestLower, string &TexLegUpper, string &TexLegLower, string &TexFeet) |
| get item display information by its model item id. More... | |
| bool | GetModelInfoFromModelID (int nItemModelID, string &Model, string &Model2, string &Skin, string &Skin2, int &visualid, int &GeosetVisID1, int &GeosetVisID2) |
| get the model information from the model display database by the model id return true if the record is found in database. More... | |
| bool | GetItemSetsBySetID (int setid, void *itemsets, int nSize) |
| get the item set. More... | |
| bool | GetItemTypeByItemID (int itemid, int &itemtype) |
| get the item's type by its item id return true if the record is found in database. More... | |
| bool | GetCartoonFaceComponent (int nType, int nStyle, string *sTex1, string *sTex2, string *sIconPath) |
Static Public Member Functions | |
| static CCharacterDB & | GetInstance () |
| get the singleton class. More... | |
it contains all functions to access the character database.
This is a singleton class. call GetInstance() to use this class.
| bool ParaEngine::CCharacterDB::CheckLoad | ( | ) |
check if database is valid or not.
| void CCharacterDB::CloseDB | ( | ) |
clean up.
| bool CCharacterDB::GetCartoonFaceComponent | ( | int | nType, |
| int | nStyle, | ||
| string * | sTex1, | ||
| string * | sTex2, | ||
| string * | sIconPath | ||
| ) |
| nType | type of CartoonFaceSlots enum CartoonFaceSlots { CFS_FACE = 0, CFS_WRINKLE = 1, CFS_EYE = 2, CFS_EYEBROW = 3, CFS_MOUTH = 4, CFS_NOSE = 5, CFS_MARKS = 6, }; |
| nStyle | starting from 0 |
| sTex1 | out texture path |
| sTex2 | out texture path |
| sIconPath | out texture icon path |
| bool CCharacterDB::GetCharacterSkins | ( | int | race, |
| int | gender, | ||
| int | nSectionType, | ||
| int | nSection, | ||
| int | skinColor, | ||
| string & | sSkinTexture0, | ||
| string & | sSkinTexture1, | ||
| string & | sSkinTexture2 | ||
| ) |
get the character's skin textures with a specified section type and section number.
return true if the record is found in database.
| bool CCharacterDB::GetFacialHairGeosets | ( | int | race, |
| int | gender, | ||
| int | facialHair, | ||
| int & | geoset1, | ||
| int & | geoset2, | ||
| int & | geoset3 | ||
| ) |
get the facial hair's geosets ids.
return true if the record is found in database.
| bool CCharacterDB::GetHairGeosets | ( | int | race, |
| int | gender, | ||
| int | hairStyle, | ||
| int & | geoset | ||
| ) |
get the hair style geoset.
return true if the record is found in database.
|
static |
get the singleton class.
| bool CCharacterDB::GetItemSetsBySetID | ( | int | setid, |
| void * | itemsets, | ||
| int | nSize | ||
| ) |
get the item set.
return true if the record is found in database.
| bool CCharacterDB::GetItemTypeByItemID | ( | int | itemid, |
| int & | itemtype | ||
| ) |
get the item's type by its item id return true if the record is found in database.
| bool CCharacterDB::GetModelDisplayInfo | ( | int | nItemModelID, |
| int & | GeosetA, | ||
| int & | GeosetB, | ||
| int & | GeosetC, | ||
| int & | GeosetD, | ||
| int & | GeosetE, | ||
| int & | flags, | ||
| int & | GeosetVisID1, | ||
| int & | GeosetVisID2, | ||
| string & | skin, | ||
| string & | skin2, | ||
| string & | TexArmUpper, | ||
| string & | TexArmLower, | ||
| string & | TexHands, | ||
| string & | TexChestUpper, | ||
| string & | TexChestLower, | ||
| string & | TexLegUpper, | ||
| string & | TexLegLower, | ||
| string & | TexFeet | ||
| ) |
get item display information by its model item id.
The display information will describe how the item (equipment) is displayed on the body of a character. return true if the record is found in database.
| bool CCharacterDB::GetModelIDfromItemID | ( | int | itemid, |
| int & | nItemType, | ||
| int & | nItemModelID | ||
| ) |
get item's model type and model id by its item id.
return true if the record is found in database.
| bool CCharacterDB::GetModelIDfromModelFile | ( | const string & | sModelFile, |
| int & | modelid, | ||
| int & | modeltype | ||
| ) |
get the model ID from model asset file name return true if the record is found in database.
| bool CCharacterDB::GetModelInfoFromModelID | ( | int | nItemModelID, |
| string & | Model, | ||
| string & | Model2, | ||
| string & | Skin, | ||
| string & | Skin2, | ||
| int & | visualid, | ||
| int & | GeosetVisID1, | ||
| int & | GeosetVisID2 | ||
| ) |
get the model information from the model display database by the model id return true if the record is found in database.
| bool CCharacterDB::GetRaceIDbyName | ( | const string & | racename, |
| int & | id | ||
| ) |
Get race ID from name return true if the record is found in database.
| bool CCharacterDB::GetRaceShortNamebyRaceID | ( | int | id, |
| string & | racename | ||
| ) |
Get race short name from race id return true if the record is found in database.
| bool CCharacterDB::GetReplaceTexturesByModelIDAndSkinID | ( | int | modelid, |
| int | skinIndex, | ||
| string & | sReplaceTexture0, | ||
| string & | sReplaceTexture1, | ||
| string & | sReplaceTexture2, | ||
| bool & | bFound | ||
| ) |
get the replaceable texture group for the specified index.
return true if the model is found.but it does not mean that the skin ID is found.
| bFound | whether found |
| void ParaEngine::CCharacterDB::ResetDataBase | ( | ) |
TODO: recreate a blank database.
1.8.12