Merge pull request #111 from CordeliaMist/Fix-RevertNotFiringFinalize

Correct StateFinalized not invoking in certain areas
This commit is contained in:
Ottermandias 2025-07-28 18:00:26 +02:00 committed by GitHub
commit e7936500e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -272,7 +272,7 @@ public sealed class StateApi : IGlamourerApiState, IApiService, IDisposable
{ {
case ApplyFlag.Equipment: _stateManager.ResetEquip(state, source, key); break; case ApplyFlag.Equipment: _stateManager.ResetEquip(state, source, key); break;
case ApplyFlag.Customization: _stateManager.ResetCustomize(state, source, key); break; case ApplyFlag.Customization: _stateManager.ResetCustomize(state, source, key); break;
case ApplyFlag.Equipment | ApplyFlag.Customization: _stateManager.ResetState(state, source, key); break; case ApplyFlag.Equipment | ApplyFlag.Customization: _stateManager.ResetState(state, source, key, true); break;
} }
ApiHelpers.Lock(state, key, flags); ApiHelpers.Lock(state, key, flags);

View file

@ -407,7 +407,7 @@ public class CommandService : IDisposable, IApiService
foreach (var identifier in identifiers) foreach (var identifier in identifiers)
{ {
if (_stateManager.TryGetValue(identifier, out var state)) if (_stateManager.TryGetValue(identifier, out var state))
_stateManager.ResetState(state, StateSource.Manual); _stateManager.ResetState(state, StateSource.Manual, isFinal: true);
} }