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

Commit

Permalink
fix: update drawing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jun 3, 2023
1 parent a151047 commit e3d546a
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 28 deletions.
16 changes: 15 additions & 1 deletion Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"3612": 0.6,
"3613": 0.6,
"3614": 0.6,
"3615": 0.1,
"3615": 0.6,
"4262": 0.6,
"4401": 0.6,
"4402": 0.6,
Expand Down Expand Up @@ -163,9 +163,15 @@
"7480": 0.6,
"7481": 0.6,
"7482": 0.6,
"7483": 0.6,
"7484": 0.6,
"7485": 0.6,
"7486": 0.6,
"7487": 0.1,
"7488": 0.1,
"7489": 0.1,
"7490": 0.6,
"7491": 0.6,
"7495": 0.6,
"7499": 0.6,
"7503": 0.1,
Expand Down Expand Up @@ -274,11 +280,15 @@
"20542": 2.1,
"21054": 2.1,
"21206": 0.6,
"21282": 2.1,
"21910": 2.1,
"21925": 0.1,
"22185": 0.6,
"22189": 0.6,
"22382": 0.1,
"22411": 1.1,
"22605": 2.1,
"23915": 0.1,
"24222": 2.1,
"24283": 0.1,
"24284": 0.1,
Expand Down Expand Up @@ -317,6 +327,9 @@
"24393": 0.6,
"24405": 0.6,
"24628": 2.1,
"25063": 2.1,
"25064": 2.1,
"25065": 2.1,
"25751": 0.6,
"25752": 0.6,
"25753": 1.15,
Expand All @@ -332,6 +345,7 @@
"25771": 0.6,
"25772": 0.6,
"25773": 0.6,
"25780": 0.6,
"25784": 0.6,
"25785": 0.6,
"25788": 0.6,
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 @@ -94,7 +94,7 @@ internal RoleAction(ActionID actionID, JobRole[] roles, ActionOption option = Ac

public static IBaseAction Bloodbath { get; } = new RoleAction(ActionID.Bloodbath, new JobRole[] { JobRole.Melee }, ActionOption.Heal)
{
ActionCheck = SecondWind.ActionCheck,
ActionCheck = (t, m) => SecondWind.ActionCheck(t, m) && HasHostilesInRange,
};

public static IBaseAction Feint { get; } = new RoleAction(ActionID.Feint, new JobRole[] { JobRole.Melee }, ActionOption.Defense)
Expand Down
60 changes: 35 additions & 25 deletions RotationSolver/UI/PainterManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,41 @@ public PositionalDrawing()

public override void UpdateOnFrame(XIVPainter.XIVPainter painter)
{
var pos = Positional;
if (!Target.HasPositional() || Player.Available && Player.Object.HasStatus(true, CustomRotation.TrueNorth.StatusProvide))
if (Target == null || !Target.IsNPCEnemy())
{
pos = EnemyPositional.None;
_flankCir.Target = null;
_rearCir.Target = null;
_noneCir.Target = null;
}
switch (pos)
else
{
case EnemyPositional.Flank:
_flankCir.Target = Target;
_rearCir.Target = null;
_noneCir.Target = null;
break;

case EnemyPositional.Rear:
_flankCir.Target = null;
_rearCir.Target = Target;
_noneCir.Target = null;
break;

default:
_flankCir.Target = null;
_rearCir.Target = null;
_noneCir.Target = Target;
break;
var pos = Positional;
if (!Target.HasPositional() || Player.Available && Player.Object.HasStatus(true, CustomRotation.TrueNorth.StatusProvide))
{
pos = EnemyPositional.None;
}
switch (pos)
{
case EnemyPositional.Flank:
_flankCir.Target = Target;
_rearCir.Target = null;
_noneCir.Target = null;
break;

case EnemyPositional.Rear:
_flankCir.Target = null;
_rearCir.Target = Target;
_noneCir.Target = null;
break;

default:
_flankCir.Target = null;
_rearCir.Target = null;
_noneCir.Target = Target;
break;
}
}

base.UpdateOnFrame(painter);
}
}
Expand Down Expand Up @@ -94,11 +104,11 @@ public static void Init()

#if DEBUG
//_painter.AddDrawings(new Drawing3DCircularSectorO(Player.Object, 3, ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.4f, 0.15f)), 5));
var color = ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.4f, 0.15f));
//var color = ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.4f, 0.15f));

var p = new Drawing3DCircularSector(Player.Object.Position, 5, color, 5);
p.ClosestPtDis = 0.5f;
_painter.AddDrawings(p);
//var p = new Drawing3DCircularSector(Player.Object.Position, 5, color, 5);
//p.ClosestPtDis = 0.5f;
//_painter.AddDrawings(p);
#endif
}

Expand Down
1 change: 1 addition & 0 deletions RotationSolver/Updaters/ActionUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ internal static void UpdateNextAction()
}

NextAction = NextGCDAction = null;
PainterManager.ClearPositional();
}

static DateTime lastTime;
Expand Down
2 changes: 1 addition & 1 deletion XIVPainter

0 comments on commit e3d546a

Please sign in to comment.