lcy
3 天以前 63f4f6c6ebab4ce0b86cb05e949abe749cf564bf
136 子 【挑战】战锤秘境 / 【挑战】战锤秘境-客户端 修改红点规则

优先玩家战力大于BOSS战力,挑战显示红点
然后玩家战力小于BOSS战力,并且有次数,扫荡显示红点
4个文件已修改
59 ■■■■■ 已修改文件
Main/System/BoneField/AdsManager.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/BoneField/BoneFieldChallengeButton.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/BoneField/BoneFieldManager.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/BoneField/BoneFieldWin.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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,今日已领取广告奖励次数>
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);
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;
                }
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)