mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-19 05:57:42 +01:00
Fix issue with unavailable customizations applying.
This commit is contained in:
parent
4743914153
commit
3b55f72ce5
6 changed files with 50 additions and 15 deletions
|
|
@ -277,11 +277,19 @@ public sealed class CustomizationService : AsyncServiceWrapper<ICustomizationMan
|
|||
private static CustomizeFlag FixValues(CustomizationSet set, ref Customize customize)
|
||||
{
|
||||
CustomizeFlag flags = 0;
|
||||
foreach (var idx in Enum.GetValues<CustomizeIndex>().Where(set.IsAvailable))
|
||||
foreach (var idx in Enum.GetValues<CustomizeIndex>())
|
||||
{
|
||||
if (ValidateCustomizeValue(set, customize.Face, idx, customize[idx], out var fixedValue, false).Length > 0)
|
||||
if (set.IsAvailable(idx))
|
||||
{
|
||||
customize[idx] = fixedValue;
|
||||
if (ValidateCustomizeValue(set, customize.Face, idx, customize[idx], out var fixedValue, false).Length > 0)
|
||||
{
|
||||
customize[idx] = fixedValue;
|
||||
flags |= idx.ToFlag();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
customize[idx] = CustomizeValue.Zero;
|
||||
flags |= idx.ToFlag();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue