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

Commit

Permalink
fix: action effect check.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 2, 2024
1 parent 69249b3 commit e6e4cf0
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Resources/HostileCastingArea.json
Original file line number Diff line number Diff line change
Expand Up @@ -512,5 +512,6 @@
26071,
26072,
26064,
33445
33445,
35218
]
4 changes: 2 additions & 2 deletions Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ClickingCount": 93113,
"SayingHelloCount": 134,
"ClickingCount": 93891,
"SayingHelloCount": 139,
"SaidUsers": []
}
8 changes: 6 additions & 2 deletions RotationSolver.Basic/Data/TimelineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public string Name
}
}

public bool IsInWindow => DataCenter.RaidTimeRaw >= Time - windowMin && DataCenter.RaidTimeRaw <= Time - windowMax;
public bool IsInWindow => DataCenter.RaidTimeRaw >= Time - windowMin && DataCenter.RaidTimeRaw <= Time + windowMax;

public bool IsShown => Name is not "--Reset--" and not "--sync--";

Expand All @@ -61,7 +61,11 @@ public string Name
{
get
{
foreach (var str in this[propertyName])
var properties = this[propertyName];

if (properties.Length == 0) return true;

foreach (var str in properties)
{
var prop = str;
if (new Regex(prop).IsMatch(matchString))
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal static void LoadActionSetting(ref IBaseAction action)
}
else
{
action.Setting.IsFriendly = a.EffectRange > 5;
action.Setting.IsFriendly = action.TargetInfo.EffectRange > 5;
}
//TODO: better target type check. (NoNeed?)
}
Expand Down
13 changes: 12 additions & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,5 +344,16 @@
"RotationSolver.Data.UiString.ForcedEnableConditionDesc": "The conditions of forced to make it true.",
"RotationSolver.Data.UiString.ForcedDisableConditionDesc": "The conditions of forced to make it false.",
"RotationSolver.Basic.Data.SpecialCommandType.NoCasting": "Open a window to do not use the casting action.",
"RotationSolver.Data.UiString.SpecialCommandType_NoCasting": "No Casting"
"RotationSolver.Data.UiString.SpecialCommandType_NoCasting": "No Casting",
"RaiseDelayName": "The random delay between for raising.",
"UseDefenseAbilityName": "Use defensive abilities",
"AutoTankStanceName": "Automatically activate tank stance",
"AutoProvokeForTankName": "Auto provoke non-tank attacking targets",
"AutoUseTrueNorthName": "Auto TrueNorth (Melee)",
"RaisePlayerBySwiftName": "Raise player by using swiftcast if avaliable",
"AutoSpeedOutOfCombatName": "Use movement speed increase abilities when out of combat.",
"UseGroundBeneficialAbilityName": "Use beneficial ground-targeted actions",
"UseDefenseAbilityDescription": "It is recommended to check this option if you are playing Raids or you can plan the heal and defense ability usage by yourself.",
"BeneficialAreaStrategyName": "Beneficial AoE strategy",
"UseGroundBeneficialAbilityWhenMovingName": "Use beneficial AoE actions when moving."
}
4 changes: 1 addition & 3 deletions RotationSolver/Updaters/RaidTimeUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
using RotationSolver.Basic.Configuration.Timeline;
using RotationSolver.UI;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Xml.Linq;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;

namespace RotationSolver.Updaters;
internal static partial class RaidTimeUpdater
Expand Down Expand Up @@ -267,6 +264,7 @@ private static void OnActorControl(IntPtr dataPtr)

private static void OnSystemLogMessage(IntPtr dataPtr)
{
Svc.Log.Debug($"Message: {ReadUint(dataPtr, 4):X}, {ReadUint(dataPtr, 8):X}, {ReadUint(dataPtr, 12):X}, {ReadUint(dataPtr, 16):X}");
foreach (var item in DataCenter.TimelineItems)
{
if (!item.IsInWindow) continue;
Expand Down

0 comments on commit e6e4cf0

Please sign in to comment.