hch
昨天 890d0dd7547c18dbffb3339c12007d87876af7ae
214 【付费内容】历练秘笈
7个文件已修改
12个文件已添加
407 ■■■■■ 已修改文件
Main/Config/ConfigManager.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/LLMJConfig.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/LLMJConfig.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Main.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/RightFuncInHome.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Recharge/DailySpecialsModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Recharge/ExpSecretCollectionCell.cs 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Recharge/ExpSecretCollectionCell.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Recharge/ExpSecretCollectionManager.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Recharge/ExpSecretCollectionManager.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Recharge/ExpSecretCollectionWin.cs 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Recharge/ExpSecretCollectionWin.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Redpoint/MainRedDot.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/EnumHelper.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/ConfigManager.cs
@@ -59,6 +59,7 @@
            typeof(InvestConfig),
            typeof(ItemCompoundConfig),
            typeof(ItemConfig),
            typeof(LLMJConfig),
            typeof(MainChapterConfig),
            typeof(MainLevelConfig),
            typeof(NPCConfig),
@@ -269,6 +270,8 @@
        ClearConfigDictionary<ItemCompoundConfig>();
        // 清空 ItemConfig 字典
        ClearConfigDictionary<ItemConfig>();
        // 清空 LLMJConfig 字典
        ClearConfigDictionary<LLMJConfig>();
        // 清空 MainChapterConfig 字典
        ClearConfigDictionary<MainChapterConfig>();
        // 清空 MainLevelConfig 字典
Main/Config/Configs/LLMJConfig.cs
New file
@@ -0,0 +1,53 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年11月9日
//--------------------------------------------------------
using System.Collections.Generic;
using System;
using UnityEngine;
using LitJson;
public partial class LLMJConfig : ConfigBase<int, LLMJConfig>
{
    static LLMJConfig()
    {
        // 访问过静态构造函数
        visit = true;
    }
    public int MJLV;
    public int CostWarhammer;
    public int ExpAddPer;
    public int ExpExUpper;
    public int DecomposeAddPer;
    public int DecomposeExUpper;
    public override int LoadKey(string _key)
    {
        int key = GetKey(_key);
        return key;
    }
    public override void LoadConfig(string input)
    {
        try {
        string[] tables = input.Split('\t');
        int.TryParse(tables[0],out MJLV);
            int.TryParse(tables[1],out CostWarhammer);
            int.TryParse(tables[2],out ExpAddPer);
            int.TryParse(tables[3],out ExpExUpper);
            int.TryParse(tables[4],out DecomposeAddPer);
            int.TryParse(tables[5],out DecomposeExUpper);
        }
        catch (Exception exception)
        {
            Debug.LogError(exception);
        }
    }
}
Main/Config/Configs/LLMJConfig.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dbdce8bad9eb8fc46bde37554698bb0f
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs
New file
@@ -0,0 +1,12 @@
using UnityEngine;
using System.Collections;
// B1 28 历练秘笈信息 #tagSCLLMJInfo
public class DTCB128_tagSCLLMJInfo : DtcBasic {
    public override void Done(GameNetPackBasic vNetPack) {
        base.Done(vNetPack);
        HB128_tagSCLLMJInfo vNetData = vNetPack as HB128_tagSCLLMJInfo;
        ExpSecretCollectionManager.Instance.OnExpSecretCollection(vNetData);
    }
}
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b287dd194d9fd404f85bcccdaac9833f
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
@@ -122,6 +122,7 @@
        Register(typeof(HB201_tagSCTianziKYInfo), typeof(DTCB201_tagSCTianziKYInfo));
        Register(typeof(HA340_tagSCSuccessInfoList), typeof(DTCA340_tagSCSuccessInfoList));
        Register(typeof(HA342_tagSCSuccessAwardRecordList), typeof(DTCA342_tagSCSuccessAwardRecordList));
        Register(typeof(HB128_tagSCLLMJInfo), typeof(DTCB128_tagSCLLMJInfo));
    }
    //主工程注册封包
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs
New file
@@ -0,0 +1,23 @@
using UnityEngine;
using System.Collections;
// B1 28 历练秘笈信息 #tagSCLLMJInfo
public class HB128_tagSCLLMJInfo : GameNetPackBasic {
    public byte MJLV;    // 秘笈等级,激活后从1开始
    public uint Zhanchui;    // 秘笈累计消耗战锤
    public uint ExpEx;    // 秘笈今日已额外获得经验
    public uint DecomposeEx;    // 秘笈今日已额外获得分解货币
    public HB128_tagSCLLMJInfo () {
        _cmd = (ushort)0xB128;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out MJLV, vBytes, NetDataType.BYTE);
        TransBytes (out Zhanchui, vBytes, NetDataType.DWORD);
        TransBytes (out ExpEx, vBytes, NetDataType.DWORD);
        TransBytes (out DecomposeEx, vBytes, NetDataType.DWORD);
    }
}
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 382098446555f5c4c95c809e78e01aa6
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/Main.cs
@@ -84,6 +84,7 @@
        managers.Add(DayMissionManager.Instance);
        managers.Add(BattlePassManager.Instance);
        managers.Add(TianziBillboradManager.Instance);
        managers.Add(ExpSecretCollectionManager.Instance);
        foreach (var manager in managers)
        {
            manager.Init();
Main/System/Main/RightFuncInHome.cs
@@ -15,6 +15,7 @@
    [SerializeField] Button monthCardBtn;
    [SerializeField] Button dayMissionBtn;
    [SerializeField] Button battlePassBtn;
    [SerializeField] Button llmjBtn; //历练秘笈
    static string listenWindowName = "";   //监听关闭时再显示
@@ -63,6 +64,13 @@
            ListenWindow("BattlePassBaseWin");
            UIManager.Instance.OpenWindow<BattlePassBaseWin>();
        });
        llmjBtn.AddListener(() =>
        {
            //用于监听界面,打开时缩进右边功能栏,关闭时显示
            ListenWindow("ExpSecretCollectionWin");
            UIManager.Instance.OpenWindow<ExpSecretCollectionWin>();
        });
    }
    void ShowBtns()
@@ -70,6 +78,7 @@
        storeBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store));
        dayMissionBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.DayMission));
        battlePassBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BattlePass));
        llmjBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.LLMJ));
    }
Main/System/Recharge/DailySpecialsModel.cs
@@ -4,7 +4,7 @@
using LitJson;
using System;
//每日特惠
public class DailySpecialsModel  : GameSystemManager<DailySpecialsModel>
{
    public uint PackBuyTime;    // 打包购买的时间戳,如果有该值,代表已经一次性打包购买了,可根据次时间戳算出当前是第几天
Main/System/Recharge/ExpSecretCollectionCell.cs
New file
@@ -0,0 +1,67 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ExpSecretCollectionCell : CellView
{
    [SerializeField] Text lvText;
    [SerializeField] Image targetBGImg;
    [SerializeField] Transform upProcessBG;
    [SerializeField] Transform upProcessImg;
    [SerializeField] Transform downProcessBG;
    [SerializeField] Transform downProcessImg;
    [SerializeField] Transform unlockRect1;
    [SerializeField] Transform unlockRect2;
    [SerializeField] Text unlockValueText;
    [SerializeField] Text addExpPerText;
    [SerializeField] Text addMoneyPerText;
    [SerializeField] Transform mask;
    [SerializeField] Transform canActiveRect;
    [SerializeField] Transform activeRect;
    [SerializeField] Button avtiveBtn;
    public void Display(int id)
    {
        var config = LLMJConfig.Get(id);
        var lv = config.MJLV;
        lvText.text = Language.Get("Arena22", lv);
        targetBGImg.SetOrgSprite(lv <= ExpSecretCollectionManager.Instance.m_MJLV ? "ExpSecret_img_43" : "ExpSecret_img_41", "LLMJ");
        var ids = LLMJConfig.GetKeys();
        ids.Sort();
        upProcessBG.SetActive(ids[0] != id);
        upProcessImg.SetActive(ExpSecretCollectionManager.Instance.m_MJLV >= lv);
        downProcessBG.SetActive(ids[ids.Count - 1] != id);
        downProcessImg.SetActive(ExpSecretCollectionManager.Instance.m_MJLV > lv);
        unlockRect1.SetActive(lv == 1);
        unlockRect2.SetActive(lv != 1);
        unlockValueText.text = config.CostWarhammer.ToString();
        addExpPerText.text = Language.Get("LLMJ6", config.ExpAddPer);
        addMoneyPerText.text = Language.Get("LLMJ7", config.DecomposeAddPer);
        mask.SetActive(ExpSecretCollectionManager.Instance.m_MJLV < lv);
        activeRect.SetActive(ExpSecretCollectionManager.Instance.m_MJLV == lv);
        canActiveRect.SetActive(ExpSecretCollectionManager.Instance.m_MJLV != 0 &&
            ExpSecretCollectionManager.Instance.m_MJLV + 1 == lv && ExpSecretCollectionManager.Instance.m_Zhanchui >= config.CostWarhammer);
        avtiveBtn.AddListener(() =>
        {
            if (ExpSecretCollectionManager.Instance.m_MJLV != 0 &&
            ExpSecretCollectionManager.Instance.m_MJLV + 1 == lv && ExpSecretCollectionManager.Instance.m_Zhanchui >= config.CostWarhammer)
            {
                var pack = new CA504_tagCMPlayerGetReward();
                pack.RewardType = 2;
                GameNetSystem.Instance.SendInfo(pack);
                SysNotifyMgr.Instance.ShowTip("Success");
            }
        });
    }
}
Main/System/Recharge/ExpSecretCollectionCell.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 01c0ae104c52aa9498987271cc2d2e7b
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/Recharge/ExpSecretCollectionManager.cs
New file
@@ -0,0 +1,65 @@
using System.Collections.Generic;
using UnityEngine.UI;
using System.Linq;
using LitJson;
using System;
// 历练秘笈
public class ExpSecretCollectionManager : GameSystemManager<ExpSecretCollectionManager>
{
    public int ctgID;
    public byte m_MJLV;    // 秘笈等级,激活后从1开始
    public uint m_Zhanchui;    // 秘笈累计消耗战锤
    public uint m_ExpEx;    // 秘笈今日已额外获得经验
    public uint m_DecomposeEx;    // 秘笈今日已额外获得分解货币
    public event Action UpdateExpSecretCollectionEvent;
    public override void Init()
    {
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
        var config = FuncConfigConfig.Get("LLMJ");
        ctgID = int.Parse(config.Numerical1);
    }
    public override void Release()
    {
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitialize;
    }
    void OnBeforePlayerDataInitialize()
    {
        m_MJLV = 0;
        m_Zhanchui = 0;
        m_ExpEx = 0;
        m_DecomposeEx = 0;
    }
    public void OnExpSecretCollection(HB128_tagSCLLMJInfo netPack)
    {
        m_MJLV = netPack.MJLV;
        m_Zhanchui = netPack.Zhanchui;
        m_ExpEx = netPack.ExpEx;
        m_DecomposeEx = netPack.DecomposeEx;
        UpdateExpSecretCollectionEvent?.Invoke();
        UpdateRedpoint();
    }
    public Redpoint redPointLLMJ = new Redpoint(MainRedDot.RightFuncRedpoint, MainRedDot.RedPoint_LLMJKey);
    void UpdateRedpoint()
    {
        if (m_MJLV == 0) return;
        var nextConfig = LLMJConfig.Get(m_MJLV + 1);
        if (nextConfig == null) return;
        if (m_Zhanchui >= nextConfig.CostWarhammer)
        {
            redPointLLMJ.state = RedPointState.Simple;
        }
        else
        {
            redPointLLMJ.state = RedPointState.None;
        }
    }
}
Main/System/Recharge/ExpSecretCollectionManager.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 37633ce5681dc8540baa735cdc7b4c2d
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/Recharge/ExpSecretCollectionWin.cs
New file
@@ -0,0 +1,98 @@
using System;
using UnityEngine;
using UnityEngine.UI;
//历练秘笈
public class ExpSecretCollectionWin : UIBase
{
    [SerializeField] Text costzcText;
    [SerializeField] Text addExpText;
    [SerializeField] Text addMoneyText;
    [SerializeField] ScrollerController scroller;
    [SerializeField] Button buyBtn;
    [SerializeField] Text buyText;
    [SerializeField] Transform buyYetRect;
    protected override void InitComponent()
    {
        buyBtn.AddListener(() =>
        {
            RechargeManager.Instance.CTG(ExpSecretCollectionManager.Instance.ctgID);
        });
    }
    protected override void OnPreOpen()
    {
        ExpSecretCollectionManager.Instance.UpdateExpSecretCollectionEvent += OnExpSecretCollectionEvent;
        scroller.OnRefreshCell += OnRefreshCell;
        CreateScroller();
        Display();
    }
    protected override void OnPreClose()
    {
        ExpSecretCollectionManager.Instance.UpdateExpSecretCollectionEvent -= OnExpSecretCollectionEvent;
        scroller.OnRefreshCell -= OnRefreshCell;
    }
    void CreateScroller()
    {
        scroller.Refresh();
        var keys = LLMJConfig.GetKeys();
        keys.Sort();
        foreach (var key in keys)
        {
            scroller.AddCell(ScrollerDataType.Header, key);
        }
        scroller.Restart();
        scroller.JumpIndex(ExpSecretCollectionManager.Instance.m_MJLV - 1);
    }
    void OnRefreshCell(ScrollerDataType type, CellView cell)
    {
        var _cell = cell as ExpSecretCollectionCell;
        _cell.Display(cell.index);
    }
    void OnExpSecretCollectionEvent()
    {
        Display();
    }
    void Display()
    {
        costzcText.text = ExpSecretCollectionManager.Instance.m_Zhanchui >= 1000000 ?
            UIHelper.ReplaceLargeNum(ExpSecretCollectionManager.Instance.m_Zhanchui) :
            ExpSecretCollectionManager.Instance.m_Zhanchui.ToString();
        var config = LLMJConfig.Get(ExpSecretCollectionManager.Instance.m_MJLV);
        if (ExpSecretCollectionManager.Instance.m_MJLV == 0)
        {
            addExpText.text = "0";
            addMoneyText.text = "0";
        }
        else
        {
            addExpText.text = ExpSecretCollectionManager.Instance.m_ExpEx + "/" + config.ExpExUpper;
            addMoneyText.text = ExpSecretCollectionManager.Instance.m_DecomposeEx + "/" + config.DecomposeExUpper;
        }
        buyBtn.SetActive(ExpSecretCollectionManager.Instance.m_MJLV == 0);
        RechargeManager.Instance.TryGetOrderInfo(ExpSecretCollectionManager.Instance.ctgID, out var orderInfoConfig);
        buyText.text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
        buyYetRect.SetActive(ExpSecretCollectionManager.Instance.m_MJLV != 0);
        scroller.m_Scorller.RefreshActiveCellViews();
    }
}
Main/System/Recharge/ExpSecretCollectionWin.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9b8d1a65440f5424daa7a543d9213479
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/Redpoint/MainRedDot.cs
@@ -52,6 +52,12 @@
    //基金(战令)
    public const int RedPoint_FundKey = 105;
    public Redpoint redPointFund = new Redpoint(RightFuncRedpoint, RedPoint_FundKey);
    //历练秘笈
    public const int RedPoint_LLMJKey = 106;
    //武将卡
    public const int HeroCardRedpoint = 200;
    public Redpoint HeroListRedpoint = new Redpoint(MainHerosRedpoint, HeroCardRedpoint);
Main/Utility/EnumHelper.cs
@@ -834,6 +834,7 @@
    AutoFight = 20,//自动战斗
    Recharge = 22,//充值
    BattlePass = 40, //基金(战令)
    LLMJ = 41,  //历练秘笈
}