Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: add animationLock property.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 19, 2023
1 parent 4b5c711 commit ae10fa2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion RotationSolver.Basic/Data/ActionEffectSet.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using FFXIVClientStructs.FFXIV.Client.Game;
using Lumina.Excel.GeneratedSheets;
using System.Collections;
using Action = Lumina.Excel.GeneratedSheets.Action;

Expand All @@ -11,12 +12,15 @@ public unsafe struct ActionEffectSet
public GameObject Target { get; }
public GameObject Source { get; }
public TargetEffect[] TargetEffects { get; }
public float AnimationLock { get; }
public int MyProperty { get; set; }
public ActionEffectSet(uint sourceId, ActionEffectHeader* effectHeader, ActionEffect* effectArray, ulong* effectTargets)
{
Type = effectHeader->actionType;
Action = Service.GetSheet<Action>().GetRow(effectHeader->actionId);
Target = Service.ObjectTable.SearchById(effectHeader->animationTargetId);
Source = Service.ObjectTable.SearchById(sourceId);
AnimationLock = effectHeader->animationLockTime;

TargetEffects = new TargetEffect[effectHeader->NumTargets];
for (int i = 0; i < effectHeader->NumTargets; i++)
Expand All @@ -27,7 +31,7 @@ public ActionEffectSet(uint sourceId, ActionEffectHeader* effectHeader, ActionEf

public override string ToString()
{
var str = $"S:{Source?.Name}, T:{Target?.Name}";
var str = $"S:{Source?.Name}, T:{Target?.Name}, Lock:{AnimationLock}";
str += $"\nType: {Type}, Name: {Action?.Name}({Action?.RowId})";
if (TargetEffects != null)
{
Expand Down

0 comments on commit ae10fa2

Please sign in to comment.