Fix some hrothgar gender change remainders.

This commit is contained in:
Ottermandias 2024-07-16 22:59:56 +02:00
parent 303001fed0
commit d3824d6a23

View file

@ -35,11 +35,10 @@ public sealed class CustomizeService(
} }
if (applyWhich.HasFlag(CustomizeFlag.Gender)) if (applyWhich.HasFlag(CustomizeFlag.Gender))
if (ret.Race is not Race.Hrothgar || newValues.Gender is not Gender.Female) {
{ changed |= ChangeGender(ref ret, newValues.Gender);
changed |= ChangeGender(ref ret, newValues.Gender); applied |= CustomizeFlag.Gender;
applied |= CustomizeFlag.Gender; }
}
if (applyWhich.HasFlag(CustomizeFlag.BodyType)) if (applyWhich.HasFlag(CustomizeFlag.BodyType))
{ {
@ -91,7 +90,7 @@ public sealed class CustomizeService(
/// <summary> Returns whether a gender is valid for the given race. </summary> /// <summary> Returns whether a gender is valid for the given race. </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
public bool IsGenderValid(Race race, Gender gender) public bool IsGenderValid(Race race, Gender gender)
=> race is Race.Hrothgar ? gender == Gender.Male : CustomizeManager.Genders.Contains(gender); => CustomizeManager.Genders.Contains(gender);
/// <inheritdoc cref="IsCustomizationValid(CustomizeSet,CustomizeValue,CustomizeIndex,CustomizeValue, out CustomizeData?)"/> /// <inheritdoc cref="IsCustomizationValid(CustomizeSet,CustomizeValue,CustomizeIndex,CustomizeValue, out CustomizeData?)"/>
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]