Files
better-genshin-impact/BetterGenshinImpact/GameTask/AutoPathing/Model/Waypoint.cs
mfkvfhpdx 040cb5080b 通过点位配置,支持在未识别点位情况下,从大地图中心点来识别坐标。 (#1526)
* 修改调度器任务和部分独立任务失去焦点时,强制切换回游戏窗口,如果用常规的方式无法激活窗口,则第10次会尝试最小化所有窗口后激活游戏。

* 去除未引入的类引用

* 修正战斗结束后,大概率打开队伍界面的问题

* 修复有些电脑上因未知原因,战斗0秒打断

* 把失焦激活放入了设置-通用设置-其他设置中,默认关闭。暂停恢复时,重置移动的起始时间,防止因暂停而导致超时放弃任务。

* 在调度器里面的任务之前,增加月卡处理,解决4点如果未进入任务会卡住的问题。增加了日志分析小怪详细。解决日志分析兜底结束日期不生效的问题。

* 在设置=》其他设置中 增加调度器任务传送过程中自动领取探索奖励功能配置。

* 调整自动派遣后恢复原任务的逻辑

* 自动领取派遣奖励时,跳过异常,防止整个配置组任务被打断。

* 把打开大地图方法从TpTask中抽出为公共方法,自动领取派遣代码调整到了调度器中。

* 去除了未使用的引用

* 暂停恢复逻辑增加恢复中条件和非空判断

* 增加了临时暂停自动拾取的逻辑(RunnerContext.AutoPickTriggerStopCount 为0时不限制,大于0时停止,多次暂停会累加该值,每次恢复-1),支持嵌套情况的暂停,在自动派遣(和结束后5秒)或暂停调度器任务时,同时暂停自动拾取功能。

* 调整暂停拾取方法

* 调整个日志输出

* 路径追踪复苏时,暂停拾取

* 增加根据点位配置,支持能在点位未识别情况下,使用大地图中心点的方式来定位,从而支持像铜锁小岛处这种小地图无法识别的点位。调整了对未识别点位的默认逻辑,未配置点位配置情况下,未识别点位,会取上一个识别的点位,从而支持在某些地方断续小地图能识别情况下的脚本。
2025-05-11 01:25:08 +08:00

59 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text.Json.Serialization;
using BetterGenshinImpact.GameTask.AutoPathing.Model.Enum;
namespace BetterGenshinImpact.GameTask.AutoPathing.Model;
[Serializable]
public class Waypoint
{
//异常识别处理
public class Misidentification
{
//何时处理 pathTooFar 路径过远 Unrecognized 未识别
public List<string> Type { get; set; }= ["unrecognized"];
//处理方式 previousDetectedPoint 取上一个识别到的点位置 , mapRecognition 大地图识别 , ScheduledArrival 特定时间到达
public string HandlingMode { get; set; } = "previousDetectedPoint";
//自行预估的时间
public int ArrivalTime { get; set; } = 0;
}
public class ExtParams
{
public Misidentification Misidentification { get; set; } = new();
public string Description { get; set; } = "";
//normal 小怪,elite 精英,legendary 传奇
public string MonsterTag { get; set; }
}
public double X { get; set; }
public double Y { get; set; }
public ExtParams PointExtParams { get; set; }=new ExtParams();
/// <summary>
/// <see cref="WaypointType"/>
/// </summary>
public string Type { get; set; } = WaypointType.Path.Code;
/// <summary>
/// <see cref="MoveModeEnum"/>
/// </summary>
public string MoveMode { get; set; } = MoveModeEnum.Walk.Code;
/// <summary>
/// <see cref="ActionEnum"/>
/// </summary>
public string? Action { get; set; }
public string? ActionParams { get; set; }
}