少年修仙传客户端代码仓库
hch
2025-06-12 204ef05a831c9484e2abc561d27ecbff7c797453
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Tuesday, October 30, 2018
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
 
using System.Collections.Generic;
 
namespace vnxbqy.UI
{
 
    public class FeaturesType3 : CellView
    {
        [SerializeField] ImageEx m_Image_Selected;//底板
        [SerializeField] ImageEx m_FeaturesTypeIcon;//Icon
        [SerializeField] Text m_FunctionName;//功能名
        [SerializeField] Text m_FunctionalLevel;//功能解锁条件
        [SerializeField] Text m_Content;//内容
        [SerializeField] ItemCell m_Award;
        [SerializeField] GameObject m_HasReceived1;
        [SerializeField] RedpointBehaviour m_RedPoint;
        FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
        TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
 
        public void GetTheFeatureID(int funcId)
        {
            var functionForecastConfig = FunctionForecastConfig.Get(funcId);
            if (functionForecastConfig == null)
            {
                return;
            }
            var funcOpenConfig = FuncOpenLVConfig.Get(funcId);
 
            m_FunctionName.text = funcOpenConfig.Remark;
 
            if (FuncOpen.Instance.IsFuncOpen(funcId))
            {
                m_FunctionalLevel.text = "";
            }
            else if (funcOpenConfig.LimitMissionID != 0)
            {
                int tagValue = TaskListConfig.GetMissionIndex(funcOpenConfig.LimitMissionID);
                int curValue = TaskListConfig.GetMissionIndex(taskModel.GetLatestMainTaskId());
                if (funcId == 3)
                {
                    //翅膀支线开启 FuncNoOpen2 funcid=3 支线等级客户端没有记录,后续优化是否配置在功能配置表
                    m_FunctionalLevel.text = Language.Get("FuncNoOpen2", 200);
                }
                else
                {
                    m_FunctionalLevel.text = Language.Get("FuncNoOpen1", tagValue - curValue);
                }
            }
            else
            {
                //后续完善境界解锁等
                m_FunctionalLevel.text = Language.Get("FuncLevelOpen", funcOpenConfig.LimitLV);
            }
 
 
            m_FeaturesTypeIcon.SetSprite(funcOpenConfig.Icon);
            m_Content.text = functionForecastConfig.DetailDescribe;
            SetRankAwardItem(funcId);
            
            if (FuncOpen.Instance.IsFuncOpen(funcId))
            {
                m_Image_Selected.gray = false;
                m_FeaturesTypeIcon.gray = false;
            }
            else
            {
                m_Image_Selected.gray = true;
                m_FeaturesTypeIcon.gray = true;
            }
 
            if (featureNoticeModel.DicRedPoint.ContainsKey(funcId))
            {
                m_RedPoint.redpointId = featureNoticeModel.DicRedPoint[funcId].id;
            }
        }
 
        private void SetRankAwardItem(int funcID)
        {
            ImpactRankModel.RankAwardItem rankAward = featureNoticeModel.DicAwardItem[funcID];
            List<Item> List = rankAward.GetAwardItem(PlayerDatas.Instance.baseData.Job);
            SetItem1(List, funcID);
        }
        private void SetItem1(List<Item> List,int funcID)
        {
            int itemID = List[0].id;
            int count = List[0].count;
            m_Award.Init(new ItemCellModel(itemID, false, (ulong)count));
            m_Award.button.AddListener(() => {
                featureNoticeModel.SendGetAward(funcID);
            });
 
 
            if (featureNoticeModel.DicOpenFuncState.ContainsKey(funcID) && featureNoticeModel.DicOpenFuncState[funcID].State == 1 && featureNoticeModel.DicOpenFuncState[funcID].AwardState == 1)
            {
                m_HasReceived1.SetActive(true);
            }
            else
            {
                m_HasReceived1.SetActive(false);
            }
        }
    }
 
}