diff --git a/src/component/ComponentData.cpp b/src/component/ComponentData.cpp index 654c561..097e69c 100644 --- a/src/component/ComponentData.cpp +++ b/src/component/ComponentData.cpp @@ -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; +} diff --git a/src/component/ComponentData.hpp b/src/component/ComponentData.hpp index 3a8e1ec..fb5751a 100644 --- a/src/component/ComponentData.hpp +++ b/src/component/ComponentData.hpp @@ -43,6 +43,7 @@ struct ComponentData { }; void GetPreferences(CharacterPreferences* preferences); + void SetPreferences(CharacterPreferences* preferences); }; #endif