From 4f63459404bf3da5c9cf035c61f7f234a0716162 Mon Sep 17 00:00:00 2001 From: Asgard Date: Wed, 20 Nov 2024 17:15:28 -0700 Subject: [PATCH] Fix actions --- Brio/UI/Controls/Selectors/ActionTimelineSelector.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Brio/UI/Controls/Selectors/ActionTimelineSelector.cs b/Brio/UI/Controls/Selectors/ActionTimelineSelector.cs index ab3d64dd..a4aed5fb 100644 --- a/Brio/UI/Controls/Selectors/ActionTimelineSelector.cs +++ b/Brio/UI/Controls/Selectors/ActionTimelineSelector.cs @@ -43,9 +43,9 @@ protected override void PopulateList() } foreach(var emote in GameDataProvider.Instance.Emotes.Values) { - // Loop BrioActionTimeline timeline; + // Loop if(emote.ActionTimeline[0].RowId != 0 && GameDataProvider.Instance.ActionTimelines.TryGetValue(emote.ActionTimeline[0].RowId, out timeline)) { AddItem(new ActionTimelineSelectorEntry(emote.Name.ToString(), (ushort)timeline.RowId, emote.RowId, timeline.Key.ToString(), ActionTimelineSelectorEntry.OriginalType.Emote, ActionTimelineSelectorEntry.AnimationPurpose.Standard, (ActionTimelineSlots)timeline.Slot, emote.Icon)); @@ -78,8 +78,8 @@ protected override void PopulateList() foreach(var action in GameDataProvider.Instance.Actions.Values) { - if(action.AnimationEnd.ValueNullable != null && action.AnimationEnd.RowId != 0) - AddItem(new ActionTimelineSelectorEntry(action.Name.ToString(), (ushort)action.AnimationEnd.RowId, action.RowId, action.AnimationEnd.Value.Key.ToString(), ActionTimelineSelectorEntry.OriginalType.Action, ActionTimelineSelectorEntry.AnimationPurpose.Action, (ActionTimelineSlots)action.AnimationEnd.Value.Slot, action.Icon)); + if(action.AnimationEnd.RowId != 0 && GameDataProvider.Instance.ActionTimelines.TryGetValue(action.AnimationEnd.RowId, out BrioActionTimeline timeline)) + AddItem(new ActionTimelineSelectorEntry(action.Name.ToString(), (ushort)action.AnimationEnd.RowId, action.RowId, action.AnimationEnd.Value.Key.ToString(), ActionTimelineSelectorEntry.OriginalType.Action, ActionTimelineSelectorEntry.AnimationPurpose.Action, (ActionTimelineSlots)timeline.Slot, action.Icon)); } }