hch
21 小时以前 7bc59ef2b3d8cefb63d74a89f2b2c949e691dac1
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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using System.Linq;
 
//通用基金界面战令
public partial class BattlePassManager : GameSystemManager<BattlePassManager>
{
 
    //战令类型:红点  通用基金界面
    Dictionary<int, Redpoint> redpointCommonDict = new Dictionary<int, Redpoint>();
 
    //通用战令对应的功能id 
    public Dictionary<int, int> typeToFuncIDDict = new Dictionary<int, int>()
    {
        {1, 40},
        {2, 40},
        {3, 40},
        {4, 28},
        {5, 27},
    };
 
    public int[] battlePassTypeSortList;
 
 
    //1-主公等级;2-祝福等级;3-主线关卡;4-古宝数量;5-演武场次数;
    void UpdateCommonBPRedpoint(int _type)
    {
        if (!redpointCommonDict.ContainsKey(_type))
        {
            return;
        }
        if (!FuncOpen.Instance.IsFuncOpen(typeToFuncIDDict[_type]))
        {
            return;
        }
        redpointCommonDict[_type].state = RedPointState.None;
        battlePassDataDict.TryGetValue(_type, out BattlePassData battlePassData);
        if (battlePassData == null) return;
        int totalValue = 0;
        switch ((BattlePassType)_type)
        {
            case BattlePassType.LV:
                {
                    totalValue = PlayerDatas.Instance.baseData.LV;
                    break;
                }
            case BattlePassType.BlessLV:
                {
                    totalValue = BlessLVManager.Instance.m_TreeLV;
                    break;
                }
            case BattlePassType.MainLine:
                {
                    totalValue = PlayerDatas.Instance.baseData.ExAttr1 / 100;
                    break;
                }
            case BattlePassType.GuBao:
                {
                    totalValue = (int)battlePassData.value1;
                    break;
                }
            case BattlePassType.Arena:
                {
                    totalValue = (int)battlePassData.value1;
                    break;
                }
        }
 
        if (HasAnyAward(_type, totalValue))
        {
            redpointCommonDict[_type].state = RedPointState.Simple;
        }
    }
 
    
}