mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 10:17:23 +01:00
Introduced locks, if nessisary for change.
This commit is contained in:
parent
611200d311
commit
0f127a557d
1 changed files with 10 additions and 4 deletions
|
|
@ -145,7 +145,10 @@ public class ItemsApi(ApiHelpers helpers, ItemManager itemManager, StateManager
|
|||
// Grab MetaIndices from attached flags, and update the states.
|
||||
var indices = metaStates.ToIndices();
|
||||
foreach (var index in indices)
|
||||
{
|
||||
stateManager.ChangeMetaState(state, index, newValue, ApplySettings.Manual);
|
||||
ApiHelpers.Lock(state, key, flags);
|
||||
}
|
||||
|
||||
return GlamourerApiEc.Success;
|
||||
}
|
||||
|
|
@ -173,7 +176,10 @@ public class ItemsApi(ApiHelpers helpers, ItemManager itemManager, StateManager
|
|||
anyUnlocked = true;
|
||||
// update all MetaStates for this ActorState
|
||||
foreach (var index in indices)
|
||||
{
|
||||
stateManager.ChangeMetaState(state, index, newValue, ApplySettings.Manual);
|
||||
ApiHelpers.Lock(state, key, flags);
|
||||
}
|
||||
}
|
||||
|
||||
if (!anyFound)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue