mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-20 21:49:23 +08:00
* 修改调度器任务和部分独立任务失去焦点时,强制切换回游戏窗口,如果用常规的方式无法激活窗口,则第10次会尝试最小化所有窗口后激活游戏。 * 去除未引入的类引用 * 修正战斗结束后,大概率打开队伍界面的问题 * 修复有些电脑上因未知原因,战斗0秒打断 * 把失焦激活放入了设置-通用设置-其他设置中,默认关闭。暂停恢复时,重置移动的起始时间,防止因暂停而导致超时放弃任务。 * 在调度器里面的任务之前,增加月卡处理,解决4点如果未进入任务会卡住的问题。增加了日志分析小怪详细。解决日志分析兜底结束日期不生效的问题。 * 在设置=》其他设置中 增加调度器任务传送过程中自动领取探索奖励功能配置。 * 调整自动派遣后恢复原任务的逻辑 * 自动领取派遣奖励时,跳过异常,防止整个配置组任务被打断。 * 把打开大地图方法从TpTask中抽出为公共方法,自动领取派遣代码调整到了调度器中。 * 去除了未使用的引用 * 暂停恢复逻辑增加恢复中条件和非空判断 * 增加了临时暂停自动拾取的逻辑(RunnerContext.AutoPickTriggerStopCount 为0时不限制,大于0时停止,多次暂停会累加该值,每次恢复-1),支持嵌套情况的暂停,在自动派遣(和结束后5秒)或暂停调度器任务时,同时暂停自动拾取功能。 * 调整暂停拾取方法 * 调整个日志输出 * 路径追踪复苏时,暂停拾取 * 增加根据点位配置,支持能在点位未识别情况下,使用大地图中心点的方式来定位,从而支持像铜锁小岛处这种小地图无法识别的点位。调整了对未识别点位的默认逻辑,未配置点位配置情况下,未识别点位,会取上一个识别的点位,从而支持在某些地方断续小地图能识别情况下的脚本。
65 lines
2.0 KiB
C#
65 lines
2.0 KiB
C#
using BetterGenshinImpact.GameTask.Common.Map;
|
|
using System;
|
|
using BetterGenshinImpact.GameTask.AutoFight.Script;
|
|
using BetterGenshinImpact.GameTask.AutoPathing.Model.Enum;
|
|
using BetterGenshinImpact.GameTask.Common.Map.Maps;
|
|
|
|
namespace BetterGenshinImpact.GameTask.AutoPathing.Model;
|
|
|
|
[Serializable]
|
|
public class WaypointForTrack : Waypoint
|
|
{
|
|
// 原神坐标系
|
|
public double GameX { get; set; }
|
|
|
|
public double GameY { get; set; }
|
|
|
|
// 全地图图像坐标系
|
|
public double MatX { get; set; }
|
|
|
|
public double MatY { get; set; }
|
|
|
|
public string MapName { get; set; }
|
|
//异常识别
|
|
public Misidentification Misidentification { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// 存在 combat_script 的 action 的话,这个值会存在
|
|
/// </summary>
|
|
public CombatScript? CombatScript { get; set; }
|
|
|
|
/// <summary>
|
|
/// LogOutput 特有
|
|
/// </summary>
|
|
public string? LogInfo { get; set; }
|
|
|
|
public WaypointForTrack(Waypoint waypoint, string mapName)
|
|
{
|
|
Type = waypoint.Type;
|
|
MoveMode = waypoint.MoveMode;
|
|
Action = waypoint.Action;
|
|
ActionParams = waypoint.ActionParams;
|
|
GameX = waypoint.X;
|
|
GameY = waypoint.Y;
|
|
MapName = mapName;
|
|
// 坐标系转换
|
|
(MatX, MatY) = MapManager.GetMap(mapName).ConvertGenshinMapCoordinatesToImageCoordinates((float)waypoint.X, (float)waypoint.Y);
|
|
X = MatX;
|
|
Y = MatY;
|
|
if (waypoint.Action == ActionEnum.CombatScript.Code)
|
|
{
|
|
if (waypoint.ActionParams is { } str)
|
|
{
|
|
CombatScript = CombatScriptParser.ParseContext(str, false);
|
|
}
|
|
}
|
|
else if (waypoint.Action == ActionEnum.LogOutput.Code)
|
|
{
|
|
if (waypoint.ActionParams is not null)
|
|
{
|
|
LogInfo = waypoint.ActionParams;
|
|
}
|
|
}
|
|
// 非必要不需要在此处新增变量解析,建议把耗时低的解析放到 Handler 中
|
|
}
|
|
} |