hch
10 小时以前 cba555476b1f1b856b9211451e739d8cdce0eeba
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
using System;
using System.Collections;
using System.Collections.Generic;
 
 
public class OperationRechargeGiftAct : OperationBase
{
    public List<int> ctgIDs = new List<int>();
    public List<HAA74_tagMCActBuyCountGiftInfo.tagMCActBuyCountGift> buyCountGifts = new List<HAA74_tagMCActBuyCountGiftInfo.tagMCActBuyCountGift>();
    public int shopType;
 
    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 string ToDisplayTimeEx()
    {
        var textBuilder = OperationTimeHepler.textBuilder;
        textBuilder.Length = 0;
        textBuilder.Append(startDate.ToDisplay(false));
        textBuilder.Append(string.Format(" {0}:{1}", joinStartHour.ToString("D2"), joinStartMinute.ToString("D2")));
        if (startDate != endDate)
        {
            textBuilder.Append(" - ");
            textBuilder.Append(endDate.ToDisplay(false));
            textBuilder.Append(string.Format(" {0}:{1}", joinEndHour.ToString("D2"), joinEndMinute.ToString("D2")));
        }
        return textBuilder.ToString();
    }
    public override void Reset()
    {
        base.Reset();
    }
 
    public void ParsePackage(HAA74_tagMCActBuyCountGiftInfo package)
    {
        ctgIDs.Clear();
        buyCountGifts.Clear();
        for (int i = 0; i < package.CTGIDCount; i++)
        {
            ctgIDs.Add(package.CTGIDList[i]);
        }
        for (int i = 0; i < package.GiftCount; i++)
        {
            buyCountGifts.Add(package.BuyCountGiftList[i]);
        }
        shopType = package.ShopType;
 
        buyCountGifts.Sort(SortCount);
    }
 
 
 
    int SortCount(HAA74_tagMCActBuyCountGiftInfo.tagMCActBuyCountGift dataA, HAA74_tagMCActBuyCountGiftInfo.tagMCActBuyCountGift dataB)
    {
        return dataA.NeedBuyCount.CompareTo(dataB.NeedBuyCount);
    }
}