少年修仙传客户端代码仓库
hch
2023-06-14 f23c81d21c9cc4c9f06e8bed3ebb7ddbe7e15ac3
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
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Wednesday, July 18, 2018
//--------------------------------------------------------
using Snxxz.UI;
using System;
using System.Collections.Generic;
 
 
public class CZBMModel : Model
{
    int m_SelectIndex = 0;
    public int selectIndex
    {
        get { return m_SelectIndex; }
        set
        {
            if (m_SelectIndex != value)
            {
                m_SelectIndex = value;
                if (selectUpdate != null)
                {
                    selectUpdate();
                }
            }
        }
    }
 
    public event Action selectUpdate;
 
    public override void Init()
    {
        m_SelectIndex = 0;
    }
    
    public override void UnInit()
    {
 
    }
 
    public HAA31_tagMCActGrowupBuyInfo.tagMCActGrowupBuyCTGItem[] GetGiftsByCTGID(int ctgID)
    {
        OperationCZBM operation;
        if (OperationTimeHepler.Instance.TryGetOperation(Operation.CZBMGift, out operation))
        {
 
            for (int i = 0; i < operation.CZBMGiftInfo.Count; i++)
            {
                for (int j = 0; j < operation.CZBMGiftInfo[i].BuyCTGIDList.Length; j++)
                {
                    if (operation.CZBMGiftInfo[i].BuyCTGIDList[j].CTGID == ctgID)
                    {
                        return operation.CZBMGiftInfo[i].BuyCTGIDList[j].GainItemList;
                    }
                }
            }
        }
 
        return null;
    }
}