From 14566ef9298fb5ef38792f644b42673058dd07c3 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 18 三月 2026 02:13:18 +0800
Subject: [PATCH] 515 【挑战】PVP群英榜

---
 Main/System/Qunying/QYNoteWin.cs.meta                                           |   11 
 Main/System/Qunying/QYNoteWin.cs                                                |   63 +++
 Main/Utility/TimeUtility.cs                                                     |   22 +
 Main/System/Qunying/QYPlayerTop3Cell.cs                                         |    5 
 Main/System/Qunying/QYAchievementCell.cs                                        |   76 ++++
 Main/System/Qunying/QYAchievementCell.cs.meta                                   |   11 
 Main/System/Qunying/QYNoteCell.cs.meta                                          |   11 
 Main/System/Qunying/QYStoreWin.cs.meta                                          |   11 
 Main/System/Store/SkinStoreLineCell.cs                                          |    2 
 Main/System/Store/SkinStoreWin.cs                                               |    4 
 Main/System/Qunying/QunyingManager.cs                                           |  160 ++++++++
 Main/System/BillboardRank/PlayerTop3Cell.cs                                     |   17 
 Main/System/GeneralConfig/GeneralDefine.cs                                      |    8 
 Main/System/Qunying/QYAchievementWin.cs                                         |   62 +++
 Main/System/Qunying/QYFighterCell.cs                                            |    4 
 Main/System/Store/StoreModel.cs                                                 |    4 
 Main/Core/NetworkPackage/DTCFile/ServerPack/HA0_Sys/DTCA009_tagSCGameRecInfo.cs |    1 
 Main/System/Qunying/QYRankAwardCell.cs                                          |   54 +++
 Main/System/Qunying/QYRankAwardWin.cs                                           |  140 ++++++++
 Main/System/Qunying/QYBattleFailWin.cs                                          |    4 
 Main/System/Qunying/QYAchievementWin.cs.meta                                    |   11 
 Main/System/Store/SkinStoreCell.cs                                              |    2 
 Main/System/Qunying/QYNoteCell.cs                                               |   74 ++++
 Main/System/Qunying/QYWin.cs                                                    |  149 ++++++++
 Main/System/Qunying/QYRankAwardCell.cs.meta                                     |   11 
 Main/System/Qunying/QYStoreWin.cs                                               |   73 ++++
 Main/System/Qunying/QYRankAwardWin.cs.meta                                      |   11 
 27 files changed, 970 insertions(+), 31 deletions(-)

diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA0_Sys/DTCA009_tagSCGameRecInfo.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA0_Sys/DTCA009_tagSCGameRecInfo.cs
index db63245..290e6a8 100644
--- a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA0_Sys/DTCA009_tagSCGameRecInfo.cs
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA0_Sys/DTCA009_tagSCGameRecInfo.cs
@@ -9,5 +9,6 @@
         HA009_tagSCGameRecInfo vNetData = vNetPack as HA009_tagSCGameRecInfo;
         ArenaManager.Instance.UpdateGameRecInfo(vNetData);
         HeroDebutManager.Instance.UpdateGameRecInfo(vNetData);
+        QunyingManager.Instance.UpdateGameRecInfo(vNetData);
     }
 }
diff --git a/Main/System/BillboardRank/PlayerTop3Cell.cs b/Main/System/BillboardRank/PlayerTop3Cell.cs
index 90a1e91..90d9666 100644
--- a/Main/System/BillboardRank/PlayerTop3Cell.cs
+++ b/Main/System/BillboardRank/PlayerTop3Cell.cs
@@ -26,7 +26,22 @@
         }
         officialTitleCell.SetActive(true);
         //rankValueText.text = string.Format(valueFormat, UIHelper.ReplaceLargeNum(rankData.cmpValue2 + rankData.cmpValue * Constants.ExpPointValue));
-        rankValueText.text = RankModel.Instance.GetCmpValueStr(rankType, rankData.cmpValue);
+        if (rankType == QunyingManager.rankType)
+        {
+            //鍖烘湇
+            if (GeneralDefine.IsRobot((int)rankData.id))
+            {
+                rankValueText.text = Language.Get("Qunying15");
+            }
+            else
+            {
+                rankValueText.text = ServerListCenter.Instance.GetServerName(UIHelper.GetServerIDByAccount(rankData.name2));
+            }
+        }
+        else
+        {
+            rankValueText.text = RankModel.Instance.GetCmpValueStr(rankType, rankData.cmpValue);
+        }
         nameText.text = rankData.name1;
         officialTitleCell.InitUI((int)rankData.value1, (int)rankData.value2);
         model.Create(HorseManager.Instance.GetOtherPlayerHorseSkinID((int)rankData.value6), (int)rankData.value5, rank == 1 ? 1f : 0.8f);
diff --git a/Main/System/GeneralConfig/GeneralDefine.cs b/Main/System/GeneralConfig/GeneralDefine.cs
index 61fdd5f..9795b71 100644
--- a/Main/System/GeneralConfig/GeneralDefine.cs
+++ b/Main/System/GeneralConfig/GeneralDefine.cs
@@ -315,6 +315,12 @@
 
     public static long GetFactValue(uint value, uint valueEx)
     {
-        return (long)valueEx * (long)Constants.ExpPointValue +(long)value;
+        return (long)valueEx * (long)Constants.ExpPointValue + (long)value;
+    }
+
+    //绾﹀畾锛歱layerID<1000000涓烘満鍣ㄤ汉 瀹為檯璇峰弬鑰冩満鍣ㄤ汉琛�
+    public static bool IsRobot(int playerID)
+    {
+        return playerID < 1000000;
     }
 }
diff --git a/Main/System/Qunying/QYAchievementCell.cs b/Main/System/Qunying/QYAchievementCell.cs
new file mode 100644
index 0000000..140084e
--- /dev/null
+++ b/Main/System/Qunying/QYAchievementCell.cs
@@ -0,0 +1,76 @@
+锘縰sing System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class QYAchievementCell : CellView
+{
+    [SerializeField] Text rankText;
+    [SerializeField] Image rankImg;
+    [SerializeField] ItemCell[] itemCells;
+    [SerializeField] Transform notActiveText;
+    [SerializeField] Button getBtn;
+    [SerializeField] Transform finishImg;
+
+    public void Display(int rank)
+    {
+        var rankAwards = QunyingManager.Instance.achievementAwards[rank];
+        
+        if (rank <= 3)
+        {
+            rankImg.SetActive(true);
+            rankText.SetActive(false);
+            rankImg.SetSprite($"Rank{rank}");
+        }
+        else
+        {
+            rankImg.SetActive(false);
+            rankText.SetActive(true);
+            rankText.text = rank.ToString();
+        }
+
+        for (int i = 0; i < itemCells.Length; i++)
+        {
+            var itemCell = itemCells[i];
+            if (i < rankAwards.Length)
+            {
+                itemCell.SetActive(true);
+                int itemID = rankAwards[i][0];
+                itemCell.Init(new ItemCellModel(itemID, true, rankAwards[i][1]));
+                itemCell.button.SetListener(() => ItemTipUtility.Show(itemID));
+            }
+            else
+            {
+                itemCell.SetActive(false);
+            }
+        }
+
+        var state = QunyingManager.Instance.GetAchievementState(rank);
+        if (state == 1)
+        {
+            notActiveText.SetActive(false);
+            getBtn.SetActive(true);
+            finishImg.SetActive(false);
+        }
+        else if (state == 2)
+        {
+            notActiveText.SetActive(false);
+            getBtn.SetActive(false);
+            finishImg.SetActive(true);
+        }
+        else
+        {
+            notActiveText.SetActive(true);
+            getBtn.SetActive(false);
+            finishImg.SetActive(false);
+        }
+
+        getBtn.AddListener(() =>
+        {
+            var pack = new CA504_tagCMPlayerGetReward();
+            pack.RewardType = 7;
+            GameNetSystem.Instance.SendInfo(pack);
+        });
+    }
+
+}
diff --git a/Main/System/Qunying/QYAchievementCell.cs.meta b/Main/System/Qunying/QYAchievementCell.cs.meta
new file mode 100644
index 0000000..b37a8d3
--- /dev/null
+++ b/Main/System/Qunying/QYAchievementCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 367255ddd03841c48b32d105723c0c29
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/Qunying/QYAchievementWin.cs b/Main/System/Qunying/QYAchievementWin.cs
new file mode 100644
index 0000000..5ac9a66
--- /dev/null
+++ b/Main/System/Qunying/QYAchievementWin.cs
@@ -0,0 +1,62 @@
+using System.Collections.Generic;
+using System.Linq;
+using Cysharp.Threading.Tasks;
+using LitJson;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class QYAchievementWin : UIBase
+{
+    [SerializeField] ScrollerController scroller;
+    [SerializeField] Button closeBtn;
+
+    protected override void InitComponent()
+    {
+
+        closeBtn.AddListener(() =>
+        {
+            CloseWindow();
+        });
+        
+       
+    }
+
+    protected override void OnPreOpen()
+    {
+        scroller.OnRefreshCell += OnRefreshCell;
+        QunyingManager.Instance.OnUpdateQunyingInfoEvent += OnUpdateQunyingInfo;
+
+        scroller.Refresh();
+        var keys = QunyingManager.Instance.achievementAwards.Keys.ToList();
+        keys.Sort();
+        int jumpIndex = 0;
+        for (int i = 0; i < keys.Count; i++)
+        {
+            scroller.AddCell(ScrollerDataType.Header, keys[i]);
+            if (QunyingManager.Instance.GetAchievementState(keys[i]) == 1)
+            {
+                jumpIndex = i;
+            }
+        }
+        scroller.Restart();
+        scroller.JumpIndex(jumpIndex - 5);
+    }
+
+    protected override void OnPreClose()
+    {
+        scroller.OnRefreshCell -= OnRefreshCell;
+        QunyingManager.Instance.OnUpdateQunyingInfoEvent -= OnUpdateQunyingInfo;
+    }
+
+
+    private void OnRefreshCell(ScrollerDataType type, CellView cellView)
+    {
+        var cell = cellView as QYAchievementCell;
+        cell.Display(cell.index);
+    }
+
+    void OnUpdateQunyingInfo()
+    {
+        scroller.m_Scorller.RefreshActiveCellViews();
+    }
+}
\ No newline at end of file
diff --git a/Main/System/Qunying/QYAchievementWin.cs.meta b/Main/System/Qunying/QYAchievementWin.cs.meta
new file mode 100644
index 0000000..7cc7848
--- /dev/null
+++ b/Main/System/Qunying/QYAchievementWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5a46d946f42d0ae40929cfb07cc095a4
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/Qunying/QYBattleFailWin.cs b/Main/System/Qunying/QYBattleFailWin.cs
index 95ab80c..befbd8e 100644
--- a/Main/System/Qunying/QYBattleFailWin.cs
+++ b/Main/System/Qunying/QYBattleFailWin.cs
@@ -70,9 +70,9 @@
     // itemInfo:濂栧姳鐗╁搧鍒楄〃锛屽彲鑳戒负绌�
     void Display()
     {
-        if (!jsonData.ContainsKey("tagID"))
+        if (!jsonData.ContainsKey("tagPlayerID"))
             return;
-        uint tagPlayerID = (uint)jsonData["tagID"];
+        uint tagPlayerID = (uint)jsonData["tagPlayerID"];
 
         if (!QunyingManager.Instance.TryGetPlayerInfo(tagPlayerID, out QunyingMatchInfo info))
             return;
diff --git a/Main/System/Qunying/QYFighterCell.cs b/Main/System/Qunying/QYFighterCell.cs
index 17dd062..8c02e86 100644
--- a/Main/System/Qunying/QYFighterCell.cs
+++ b/Main/System/Qunying/QYFighterCell.cs
@@ -42,7 +42,7 @@
 
         queryPlayerBtn.AddListener(() =>
         {
-            if (matchInfo.PlayerID < 1000000) return;
+            if (GeneralDefine.IsRobot((int)matchInfo.PlayerID)) return;
             AvatarHelper.TryViewOtherPlayerInfo((int)matchInfo.PlayerID, viewPlayerLineupType: (int)BattlePreSetType.Qunying);
         });
 
@@ -122,7 +122,7 @@
 
         nameText.text = UIHelper.ServerStringTrim(matchInfo.PlayerName);
 
-        if (matchInfo.ServerID == 0)
+        if (GeneralDefine.IsRobot((int)matchInfo.PlayerID))
         {
             serverText.text = Language.Get("Qunying15");
         }
diff --git a/Main/System/Qunying/QYNoteCell.cs b/Main/System/Qunying/QYNoteCell.cs
new file mode 100644
index 0000000..e4f85ab
--- /dev/null
+++ b/Main/System/Qunying/QYNoteCell.cs
@@ -0,0 +1,74 @@
+using System.Collections.Generic;
+using UnityEngine;
+using System;
+using UnityEngine.UI;
+
+public class QYNoteCell : CellView
+{
+    [SerializeField] ImageEx atkTypeImg;
+    [SerializeField] Text atkTypeTxt;
+    [SerializeField] AvatarCell avatarCell;
+    [SerializeField] TextEx lvTxt;
+    [SerializeField] TextEx nameTxt;
+    [SerializeField] TextEx rankTxt;
+    [SerializeField] TextEx serverTxt;
+    [SerializeField] Image stateImg;    //鑳滆礋
+    
+    [SerializeField] AvatarCell tagAvatarCell;
+    [SerializeField] TextEx tagLVTxt;
+    [SerializeField] TextEx tagNameTxt;
+    [SerializeField] TextEx tagRankTxt;
+    [SerializeField] TextEx tagServerTxt;
+    [SerializeField] Image tagStateImg;
+
+    // [SerializeField] ButtonEx replayBtn; //闇�瑕丟UID
+    QunyingGameRec arenaGameRec;
+
+
+    public void Display(int index)
+    {
+        uint playerID = PlayerDatas.Instance.baseData.PlayerID;
+        QunyingManager.Instance.TryGetSortedGameRecList(playerID, out List<QunyingGameRec> sortedList);
+        if (sortedList.IsNullOrEmpty() || index < 0 || index >= sortedList.Count)
+            return;
+        arenaGameRec = sortedList[index];
+
+        atkTypeImg.SetSprite("QYAtkType" + arenaGameRec.Value2);
+        atkTypeTxt.text = arenaGameRec.Value2 == 1 ? Language.Get("mainui2") : Language.Get("herocard28");
+
+        //鍙栫帺瀹惰嚜宸辩殑鏁版嵁
+        avatarCell.InitUI(AvatarHelper.GetAvatarModel((int)PlayerDatas.Instance.baseData.PlayerID,
+                                        PlayerDatas.Instance.baseData.face,
+                                        PlayerDatas.Instance.baseData.facePic));
+        lvTxt.text = PlayerDatas.Instance.baseData.LV.ToString();
+        nameTxt.text = PlayerDatas.Instance.baseData.PlayerName;
+        serverTxt.text = ServerListCenter.Instance.GetServerName(UIHelper.GetServerIDByAccount(PlayerDatas.Instance.baseData.AccID));
+        stateImg.SetSprite("QYResult" + (arenaGameRec.Value4 == 1 ? 1 : 2));
+        rankTxt.text = Language.Get("Qunying20") + arenaGameRec.CurRank;
+
+        tagAvatarCell.InitUI(AvatarHelper.GetAvatarModel((int)arenaGameRec.Value3, (int)arenaGameRec.Value5, (int)arenaGameRec.Value6));
+        
+        tagAvatarCell.SetListener(() =>
+        {
+            if (GeneralDefine.IsRobot((int)arenaGameRec.Value3)) return;
+            AvatarHelper.TryViewOtherPlayerInfo((int)arenaGameRec.Value3, viewPlayerLineupType: (int)BattlePreSetType.Arena);
+        });
+        tagLVTxt.text = arenaGameRec.Value8.ToString();
+        tagNameTxt.text = arenaGameRec.Name;
+        
+        if (GeneralDefine.IsRobot((int)arenaGameRec.Value3))
+        {
+            tagServerTxt.text = Language.Get("Qunying15");
+        }
+        else
+        {
+            tagServerTxt.text = ServerListCenter.Instance.GetServerName((int)arenaGameRec.Value1);
+        }
+        tagRankTxt.text = Language.Get("Qunying20") + arenaGameRec.TagRank;
+        tagStateImg.SetSprite("QYResult" + (arenaGameRec.Value4 == 1 ? 2 : 1));
+    
+
+    }
+
+   
+}
diff --git a/Main/System/Qunying/QYNoteCell.cs.meta b/Main/System/Qunying/QYNoteCell.cs.meta
new file mode 100644
index 0000000..cdcd084
--- /dev/null
+++ b/Main/System/Qunying/QYNoteCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fd46d4292beb1db4589734bcafc14387
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/Qunying/QYNoteWin.cs b/Main/System/Qunying/QYNoteWin.cs
new file mode 100644
index 0000000..8f09d09
--- /dev/null
+++ b/Main/System/Qunying/QYNoteWin.cs
@@ -0,0 +1,63 @@
+using System.Collections.Generic;
+using UnityEngine;
+
+public class QYNoteWin : UIBase
+{
+    [SerializeField] ScrollerController scrollerController;
+
+    protected override void OnPreOpen()
+    {
+        SendRec();
+        scrollerController.OnRefreshCell += OnRefreshCell;
+        QunyingManager.Instance.OnUpdateGameRecInfo += OnUpdateGameRecInfo;
+        Display();
+    }
+
+    protected override void OnPreClose()
+    {
+        scrollerController.OnRefreshCell -= OnRefreshCell;
+        QunyingManager.Instance.OnUpdateGameRecInfo -= OnUpdateGameRecInfo;
+    }
+
+
+
+    private void OnUpdateGameRecInfo()
+    {
+        Display();
+    }
+
+    void OnRefreshCell(ScrollerDataType type, CellView cell)
+    {
+        var _cell = cell.GetComponent<QYNoteCell>();
+        _cell?.Display(cell.index);
+    }
+
+    private void CreateScroller()
+    {
+        scrollerController.Refresh();
+        uint playerID = PlayerDatas.Instance.baseData.PlayerID;
+        QunyingManager.Instance.TryGetSortedGameRecList(playerID, out List<QunyingGameRec> sortedList);
+        if (!sortedList.IsNullOrEmpty())
+        {
+            for (int i = 0; i < sortedList.Count; i++)
+            {
+                scrollerController.AddCell(ScrollerDataType.Header, i);
+            }
+        }
+        scrollerController.Restart();
+    }
+
+    void Display()
+    {
+        CreateScroller();
+    }
+
+
+    void SendRec()
+    {
+        CA008_tagCSViewGameRec pack = new CA008_tagCSViewGameRec();
+        pack.RecType = 312;
+        pack.RecID = PlayerDatas.Instance.baseData.PlayerID;
+        GameNetSystem.Instance.SendInfo(pack);
+    }
+}
diff --git a/Main/System/Qunying/QYNoteWin.cs.meta b/Main/System/Qunying/QYNoteWin.cs.meta
new file mode 100644
index 0000000..5582605
--- /dev/null
+++ b/Main/System/Qunying/QYNoteWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b8031772edc07284dac0925efb26aaf7
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/Qunying/QYPlayerTop3Cell.cs b/Main/System/Qunying/QYPlayerTop3Cell.cs
index 9772f61..5705ad1 100644
--- a/Main/System/Qunying/QYPlayerTop3Cell.cs
+++ b/Main/System/Qunying/QYPlayerTop3Cell.cs
@@ -24,8 +24,7 @@
             return;
         }
         officialTitleCell.SetActive(true);
-        var sid = UIHelper.GetServerIDByAccount(rankData.name2);
-        if (sid == 0)
+        if (GeneralDefine.IsRobot((int)rankData.id))
         {
             serverText.text = Language.Get("Qunying15");
         }
@@ -39,7 +38,7 @@
         model.Create(HorseManager.Instance.GetOtherPlayerHorseSkinID((int)rankData.value6), (int)rankData.value5, 0.9f);
         queryPlayerBtn.SetListener(() =>
         {
-            if (rankData.id < 1000000) return;
+            if (GeneralDefine.IsRobot((int)rankData.id)) return;
             AvatarHelper.TryViewOtherPlayerInfo((int)rankData.id, viewPlayerLineupType: (int)BattlePreSetType.Qunying);
         });
         fightPowerText.text = UIHelper.ReplaceLargeArtNum(rankData.fightPower);
diff --git a/Main/System/Qunying/QYRankAwardCell.cs b/Main/System/Qunying/QYRankAwardCell.cs
new file mode 100644
index 0000000..717f2fe
--- /dev/null
+++ b/Main/System/Qunying/QYRankAwardCell.cs
@@ -0,0 +1,54 @@
+using System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+
+public class QYRankAwardCell : CellView
+{
+    [SerializeField] ImageEx imgRank;
+    [SerializeField] TextEx txtRank;
+    [SerializeField] ItemCell[] itemCells;
+    public void Display(int index, int order)
+    {
+        Dictionary<int, int[][]> rewardDict = QunyingManager.Instance.GetRankAwardDict(order);
+        if (rewardDict.IsNullOrEmpty())
+            return;
+        var list = rewardDict.Keys.ToList();
+        list.Sort();
+
+
+        int rank = list[index];
+        
+        if (rank <= 3)
+        {
+            imgRank.SetActive(true);
+            txtRank.SetActive(false);
+            imgRank.SetSprite($"Rank{rank}");
+            txtRank.text = rank.ToString();
+        }
+        else
+        {
+            imgRank.SetActive(false);
+            txtRank.SetActive(true);
+            int lastIndex = index - 1;
+            txtRank.text = lastIndex > 0 && lastIndex < list.Count ? Language.Get("Arena15", list[lastIndex] + 1, rank) : string.Empty;
+        }
+
+        int key = list[index];
+        int[][] rewardArr = rewardDict[key];
+        for (int i = 0; i < itemCells.Length; i++)
+        {
+            var itemCell = itemCells[i];
+            if (!rewardArr.IsNullOrEmpty() && i < rewardArr.Length)
+            {
+                int itemCellIndex = i;
+                itemCell.SetActive(true);
+                itemCell.Init(new ItemCellModel(rewardArr[i][0], true, rewardArr[i][1]));
+                itemCell.button.SetListener(() => ItemTipUtility.Show(rewardArr[itemCellIndex][0]));
+            }
+            else
+            {
+                itemCell.SetActive(false);
+            }
+        }
+    }
+}
diff --git a/Main/System/Qunying/QYRankAwardCell.cs.meta b/Main/System/Qunying/QYRankAwardCell.cs.meta
new file mode 100644
index 0000000..1f4a828
--- /dev/null
+++ b/Main/System/Qunying/QYRankAwardCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2b2a9b63aec1f704190eeccbb5a7228b
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/Qunying/QYRankAwardWin.cs b/Main/System/Qunying/QYRankAwardWin.cs
new file mode 100644
index 0000000..962b3c8
--- /dev/null
+++ b/Main/System/Qunying/QYRankAwardWin.cs
@@ -0,0 +1,140 @@
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class QYRankAwardWin : UIBase
+{
+    [SerializeField] Text titleText;
+    [SerializeField] ScrollerController scroller;
+    [SerializeField] Text myRankText;
+    [SerializeField] ItemCell[] itemCells;
+    [SerializeField] Transform unRankText;
+    [SerializeField] Text noAwardText;
+    [SerializeField] Text timeText;
+    [SerializeField] GroupButtonEx weekBtn;
+    [SerializeField] GroupButtonEx dayBtn;
+
+    protected override void InitComponent()
+    {
+        weekBtn.AddListener(()=>
+        {
+            functionOrder = 0;
+            Display();
+        });
+        dayBtn.AddListener(()=>
+        {
+            functionOrder = 1;
+            Display();
+        });
+    }
+
+    protected override void OnPreOpen()
+    {
+        if (functionOrder == 0)
+        {
+            weekBtn.SelectBtn();
+        }
+        else
+        {
+            dayBtn.SelectBtn();
+        }
+
+        scroller.OnRefreshCell += OnRefreshCell;
+        GlobalTimeEvent.Instance.secondEvent += OnSecondEvent;
+        Display();
+
+    }
+
+    protected override void OnPreClose()
+    {
+        scroller.OnRefreshCell -= OnRefreshCell;
+        GlobalTimeEvent.Instance.secondEvent -= OnSecondEvent;
+    }
+
+
+    private void OnRefreshCell(ScrollerDataType type, CellView cellView)
+    {
+        var cell = cellView as QYRankAwardCell;
+        cell.Display(cell.index, functionOrder);
+    }
+    private void OnSecondEvent()
+    {
+        if (functionOrder == 0)
+        {
+            timeText.text = Language.Get("Arena14", QunyingManager.Instance.GetEndSecondStr());
+
+        }
+        else
+        {
+            timeText.text = Language.Get("Arena14", TimeUtility.SecondsToDHMS((int)(TimeUtility.GetCommTodayEndTime(0) -
+                            TimeUtility.GetCommServerNow(GuildManager.Instance.zoneID)).TotalSeconds));
+        }
+
+    }
+
+    void Display()
+    {
+        scroller.Refresh();
+        if (functionOrder == 1)
+        {
+            titleText.text = Language.Get("Qunying18");
+        }
+        else
+        {
+            titleText.text = Language.Get("Qunying19");
+        }
+        var keys = QunyingManager.Instance.GetRankAwardDict(functionOrder).Keys.ToList();
+        keys.Sort();
+        for (int i = 0; i < keys.Count; i++)
+        {
+            scroller.AddCell(ScrollerDataType.Header, i);
+        }
+        scroller.Restart();
+
+        OnSecondEvent();
+
+        var myMatch = QunyingManager.Instance.GetMyMatchInfo(out var index);
+        if (myMatch != null)
+        {
+            myRankText.SetActive(true);
+            unRankText.SetActive(false);
+            myRankText.text = myMatch.Rank.ToString();
+            var awards = QunyingManager.Instance.GetMyRankAwards(functionOrder, myMatch.Rank);
+            if (awards.IsNullOrEmpty())
+            {
+                noAwardText.SetActive(true);
+                for (int i = 0; i < itemCells.Length; i++)
+                {
+                    itemCells[i].SetActive(false);
+                }
+            }
+            else
+            {
+                noAwardText.SetActive(false);
+                for (int i = 0; i < itemCells.Length; i++)
+                {
+                    if (i < awards.Length)
+                    {
+                        itemCells[i].SetActive(true);
+                        int itemID = awards[i][0];
+                        itemCells[i].Init(new ItemCellModel(itemID, false, awards[i][1]));
+                        itemCells[i].button.SetListener(() => ItemTipUtility.Show(itemID));
+                    }
+                    else
+                    {
+                        itemCells[i].SetActive(false);
+                    }
+                }
+            }
+
+        }
+        else
+        {
+            myRankText.SetActive(false);
+            unRankText.SetActive(true);
+            noAwardText.SetActive(true);
+        }
+
+
+    }
+}
\ No newline at end of file
diff --git a/Main/System/Qunying/QYRankAwardWin.cs.meta b/Main/System/Qunying/QYRankAwardWin.cs.meta
new file mode 100644
index 0000000..82925a6
--- /dev/null
+++ b/Main/System/Qunying/QYRankAwardWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 40adbfa987c6b18468007c00c7d14d4e
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/Qunying/QYStoreWin.cs b/Main/System/Qunying/QYStoreWin.cs
new file mode 100644
index 0000000..8556cdc
--- /dev/null
+++ b/Main/System/Qunying/QYStoreWin.cs
@@ -0,0 +1,73 @@
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class QYStoreWin : UIBase
+{
+
+    [SerializeField] ScrollerController scroller;
+
+
+    protected override void OnPreOpen()
+    {
+        StoreModel.Instance.selectStoreFuncType = StoreFunc.Qunying;
+        scroller.OnRefreshCell += OnRefreshCell;
+        StoreModel.Instance.RefreshShopEvent += Display;
+        StoreModel.Instance.RefreshBuyShopLimitEvent += Display;
+        
+        Display();
+    }
+
+    protected override void OnPreClose()
+    {
+        scroller.OnRefreshCell -= OnRefreshCell;
+        StoreModel.Instance.RefreshShopEvent -= Display;
+        StoreModel.Instance.RefreshBuyShopLimitEvent -= Display;
+    }
+
+    void Display()
+    {
+        CreateScroller();
+    }
+
+
+
+    void CreateScroller()
+    {
+        if (!StoreModel.Instance.storeTypeDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType))
+        {
+            return;
+        }
+
+        scroller.Refresh();
+        int jumpIndex = -1;
+        var list = StoreModel.Instance.storeTypeDict[(int)StoreModel.Instance.selectStoreFuncType];
+        for (int i = 0; i < list.Count; i++)
+        {
+            if (i % 3 == 0)
+            {
+                scroller.AddCell(ScrollerDataType.Header, i);
+            }
+            if (jumpIndex == -1 && list[i].shopId == StoreModel.Instance.jumpShopID)
+            {
+                jumpIndex = i / 3;
+            }
+        }
+        scroller.Restart();
+        scroller.lockType = EnhanceLockType.KeepVertical;
+        if (StoreModel.Instance.jumpShopID != 0)
+        {
+            scroller.JumpIndex(jumpIndex);
+            StoreModel.Instance.jumpShopID = 0;
+        }
+    }
+
+
+    void OnRefreshCell(ScrollerDataType type, CellView cell)
+    {
+        var _cell = cell as StoreLineCell;
+        _cell.Display(cell.index);
+    }
+
+
+}
diff --git a/Main/System/Qunying/QYStoreWin.cs.meta b/Main/System/Qunying/QYStoreWin.cs.meta
new file mode 100644
index 0000000..a01cfe7
--- /dev/null
+++ b/Main/System/Qunying/QYStoreWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 47a5fdf362707eb469b6cab4d016a64b
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/Qunying/QYWin.cs b/Main/System/Qunying/QYWin.cs
index 496dbbd..4f9fcf3 100644
--- a/Main/System/Qunying/QYWin.cs
+++ b/Main/System/Qunying/QYWin.cs
@@ -13,9 +13,68 @@
     [SerializeField] ScrollRect battleScrollRect;
     [SerializeField] Button closeBtn;
 
+    [SerializeField] Text gameTimeText;
+    [SerializeField] Button buyTicketBtn;
+    [SerializeField] Text ticketCountText;
+    [SerializeField] Text ticketTimeText;
+
+    [SerializeField] Button achievementBtn;
+    [SerializeField] Text achievementTargetText;
+    [SerializeField] Text rankText;
+    [SerializeField] Button defentPosBtn;
+    [SerializeField] Button attackPosBtn;
+    [SerializeField] Button refreshBtn;
+    [SerializeField] Text refreshMoneyText;
+    [SerializeField] Image refreshMoneyImg;
+    [SerializeField] Text refreshCntText;
+
+    [SerializeField] Button storeBtn;
+    [SerializeField] Button rankBtn;
+    [SerializeField] Button awardBtn;
+    [SerializeField] Button noteBtn;
+
     protected override void InitComponent()
     {
         closeBtn.AddListener(CloseWindow);
+        buyTicketBtn.AddListener(() =>
+        {
+            StoreModel.Instance.ShowBuyItem(QunyingManager.challengeShopID);
+        });
+        achievementBtn.AddListener(() =>
+        {
+            UIManager.Instance.OpenWindow<QYAchievementWin>();
+        });
+        defentPosBtn.AddListener(() =>
+        {
+            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Qunying);
+        });
+        attackPosBtn.AddListener(() =>
+        {
+            FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Story);
+        });
+        refreshBtn.AddListener(() =>
+        {
+            RefreshFighters();
+        });
+
+        storeBtn.AddListener(() =>
+        {
+            UIManager.Instance.OpenWindow<QYStoreWin>();
+        });
+        rankBtn.AddListener(() =>
+        {
+            RankModel.Instance.ResetQueryParam();
+            RankModel.Instance.QueryRankByPage(QunyingManager.rankType);
+            UIManager.Instance.OpenWindow<PlayerRankWin>(QunyingManager.rankType);
+        });
+        awardBtn.AddListener(() =>
+        {
+            UIManager.Instance.OpenWindow<QYRankAwardWin>(1);
+        });
+        noteBtn.AddListener(() =>
+        {
+            UIManager.Instance.OpenWindow<QYNoteWin>();
+        });
     }
 
     protected override void OnPreOpen()
@@ -35,6 +94,9 @@
 
         RankModel.Instance.onRankRefresh += OnRankRefresh;
         QunyingManager.Instance.OnMatchListEvent += OnMatchListEvent;
+        PlayerDatas.Instance.playerDataRefreshEvent += OnPlayerDataRefresh;
+        GlobalTimeEvent.Instance.secondEvent += OnSecondEvent;
+        QunyingManager.Instance.OnUpdateQunyingInfoEvent += OnUpdateQunyingInfoEvent;
 
         Display();
     }
@@ -64,14 +126,45 @@
     {
         RankModel.Instance.onRankRefresh -= OnRankRefresh;
         QunyingManager.Instance.OnMatchListEvent -= OnMatchListEvent;
+        PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerDataRefresh;
+        GlobalTimeEvent.Instance.secondEvent -= OnSecondEvent;
+        QunyingManager.Instance.OnUpdateQunyingInfoEvent -= OnUpdateQunyingInfoEvent;
         QunyingManager.Instance.openQYWinNeedRoll = true;
+
     }
 
-
+    void OnSecondEvent()
+    {
+        ShowGameTime();
+    }
     void Display()
     {
         DisplayFighers();
         DisplayPlayerTop3();
+        ShowGameTime();
+        ShowTicketCnt();
+        OnUpdateQunyingInfoEvent();
+
+
+    }
+
+    //娲诲姩鏃堕棿
+    void ShowGameTime()
+    {
+        gameTimeText.text = QunyingManager.Instance.GetEndSecondStr();
+        if (QunyingManager.Instance.m_LastRecoverTime == 0)
+        {
+            ticketTimeText.text = "";
+        }
+        else
+        {
+            ticketTimeText.text = Language.Get("Qunying6", TimeUtility.SecondsToDHMS(QunyingManager.Instance.restoreTicketMinute * 60 - (TimeUtility.GetCommServerTick() - (int)QunyingManager.Instance.m_LastRecoverTime)));
+        }
+    }
+
+    void ShowTicketCnt()
+    {
+        ticketCountText.text = UIHelper.GetMoneyCnt(QunyingManager.challengeMoneyType) + "/" + QunyingManager.Instance.challengeMaxCnt;
     }
 
 
@@ -83,11 +176,37 @@
         }
     }
 
+    void OnPlayerDataRefresh(PlayerDataType type)
+    {
+        if (type == PlayerDataType.QunyingWDL)
+        {
+            DisplayFighers();
+            ShowTicketCnt();
+        }
+    }
+
     void OnRankRefresh(int type)
     {
         if (type != QunyingManager.rankType)
             return;
         DisplayPlayerTop3();
+    }
+
+    void OnUpdateQunyingInfoEvent()
+    {
+        var nextRank = QunyingManager.Instance.GetNextAchievementRank();
+        if (nextRank == 0)
+        {
+            achievementTargetText.text = Language.Get("Qunying17");
+        }
+        else
+        {
+            achievementTargetText.text = Language.Get("Qunying4", nextRank);
+        }
+
+        refreshMoneyText.text = UIHelper.ShowUseMoney(QunyingManager.Instance.refreshMoneyType, QunyingManager.Instance.refreshMoneyValue);
+        refreshMoneyImg.SetIconWithMoneyType(QunyingManager.Instance.refreshMoneyType);
+        refreshCntText.text = QunyingManager.Instance.m_RefreshCnt + "/" + QunyingManager.Instance.refreshMaxCnt;
     }
 
     void DisplayFighers()
@@ -101,14 +220,40 @@
     void OnMatchListEvent()
     {
         //婊氬姩鍒拌嚜宸辩殑浣嶇疆
+        var myMatch = QunyingManager.Instance.GetMyMatchInfo(out int index);
         if (QunyingManager.Instance.openQYWinNeedRoll)
         {
-            var myMatch = QunyingManager.Instance.GetMyMatchInfo(out int index);
             SmoothScrollToBottom(myMatch == null ? 0.1f : (4 - index) * 0.15f + 0f).Forget();
         }
+        if (myMatch != null)
+        {
+            rankText.text = Language.Get("Qunying5", myMatch.Rank);
+        }
+        else
+        {
+            rankText.text = Language.Get("L1045");
+        }
         DisplayFighers();
     }
 
+
+    void RefreshFighters()
+    {
+        //楠岃瘉閽卞拰娆℃暟
+        if (!UIHelper.CheckMoneyCount(QunyingManager.Instance.refreshMoneyType, QunyingManager.Instance.refreshMoneyValue, 1))
+        {
+            return;
+        }
+
+        if (QunyingManager.Instance.m_RefreshCnt >= QunyingManager.Instance.refreshMaxCnt)
+        {
+            SysNotifyMgr.Instance.ShowTip("Qunying1");
+            return;
+        }
+
+        QunyingManager.Instance.RequestRefreshFighters(1);
+    }
+
 }
 
 
diff --git a/Main/System/Qunying/QunyingManager.cs b/Main/System/Qunying/QunyingManager.cs
index 57306e0..503ec64 100644
--- a/Main/System/Qunying/QunyingManager.cs
+++ b/Main/System/Qunying/QunyingManager.cs
@@ -2,10 +2,11 @@
 using UnityEngine;
 using LitJson;
 using System;
+using System.Linq;
 
 public class QunyingManager : GameSystemManager<QunyingManager>
 {
-    public const int challengeMoneyType = 56;
+    public const int challengeMoneyType = 56;   //鎸戞垬 闂紟浠�
     public const int challengeShopID = 16;
     public const int rankType = 10;
     public const int recType = 312;  // 鎸戞垬璁板綍绫诲瀷 
@@ -15,13 +16,19 @@
     public List<QunyingMatchInfo> matchInfoList = new List<QunyingMatchInfo>();
     //鐢ㄤ簬鐢ㄦ潵鎷挎垬鏂楄儨鍒╁け璐ョ殑澶村儚淇℃伅
     public Dictionary<uint, QunyingMatchInfo> allFaceInfoDict = new Dictionary<uint, QunyingMatchInfo>();
-    public Dictionary<uint, List<QunyingGameRec>> gameRecDict = new Dictionary<uint, List<QunyingGameRec>>(); // <RecID,QunyingGameRec>
+    public Dictionary<uint, List<QunyingGameRec>> gameRecDict = new Dictionary<uint, List<QunyingGameRec>>(); // <鐜╁ID,QunyingGameRec>
     public uint atkPlayerId;
     public int tagRank; //鎸戞垬鐩爣鐨勬帓鍚� 缁撴灉鏄剧ず鐢�
     public event Action OnUpdateGameRecInfo;
 
     public bool openQYWinNeedRoll = true; //鎵撳紑缇よ嫳鐣岄潰闇�瑕佹粴鍔ㄧ殑鎯呭喌
 
+    public uint m_RefreshCnt;    // 鏈懆宸插埛鏂板尮閰嶆鏁�
+    public uint m_LastRecoverTime;    // 涓婃鍏嶈垂鎭㈠鎸戞垬浠ゆ椂闂存埑锛屼负0鏃跺彲涓嶇敤鍊掕鏃�
+    public ushort m_RankHighest;    // 鍘嗗彶鏈�楂樺悕娆★紝绗�1鍚嶄负鏈�楂�
+    public uint m_RankSuccAward;    // 鍘嗗彶鏈�楂樺悕娆℃垚灏遍濂栬褰曪紝鎸夊鍔辫褰曠储寮曚綅杩愮畻璁板綍鏄惁宸查鍙�
+
+    public event Action OnUpdateQunyingInfoEvent;
 
 
     public override void Init()
@@ -48,7 +55,7 @@
     public Dictionary<int, int[][]> weekRankAwards = new Dictionary<int, int[][]>();
     public Dictionary<int, int[][]> achievementAwards = new Dictionary<int, int[][]>();
     public Dictionary<int, int> achievementIndexs = new Dictionary<int, int>();
-    
+
     void InitTable()
     {
         var config = FuncConfigConfig.Get("QunyingSet");
@@ -76,16 +83,15 @@
     {
         matchInfoList.Clear();
     }
-    
+
     private void PlayerDataRefresh(PlayerDataType type)
     {
-        UpdateRedPonit();
+        if (type == PlayerDataType.QunyingWDL)
+        {
+            UpdateRedPonit();
+        }
     }
 
-    public void UpdateRedPonit()
-    {
-
-    }
 
 
     public void UpdateQunyingMatchInfo(HA924_tagSCQunyingMatchList vNetData)
@@ -116,12 +122,20 @@
             allFaceInfoDict[item.PlayerID] = matchInfo;
         }
         matchInfoList.Sort((a, b) => a.Rank.CompareTo(b.Rank));
+
+        UpdateRedPonit();
         OnMatchListEvent?.Invoke();
     }
 
     public void UpdateQunyingInfo(HA925_tagSCQunyingPlayerInfo vNetData)
     {
+        m_RefreshCnt = vNetData.RefreshCnt;
+        m_LastRecoverTime = vNetData.LastRecoverTime;
+        m_RankHighest = vNetData.RankHighest;
+        m_RankSuccAward = vNetData.RankSuccAward;
 
+        UpdateRedPonit();
+        OnUpdateQunyingInfoEvent?.Invoke();
     }
 
     public void UpdateGameRecInfo(HA009_tagSCGameRecInfo vNetData)
@@ -265,15 +279,137 @@
         //鍒ゆ柇鍔熻兘寮�鍚ぉ鏄惁鍦ㄥ綋鍓嶅懆鍐�
         isThisWeek = openFuncDay >= currentWeekStart && openFuncDay <= currentWeekEnd;
 
-        
+
         if (isThisWeek)
         {
             weekDay = openFuncDay - currentWeekStart + 1;
         }
-        
+
         return true;
     }
 
+    public string GetEndSecondStr()
+    {
+        TryGetOpenWeek(out bool isThisWeek, out int openWeekDay);
+        if (isThisWeek && resetOpenDay - FuncOpenLVConfig.Get((int)FuncOpenEnum.Qunying).OpenDay - 1 > 7 - openWeekDay)
+        {
+            //鏈懆寮�鍚椂闂翠笉瓒� 鍒欏拰涓嬪懆鐨勫悎骞�
+            return TimeUtility.SecondsToDHMS(TimeUtility.GetCommonWeekEndTime() + 7 * 24 * 60 * 60);
+        }
+        else
+        {
+            return  TimeUtility.SecondsToDHMS(TimeUtility.GetCommonWeekEndTime());
+        }
+    }
+
+
+    //鑾峰彇涓嬩竴涓垚灏辩殑鎺掑悕濂栧姳
+    //0 娌℃湁涓嬩竴涓� 鏈�楂�
+    public int GetNextAchievementRank()
+    {
+        var keys = achievementAwards.Keys.ToList();
+        if (m_RankHighest == 0)
+            return keys[keys.Count - 1];
+        keys.Sort();
+        for (int i = 0; i < keys.Count; i++)
+        {
+            if (m_RankHighest <= keys[i])
+            {
+                if (i == 0)
+                {
+                    return 0;
+                }
+                return keys[i - 1];
+            }
+        }
+        return keys[keys.Count - 1];
+    }
+
+    //0 鏈揪鎴� 1 杈炬垚 2 宸查鍙�
+    public int GetAchievementState(int rank)
+    {
+        if (m_RankHighest == 0)
+            return 0;
+        if (m_RankHighest > rank)
+            return 0;
+
+        var awardIndex = achievementIndexs[rank];
+        bool isGot = (m_RankSuccAward & (1 << awardIndex)) != 0;
+        return isGot ? 2 : 1;
+    }
+
+    public Dictionary<int, int[][]> GetRankAwardDict(int functionOrder)
+    {
+        return functionOrder == 0 ? weekRankAwards : dayRankAwards;
+    }
+
+    public int[][] GetMyRankAwards(int functionOrder, int rank)
+    {
+        if (rank == 0)
+        {
+            return null;
+        }
+        var awardDict = GetRankAwardDict(functionOrder);
+        var keys = awardDict.Keys.ToList();
+        keys.Sort();
+        for (int i = 0; i < keys.Count; i++)
+        {
+            if (rank <= keys[i])
+            {
+                return awardDict[keys[i]];
+            }
+        }
+        return null;
+    }
+
+    /// <summary>
+    /// 鏍规嵁recID鑾峰彇鎸夋椂闂翠粠澶у埌灏忔帓搴忕殑List<QunyingGameRec>
+    /// </summary>
+    /// <param name="recID">璁板綍ID</param>
+    /// <param name="sortedList">杈撳嚭鍙傛暟锛氭寜鏃堕棿浠庡ぇ鍒板皬鎺掑簭鐨凲unyingGameRec鍒楄〃</param>
+    /// <returns>濡傛灉recID瀛樺湪涓旀垚鍔熻幏鍙栧垪琛ㄨ繑鍥瀟rue锛屽惁鍒欒繑鍥瀎alse</returns>
+    public bool TryGetSortedGameRecList(uint recID, out List<QunyingGameRec> sortedList)
+    {
+        sortedList = null;
+        if (!gameRecDict.ContainsKey(recID))
+            return false;
+        sortedList = new List<QunyingGameRec>(gameRecDict[recID]);
+        sortedList.Sort((a, b) => b.Time.CompareTo(a.Time)); // 鎸夋椂闂翠粠澶у埌灏忔帓搴�
+        return true;
+    }
+
+    #region 绾㈢偣
+
+    public Redpoint parentRedpoint = new Redpoint(MainRedDot.Qunying);
+    Redpoint awardRedpoint = new Redpoint(MainRedDot.Qunying, MainRedDot.Qunying * 10 + 1);
+    Redpoint matchRedpoint = new Redpoint(MainRedDot.Qunying, MainRedDot.Qunying * 10 + 2);
+    public void UpdateRedPonit()
+    {
+        awardRedpoint.state = RedPointState.None;
+        matchRedpoint.state = RedPointState.None;
+
+        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Qunying))
+        {
+            return;
+        }
+
+        var keys = achievementAwards.Keys.ToList();
+        for (int i = 0; i < keys.Count; i++)
+        {
+            if (GetAchievementState(keys[i]) == 1)
+            {
+                awardRedpoint.state = RedPointState.Simple;
+                break;
+            }
+        }
+
+        if (UIHelper.GetMoneyCnt(challengeMoneyType) >= challengeMaxCnt)
+        {
+            matchRedpoint.state = RedPointState.Simple;
+        }
+        
+    }
+    #endregion
 }
 
 public class QunyingMatchInfo
@@ -297,7 +433,7 @@
 public class QunyingGameRec
 {
     public uint Time;        //鎴樻枟鏃堕棿鎴�
-    public uint Value1;        //鏃�
+    public uint Value1;        //sid
     public uint Value2;        //鏀诲嚮绫诲瀷 1-鍙戣捣鏀诲嚮鐨勶紝2-琚敾鍑荤殑
     public uint Value3;        //鐩稿鏀诲嚮绫诲瀷鐨勭洰鏍囩帺瀹禝D
     public uint Value4;        //鏄惁鑾疯儨 1-鑾疯儨锛�2-澶辫触
diff --git a/Main/System/Store/SkinStoreCell.cs b/Main/System/Store/SkinStoreCell.cs
index 0abe417..fc34772 100644
--- a/Main/System/Store/SkinStoreCell.cs
+++ b/Main/System/Store/SkinStoreCell.cs
@@ -19,7 +19,7 @@
 
     public void Display(int index)
     {
-        var list = StoreModel.Instance.storeTypeDict[StoreModel.skinStoreType];
+        var list = StoreModel.Instance.storeTypeDict[(int)StoreFunc.HeroSkin];
         var storeData = list[index];
         int shopID = storeData.shopId;
         var itemID = storeData.storeConfig.ItemID;
diff --git a/Main/System/Store/SkinStoreLineCell.cs b/Main/System/Store/SkinStoreLineCell.cs
index c71f498..d637c35 100644
--- a/Main/System/Store/SkinStoreLineCell.cs
+++ b/Main/System/Store/SkinStoreLineCell.cs
@@ -10,7 +10,7 @@
 
     public void Display(int index)
     {
-        var list = StoreModel.Instance.storeTypeDict[StoreModel.skinStoreType];
+        var list = StoreModel.Instance.storeTypeDict[(int)StoreFunc.HeroSkin];
 
         for (int i = 0; i < storeCells.Length; i++)
         {
diff --git a/Main/System/Store/SkinStoreWin.cs b/Main/System/Store/SkinStoreWin.cs
index 57f3195..b9ff542 100644
--- a/Main/System/Store/SkinStoreWin.cs
+++ b/Main/System/Store/SkinStoreWin.cs
@@ -48,14 +48,14 @@
 
     void CreateScroller()
     {
-        if (!StoreModel.Instance.storeTypeDict.ContainsKey(StoreModel.skinStoreType))
+        if (!StoreModel.Instance.storeTypeDict.ContainsKey((int)StoreFunc.HeroSkin))
         {
             return;
         }
 
         int jumpIndex = -1;
         scroller.Refresh();
-        var list = StoreModel.Instance.storeTypeDict[StoreModel.skinStoreType];
+        var list = StoreModel.Instance.storeTypeDict[(int)StoreFunc.HeroSkin];
         for (int i = 0; i < list.Count; i++)
         {
             if (i % 4 == 0)
diff --git a/Main/System/Store/StoreModel.cs b/Main/System/Store/StoreModel.cs
index ba391f2..32856e4 100644
--- a/Main/System/Store/StoreModel.cs
+++ b/Main/System/Store/StoreModel.cs
@@ -41,7 +41,7 @@
     public Dictionary<int, List<int>> freeShopDict = new Dictionary<int, List<int>>();  //鍏嶈垂鍟嗗搧 鍟嗗簵绫诲瀷锛氬晢鍝佸垪琛�
     public Dictionary<int, int> shopMoneyTypeDict = new Dictionary<int, int>();
 
-    public const int skinStoreType = 16;
+
 
     public override void Init()
     {
@@ -621,9 +621,11 @@
     DailySpecialsFree = 8, //8: 姣忔棩鐗规儬-姣忔棩鐗规儬鍏嶈垂
     DailyGiftFree = 9, //9: 姣忔棩鐗规儬-姣忔棩绀煎寘鍏嶈垂
     WeeklyGiftFree = 10, //10: 姣忔棩鐗规儬-姣忓懆绀煎寘鍏嶈垂
+    HeroSkin = 16, //16: 鏃惰鍟嗗簵
     OSBeautyMM = 17, //17: 绾㈤鍐叉绀煎寘
     OSHeroTrain = 18, //18: 姝﹀皢鍐叉绀煎寘
     OSMingge = 19, //19: 鍛芥牸鍐叉绀煎寘
+    Qunying = 20, //20: 缇よ嫳绉垎鍟嗗簵
 }
 
 
diff --git a/Main/Utility/TimeUtility.cs b/Main/Utility/TimeUtility.cs
index 514433a..b9db750 100644
--- a/Main/Utility/TimeUtility.cs
+++ b/Main/Utility/TimeUtility.cs
@@ -132,7 +132,7 @@
 
     //寮�鏈嶆椂闂存埑
     public static int openServerTick
-        {
+    {
         get; private set;
     }
 
@@ -412,7 +412,7 @@
             return StringUtility.Concat(hours.ToString(), Language.Get("L1072"), mins.ToString(), Language.Get("L1073"));
         }
         else if (mins > 0)
-        { 
+        {
             return StringUtility.Concat(mins.ToString(), Language.Get("L1073"));
         }
         return StringUtility.Concat(seconds.ToString(), Language.Get("L1075"));
@@ -518,7 +518,7 @@
     }
 
     // 浠婃棩鍒皒鐐硅繕瑕佸灏戠锛屽鏋滃凡缁忚繃浜唜鐐癸紝杩斿洖0
-    public static int GetToTheHourSeconds(int hour=10)
+    public static int GetToTheHourSeconds(int hour = 10)
     {
         var now = ServerNow;
         if (now.Hour < hour)
@@ -588,5 +588,21 @@
         var now = GetCommServerNow(zoneID).AddDays(1);
         return new DateTime(now.Year, now.Month, now.Day);
     }
+
+    //鑾峰彇褰撳墠鍛ㄥ嚑锛�1-7
+    public static int GetCommonWeekday(int zoneID = 0)
+    {
+        var day = GetCommServerNow(zoneID).DayOfWeek;
+        return day == DayOfWeek.Sunday ? 7 : (int)day;
+    }
+
+    //鏈懆缁撴潫鏃堕棿 绉�
+    public static int GetCommonWeekEndTime(int zoneID = 0)
+    {
+        var now = GetCommServerNow(zoneID);
+        var weekDay = GetCommonWeekday(zoneID);
+        var endDay = now.AddDays(7 - weekDay + 1);
+        return (int)(new DateTime(endDay.Year, endDay.Month, endDay.Day) - now).TotalSeconds;
+    }
     #endregion
 }

--
Gitblit v1.8.0