mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-15 07:43:20 +08:00
feat: 简化自动战斗日志输出 (#2732)
This commit is contained in:
@@ -320,7 +320,8 @@ namespace BetterGenshinImpact.GameTask.AutoFight
|
||||
if (retryCount == 0)
|
||||
{
|
||||
await Delay(delayTime,ct);
|
||||
Logger.LogInformation("打开编队界面检查战斗是否结束,延时{detectDelayTime}毫秒检查", detectDelayTime);
|
||||
// Logger.LogInformation("打开编队界面检查战斗是否结束,延时{detectDelayTime}毫秒检查", detectDelayTime);
|
||||
Logger.LogInformation("打开编队界面检查战斗是否结束");
|
||||
Simulation.SendInput.SimulateAction(GIActions.OpenPartySetupScreen);
|
||||
await Delay(detectDelayTime, ct);
|
||||
var ra3 = CaptureToRectArea();
|
||||
|
||||
@@ -444,7 +444,7 @@ public class AutoFightTask : ISoloTask
|
||||
if (_finishDetectConfig.DelayTimes.TryGetValue(command.Name, out var time))
|
||||
{
|
||||
delayTime = time;
|
||||
Logger.LogInformation($"{command.Name}结束后,延时检查为{delayTime}毫秒");
|
||||
// Logger.LogInformation($"{command.Name}结束后,延时检查为{delayTime}毫秒");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -766,7 +766,8 @@ public class AutoFightTask : ISoloTask
|
||||
|
||||
if (!_finishDetectConfig.RotateFindEnemyEnabled)await Delay(delayTime, _ct);
|
||||
|
||||
Logger.LogInformation("打开编队界面检查战斗是否结束,延时{detectDelayTime}毫秒检查", detectDelayTime);
|
||||
// Logger.LogInformation("打开编队界面检查战斗是否结束,延时{detectDelayTime}毫秒检查", detectDelayTime);
|
||||
Logger.LogInformation("打开编队界面检查战斗是否结束");
|
||||
// 最终方案确认战斗结束
|
||||
Simulation.SendInput.SimulateAction(GIActions.OpenPartySetupScreen);
|
||||
await Delay(detectDelayTime, _ct);
|
||||
@@ -789,8 +790,9 @@ public class AutoFightTask : ISoloTask
|
||||
return true;
|
||||
}
|
||||
|
||||
Logger.LogInformation($"未识别到战斗结束yellow{b3.Item0},{b3.Item1},{b3.Item2}");
|
||||
Logger.LogInformation($"未识别到战斗结束white{whiteTile.Item0},{whiteTile.Item1},{whiteTile.Item2}");
|
||||
// Logger.LogInformation($"未识别到战斗结束yellow{b3.Item0},{b3.Item1},{b3.Item2}");
|
||||
// Logger.LogInformation($"未识别到战斗结束white{whiteTile.Item0},{whiteTile.Item1},{whiteTile.Item2}");
|
||||
Logger.LogInformation($"未识别到战斗结束: yellow{b3.Item0},{b3.Item1},{b3.Item2};white{whiteTile.Item0},{whiteTile.Item1},{whiteTile.Item2}");
|
||||
|
||||
if (_finishDetectConfig.RotateFindEnemyEnabled)
|
||||
{
|
||||
|
||||
@@ -254,10 +254,10 @@ public class Avatar
|
||||
// 切换成功
|
||||
if (CombatScenes.GetActiveAvatarIndex(region, context) == Index)
|
||||
{
|
||||
if (needLog && i > 0)
|
||||
{
|
||||
Logger.LogInformation("成功切换角色:{Name}", Name);
|
||||
}
|
||||
// if (needLog && i > 0)
|
||||
// {
|
||||
// Logger.LogInformation("成功切换角色:{Name}", Name);
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -267,6 +267,8 @@ public class Avatar
|
||||
|
||||
Sleep(250, Ct);
|
||||
}
|
||||
|
||||
Logger.LogWarning("切换角色失败:{Name}", Name);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -472,8 +474,8 @@ public class Avatar
|
||||
var cd = AfterUseSkill(region);
|
||||
if (cd > 0)
|
||||
{
|
||||
Logger.LogInformation(hold ? "{Name} 长按元素战技,cd:{Cd} 秒" : "{Name} 点按元素战技,cd:{Cd} 秒", Name,
|
||||
Math.Round(cd, 2));
|
||||
// Logger.LogInformation(hold ? "{Name} 长按元素战技,cd:{Cd} 秒" : "{Name} 点按元素战技,cd:{Cd} 秒", Name,
|
||||
// Math.Round(cd, 2));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,9 @@ public class CombatScriptBag(List<CombatScript> combatScripts)
|
||||
}
|
||||
|
||||
if (matchCount != avatars.Count) continue;
|
||||
Logger.LogInformation("匹配到战斗脚本:{Name},共{Cnt}条指令,涉及角色:{Str}",
|
||||
combatScript.Name, combatScript.CombatCommands.Count, string.Join(",", combatScript.AvatarNames));
|
||||
// Logger.LogInformation("匹配到战斗脚本:{Name},共{Cnt}条指令,涉及角色:{Str}",
|
||||
// combatScript.Name, combatScript.CombatCommands.Count, string.Join(",", combatScript.AvatarNames));
|
||||
Logger.LogInformation("匹配到战斗脚本:{Name}", combatScript.Name);
|
||||
return combatScript.CombatCommands;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user