Merge branch 'pr/884'

This commit is contained in:
辉鸭蛋 2024-12-29 00:52:01 +08:00
commit c3ef67f57a
7 changed files with 171 additions and 18 deletions

View File

@ -143,7 +143,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="GameTask\Common\Element\Assets\Json\" />
<Folder Include="GameTask\OneDragon\" />
<Folder Include="User\AutoPathing\" />
</ItemGroup>

View File

@ -178,7 +178,19 @@ public class AutoFightTask : ISoloTask
if (_taskParam is { FightFinishDetectEnabled: true, PickDropsAfterFightEnabled: true })
{
//
// 队伍中存在万叶的时候使用一次长E
var kazuha = combatScenes.Avatars.FirstOrDefault(a => a.Name == "枫原万叶");
if (kazuha != null)
{
Logger.LogInformation("使用枫原万叶长E拾取掉落物");
var time = DateTime.UtcNow - kazuha.LastSkillTime;
if (time.TotalMilliseconds > 0 && time.TotalSeconds <= kazuha.SkillHoldCd)
{
Logger.LogInformation("枫原万叶长E技能可能处于冷却中等待 {Time} s",time.TotalSeconds);
await Delay((int)Math.Ceiling(time.TotalMilliseconds), ct);
}
kazuha.UseSkill(true);
}
// 执行自动拾取掉落物的功能
await new ScanPickTask().Start(ct);

View File

@ -52,6 +52,11 @@ public class Avatar
/// 长按元素战技CD
/// </summary>
public double SkillHoldCd { get; set; }
/// <summary>
/// 最近一次使用元素战技的时间
/// </summary>
public DateTime LastSkillTime { get; set; }
/// <summary>
/// 元素爆发CD
@ -357,6 +362,7 @@ public class Avatar
{
Logger.LogInformation(hold ? "{Name} 长按元素战技cd:{Cd}" : "{Name} 点按元素战技cd:{Cd}", Name, cd);
// todo 把cd加入执行队列
LastSkillTime = DateTime.UtcNow;
return;
}
}

View File

@ -12,33 +12,33 @@
"id": 1,
"x": -867.6884765625,
"y": 2281.365966796875,
"type": "teleport",
"action": "",
"move_mode": "walk",
"action": ""
"type": "teleport"
},
{
"id": 2,
"x": -882.1455078125,
"y": 2262.399658203125,
"type": "path",
"action": "",
"move_mode": "walk",
"action": ""
"type": "path"
},
{
"id": 3,
"x": -893.3056640625,
"y": 2249.19482421875,
"type": "path",
"x": -911.3125,
"y": 2240.5625,
"action": "",
"move_mode": "walk",
"action": ""
"type": "path"
},
{
"id": 4,
"x": -914.3564453125,
"y": 2233.071044921875,
"type": "path",
"x": -913.5625,
"y": 2233.5625,
"action": "",
"move_mode": "walk",
"action": ""
"type": "path"
}
]
}

View File

@ -0,0 +1,60 @@
{
"info": {
"name": "稻妻凯瑟琳-合成台",
"type": "collect",
"author": "XS",
"version": "1.0",
"description": "",
"bgiVersion": "0.35.1"
},
"positions": [
{
"id": 1,
"x": -4402.443359375,
"y": -3053.1025390625,
"action": "",
"move_mode": "walk",
"type": "teleport"
},
{
"id": 2,
"x": -4402.888671875,
"y": -3060.0810546875,
"action": "",
"move_mode": "walk",
"type": "path"
},
{
"id": 3,
"x": -4414.158203125,
"y": -3076.2705078125,
"action": "",
"move_mode": "walk",
"type": "path"
},
{
"id": 4,
"x": -4420.93359375,
"y": -3084.6572265625,
"action": "",
"move_mode": "walk",
"type": "path"
},
{
"id": 5,
"x": -4431.484375,
"y": -3092.462890625,
"action": "",
"move_mode": "walk",
"type": "path"
},
{
"id": 6,
"x": -4432.345703125,
"y": -3093.796875,
"action": "",
"move_mode": "walk",
"type": "path"
}
]
}

View File

@ -0,0 +1,76 @@
{
"info": {
"name": "蒙德合成台-凯瑟琳",
"type": "collect",
"author": "XS",
"version": "1.0",
"description": "",
"bgiVersion": "0.35.1"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": -867.7041015625,
"y": 2281.378173828125
},
{
"id": 2,
"x": -874.3662109375,
"y": 2274.179931640625,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 3,
"x": -886.1494140625,
"y": 2263.282958984375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 4,
"x": -888.1865234375,
"y": 2265.906005859375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 5,
"x": -887.142578125,
"y": 2260.765625,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 6,
"x": -892.3271484375,
"y": 2249.783203125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 7,
"x": -909.357421875,
"y": 2240.581298828125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 8,
"x": -888.47,
"y": 2267.35,
"type": "path",
"move_mode": "walk",
"action": ""
}
]
}

View File

@ -567,8 +567,8 @@ public partial class HotKeyPageViewModel : ObservableObject, IViewModel
// SwitchPartyTask switchPartyTask = new SwitchPartyTask();
// Task.Run(async () => { await switchPartyTask.Start("三保一", new CancellationToken()); });
// GoToAdventurersGuildTask goToAdventurersGuildTask = new GoToAdventurersGuildTask();
// Task.Run(async () => { await goToAdventurersGuildTask.Start("枫丹", new CancellationToken()); });
GoToAdventurersGuildTask goToAdventurersGuildTask = new GoToAdventurersGuildTask();
Task.Run(async () => { await goToAdventurersGuildTask.Start("蒙德", new CancellationToken()); });
// ArtifactSalvageTask artifactSalvageTask = new ArtifactSalvageTask();
// Task.Run(async () => { await artifactSalvageTask.Start(4, new CancellationToken()); });
@ -590,7 +590,7 @@ public partial class HotKeyPageViewModel : ObservableObject, IViewModel
// // TaskContext.Instance().PostMessageSimulator.KeyUp(User32.VK.VK_MENU);
// Simulation.SendInput.Keyboard.KeyUp(false, User32.VK.VK_LMENU);
TaskControl.Logger.LogInformation("大地图界面缩放按钮位置:{Position}", Bv.GetBigMapScale( TaskControl.CaptureToRectArea()));
// TaskControl.Logger.LogInformation("大地图界面缩放按钮位置:{Position}", Bv.GetBigMapScale( TaskControl.CaptureToRectArea()));
}
));
debugDirectory.Children.Add(new HotKeySettingModel(
@ -601,7 +601,7 @@ public partial class HotKeyPageViewModel : ObservableObject, IViewModel
(_, _) =>
{
GoToCraftingBenchTask goToCraftingBenchTask = new GoToCraftingBenchTask();
Task.Run(async () => { await goToCraftingBenchTask.Start("璃月", new CancellationToken()); });
Task.Run(async () => { await goToCraftingBenchTask.Start("稻妻", new CancellationToken()); });
}
));