少年修仙传客户端代码仓库
hch
5 天以前 600733c8f592cb9e65f2b7a3e110ac1d686e6bfe
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
using vnxbqy.UI;
 
//天帝礼包活动
public class OperationGodKingGift : OperationBase
{
    public byte CostMoneyType;    //消耗货币类型
    public uint[] CostMoneyValueList;    //消耗货币值列表
    public byte PrizeMoneyType;    //奖励货币类型
    public uint[] PrizeMoneyValueList;    //奖励货币值列表
    public byte ResetLimitTimes;    //至少抽几次才可重置奖池
    public byte ResetCountMax;    //最大可重置奖池次数
    public byte IsAwardPoolOK;    //奖池是否选择完毕,否的话需要先选择奖池才可抽奖
    public IL_HAA60_tagMCActGodGiftInfo.tagMCActGodGiftItemLib[] ItemLibList;    //奖池库信息列表
 
    public override bool SatisfyOpenCondition()
    {
        return PlayerDatas.Instance.baseData.LV >= limitLv;
    }
 
    public override string ToDisplayTime()
    {
        var textBuilder = OperationTimeHepler.textBuilder;
        textBuilder.Length = 0;
        textBuilder.Append(startDate.ToDisplay());
        if (startDate != endDate)
        {
            textBuilder.Append("—");
            textBuilder.Append(endDate.ToDisplay());
        }
        return textBuilder.ToString();
    }
 
    public override void Reset()
    {
        base.Reset();
    }
 
 
    public void UpdateNetPack(IL_HAA60_tagMCActGodGiftInfo package)
    {
        CostMoneyType = package.CostMoneyType;
        CostMoneyValueList = package.CostMoneyValueList;
        PrizeMoneyType = package.PrizeMoneyType;
        PrizeMoneyValueList = package.PrizeMoneyValueList;
        ResetLimitTimes = package.ResetLimitTimes;
        ResetCountMax = package.ResetCountMax;
        IsAwardPoolOK = package.IsAwardPoolOK;
        ItemLibList = package.ItemLibList;
 
        if (IsAwardPoolOK != 0)
        {
            GodKingGiftModel.Instance.godKingItems.Clear();
            for (int i = 0; i < ItemLibList.Length; i++)
            {
                for (int j = 0; j < ItemLibList[i].GodGiftItemList.Length; j++)
                {
                    if (ItemLibList[i].GodGiftItemList[j].IsChoose == 1)
                    { 
                        GodKingGiftModel.Instance.godKingItems.Add(new GodKingGiftModel.GodKingGiftItem() {
                            libType = ItemLibList[i].ItemLibType,
                            itemID = ItemLibList[i].GodGiftItemList[j].ItemID,
                            itemNum = ItemLibList[i].GodGiftItemList[j].ItemNum,
                            itemCount = ItemLibList[i].GodGiftItemList[j].ItemCount,
                        });
                    }
                }
            }
        }
    }
 
        
}