mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(component): add ComponentData::SetPreferences
This commit is contained in:
parent
01d0268d5c
commit
def6b42a7b
@ -15,3 +15,18 @@ void ComponentData::GetPreferences(CharacterPreferences* preferences) {
|
||||
preferences->facialHairStyleID = this->facialHairStyleID;
|
||||
preferences->hairStyleID = this->hairStyleID;
|
||||
}
|
||||
|
||||
void ComponentData::SetPreferences(CharacterPreferences* preferences) {
|
||||
if (!preferences) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->raceID = preferences->raceID;
|
||||
this->sexID = preferences->sexID;
|
||||
this->classID = preferences->classID;
|
||||
this->hairColorID = preferences->hairColorID;
|
||||
this->skinColorID = preferences->skinColorID;
|
||||
this->faceID = preferences->faceID;
|
||||
this->facialHairStyleID = preferences->facialHairStyleID;
|
||||
this->hairStyleID = preferences->hairStyleID;
|
||||
}
|
||||
|
||||
@ -43,6 +43,7 @@ struct ComponentData {
|
||||
};
|
||||
|
||||
void GetPreferences(CharacterPreferences* preferences);
|
||||
void SetPreferences(CharacterPreferences* preferences);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user