From 7cb702be952a7593ddbd82509fe953daa9cb81b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E6=B0=B4?= <53346444+ArchiDog1998@users.noreply.github.com> Date: Wed, 27 Mar 2024 21:03:47 +0800 Subject: [PATCH] fix: fixed some upload and downloading bug. and control window ui. --- Resources/RotationSolverRecord.json | 2 +- Resources/Timelines/1150.json | 226 +++++ Resources/Timelines/1152.json | 878 ++++++++++++++++++ RotationSolver.Basic/Configuration/Configs.cs | 15 +- .../Timeline/MoveTimelineItem.cs | 4 + .../Data/TargetHostileType.cs | 6 + RotationSolver.Basic/Helpers/ObjectHelper.cs | 2 + RotationSolver/UI/ControlWindow.cs | 29 +- RotationSolver/Updaters/RaidTimeUpdater.cs | 8 +- RotationSolver/Updaters/SocialUpdater.cs | 1 - 10 files changed, 1155 insertions(+), 16 deletions(-) create mode 100644 Resources/Timelines/1150.json create mode 100644 Resources/Timelines/1152.json diff --git a/Resources/RotationSolverRecord.json b/Resources/RotationSolverRecord.json index 665e9b0c1..0a11a7d71 100644 --- a/Resources/RotationSolverRecord.json +++ b/Resources/RotationSolverRecord.json @@ -1,5 +1,5 @@ { - "ClickingCount": 117650, + "ClickingCount": 117652, "SayingHelloCount": 186, "SaidUsers": [] } \ No newline at end of file diff --git a/Resources/Timelines/1150.json b/Resources/Timelines/1150.json new file mode 100644 index 000000000..34762f3e3 --- /dev/null +++ b/Resources/Timelines/1150.json @@ -0,0 +1,226 @@ +{ + "14.1": [ + { + "Duration": 5.0, + "DrawingGetters": [ + { + "Path": "vfx/omen/eff/general_1bf.avfx", + "IsActorEffect": false, + "Position": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Rotation": 0.0, + "Scale": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0 + }, + "ObjectGetter": { + "Type": 0, + "DataID": "", + "Tank": false, + "Healer": false, + "Melee": false, + "Range": false, + "Caster": false, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "TargetGetter": { + "Type": 0, + "DataID": "", + "Tank": false, + "Healer": false, + "Melee": false, + "Range": false, + "Caster": false, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "IsTargetByTarget": true, + "GetATarget": false, + "ObjectText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "TargetText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "Enable": true, + "Name": "Unnamed" + } + ], + "Condition": { + "Type": 0, + "Conditions": [] + }, + "Time": 5.0 + } + ], + "23.2": [], + "34.7": [], + "40.8": [], + "48.5": [], + "48.7": [], + "58.7": [], + "68.5": [], + "70.9": [], + "78.6": [], + "89.6": [], + "96": [], + "97.3": [], + "102.9": [], + "103": [], + "108.4": [], + "118.4": [], + "122.8": [], + "131.9": [], + "144.2": [], + "145.8": [], + "148.8": [], + "159.8": [], + "168.9": [], + "185": [], + "194.1": [], + "195.4": [], + "206.1": [], + "210.7": [], + "215.1": [], + "219.7": [], + "223.9": [], + "226.9": [], + "233.8": [], + "237.6": [], + "249.3": [], + "258.4": [], + "278.6": [], + "281": [], + "288.7": [], + "298.9": [], + "299.6": [], + "308": [], + "308.9": [], + "316.2": [], + "317.5": [], + "323.1": [], + "323.2": [], + "329.9": [], + "330.6": [], + "333.9": [], + "334.3": [], + "338.6": [], + "344.7": [], + "356.8": [], + "357.4": [], + "357.7": [], + "375.3": [], + "384.6": [], + "405": [], + "411.1": [], + "418.9": [], + "419.1": [], + "419.2": [], + "422.1": [], + "426.4": [], + "428.1": [], + "437.8": [], + "438.8": [], + "440.8": [], + "442.6": [], + "444.3": [], + "446": [], + "447.6": [], + "448.9": [], + "450.1": [], + "454": [], + "459.3": [], + "462.3": [], + "480.5": [], + "490.6": [], + "514": [], + "516.4": [], + "523.1": [], + "534.1": [], + "543.8": [], + "555.9": [], + "559.7": [], + "563": [], + "569.1": [], + "579.1": [], + "586.4": [], + "587.3": [], + "593.3": [], + "593.4": [], + "600.8": [], + "623.5": [], + "624.5": [], + "626.5": [], + "628.3": [], + "630": [], + "631.7": [], + "633.3": [], + "634.6": [], + "635.8": [], + "639.7": [] +} \ No newline at end of file diff --git a/Resources/Timelines/1152.json b/Resources/Timelines/1152.json new file mode 100644 index 000000000..d0e800e82 --- /dev/null +++ b/Resources/Timelines/1152.json @@ -0,0 +1,878 @@ +{ + "16": [], + "26.1": [], + "29.2": [], + "42.3": [ + { + "Duration": 8.0, + "DrawingGetters": [ + { + "Path": "vfx/omen/eff/general02f.avfx", + "IsActorEffect": false, + "Position": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Rotation": 0.0, + "Scale": { + "X": 2.0, + "Y": 1.0, + "Z": 20.0 + }, + "ObjectGetter": { + "Type": 1, + "DataID": "3EF2", + "Tank": false, + "Healer": false, + "Melee": false, + "Range": false, + "Caster": false, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "TargetGetter": { + "Type": 2, + "DataID": "", + "Tank": true, + "Healer": true, + "Melee": true, + "Range": true, + "Caster": true, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "IsTargetByTarget": false, + "GetATarget": true, + "ObjectText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "TargetText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "Enable": true, + "Name": "Straight line" + }, + { + "Path": "vfx/lockon/eff/lockon5_t0h.avfx", + "IsActorEffect": true, + "Position": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Rotation": 0.0, + "Scale": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0 + }, + "ObjectGetter": { + "Type": 2, + "DataID": "", + "Tank": true, + "Healer": true, + "Melee": true, + "Range": true, + "Caster": true, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "TargetGetter": { + "Type": 0, + "DataID": "", + "Tank": false, + "Healer": false, + "Melee": false, + "Range": false, + "Caster": false, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "IsTargetByTarget": true, + "GetATarget": false, + "ObjectText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "TargetText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "Enable": true, + "Name": "Single lock on" + }, + { + "Path": "vfx/channeling/eff/chn_dark001f.avfx", + "IsActorEffect": true, + "Position": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Rotation": 0.0, + "Scale": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0 + }, + "ObjectGetter": { + "Type": 1, + "DataID": "3EF2", + "Tank": true, + "Healer": true, + "Melee": true, + "Range": true, + "Caster": true, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "TargetGetter": { + "Type": 2, + "DataID": "", + "Tank": true, + "Healer": true, + "Melee": true, + "Range": true, + "Caster": true, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "IsTargetByTarget": false, + "GetATarget": true, + "ObjectText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "TargetText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "Enable": true, + "Name": "Channeling" + } + ], + "Condition": { + "Type": 0, + "Conditions": [] + }, + "Time": 5.0 + }, + { + "Duration": 3.0, + "DrawingGetters": [ + { + "Path": "vfx/omen/eff/general_1bf.avfx", + "Position": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Rotation": 0.0, + "Scale": { + "X": 6.0, + "Y": 1.0, + "Z": 6.0 + }, + "PlaceOnObject": true, + "ObjectGetter": { + "Type": 2, + "DataID": "", + "Tank": true, + "Healer": true, + "Melee": true, + "Range": true, + "Caster": true, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "Text": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "Enable": true, + "Name": "Circle" + } + ], + "Condition": { + "Type": 0, + "Conditions": [ + { + "Count": 1, + "Getter": { + "Type": 1, + "DataID": "3EF2", + "Tank": true, + "Healer": true, + "Melee": true, + "Range": true, + "Caster": true, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 20.0 + }, + "VfxPath": "vfx/common/eff/m0830_light_castloopc0k1.avfx", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + } + } + ] + }, + "Time": -3.0 + }, + { + "Duration": 3.0, + "DrawingGetters": [ + { + "Path": "vfx/omen/eff/gl_sircle_4008ah1.avfx", + "Position": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Rotation": 0.0, + "Scale": { + "X": 10.0, + "Y": 1.0, + "Z": 10.0 + }, + "PlaceOnObject": true, + "ObjectGetter": { + "Type": 2, + "DataID": "", + "Tank": true, + "Healer": true, + "Melee": true, + "Range": true, + "Caster": true, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "Text": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "Enable": true, + "Name": "Donut" + } + ], + "Condition": { + "Type": 0, + "Conditions": [ + { + "Count": 1, + "Getter": { + "Type": 1, + "DataID": "3EF2", + "Tank": true, + "Healer": true, + "Melee": true, + "Range": true, + "Caster": true, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 20.0 + }, + "VfxPath": "vfx/common/eff/m0830_dark_castloopc0k1.avfx", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + } + } + ] + }, + "Time": -3.0 + } + ], + "48.3": [ + { + "Duration": 5.0, + "DrawingGetters": [ + { + "Path": "vfx/lockon/eff/com_share0c.avfx", + "IsActorEffect": true, + "Position": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Rotation": 0.0, + "Scale": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0 + }, + "ObjectGetter": { + "Type": 2, + "DataID": "", + "Tank": false, + "Healer": true, + "Melee": false, + "Range": false, + "Caster": false, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "TargetGetter": { + "Type": 0, + "DataID": "", + "Tank": false, + "Healer": false, + "Melee": false, + "Range": false, + "Caster": false, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "IsTargetByTarget": true, + "GetATarget": false, + "ObjectText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "TargetText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "Enable": true, + "Name": "Healer 4 share" + } + ], + "Condition": { + "Type": 0, + "Conditions": [ + { + "Count": 1, + "Getter": { + "Type": 1, + "DataID": "3EF2", + "Tank": false, + "Healer": false, + "Melee": false, + "Range": false, + "Caster": false, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 20.0 + }, + "VfxPath": "vfx/common/eff/m0830_light_castloopc0k1.avfx", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + } + } + ] + }, + "Time": 5.0 + }, + { + "Duration": 5.0, + "DrawingGetters": [ + { + "Path": "vfx/lockon/eff/m0618trg_a0k1.avfx", + "IsActorEffect": true, + "Position": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Rotation": 0.0, + "Scale": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0 + }, + "ObjectGetter": { + "Type": 2, + "DataID": "", + "Tank": true, + "Healer": true, + "Melee": false, + "Range": false, + "Caster": false, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "TargetGetter": { + "Type": 0, + "DataID": "", + "Tank": false, + "Healer": false, + "Melee": false, + "Range": false, + "Caster": false, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 2.0 + }, + "VfxPath": "", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + }, + "IsTargetByTarget": true, + "GetATarget": false, + "ObjectText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "TargetText": { + "Text": "", + "PositionOffset": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0 + }, + "Padding": { + "X": 5.0, + "Y": 5.0 + }, + "Scale": 1.0, + "BackgroundColor": { + "X": 0.0, + "Y": 0.0, + "Z": 0.0, + "W": 0.5 + }, + "Color": { + "X": 1.0, + "Y": 1.0, + "Z": 1.0, + "W": 1.0 + }, + "Corner": 5.0 + }, + "Enable": true, + "Name": "Share 2" + } + ], + "Condition": { + "Type": 0, + "Conditions": [ + { + "Count": 1, + "Getter": { + "Type": 1, + "DataID": "3EF2", + "Tank": false, + "Healer": false, + "Melee": false, + "Range": false, + "Caster": false, + "Status": 0, + "StatusTime": 5.0, + "TimeDuration": { + "X": 0.0, + "Y": 20.0 + }, + "VfxPath": "vfx/common/eff/m0830_dark_castloopc0k1.avfx", + "ObjectEffect1": 0, + "ObjectEffect2": 0 + } + } + ] + }, + "Time": 5.0 + } + ], + "61.7": [], + "66.3": [], + "70.3": [], + "79.9": [], + "84.5": [], + "93.7": [], + "105.2": [], + "113.3": [], + "120.4": [], + "122.8": [], + "125.8": [], + "145.5": [], + "152.6": [], + "166.9": [], + "169.6": [], + "174.1": [], + "179.5": [], + "183.5": [], + "189.2": [], + "195.2": [], + "203.3": [], + "220.9": [], + "233.2": [], + "240.1": [], + "244.7": [], + "256.8": [], + "271.2": [], + "275.6": [], + "286.6": [], + "293.9": [], + "307": [], + "316.7": [], + "323.1": [], + "329.1": [], + "341.5": [], + "346.1": [], + "353.2": [], + "361.4": [], + "380.2": [], + "383.3": [], + "395.4": [], + "402.5": [], + "410.6": [], + "412.5": [], + "426.6": [], + "432.6": [], + "446": [], + "450.4": [], + "456.4": [], + "466.2": [], + "470.8": [], + "483.9": [], + "503.1": [], + "510.2": [], + "517.3": [], + "526.4": [], + "527": [], + "529.5": [], + "533.5": [], + "538.4": [], + "541.8": [], + "547.4": [], + "553": [], + "561.6": [], + "580.4": [], + "592.6": [], + "598.9": [], + "603.4": [], + "619.5": [], + "622.6": [], + "638.7": [], + "644.7": [], + "655.8": [], + "672.5": [] +} \ No newline at end of file diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs index 9d9dcc791..f8435b05d 100644 --- a/RotationSolver.Basic/Configuration/Configs.cs +++ b/RotationSolver.Basic/Configuration/Configs.cs @@ -418,6 +418,10 @@ public const string Filter = TimelineFilter)] private static readonly bool _showTimelineDrawing = true; + [ConditionBool, UI("Enable the auto movement in the timeline.", + Filter = TimelineFilter)] + private static readonly bool _enableTimelineMovement = true; + [UI("Use additional conditions", Filter = BasicParams)] public bool UseAdditionalConditions { get; set; } = false; @@ -721,7 +725,7 @@ public const string private readonly float _actionAhead = 0.08f; [JobConfig, UI("Engage settings", Filter = TargetConfig, PvPFilter = JobFilterType.NoJob)] - private readonly TargetHostileType _hostileType = TargetHostileType.TargetsHaveTarget; + private readonly TargetHostileType _hostileType = TargetHostileType.AllTargetsWhenSolo; [JobConfig] private readonly string _PvPRotationChoice = string.Empty; @@ -756,10 +760,13 @@ public void Save() { var refineTimeline = timeline.Select(i => (i.Key, i.Value.Where(j => j is DrawingTimeline).ToList())).ToDictionary(); + var count = refineTimeline.Sum(i => i.Value.Count); + + if (count == 0) continue; + if (dict.TryGetValue(id, out var lastTimeline)) { - if (lastTimeline.Sum(i => i.Value.Count) - >= refineTimeline.Sum(i => i.Value.Count)) + if (lastTimeline.Sum(i => i.Value.Count) >= count) { continue; } @@ -770,7 +777,7 @@ public void Save() foreach ((var id, var timeline) in dict) { - File.WriteAllText(@$"E:\OneDrive - stu.zafu.edu.cn\PartTime\FFXIV\RotationSolver\Resources\Timelines\{id}.json", JsonConvert.SerializeObject(timeline)); + File.WriteAllText(@$"E:\OneDrive - stu.zafu.edu.cn\PartTime\FFXIV\RotationSolver\Resources\Timelines\{id}.json", JsonConvert.SerializeObject(timeline, Formatting.Indented)); } #endif File.WriteAllText(Svc.PluginInterface.ConfigFile.FullName, diff --git a/RotationSolver.Basic/Configuration/Timeline/MoveTimelineItem.cs b/RotationSolver.Basic/Configuration/Timeline/MoveTimelineItem.cs index dd202b0de..2da3de1c8 100644 --- a/RotationSolver.Basic/Configuration/Timeline/MoveTimelineItem.cs +++ b/RotationSolver.Basic/Configuration/Timeline/MoveTimelineItem.cs @@ -23,6 +23,8 @@ internal override void OnEnable() { base.OnEnable(); + if (!Service.Config.EnableTimelineMovement) return; + var ipc = Svc.PluginInterface.GetIpcSubscriber, bool, object>("vnavmesh.Path.MoveTo"); if (ipc == null) @@ -37,6 +39,8 @@ internal override void OnDisable() { base.OnDisable(); + if (!Service.Config.EnableTimelineMovement) return; + var ipc = Svc.PluginInterface.GetIpcSubscriber("vnavmesh.Path.Stop"); ipc?.InvokeAction(); } diff --git a/RotationSolver.Basic/Data/TargetHostileType.cs b/RotationSolver.Basic/Data/TargetHostileType.cs index 1b86a9593..caf75720b 100644 --- a/RotationSolver.Basic/Data/TargetHostileType.cs +++ b/RotationSolver.Basic/Data/TargetHostileType.cs @@ -16,4 +16,10 @@ public enum TargetHostileType : byte /// [Description("Previously engaged targets (engages on countdown timer)")] TargetsHaveTarget, + + /// + /// ALl Targets When solo. + /// + [Description("All targets when solo, or previously engaged.")] + AllTargetsWhenSolo, } diff --git a/RotationSolver.Basic/Helpers/ObjectHelper.cs b/RotationSolver.Basic/Helpers/ObjectHelper.cs index b30468bd6..2f0f27278 100644 --- a/RotationSolver.Basic/Helpers/ObjectHelper.cs +++ b/RotationSolver.Basic/Helpers/ObjectHelper.cs @@ -129,6 +129,8 @@ internal static bool IsAttackable(this BattleChara battleChara) { TargetHostileType.AllTargetsCanAttack => true, TargetHostileType.TargetsHaveTarget => battleChara.TargetObject is BattleChara, + TargetHostileType.AllTargetsWhenSolo => DataCenter.PartyMembers.Length < 2 + || battleChara.TargetObject is BattleChara, _ => true, }; } diff --git a/RotationSolver/UI/ControlWindow.cs b/RotationSolver/UI/ControlWindow.cs index f15a0e24f..08eb7a0a0 100644 --- a/RotationSolver/UI/ControlWindow.cs +++ b/RotationSolver/UI/ControlWindow.cs @@ -144,6 +144,10 @@ private static void DrawSpecials() ImGui.SameLine(); + DrawCommandAction(61397, SpecialCommandType.NoCasting, ImGuiColors.DalamudWhite2); + + ImGui.SameLine(); + DrawCommandAction(61804, SpecialCommandType.Burst, ImGuiColors.DalamudWhite2); ImGui.SameLine(); @@ -204,7 +208,7 @@ static void DrawCommandAction(IAction? gcd, IAction? ability, SpecialCommandType { var gcdW = Service.Config.ControlWindowGCDSize; var abilityW = Service.Config.ControlWindow0GCDSize; - var width = gcdW + abilityW + ImGui.GetStyle().ItemSpacing.X + ImGui.GetStyle().ItemInnerSpacing.X * 4; + var width = gcdW + abilityW + ImGui.GetStyle().ItemSpacing.X; var str = command.ToString(); var strWidth = ImGui.CalcTextSize(str).X; @@ -229,13 +233,24 @@ static void DrawCommandAction(IAction? gcd, IAction? ability, SpecialCommandType { var y = ImGui.GetCursorPosY(); - DrawIAction(texture.ImGuiHandle, baseId + nameof(gcd), gcdW, command, help); + var gcdHelp = help; + if (gcd != null) + { + gcdHelp += "\n" + gcd.ToString(); + } + DrawIAction(texture.ImGuiHandle, baseId + nameof(gcd), gcdW, command, gcdHelp); if (IconSet.GetTexture(ability, out texture)) { ImGui.SameLine(); ImGui.SetCursorPosY(y); - DrawIAction(texture.ImGuiHandle, baseId + nameof(ability), abilityW, command, help); + + var abilityHelp = help; + if (ability != null) + { + abilityHelp += "\n" + ability.ToString(); + } + DrawIAction(texture.ImGuiHandle, baseId + nameof(ability), abilityW, command, abilityHelp); } } } @@ -266,7 +281,7 @@ public static void HighLight(Vector2 pt, Vector2 size, float thickness = 2f) static void DrawCommandAction(IAction? ability, SpecialCommandType command, Vector4 color) { - if (ability.GetTexture(out var texture)) DrawCommandAction(texture, command, color); + if (ability.GetTexture(out var texture)) DrawCommandAction(texture, command, color, ability?.ToString() ?? ""); } static void DrawCommandAction(uint iconId, SpecialCommandType command, Vector4 color) @@ -274,7 +289,7 @@ static void DrawCommandAction(uint iconId, SpecialCommandType command, Vector4 c if (IconSet.GetTexture(iconId, out var texture)) DrawCommandAction(texture, command, color); } - static void DrawCommandAction(IDalamudTextureWrap texture, SpecialCommandType command, Vector4 color) + static void DrawCommandAction(IDalamudTextureWrap texture, SpecialCommandType command, Vector4 color, string helpAddition = "") { var abilityW = Service.Config.ControlWindow0GCDSize; var width = abilityW + ImGui.GetStyle().ItemInnerSpacing.X * 2; @@ -294,6 +309,10 @@ static void DrawCommandAction(IDalamudTextureWrap texture, SpecialCommandType co ImGui.TextColored(color, str); var help = command.Local(); + if (!string.IsNullOrEmpty(helpAddition)) + { + help += "\n" + helpAddition; + } string baseId = "ImgButton" + command.ToString(); ImGui.SetCursorPosX(ImGui.GetCursorPosX() + Math.Max(0, strWidth / 2 - width / 2)); diff --git a/RotationSolver/Updaters/RaidTimeUpdater.cs b/RotationSolver/Updaters/RaidTimeUpdater.cs index aafb25cc1..c12472167 100644 --- a/RotationSolver/Updaters/RaidTimeUpdater.cs +++ b/RotationSolver/Updaters/RaidTimeUpdater.cs @@ -105,14 +105,12 @@ private static void DownloadTerritoryPrivate(uint id) Service.Config.Timeline[id] = JsonConvert.DeserializeObject>>(str, new BaseTimelineItemConverter(), new BaseDrawingGetterConverter(), new ITimelineConditionConverter())!; } -#if DEBUG - catch(Exception ex) + catch (Exception ex) { +#if DEBUG Svc.Log.Error(ex, $"Failed to download the timeline {id}."); - } #endif - finally - { + return; } _downloadingList.Remove(id); } diff --git a/RotationSolver/Updaters/SocialUpdater.cs b/RotationSolver/Updaters/SocialUpdater.cs index da4f0e362..f30d0aa89 100644 --- a/RotationSolver/Updaters/SocialUpdater.cs +++ b/RotationSolver/Updaters/SocialUpdater.cs @@ -207,7 +207,6 @@ private static async void SayHelloToUsers() } } - internal abstract class ChatEntity(PlayerCharacter character) : IDisposable { public readonly PlayerCharacter player = character;