少年修仙传客户端代码仓库
hch
2025-03-03 28785d6ddf9c08e49527ede9405c7b6c93c6ed32
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
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace vnxbqy.UI
{
 
    //本服和跨服活动的组合 OperationCrossBossTrial
    //1. 参与时分由跨服活动决定
    public class OperationBossTrial : OperationBase
    {
        public Dictionary<int, BossTrialSubmitInfo> bossTrialSubmitInfo = new Dictionary<int, BossTrialSubmitInfo>();
        public Dictionary<int, ActBillboardAwards> rankInfo = new Dictionary<int, ActBillboardAwards>(); //根据排名显示奖励 从1开始  本服个人榜
        public int maxRank; //根据奖励显示最大排名
 
        public int m_ShopType;    // 开放商店类型,可能为0不开放
        public int m_SubResetType;    // 提交凭证奖励重置类型,0-跟随活动; 1-0点重置;2-5点重置
 
        public override void Reset()
        {
            base.Reset();
            bossTrialSubmitInfo.Clear();
            rankInfo.Clear();
            maxRank = 0;
        }
 
        public override string ToDisplayTime()
        {
            var textBuilder = OperationTimeHepler.textBuilder;
            textBuilder.Length = 0;
            textBuilder.Append(startDate.ToDisplay(false));
            if (startDate != endDate)
            {
                textBuilder.Append(" - ");
                textBuilder.Append(endDate.ToDisplay(false));
            }
            return textBuilder.ToString();
        }
 
 
        public void ParseBossTrialInfo(HAA67_tagMCActBossTrialInfo package)
        {
            m_ShopType = package.ShopType;
            m_SubResetType = package.SubResetType;
 
            bossTrialSubmitInfo.Clear();
            for (int i = 0; i < package.SubmitInfoList.Length; i++)
            {
                List<Item> items = new List<Item>();
                for (int j = 0; j < package.SubmitInfoList[i].AwardItemList.Length; j++)
                { 
                    items.Add(new Item((int)package.SubmitInfoList[i].AwardItemList[j].ItemID, 
                        package.SubmitInfoList[i].AwardItemList[j].ItemCount, 
                        package.SubmitInfoList[i].AwardItemList[j].IsBind));
                }
                bossTrialSubmitInfo[package.SubmitInfoList[i].NeedCount] = new BossTrialSubmitInfo()
                {
                    index = package.SubmitInfoList[i].RecordIndex,
                    items = items
                };
            }
 
            rankInfo.Clear();
            maxRank = 0;
            for (int i = 0; i < package.PersonalBillboardInfoList.Length; i++)
            {
                List<Item> items = new List<Item>();
                for (int j = 0; j < package.PersonalBillboardInfoList[i].AwardItemList.Length; j++)
                {
                    items.Add(new Item((int)package.PersonalBillboardInfoList[i].AwardItemList[j].ItemID,
                                               package.PersonalBillboardInfoList[i].AwardItemList[j].ItemCount,
                                               package.PersonalBillboardInfoList[i].AwardItemList[j].IsBind));
                }
                //仅处理一档额外奖励
                List<Item> itemsEx = new List<Item>();
                var awardsEx = package.PersonalBillboardInfoList[i].AwardItemExList;
                int needScoreEx = 0;
                if (awardsEx.Length != 0)
                {
                    for (int j = 0; j < awardsEx[0].AwardItemList.Length; j++)
                    {
                        itemsEx.Add(new Item((int)awardsEx[0].AwardItemList[j].ItemID,
                                                awardsEx[0].AwardItemList[j].ItemCount,
                                                awardsEx[0].AwardItemList[j].IsBind));
                    }
                    needScoreEx = (int)awardsEx[0].NeedScore;
                }
 
                rankInfo[(int)package.PersonalBillboardInfoList[i].Rank] = new ActBillboardAwards()
                {
                    needScore = (int)package.PersonalBillboardInfoList[i].NeedScore,
                    awardItemList = items,
                    awardItemListEx = itemsEx,
                    needScoreEx = needScoreEx,
 
                };
                maxRank = Math.Max(maxRank, (int)package.PersonalBillboardInfoList[i].Rank);
            }
        }
 
 
        public struct BossTrialSubmitInfo
        {
            public int index;
            public List<Item> items;
        }
    }
}