From 63f4f6c6ebab4ce0b86cb05e949abe749cf564bf Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期六, 11 十月 2025 18:19:41 +0800
Subject: [PATCH] 136 子 【挑战】战锤秘境 / 【挑战】战锤秘境-客户端 修改红点规则
---
Main/System/BoneField/BoneFieldManager.cs | 46 +++++++++++++++++++++++++++++++---------------
Main/System/BoneField/AdsManager.cs | 2 --
Main/System/BoneField/BoneFieldWin.cs | 9 +++++----
Main/System/BoneField/BoneFieldChallengeButton.cs | 2 +-
4 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/Main/System/BoneField/AdsManager.cs b/Main/System/BoneField/AdsManager.cs
index f5d7ac0..b3974b9 100644
--- a/Main/System/BoneField/AdsManager.cs
+++ b/Main/System/BoneField/AdsManager.cs
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Net.Http.Headers;
-using UnityEngine;
public class AdsManager : GameSystemManager<AdsManager>
{
//<骞垮憡ID,浠婃棩宸查鍙栧箍鍛婂鍔辨鏁�>
diff --git a/Main/System/BoneField/BoneFieldChallengeButton.cs b/Main/System/BoneField/BoneFieldChallengeButton.cs
index 96266eb..86be514 100644
--- a/Main/System/BoneField/BoneFieldChallengeButton.cs
+++ b/Main/System/BoneField/BoneFieldChallengeButton.cs
@@ -23,7 +23,7 @@
this.lvLimitMin = lvLimitMin;
isLvOk = PlayerDatas.Instance.baseData.LV >= lvLimitMin;
long myFightPower = PlayerDatas.Instance.baseData.FightPower;
- imgChallengeRed.SetActive(isLvOk && isHasNextLineID && myFightPower > bossFightPower);
+ imgChallengeRed.SetActive(isLvOk && isHasNextLineID && myFightPower >= bossFightPower);
txtChallengeLv.SetActive(!isLvOk);
txtChallengeLv.text = Language.Get("BoneField07", lvLimitMin);
txtChallengeYes.SetActive(isLvOk && isHasNextLineID);
diff --git a/Main/System/BoneField/BoneFieldManager.cs b/Main/System/BoneField/BoneFieldManager.cs
index 40ef7dc..7648ffd 100644
--- a/Main/System/BoneField/BoneFieldManager.cs
+++ b/Main/System/BoneField/BoneFieldManager.cs
@@ -13,6 +13,7 @@
DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitializeEvent;
DungeonManager.Instance.UpdateFBInfoChangeEvent += OnUpdateFBInfoChangeEvent;
AdsManager.Instance.OnAdsInfoListUpdateEvent += OnAdsInfoListUpdateEvent;
+ FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
TimeMgr.Instance.OnDayEvent += OnDayEvent;
}
@@ -21,16 +22,28 @@
DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitializeEvent;
DungeonManager.Instance.UpdateFBInfoChangeEvent -= OnUpdateFBInfoChangeEvent;
AdsManager.Instance.OnAdsInfoListUpdateEvent -= OnAdsInfoListUpdateEvent;
+ FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
TimeMgr.Instance.OnDayEvent -= OnDayEvent;
}
+
+ private void OnFuncStateChangeEvent(int obj)
+ {
+ if (obj != funcId)
+ return;
+ UpdateRedPoint();
+ }
+
private void OnDayEvent()
{
UpdateRedPoint();
}
+
private void OnUpdateFBInfoChangeEvent(int mapID, bool isADAddCntChange, bool isBuyAddCntChange, bool isItemAddCntChange)
{
int dataMapID = DataMapID;
if (mapID != dataMapID)
+ return;
+ if (isADAddCntChange)
return;
UpdateRedPoint();
}
@@ -50,28 +63,31 @@
public void UpdateRedPoint()
{
parentRedpoint.state = RedPointState.None;
- // 鏈夋壂鑽℃鏁�:鍏嶈垂+閲戝竵
- if (TryGetShowSweepCount(out int showSweepMaxCount, out int showrealRemainSweepCount))
+ if (!FuncOpen.Instance.IsFuncOpen(funcId))
+ return;
+ if (!DungeonManager.Instance.TryGetFBInfoByMapID(DataMapID, out var fbInfo))
+ return;
+ bool isHasNextLineID = IsHasNextLineID(fbInfo);
+ int nowPassLineID = GetNowPassLineID(fbInfo);
+ DungeonConfig.TryGetDungeonID(DataMapID, nowPassLineID, out int dungeonID);
+ if (!DungeonConfig.HasKey(dungeonID))
+ return;
+ DungeonConfig dungeonConfig = DungeonConfig.Get(dungeonID);
+ bool isLvOk = PlayerDatas.Instance.baseData.LV >= dungeonConfig.LVLimitMin;
+ long myFightPower = PlayerDatas.Instance.baseData.FightPower;
+ if (myFightPower >= dungeonConfig.FightPower)
{
- bool isSweepCountOk = showrealRemainSweepCount > 0;
- if (isSweepCountOk)
+ if (isLvOk && isHasNextLineID)
{
parentRedpoint.state = RedPointState.Simple;
}
}
- //鍙寫鎴� 鎴樺姏灏忎簬boss
- if (DungeonManager.Instance.TryGetFBInfoByMapID(DataMapID, out var fbInfo))
+ else
{
- bool isHasNextLineID = IsHasNextLineID(fbInfo);
- int nowPassLineID = GetNowPassLineID(fbInfo);
-
- DungeonConfig.TryGetDungeonID(DataMapID, nowPassLineID, out int dungeonID);
- if (DungeonConfig.HasKey(dungeonID))
+ if (TryGetShowSweepCount(out int showSweepMaxCount, out int showrealRemainSweepCount))
{
- DungeonConfig dungeonConfig = DungeonConfig.Get(dungeonID);
- bool isLvOk = PlayerDatas.Instance.baseData.LV >= dungeonConfig.LVLimitMin;
- long myFightPower = PlayerDatas.Instance.baseData.FightPower;
- if (isLvOk && isHasNextLineID && myFightPower > dungeonConfig.FightPower)
+ bool isSweepCountOk = showrealRemainSweepCount > 0;
+ if (isSweepCountOk)
{
parentRedpoint.state = RedPointState.Simple;
}
diff --git a/Main/System/BoneField/BoneFieldWin.cs b/Main/System/BoneField/BoneFieldWin.cs
index 919769f..8a05b7a 100644
--- a/Main/System/BoneField/BoneFieldWin.cs
+++ b/Main/System/BoneField/BoneFieldWin.cs
@@ -1,3 +1,4 @@
+using System;
using System.Collections.Generic;
using UnityEngine;
public class BoneFieldWin : UIBase
@@ -156,7 +157,7 @@
DisplayFBInfo(nPCConfig, dungeonConfig, nowPassLineID);
DisplayChallengeButton(dungeonConfig, fbInfo);
- DisplaySweepButton();
+ DisplaySweepButton(dungeonConfig);
DisplayAdsButton(aDAwardConfig);
DisplaySkillWordsList(lineupConfig);
DisplayItemCellList(challengeItemCells1, dungeonConfig.PassAwardList);
@@ -192,18 +193,18 @@
- public void DisplaySweepButton()
+ public void DisplaySweepButton(DungeonConfig dungeonConfig)
{
if (!BoneFieldManager.Instance.TryGetShowSweepCount(out showSweepMaxCount, out showrealRemainSweepCount))
return;
bool isSweepCountOk = showrealRemainSweepCount > 0;
imgSweepNo.SetActive(!isSweepCountOk);
btnSweep.interactable = isSweepCountOk;
- imgSweepRed.SetActive(isSweepCountOk);
+ long myFightPower = PlayerDatas.Instance.baseData.FightPower;
+ imgSweepRed.SetActive(isSweepCountOk && myFightPower < dungeonConfig.FightPower);
txtFirstFree.SetActive(showSweepMaxCount == showrealRemainSweepCount);
txtTodaySweepCount.SetActive(showSweepMaxCount > showrealRemainSweepCount);
txtTodaySweepCount.text = UIHelper.AppendColor(isSweepCountOk ? TextColType.Green : TextColType.Red, Language.Get("BoneField08", showrealRemainSweepCount, showSweepMaxCount));
-
}
public void DisplayAdsButton(ADAwardConfig aDAwardConfig)
--
Gitblit v1.8.0