mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(glue): add CCharacterCreation::IsRaceClassValid
This commit is contained in:
parent
2258267992
commit
bb254840ff
@ -171,6 +171,18 @@ bool CCharacterCreation::IsClassValid(int32_t classID) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CCharacterCreation::IsRaceClassValid(int32_t raceID, int32_t classID) {
|
||||||
|
for (int32_t i = 0; i < g_charBaseInfoDB.GetNumRecords(); i++) {
|
||||||
|
auto infoRec = g_charBaseInfoDB.GetRecordByIndex(i);
|
||||||
|
|
||||||
|
if (infoRec->m_raceID == raceID && infoRec->m_classID == classID) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void CCharacterCreation::ResetCharCustomizeInfo() {
|
void CCharacterCreation::ResetCharCustomizeInfo() {
|
||||||
if (!CCharacterCreation::s_charCustomizeFrame) {
|
if (!CCharacterCreation::s_charCustomizeFrame) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -29,6 +29,7 @@ class CCharacterCreation {
|
|||||||
static void GetRandomRaceAndSex(ComponentData* data);
|
static void GetRandomRaceAndSex(ComponentData* data);
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
static bool IsClassValid(int32_t classID);
|
static bool IsClassValid(int32_t classID);
|
||||||
|
static bool IsRaceClassValid(int32_t raceID, int32_t classID);
|
||||||
static void ResetCharCustomizeInfo();
|
static void ResetCharCustomizeInfo();
|
||||||
static void SetCharCustomizeModel(const char* filename);
|
static void SetCharCustomizeModel(const char* filename);
|
||||||
static void SetFacing(float orientation);
|
static void SetFacing(float orientation);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user