From 69964c5ccb8b47702c357b1e29b94a4aa0c29a0b Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期三, 26 九月 2018 15:14:49 +0800
Subject: [PATCH] 3867 【前端】神兽地图优化

---
 System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs |    8 ++++----
 System/FindPrecious/DemonJarModel.cs                |    5 +++--
 System/FindPrecious/FindPreciousModel.cs            |   15 +++++++++++++++
 System/DogzDungeon/DogzDungeonModel.cs              |   21 ++++++++++++++++++---
 4 files changed, 40 insertions(+), 9 deletions(-)

diff --git a/System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs b/System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs
index 18856bd..68b9d92 100644
--- a/System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs
+++ b/System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs
@@ -178,14 +178,14 @@
             switch (config.MonsterType)
             {
                 case 1:
-                    m_BossName.text = _name;
-                    m_BossLevel.text = string.Empty;
-                    break;
                 case 2:
-                    m_BossName.text = _name;
+                    m_BossName.text = Language.Get("DogzMap1");
                     m_BossLevel.text = string.Empty;
                     break;
                 case 3:
+                    m_BossName.text = Language.Get("DogzMap2");
+                    m_BossLevel.text = string.Empty;
+                    break;
                 case 4:
                     m_BossName.text = _name;
                     m_BossLevel.text = Language.Get("Z1024", _level);
diff --git a/System/DogzDungeon/DogzDungeonModel.cs b/System/DogzDungeon/DogzDungeonModel.cs
index 987270f..6b07f67 100644
--- a/System/DogzDungeon/DogzDungeonModel.cs
+++ b/System/DogzDungeon/DogzDungeonModel.cs
@@ -6,10 +6,10 @@
 
 namespace Snxxz.UI
 {
-    public class DogzDungeonModel : Model
+    public class DogzDungeonModel : Model, IPlayerLoginOk
     {
 
-        public const int DOGZDUNGEON_REDPOINT = 76009;
+        public const int DOGZDUNGEON_REDPOINT = 77002;
         public const int DATA_MAPID = 21110;
 
         int m_SelectedBoss = 0;
@@ -36,6 +36,7 @@
                 if (m_WearyValue != value)
                 {
                     m_WearyValue = value;
+                    UpdateRedpoint();
                     if (bossWearyValueChangeEvent != null)
                     {
                         bossWearyValueChangeEvent();
@@ -75,7 +76,7 @@
         Dictionary<int, DogzDungeonBossData> bosses = new Dictionary<int, DogzDungeonBossData>();
         public DogzDungeonBox dogzDungeonBox = new DogzDungeonBox();
         public DogzDungeonElite dogzDungeonElite = new DogzDungeonElite();
-        Redpoint redpoint = new Redpoint(DOGZDUNGEON_REDPOINT);
+        public Redpoint redpoint = new Redpoint(FindPreciousModel.LOOTPRECIOUs_REDPOINTID, DOGZDUNGEON_REDPOINT);
 
         FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
 
@@ -310,6 +311,19 @@
             }
         }
 
+        public void OnPlayerLoginOk()
+        {
+            UpdateRedpoint();
+        }
+
+        private void UpdateRedpoint()
+        {
+            var wearyValueLimit = GeneralConfig.Instance.bossWearyValues[2];
+            redpoint.count = wearyValueLimit - wearyValue;
+
+            redpoint.state = redpoint.count > 0 ? RedPointState.Quantity : RedPointState.None;
+        }
+
         private void ParseConfig()
         {
             var configs = Config.Instance.GetAllValues<DogzDungeonConfig>();
@@ -335,6 +349,7 @@
 
             sortedBossIds.Sort(DogzDungeonBossData.LevelCompare);
         }
+
     }
 
     public class DogzDungeonBox
diff --git a/System/FindPrecious/DemonJarModel.cs b/System/FindPrecious/DemonJarModel.cs
index 2b90292..8c0cc6b 100644
--- a/System/FindPrecious/DemonJarModel.cs
+++ b/System/FindPrecious/DemonJarModel.cs
@@ -17,9 +17,10 @@
 
         public const int DEMONJAR_SINGLEMAPID = 52020;
         public const int DEMONJAR_MAPID = 52010;
-        const int DEMONJAR_REDPOINTID = 76005;
 
-        Redpoint redpoint = new Redpoint(DEMONJAR_REDPOINTID);
+        public const int DEMONJAR_REDPOINTID = 77001;
+
+        public Redpoint redpoint = new Redpoint(FindPreciousModel.LOOTPRECIOUs_REDPOINTID, DEMONJAR_REDPOINTID);
 
         bool m_IsDoubleAward = false;
         public bool isDoubleAward {
diff --git a/System/FindPrecious/FindPreciousModel.cs b/System/FindPrecious/FindPreciousModel.cs
index 687ccad..a75e2d6 100644
--- a/System/FindPrecious/FindPreciousModel.cs
+++ b/System/FindPrecious/FindPreciousModel.cs
@@ -11,7 +11,10 @@
     {
         public const int PREPOSE_SECONDS = 300;
         public const int FINDPRECIOUS_REDPOINTID = 76000;
+        public const int LOOTPRECIOUs_REDPOINTID = 77000;
+
         Redpoint findPreciousRedpoint = new Redpoint(FINDPRECIOUS_REDPOINTID);
+        Redpoint lootPreciousRedpoint = new Redpoint(LOOTPRECIOUs_REDPOINTID);
 
         int m_ViewKillRecordsBoss = 0;
         public int ViewKillRecordsBoss {
@@ -51,6 +54,7 @@
         WorldBossModel worldBossModel { get { return ModelCenter.Instance.GetModel<WorldBossModel>(); } }
         BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
         PersonalBossModel personalBossModel { get { return ModelCenter.Instance.GetModel<PersonalBossModel>(); } }
+        DogzDungeonModel dogzDungeonModel { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } }
 
         public override void Init()
         {
@@ -390,6 +394,17 @@
                 findPreciousRedpoint.state = totalCount > 0 ? RedPointState.Quantity : RedPointState.None;
                 findPreciousRedpoint.count = totalCount;
             }
+
+            if (_redpointId == DemonJarModel.DEMONJAR_REDPOINTID ||
+                _redpointId == DogzDungeonModel.DOGZDUNGEON_REDPOINT)
+            {
+                var demonJarRedpointCount = demonJarModel.redpoint.count;
+                var dogzDungeonRedpointCount = dogzDungeonModel.redpoint.count;
+                var totalCount = demonJarRedpointCount + dogzDungeonRedpointCount;
+
+                lootPreciousRedpoint.count = totalCount;
+                lootPreciousRedpoint.state = totalCount > 0 ? RedPointState.Quantity : RedPointState.None;
+            }
         }
 
         public FindPreciousType GetBossFindPreciousType(int _bossId)

--
Gitblit v1.8.0