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

Commit

Permalink
fix: patch for drawing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jun 19, 2023
1 parent 1e11608 commit f316549
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 45 deletions.
28 changes: 28 additions & 0 deletions Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@
"190": 0.1,
"260": 0.6,
"266": 0.6,
"2240": 0.6,
"2242": 0.6,
"2245": 0.6,
"2248": 0.6,
"2255": 0.6,
"2258": 0.6,
"2259": 0.35,
"2263": 0.35,
"2264": 0.6,
"2267": 0.6,
"2269": 0.6,
"2271": 0.6,
"2874": 0.6,
"2876": 0.6,
"2878": 0.6,
Expand All @@ -90,6 +102,7 @@
"3546": 0.6,
"3549": 0.6,
"3550": 0.6,
"3551": 0.6,
"3552": 0.6,
"3554": 0.6,
"3555": 0.6,
Expand All @@ -99,6 +112,8 @@
"3559": 0.6,
"3560": 0.6,
"3562": 0.6,
"3563": 0.6,
"3566": 0.6,
"3568": 0.1,
"3569": 0.6,
"3570": 0.6,
Expand Down Expand Up @@ -152,6 +167,8 @@
"7398": 0.6,
"7399": 0.6,
"7400": 0.6,
"7402": 0.6,
"7403": 0.6,
"7404": 0.6,
"7406": 0.6,
"7407": 0.6,
Expand Down Expand Up @@ -275,6 +292,9 @@
"16485": 0.6,
"16486": 0.6,
"16487": 0.6,
"16489": 0.6,
"16492": 0.6,
"16493": 0.6,
"16495": 0.6,
"16496": 0.6,
"16498": 0.6,
Expand Down Expand Up @@ -304,6 +324,9 @@
"17841": 2.1,
"17842": 2.1,
"17843": 2.1,
"18873": 0.6,
"18877": 0.6,
"18881": 0.6,
"19002": 0.6,
"19004": 0.6,
"19010": 0.6,
Expand All @@ -315,7 +338,10 @@
"21054": 2.1,
"21206": 0.6,
"21282": 2.1,
"21291": 2.1,
"21292": 2.1,
"21910": 2.1,
"21912": 2.1,
"21925": 0.1,
"22185": 0.6,
"22189": 0.6,
Expand Down Expand Up @@ -392,6 +418,8 @@
"25771": 0.6,
"25772": 0.6,
"25773": 0.6,
"25774": 0.6,
"25778": 0.6,
"25780": 0.6,
"25784": 0.6,
"25785": 0.6,
Expand Down
14 changes: 14 additions & 0 deletions Resources/HostileCastingArea.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,26 @@
8367,
8581,
9523,
9660,
9665,
9670,
9676,
9688,
9760,
9767,
9774,
9790,
9808,
9841,
9869,
10086,
10097,
10284,
10415,
10426,
10532,
10535,
10541,
11234,
11238,
11246,
Expand Down
3 changes: 1 addition & 2 deletions RotationSolver.Basic/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public class PluginConfiguration : IPluginConfiguration

public float DrawingHeight = 3;
public float SampleLength = 0.2f;
public bool UseTaskToDrawing = false;

public bool KeyBoardNoise = true;
public int KeyBoardNoiseMin = 2;
Expand All @@ -94,7 +93,7 @@ public class PluginConfiguration : IPluginConfiguration
public float MinLastAbilityAdvanced = 0.1f;

public float HealWhenNothingTodoBelow = 0.8f;
public float TargetIconSize = 0.2f;
public float TargetIconSize = 0.6f;

public Dictionary<Job, float> HealingOfTimeSubtractSingles { get; set; } = new Dictionary<Job, float>();

Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
"ConfigWindow_Param_SubTargetColor": "Sub-target color",
"ConfigWindow_Param_DrawingHeight": "The height of drawing.",
"ConfigWindow_Param_SampleLength": "The sample length of the line.",
"ConfigWindow_Param_UseTaskToDrawing": "Use Task for accelerating drawing (Not recommended)",
"ConfigWindow_Param_KeyBoardNoise": "Simulate the effect of pressing",
"ConfigWindow_Param_KeyBoardNoiseTimes": "Effect times",
"ConfigWindow_Param_ToastPositional": "Hint positional anticipation by Toast",
Expand All @@ -103,6 +102,7 @@
"ConfigWindow_Param_DrawMeleeOffset": "Draw the offset of melee on the screen",
"ConfigWindow_Param_ShowMoveTarget": "Show the target of the move action",
"ConfigWindow_Param_ShowTarget": "Show Target",
"ConfigWindow_Param_TargetIconSize": "The size of drawing target action icon.",
"ConfigWindow_Param_SayOutStateChanged": "Saying the state changes out",
"ConfigWindow_Param_ShowInfoOnDtr": "Display plugin state on server info",
"ConfigWindow_Param_ShowInfoOnToast": "Display plugin state on toast",
Expand Down
1 change: 0 additions & 1 deletion RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ internal partial class Strings
public string ConfigWindow_Param_SubTargetColor { get; set; } = "Sub-target color";
public string ConfigWindow_Param_DrawingHeight { get; set; } = "The height of drawing.";
public string ConfigWindow_Param_SampleLength { get; set; } = "The sample length of the line.";
public string ConfigWindow_Param_UseTaskToDrawing { get; set; } = "Use Task for accelerating drawing (Not recommended)";
public string ConfigWindow_Param_KeyBoardNoise { get; set; } = "Simulate the effect of pressing";
public string ConfigWindow_Param_KeyBoardNoiseTimes { get; set; } = "Effect times";
public string ConfigWindow_Param_ToastPositional { get; set; } = "Hint positional anticipation by Toast";
Expand Down
65 changes: 31 additions & 34 deletions RotationSolver/UI/PainterManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public static void Init()

_painter.DrawingHeight = Service.Config.DrawingHeight;
_painter.SampleLength = Service.Config.SampleLength;
_painter.UseTaskForAccelerate = Service.Config.UseTaskToDrawing;
//_painter.UseTaskForAccelerate = Service.Config.UseTaskToDrawing;

var annulus = new Drawing3DAnnulusO(Player.Object, 3, 3 + Service.Config.MeleeRangeOffset, 0, 2);
annulus.InsideColor = ImGui.ColorConvertFloat4ToU32(new Vector4(0.8f, 0.3f, 0.2f, 0.15f));
Expand Down Expand Up @@ -234,41 +234,38 @@ public static void Init()
_painter.AddDrawings(_positional, annulus, movingTarget, new TargetDrawing(), new TargetText());

#if DEBUG
var deadTime = DateTime.Now.AddSeconds(5);
var r = new Random();
var col = ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.8f, 0.75f, 0.15f));
var colIn = ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.8f, 0.75f, 0.8f));
_painter.AddDrawings(
new Drawing3DAnnulus(Player.Object.Position + new Vector3((float)r.NextDouble() * 3, 0, (float)r.NextDouble() * 3), 5, 10, col, 2)
{
DeadTime = deadTime,
InsideColor = colIn,
PolylineType = XIVPainter.Enum.PolylineType.ShouldGoOut,
},

new Drawing3DCircularSector(Player.Object.Position + new Vector3((float)r.NextDouble() * 3, 0, (float)r.NextDouble() * 3), 5, col, 2)
{
DeadTime = deadTime,
InsideColor = colIn,
PolylineType = XIVPainter.Enum.PolylineType.ShouldGoOut,
}
try
{
var deadTime = DateTime.Now.AddSeconds(10);
var r = new Random();
var col = ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.2f, 0.15f));
var colIn = ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.2f, 0.5f));
_painter.AddDrawings(
new Drawing3DAnnulus(Player.Object.Position + new Vector3((float)r.NextDouble() * 3, 0, (float)r.NextDouble() * 3), 5, 10, col, 2)
{
DeadTime = deadTime,
InsideColor = colIn,
PolylineType = XIVPainter.Enum.PolylineType.ShouldGoOut,
},

new Drawing3DCircularSector(Player.Object.Position + new Vector3((float)r.NextDouble() * 3, 0, (float)r.NextDouble() * 3), 5, col, 2)
{
DeadTime = deadTime,
InsideColor = colIn,
PolylineType = XIVPainter.Enum.PolylineType.ShouldGoOut,
}
);
//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);
}
catch
{

//new Drawing3DCircularSectorO(Player.Object, 3, ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.4f, 0.5f)), -5, arcStartSpan: new Vector2(0, MathF.PI / 2))
//{
// IsFill = false,
//},

//new Drawing3DCircularSector(Player.Object.Position, 5,
//ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.8f, 0.75f, 0.15f)), 2)
//{
// DeadTime = DateTime.Now.AddSeconds(5),
//}
);
//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);
}
#endif
}

Expand Down
6 changes: 0 additions & 6 deletions RotationSolver/UI/RotationConfigWindow_Param.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,6 @@ private void DrawParamDisplay()
{
PainterManager._painter.SampleLength = Math.Max(0.05f, Service.Config.SampleLength);
});

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_UseTaskToDrawing,
ref Service.Config.UseTaskToDrawing, Service.Default.UseTaskToDrawing, otherThing: () =>
{
PainterManager._painter.UseTaskForAccelerate = Service.Config.UseTaskToDrawing;
});
}

ImGui.Separator();
Expand Down
2 changes: 1 addition & 1 deletion XIVPainter

0 comments on commit f316549

Please sign in to comment.