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

Commit

Permalink
fix: add default value for rotation condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Aug 25, 2023
1 parent 68df11e commit 9ccae01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal static class DataCenter

internal static bool InEffectTime => DateTime.Now >= EffectTime && DateTime.Now <= EffectEndTime;
internal static Dictionary<ulong, uint> HealHP { get; set; } = new Dictionary<ulong, uint>();
internal static Dictionary<ulong, uint> ApplyStatus { private get; set; } = new Dictionary<ulong, uint>();
internal static Dictionary<ulong, uint> ApplyStatus { get; set; } = new Dictionary<ulong, uint>();
internal static uint MPGain { get; set; }
internal static bool HasApplyStatus(uint id, StatusID[] ids)
{
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/ActionSequencer/RotationCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace RotationSolver.ActionSequencer;

internal class RotationCondition : ICondition
{
public ComboConditionType ComboConditionType;
public ComboConditionType ComboConditionType = ComboConditionType.Float;
PropertyInfo _prop;
public string PropertyName { get; set; } = string.Empty;
public string PropertyName { get; set; } = nameof(CustomRotation.CombatTime);

MethodInfo _method;
public string MethodName { get; set; } = string.Empty;
Expand Down
4 changes: 4 additions & 0 deletions RotationSolver/Watcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ private static void ActionFromSelf(ActionEffectSet set)

DataCenter.HealHP = set.GetSpecificTypeEffect(ActionEffectType.Heal);
DataCenter.ApplyStatus = set.GetSpecificTypeEffect(ActionEffectType.ApplyStatusEffectTarget);
foreach ( var effect in set.GetSpecificTypeEffect(ActionEffectType.ApplyStatusEffectSource))
{
DataCenter.ApplyStatus.Add(effect.Key, effect.Value);
}
DataCenter.MPGain = (uint)set.GetSpecificTypeEffect(ActionEffectType.MpGain).Where(i => i.Key == Player.Object.ObjectId).Sum(i => i.Value);
DataCenter.EffectTime = DateTime.Now;
DataCenter.EffectEndTime = DateTime.Now.AddSeconds(set.Header.AnimationLockTime + 1);
Expand Down

0 comments on commit 9ccae01

Please sign in to comment.