mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +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
|
|
@ -144,8 +144,11 @@ public class ItemsApi(ApiHelpers helpers, ItemManager itemManager, StateManager
|
||||||
|
|
||||||
// Grab MetaIndices from attached flags, and update the states.
|
// Grab MetaIndices from attached flags, and update the states.
|
||||||
var indices = metaStates.ToIndices();
|
var indices = metaStates.ToIndices();
|
||||||
foreach (var index in indices)
|
foreach (var index in indices)
|
||||||
stateManager.ChangeMetaState(state, index, newValue, ApplySettings.Manual);
|
{
|
||||||
|
stateManager.ChangeMetaState(state, index, newValue, ApplySettings.Manual);
|
||||||
|
ApiHelpers.Lock(state, key, flags);
|
||||||
|
}
|
||||||
|
|
||||||
return GlamourerApiEc.Success;
|
return GlamourerApiEc.Success;
|
||||||
}
|
}
|
||||||
|
|
@ -172,8 +175,11 @@ public class ItemsApi(ApiHelpers helpers, ItemManager itemManager, StateManager
|
||||||
|
|
||||||
anyUnlocked = true;
|
anyUnlocked = true;
|
||||||
// update all MetaStates for this ActorState
|
// update all MetaStates for this ActorState
|
||||||
foreach (var index in indices)
|
foreach (var index in indices)
|
||||||
stateManager.ChangeMetaState(state, index, newValue, ApplySettings.Manual);
|
{
|
||||||
|
stateManager.ChangeMetaState(state, index, newValue, ApplySettings.Manual);
|
||||||
|
ApiHelpers.Lock(state, key, flags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!anyFound)
|
if (!anyFound)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue