少年修仙传客户端代码仓库
hch
3 天以前 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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Monday, January 28, 2019
//--------------------------------------------------------
 
using System;
using UnityEngine;
using UnityEngine.UI;
using vnxbqy.UI;
using System.Collections.Generic;
using LitJson;
 
public class CrossServerQualifyingHallOfFameCell : ILBehaviour
{
    RawImage rawPlayer;
    Text familyName;
    Text playerName;
    ButtonEx worshipButton;
    Text count;
    Transform doubleObj;
 
    RoleParticularModel model { get { return ModelCenter.Instance.GetModel<RoleParticularModel>(); } }
    protected override void Awake()
    {
        rawPlayer = proxy.GetWidgtEx<RawImage>("Raw_Player");
        familyName = proxy.GetWidgtEx<Text>("Txt_FairyName");
        playerName = proxy.GetWidgtEx<Text>("Txt_PlayerName");
        worshipButton = proxy.GetWidgtEx<ButtonEx>("worshipButton");
        count = proxy.GetWidgtEx<Text>("count");
        doubleObj = proxy.GetWidgtEx<Transform>("double");
    }
 
    public void Display(int id)
    {
        var offcialInfo = CrossServerQualifyingModel.Instance.rankOfficialDict[id];
        var playerID = CrossServerQualifyingModel.Instance.GetOfficialPlayer(id).PlayerID;
        count.text = Language.Get("CrossServerQualifying66") + " " + offcialInfo.WorshipCount;
 
        if (offcialInfo.WorshipDouble == 1 && TimeUtility.ServerNow.Hour == CrossServerQualifyingModel.Instance.doubleTimeArr[0][0])
        {
            doubleObj.SetActiveIL(true);
        }
        else
        {
            doubleObj.SetActiveIL(false);
        }
        worshipButton.SetActiveIL(true);
        worshipButton.interactable = CrossServerQualifyingModel.Instance.worshipCntToday < CrossServerQualifyingModel.Instance.worshipMaxCnt;
        worshipButton.SetListener(()=> {
            if (CrossServerQualifyingModel.Instance.worshipCntToday >= CrossServerQualifyingModel.Instance.worshipMaxCnt)
                return;
            var pack = new IL_CC123_tagCMChampionshipWorship();
            pack.ZoneID = (byte)CrossServerQualifyingModel.Instance.officialZoneID;
            pack.PlayerID = playerID;
            GameNetSystem.Instance.SendInfo(pack);
        });
        
        var viewPlayerData = model.GetViewPlayerData((int)playerID);
 
        if (viewPlayerData != null)
        {
            //var realmLv = viewPlayerData.rolePropData.RealmLV;
            //realmImg.SetActive(false);
            //if (realmLv > 0)
            //{
            //    RealmConfig realmConfig = RealmConfig.Get(realmLv);
            //    if (realmConfig != null)
            //    {
            //        realmImg.SetSprite(realmConfig.Img);
            //    }
            //}
            playerName.text = StringUtility.Contact(viewPlayerData.rolePropData.Name, "Lv. ", viewPlayerData.rolePropData.LV);
 
            if (viewPlayerData.rolePropData.FamilyID == 0)
            {
                familyName.SetActive(false);
            }
            else
            {
                familyName.SetActive(true);
                familyName.text = StringUtility.Contact(Language.Get("RoleParticularWin_1"),
                    viewPlayerData.rolePropData.FamilyName);
            }
 
            int _suitLevel = (int)(viewPlayerData.rolePropData.EquipShowSwitch % 10);
            int clothes = viewPlayerData.GetItemId(RoleEquipType.Clothes);
            int weapon = viewPlayerData.GetItemId(RoleEquipType.Weapon);
            int wing = viewPlayerData.GetItemId(RoleEquipType.Wing);
            int weapon2 = viewPlayerData.GetItemId(RoleEquipType.Weapon2);
            int fashionClothes = viewPlayerData.GetItemId(RoleEquipType.FashionClothes);
            int fashionWeapon = viewPlayerData.GetItemId(RoleEquipType.FashionWeapon);
            int fashionWeapon2 = viewPlayerData.GetItemId(RoleEquipType.FashionWeapon2);
            var reikiRootEffectId = viewPlayerData.rolePropData.EquipShowSwitch / 1000 % 1000;
 
            var data = new UI3DPlayerExhibitionData
            {
                job = viewPlayerData.rolePropData.Job,
                fashionClothesId = fashionClothes,
                fashionWeaponId = fashionWeapon,
                fashionSecondaryId = fashionWeapon2,
                clothesId = clothes,
                suitLevel = _suitLevel,
                weaponId = weapon,
                wingsId = wing,
                secondaryId = weapon2,
                reikiRootEffectId = (int)reikiRootEffectId,
                isDialogue = false,
                equipLevel = (int)viewPlayerData.rolePropData.EquipShowSwitch / 10 % 100,
                titleID = viewPlayerData.rolePropData.TitleID,
            };
 
            rawPlayer.SetActive(true);
            if (id == 1)
            {
                UI3DModelExhibition.Instance.ShowPlayer(rawPlayer, data);
            }
            else if (id == 2)
            {
                UI3DModelExhibition.InstanceClone1.ShowPlayer(rawPlayer, data);
            }
            else if (id == 3)
            {
                UI3DModelExhibition.InstanceClone2.ShowPlayer(rawPlayer, data);
            }
            else if (id == 4)
            {
                UI3DModelExhibition.InstanceClone3.ShowPlayer(rawPlayer, data);
            }
            else if (id == 5)
            {
                UI3DModelExhibition.InstanceClone4.ShowPlayer(rawPlayer, data);
            }
            else if (id == 6)
            {
                UI3DModelExhibition.InstanceClone5.ShowPlayer(rawPlayer, data);
            }
            else if (id == 7)
            {
                UI3DModelExhibition.InstanceClone6.ShowPlayer(rawPlayer, data);
            }
            else if (id == 8)
            {
                UI3DModelExhibition.InstanceClone7.ShowPlayer(rawPlayer, data);
            }
            rawPlayer.raycastTarget = false;
        }
        else
        {
            //CrossServerQualifyingModel.Instance.QueryKaiKingInfo(playerID);
            //Debug.Log("名人堂单独查询");
            playerName.text = string.Empty;
            familyName.text = string.Empty;
            worshipButton.SetActiveIL(false);
            rawPlayer.SetActiveIL(false);
            count.text = string.Empty;
            doubleObj.SetActiveIL(false);
        }
    }
 
}