| | |
| | | using TableConfig; |
| | | using EnhancedUI.EnhancedScroller; |
| | | |
| | | namespace Snxxz.UI {
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | //赛季奖励
|
| | | [XLua.Hotfix] |
| | | public class SeasonRewardWin : Window |
| | |
| | | { |
| | | IsInquireReward(); |
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | m_ScrollerController.JumpIndex(JumpIndex()); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | |
| | | CrossServerOneVsOnePlayerInfo.Instance.UpdatePlayerInfoEvent -= UpdatePlayerInfoEvent; |
| | | }
|
| | |
|
| | | |
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | |
| | | gridCtrl.AddCell(ScrollerDataType.Header, key);
|
| | | }
|
| | | for (int i = SortList.Count - 1; i >= 0; i--)
|
| | | {
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Normal, SortList[i]);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | |
| | | {
|
| | | int Index = cell.index;
|
| | | SeasonRewardCell seasonRewardCell = cell.GetComponent<SeasonRewardCell>();
|
| | | seasonRewardCell.ScrollerDataTypAndId(type, Index); |
| | | seasonRewardCell.ScrollerDataTypAndId(type, Index);
|
| | | } |
| | | |
| | | private void IsInquireReward()
|
| | | {
|
| | | bool isbool = crossServerRewardModel.IsAwardState(CrossRealmPKAwardStateEnum.SeasonAwardState,-1);
|
| | | bool isbool = crossServerRewardModel.IsAwardState(CrossRealmPKAwardStateEnum.SeasonAwardState, -1);
|
| | | if (CrossServerOneVsOnePKSeason.Instance.SeasonState == 2 && !isbool)
|
| | | {
|
| | | crossServerRewardModel.ViewCrossPKBillboard(CrossServerOneVsOnePKSeason.Instance.ZoneID, CrossServerOneVsOnePKSeason.Instance.SeasonID);
|
| | | }
|
| | | } |
| | | |
| | | private int JumpIndex()
|
| | | {
|
| | | int Index = 0;
|
| | | if (CrossServerOneVsOnePKSeason.Instance.SeasonState != 2)
|
| | | {
|
| | | return Index;
|
| | | }
|
| | | if (crossServerRewardModel.MyRank > -1 && crossServerRewardModel.MyRank < 100)//存在世界排名
|
| | | {
|
| | | int Type = 0;
|
| | | foreach (var key in crossServerRewardModel.SeasonRewardDic.AwardDic.Keys)
|
| | | {
|
| | | if (crossServerRewardModel.MyRank < key)
|
| | | {
|
| | | Index = Type;
|
| | | return Index;
|
| | | }
|
| | | Type += 1;
|
| | | }
|
| | | }
|
| | | int Type1 = 3;
|
| | | for (int i = SortList.Count - 1; i >= 0; i--)
|
| | | {
|
| | | if (CrossServerOneVsOnePlayerInfo.Instance.DanLV == SortList[i])
|
| | | {
|
| | | Index = Type1;
|
| | | return Index;
|
| | | }
|
| | | Type1 += 1;
|
| | | }
|
| | |
|
| | | return Index;
|
| | | } |
| | | } |
| | | |
| | | } |