mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-13 20:43:31 +08:00
72 lines
3.2 KiB
C#
72 lines
3.2 KiB
C#
using BetterGenshinImpact.GameTask.Model;
|
|
|
|
namespace BetterGenshinImpact.GameTask.AutoFight;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class AutoFightParam : BaseTaskParam<AutoFightTask>
|
|
{
|
|
public class FightFinishDetectConfig
|
|
{
|
|
public string BattleEndProgressBarColor { get; set; } = "";
|
|
|
|
public string BattleEndProgressBarColorTolerance { get; set; } = "";
|
|
public bool FastCheckEnabled = false;
|
|
public string FastCheckParams = "";
|
|
public string CheckEndDelay = "";
|
|
public string BeforeDetectDelay = "";
|
|
public bool RotateFindEnemyEnabled = false;
|
|
}
|
|
|
|
public AutoFightParam(string path, AutoFightConfig autoFightConfig) : base(null, null)
|
|
{
|
|
CombatStrategyPath = path;
|
|
Timeout = autoFightConfig.Timeout;
|
|
FightFinishDetectEnabled = autoFightConfig.FightFinishDetectEnabled;
|
|
PickDropsAfterFightEnabled = autoFightConfig.PickDropsAfterFightEnabled;
|
|
PickDropsAfterFightSeconds = autoFightConfig.PickDropsAfterFightSeconds;
|
|
KazuhaPickupEnabled = autoFightConfig.KazuhaPickupEnabled;
|
|
ActionSchedulerByCd = autoFightConfig.ActionSchedulerByCd;
|
|
|
|
FinishDetectConfig.FastCheckEnabled = autoFightConfig.FinishDetectConfig.FastCheckEnabled;
|
|
FinishDetectConfig.FastCheckParams = autoFightConfig.FinishDetectConfig.FastCheckParams;
|
|
FinishDetectConfig.CheckEndDelay = autoFightConfig.FinishDetectConfig.CheckEndDelay;
|
|
FinishDetectConfig.BeforeDetectDelay = autoFightConfig.FinishDetectConfig.BeforeDetectDelay;
|
|
FinishDetectConfig.RotateFindEnemyEnabled = autoFightConfig.FinishDetectConfig.RotateFindEnemyEnabled;
|
|
|
|
|
|
KazuhaPartyName = autoFightConfig.KazuhaPartyName;
|
|
OnlyPickEliteDropsMode = autoFightConfig.OnlyPickEliteDropsMode;
|
|
BattleThresholdForLoot = autoFightConfig.BattleThresholdForLoot ?? BattleThresholdForLoot;
|
|
//下面参数固定,只取自动战斗里面的
|
|
FinishDetectConfig.BattleEndProgressBarColor = TaskContext.Instance().Config.AutoFightConfig.FinishDetectConfig.BattleEndProgressBarColor;
|
|
FinishDetectConfig.BattleEndProgressBarColorTolerance = TaskContext.Instance().Config.AutoFightConfig.FinishDetectConfig.BattleEndProgressBarColorTolerance;
|
|
|
|
GuardianAvatar = autoFightConfig.GuardianAvatar;
|
|
GuardianCombatSkip = autoFightConfig.GuardianCombatSkip;
|
|
SkipModel = autoFightConfig.SkipModel;
|
|
GuardianAvatarHold = autoFightConfig.GuardianAvatarHold;
|
|
}
|
|
|
|
public FightFinishDetectConfig FinishDetectConfig { get; set; } = new();
|
|
|
|
public string CombatStrategyPath { get; set; }
|
|
|
|
public bool FightFinishDetectEnabled { get; set; } = false;
|
|
public bool PickDropsAfterFightEnabled { get; set; } = false;
|
|
public int PickDropsAfterFightSeconds { get; set; } = 15;
|
|
public int BattleThresholdForLoot { get; set; } = -1;
|
|
public int Timeout { get; set; } = 120;
|
|
|
|
public bool KazuhaPickupEnabled = true;
|
|
public string ActionSchedulerByCd = "";
|
|
public string KazuhaPartyName;
|
|
public string OnlyPickEliteDropsMode = "";
|
|
public string GuardianAvatar { get; set; } = " ";
|
|
public bool GuardianCombatSkip { get; set; } = false;
|
|
public bool SkipModel = false;
|
|
public bool GuardianAvatarHold = false;
|
|
} |