Persist daemon consumable behavior state

This commit is contained in:
Meta Vens 2026-07-13 16:19:35 +01:00
commit 5363714cde
17 changed files with 445 additions and 30 deletions

View file

@ -2802,10 +2802,20 @@ static AetheriaRuntimeEntitySnapshotCommit ToRuntimeEntity(
ActiveConsumables = (entity.ActiveConsumables ?? Array.Empty<AetheriaActiveConsumableSnapshot>())
.Select(consumable => new AetheriaRuntimeActiveConsumableCommit
{
EffectId = consumable.EffectId ?? "",
ItemKey = consumable.ItemKey ?? "",
Quality = consumable.Quality,
RemainingDuration = consumable.RemainingDuration,
Duration = consumable.Duration
Duration = consumable.Duration,
BehaviorStates = (consumable.BehaviorStates ?? Array.Empty<AetheriaConsumableBehaviorStateSnapshot>())
.Select(state => new AetheriaRuntimeConsumableBehaviorStateCommit
{
BehaviorIndex = state.BehaviorIndex,
BehaviorKind = state.BehaviorKind ?? "",
ScalarState = state.ScalarState,
BehaviorId = state.BehaviorId ?? ""
})
.ToArray()
})
.ToArray(),
BehaviorProgress = (entity.BehaviorProgress ?? Array.Empty<AetheriaBehaviorProgressSnapshot>())