From 78bfe524ea4776c47f6314e56e97f39970b00fce Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 25 九月 2018 15:07:07 +0800
Subject: [PATCH] Merge branch 'master' into 1871天赋功能

---
 System/DogzDungeon/DogzDungeonModel.cs |   71 ++++++++++++++++++++++-------------
 1 files changed, 44 insertions(+), 27 deletions(-)

diff --git a/System/DogzDungeon/DogzDungeonModel.cs b/System/DogzDungeon/DogzDungeonModel.cs
index 9708931..987270f 100644
--- a/System/DogzDungeon/DogzDungeonModel.cs
+++ b/System/DogzDungeon/DogzDungeonModel.cs
@@ -13,14 +13,11 @@
         public const int DATA_MAPID = 21110;
 
         int m_SelectedBoss = 0;
-        public int selectedBoss
-        {
-            get
-            {
+        public int selectedBoss {
+            get {
                 return this.m_SelectedBoss;
             }
-            set
-            {
+            set {
                 if (this.m_SelectedBoss != value)
                 {
                     this.m_SelectedBoss = value;
@@ -33,11 +30,9 @@
         }
 
         int m_WearyValue = 0;
-        public int wearyValue
-        {
+        public int wearyValue {
             get { return m_WearyValue; }
-            set
-            {
+            set {
                 if (m_WearyValue != value)
                 {
                     m_WearyValue = value;
@@ -50,11 +45,9 @@
         }
 
         int m_BigBoxCollectCount = 0;
-        public int bigBoxCollectCount
-        {
+        public int bigBoxCollectCount {
             get { return m_BigBoxCollectCount; }
-            set
-            {
+            set {
                 if (m_BigBoxCollectCount != value)
                 {
                     m_BigBoxCollectCount = value;
@@ -67,8 +60,7 @@
         }
 
         int m_SmallBoxCollectCount = 0;
-        public int smallBoxCollectCount
-        {
+        public int smallBoxCollectCount {
             get { return m_SmallBoxCollectCount; }
             set { m_SmallBoxCollectCount = value; }
         }
@@ -272,18 +264,47 @@
 
         public void UpdateBoxOrEliteRefreshTime(HA904_tagGCDogzNPCRefreshTime _refreshTimes)
         {
+            var containBox = false;
+            var boxRefreshSecond = 0;
+
+            var containElite = false;
+            var eliteRefreshSecond = 0;
+
             for (int i = 0; i < _refreshTimes.InfoList.Length; i++)
             {
                 var info = _refreshTimes.InfoList[i];
                 if (bigBoxNpcId == info.NPCID || smallBoxNpcId == info.NPCID)
                 {
-                    dogzDungeonBox.UpdateBoxRefreshTime((int)info.RefreshSecond);
-                    RequestBoxSurplusInfo();
+                    containBox = true;
+                    boxRefreshSecond = (int)info.RefreshSecond;
                 }
 
                 if (eliteMonsters.Contains((int)info.NPCID))
                 {
-                    dogzDungeonElite.UpdateEliteRefreshTime((int)info.RefreshSecond);
+                    containElite = true;
+                    eliteRefreshSecond = (int)info.RefreshSecond;
+                }
+            }
+
+            if (containBox)
+            {
+                dogzDungeonBox.UpdateBoxRefreshTime(boxRefreshSecond);
+            }
+
+            if (containElite)
+            {
+                dogzDungeonElite.UpdateEliteRefreshTime(eliteRefreshSecond);
+            }
+
+            if (WindowCenter.Instance.CheckOpen("DogzDungeonWin"))
+            {
+                if (containBox)
+                {
+                    RequestBoxSurplusInfo();
+                }
+
+                if (containElite)
+                {
                     RequestEliteSurplusInfo();
                 }
             }
@@ -344,10 +365,8 @@
     public class DogzDungeonElite
     {
         public Dictionary<int, int> eliteCounts = new Dictionary<int, int>();
-        public int eliteSurplus
-        {
-            get
-            {
+        public int eliteSurplus {
+            get {
                 var count = 0;
                 foreach (var eliteCount in eliteCounts.Values)
                 {
@@ -392,10 +411,8 @@
     public class DogzDungeonBossData
     {
         public int id { get; private set; }
-        public bool isUnLocked
-        {
-            get
-            {
+        public bool isUnLocked {
+            get {
                 var config = Config.Instance.Get<NPCConfig>(id);
                 return PlayerDatas.Instance.baseData.LV >= config.NPCLV;
             }

--
Gitblit v1.8.0