From af0d59c2da7eb91de99d568ed17cbf2aa441f5b3 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 15 一月 2026 23:24:15 +0800
Subject: [PATCH] 429 【主界面】自动挂机-补充自动挑战自动任务
---
Main/System/Main/AutoFightWin.cs | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/Main/System/Main/AutoFightWin.cs b/Main/System/Main/AutoFightWin.cs
index cedfa01..f9472f8 100644
--- a/Main/System/Main/AutoFightWin.cs
+++ b/Main/System/Main/AutoFightWin.cs
@@ -82,9 +82,9 @@
autoChallengeBossToggle.AddListener((bool value) =>
{
- if (!IsOpenTryChallenge(out int needtaskCount))
+ if (!IsOpenTryChallenge())
{
- SysNotifyMgr.Instance.ShowTip("autofight2", needtaskCount);
+ SysNotifyMgr.Instance.ShowTip("autofight5", AutoFightModel.Instance.openAutoChallengeBossCond / 100, AutoFightModel.Instance.openAutoChallengeBossCond % 100);
autoChallengeBossToggle.SetIsOnWithoutNotify(false);
return;
}
@@ -93,9 +93,9 @@
autoFinishTaskToggle.AddListener((bool value) =>
{
- if (!IsOpenAutoFinishTask(out int needtaskCount))
+ if (!IsOpenAutoFinishTask())
{
- SysNotifyMgr.Instance.ShowTip("autofight2", needtaskCount);
+ SysNotifyMgr.Instance.ShowTip("autofight4", AutoFightModel.Instance.openAutoFinishCond);
autoFinishTaskToggle.SetIsOnWithoutNotify(false);
return;
}
@@ -135,16 +135,14 @@
speedScroll.OnRefreshCell -= OnRefreshSpeedCell;
tryChallengeScroll.OnRefreshCell -= OnRefreshTryChallengeCell;
}
- bool IsOpenTryChallenge(out int needtaskCount)
+ bool IsOpenTryChallenge()
{
- needtaskCount = TaskManager.Instance.GetNeedFinishTaskCount(AutoFightModel.Instance.openAutoChallengeBossMissionID);
- return needtaskCount <= 0;
+ return PlayerDatas.Instance.baseData.ExAttr1 / 100 > AutoFightModel.Instance.openAutoChallengeBossCond;
}
- bool IsOpenAutoFinishTask(out int needtaskCount)
+ bool IsOpenAutoFinishTask()
{
- needtaskCount = TaskManager.Instance.GetNeedFinishTaskCount(AutoFightModel.Instance.openAutoChallengeBossMissionID);
- return needtaskCount <= 0;
+ return BlessLVManager.Instance.m_TreeLV >= AutoFightModel.Instance.openAutoFinishCond;
}
void DislayTip(string key, Vector3 worldPos)
@@ -304,18 +302,13 @@
void OnRefreshTryChallengeCell(ScrollerDataType type, CellView cell)
{
- bool isOpen = IsOpenTryChallenge(out int needtaskCount);
+ bool isOpen = IsOpenTryChallenge();
bool isbuy = InvestModel.Instance.IsInvested(InvestModel.monthCardType);
var btn = cell.GetComponent<Button>();
btn.AddListener(() =>
{
if (cell.index != 1)
{
- if (!isOpen)
- {
- SysNotifyMgr.Instance.ShowTip("autofight2", needtaskCount);
- return;
- }
if (!isbuy)
{
SysNotifyMgr.Instance.ShowTip("autofight3");
--
Gitblit v1.8.0