From bc8eefc82f2b1862fc0c417f9813e22fee809b26 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期五, 21 九月 2018 20:22:34 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/WindowBase/WindowCenter.cs               |   18 
 System/Dogz/DogzActiveWin.cs                    |   21 +
 Core/GameEngine/Model/Config/DogzConfig.cs.meta |    2 
 System/DailyQuest/DailyQuestData.cs             |    2 
 System/Dogz/DogzPackWin.cs                      |   19 +
 Plugins/Trails/SmoothTrail.cs                   |  100 --------
 System/Treasure/TreasurePotentialPanel.cs       |    1 
 Core/GameEngine/Model/Config/DogzConfig.cs      |    7 
 System/WorldMap/WorldMapWin.cs                  |    3 
 System/WindowJump/WindowJumpMgr.cs              |    2 
 System/Dungeon/TrialExchangeWin.cs              |   71 +++++
 System/Dogz/DogzCell.cs                         |    2 
 System/Dungeon/TrialDungeonModel.cs             |   44 +++
 System/Dogz/DogzModel.cs                        |  383 +++++++++++++++++++++++++++----
 14 files changed, 488 insertions(+), 187 deletions(-)

diff --git a/Core/GameEngine/Model/Config/DogzConfig.cs b/Core/GameEngine/Model/Config/DogzConfig.cs
index fd635a1..1bd92e6 100644
--- a/Core/GameEngine/Model/Config/DogzConfig.cs
+++ b/Core/GameEngine/Model/Config/DogzConfig.cs
@@ -1,6 +1,6 @@
 锘�//--------------------------------------------------------
 //    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Friday, August 17, 2018
+//    [  Date ]:		   Friday, September 21, 2018
 //--------------------------------------------------------
 
 using UnityEngine;
@@ -17,6 +17,7 @@
 		public int[] BaseAttrTypes;
 		public int[] BaseAttrValues;
 		public int[] HelpBattleSkills;
+		public int FightPowerEx { get ; private set ; }
 		public int[] EquipPlaceColorList;
 
 		public override string getKey()
@@ -54,7 +55,9 @@
 					 int.TryParse(HelpBattleSkillsStringArray[i],out HelpBattleSkills[i]);
 				}
 			
-				string[] EquipPlaceColorListStringArray = rawContents[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+				FightPowerEx=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; 
+			
+				string[] EquipPlaceColorListStringArray = rawContents[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
 				EquipPlaceColorList = new int[EquipPlaceColorListStringArray.Length];
 				for (int i=0;i<EquipPlaceColorListStringArray.Length;i++)
 				{
diff --git a/Core/GameEngine/Model/Config/DogzConfig.cs.meta b/Core/GameEngine/Model/Config/DogzConfig.cs.meta
index f32a209..67830f4 100644
--- a/Core/GameEngine/Model/Config/DogzConfig.cs.meta
+++ b/Core/GameEngine/Model/Config/DogzConfig.cs.meta
@@ -1,6 +1,6 @@
 fileFormatVersion: 2
 guid: 940b0f1e335cf3749bb18fbee7090526
-timeCreated: 1534489434
+timeCreated: 1537530330
 licenseType: Pro
 MonoImporter:
   serializedVersion: 2
diff --git a/Plugins/Trails/SmoothTrail.cs b/Plugins/Trails/SmoothTrail.cs
index cf204f3..0171c2a 100644
--- a/Plugins/Trails/SmoothTrail.cs
+++ b/Plugins/Trails/SmoothTrail.cs
@@ -28,7 +28,6 @@
 
         protected override void Update()
         {
-
             if (_emit)
             {
                 _distanceMoved += Vector3.Distance(_t.position, _lastPosition);
@@ -56,71 +55,6 @@
 
             base.Update();
         }
-
-        /*
-        void OnDrawGizmos()
-        {
-            if (Application.isPlaying && _controlPoints != null)
-            {
-                for (int i = 0; i < _controlPoints.Count; i++)
-                {
-                    Gizmos.color = Color.red;
-                    Gizmos.DrawSphere(_controlPoints[i].p, 0.01f);
-
-                    if (i < _controlPoints.Count - 1)
-                    {
-                        Vector3 Handle1, Handle2;
-                        float distanceBetween = Vector3.Distance(_controlPoints[i].p, _controlPoints[i + 1].p) / 2;
-                        if (i == 0)
-                        {
-                            Handle1 = _controlPoints[i].p + (_controlPoints[i + 1].p - _controlPoints[i].p).normalized * distanceBetween;
-                        }
-                        else
-                        {
-                            Handle1 = _controlPoints[i].p + (_controlPoints[i + 1].p - _controlPoints[i - 1].p).normalized * distanceBetween;
-                        }
-
-                        int nextI = i + 1;
-
-                        if (nextI == _controlPoints.Count - 1)
-                        {
-                            Handle2 = _controlPoints[nextI].p + (_controlPoints[nextI - 1].p - _controlPoints[nextI].p).normalized * distanceBetween;
-                        }
-                        else
-                        {
-                            Handle2 = _controlPoints[nextI].p + (_controlPoints[nextI - 1].p - _controlPoints[nextI + 1].p).normalized * distanceBetween;
-                        }
-
-                        Gizmos.color = Color.green;
-                        Gizmos.DrawSphere(Handle1, 0.01f);
-                        Gizmos.DrawLine(_controlPoints[i].p, Handle1);
-                        Gizmos.color = Color.blue;
-                        Gizmos.DrawSphere(Handle2, 0.01f);
-                        Gizmos.DrawLine(_controlPoints[nextI].p, Handle2);
-
-
-                        Vector3 current = _controlPoints[i].p;
-
-                        for (int pointBetween = 0; pointBetween < PointsBetweenControlPoints; pointBetween++)
-                        {
-                            Vector3 next = GetPointAlongCurve(_controlPoints[i].p, Handle1, _controlPoints[i + 1].p, Handle2, ((pointBetween + 1) / ((float)PointsBetweenControlPoints + 1f)), 0.3f);
-
-                            Gizmos.DrawLine(current, next);
-
-                            Gizmos.color = Color.yellow;
-                            Gizmos.DrawSphere(next, 0.01f);
-
-                            current = next;
-                        }
-
-                        Gizmos.color = Color.blue;
-                        Gizmos.DrawLine(current, _controlPoints[i + 1].p);
-
-                    }
-                }
-            }
-        }
-        */
 
         protected override void OnStartEmit()
         {
@@ -210,40 +144,6 @@
             int lastControlPointPointIndex = ((_controlPoints.Count - 1) + ((_controlPoints.Count - 1) * PointsBetweenControlPoints));
             int prevControlPointPointIndex = lastControlPointPointIndex - PointsBetweenControlPoints - 1;
             int activePointCount = lastControlPointPointIndex + 1;
-            
-
-            /*
-             * 
-             * This is that optimisation mentioned above..sort of works, but smoothing isn't working right so i am leaving it out for now
-             * 
-             * 
-             
-            int lastControlPointIndex = _controlPoints.Count - 1;
-            int prevControlPointIndex = _controlPoints.Count - 2;
-
-            Vector3 Handle1, Handle2;
-            float distanceBetween = Vector3.Distance(_controlPoints[lastControlPointIndex].p, _controlPoints[prevControlPointIndex].p) / 2;
-
-            if (prevControlPointIndex == 0)
-                Handle1 = _controlPoints[prevControlPointIndex].p + (_controlPoints[lastControlPointIndex].p - _controlPoints[prevControlPointIndex].p).normalized * distanceBetween;
-            else
-                Handle1 = _controlPoints[prevControlPointIndex].p + (_controlPoints[lastControlPointIndex].p - _controlPoints[prevControlPointIndex - 1].p).normalized * distanceBetween;
-           
-
-            Handle2 = _controlPoints[lastControlPointIndex].p + (_controlPoints[prevControlPointIndex].p - _controlPoints[lastControlPointIndex].p).normalized * distanceBetween;
-
-
-            float timeActiveLastControlPoint = trail.Points[lastControlPointPointIndex].TimeActive();
-            float timeActivePrevControlPoint = trail.Points[prevControlPointPointIndex].TimeActive();
-
-            for (int pointBetween = 0; pointBetween < PointsBetweenControlPoints; pointBetween++)
-            {
-                float t= (((float)pointBetween + 1f) / ((float)PointsBetweenControlPoints + 1f));
-                trail.Points[prevControlPointPointIndex + pointBetween + 1].Position = GetPointAlongCurve(_controlPoints[prevControlPointIndex].p, Handle1, _controlPoints[lastControlPointIndex].p, Handle2, t, 0.3f);
-                trail.Points[prevControlPointPointIndex + pointBetween + 1].SetTimeActive(Mathf.Lerp(timeActivePrevControlPoint, timeActiveLastControlPoint, t));
-            }
-            trail.Points[lastControlPointPointIndex].Position = _controlPoints[lastControlPointIndex].p;
-            */
 
             float distanceFromStart = trail.Points[prevControlPointPointIndex].GetDistanceFromStart();
             for (int i = prevControlPointPointIndex + 1; i < activePointCount; i++)
diff --git a/System/DailyQuest/DailyQuestData.cs b/System/DailyQuest/DailyQuestData.cs
index 04f1d09..7816d68 100644
--- a/System/DailyQuest/DailyQuestData.cs
+++ b/System/DailyQuest/DailyQuestData.cs
@@ -231,7 +231,7 @@
         var isSpecialDay = TimeUtility.OpenWeekCnt <= 1;
         var openDayWeek = (int)TimeUtility.openServerTime.DayOfWeek;
         var dayIndex = TimeUtility.OpenDay + 1;
-        if (isSpecialDay && specialOpenTimes.ContainsKey(openDayWeek) && specialOpenTimes[openDayWeek].ContainsKey(dayIndex))
+        if (isSpecialDay)
         {
             if (specialOpenTimes.ContainsKey(openDayWeek) && specialOpenTimes[openDayWeek].ContainsKey(dayIndex))
             {
diff --git a/System/Dogz/DogzActiveWin.cs b/System/Dogz/DogzActiveWin.cs
index 62b132d..c488fbc 100644
--- a/System/Dogz/DogzActiveWin.cs
+++ b/System/Dogz/DogzActiveWin.cs
@@ -16,7 +16,7 @@
         [SerializeField] ScrollerController m_Controller;
         [SerializeField] List<DogzSkillData> m_DogzSkills;
         [SerializeField] List<DogzEquip> m_DogzEquips;
-        [SerializeField] List<Button> m_DogzUnEquipBtns;
+        [SerializeField] List<DogzUnEquip> m_DogzUnEquipBtns;
         [SerializeField] List<Text> m_PropertyTypes;
         [SerializeField] List<Text> m_PropertyValues;
         [SerializeField] Image m_DogzHeadIcon;
@@ -25,6 +25,7 @@
         [SerializeField] Button m_TakeOffEquipBtn;
         [SerializeField] Button m_EquipPackBtn;
         [SerializeField] Button m_CallBackBtn;
+        [SerializeField] RedpointBehaviour assistBtnRedBehav;
         [SerializeField] Text m_CallBackBtnTxt;
         DogzModel m_Model;
         DogzModel model
@@ -51,7 +52,7 @@
             for (int i = 0; i < m_DogzUnEquipBtns.Count; i++)
             {
                 var _index = i;
-                m_DogzUnEquipBtns[i].onClick.AddListener(() =>
+                m_DogzUnEquipBtns[i].DogzUnEquipBtn.AddListener(() =>
                 {
                     OpenDogzEquip(_index);
                 });
@@ -106,6 +107,7 @@
             UpdateDogzEquip();
             UpdateDogzProperty();
             UpdateDogzBtn();
+            assistBtnRedBehav.redpointId = model.GetDogzAssistRedpointById(model.presentSelectDogz).id;
         }
         private void UpdateDogzSkill()
         {
@@ -144,9 +146,12 @@
         private void RefreshDogzEquipEvent(int dogzId)
         {
             if (dogzId != model.presentSelectDogz) return;
+
+            m_Controller.m_Scorller.RefreshActiveCellViews();
             UpdateDogzEquip();
             UpdateDogzProperty();
             UpdateDogzBtn();
+
         }
 
         private void UpdateDogzEquip()
@@ -158,7 +163,8 @@
             {
                 ItemModel _data;
                 bool _equiped = model.TryGetDogzEquip(model.presentSelectDogz, i+101, out _data);
-                m_DogzUnEquipBtns[i].gameObject.SetActive(!_equiped);
+                m_DogzUnEquipBtns[i].DogzUnEquipBtn.gameObject.SetActive(!_equiped);
+                m_DogzUnEquipBtns[i].RedpointBeh.redpointId = model.GetDogzEquipPlaceRedpointById(model.presentSelectDogz,i).id;
                 m_DogzEquips[i].gameObject.SetActive(_equiped);
                 if (_equiped)
                 {
@@ -302,6 +308,15 @@
             [SerializeField] Button m_SkillBtn;
             public Button SkillBtn { get { return m_SkillBtn; } }
         }
+
+        [Serializable]
+        public class DogzUnEquip
+        {
+            [SerializeField] Button m_DogzUnEquipBtn;
+            public Button DogzUnEquipBtn { get { return m_DogzUnEquipBtn; } }
+            [SerializeField] RedpointBehaviour m_RedpointBeh;
+            public RedpointBehaviour RedpointBeh { get { return m_RedpointBeh; } }
+        }
     }
 }
 
diff --git a/System/Dogz/DogzCell.cs b/System/Dogz/DogzCell.cs
index 734b370..ec1bf90 100644
--- a/System/Dogz/DogzCell.cs
+++ b/System/Dogz/DogzCell.cs
@@ -14,6 +14,7 @@
         [SerializeField] Text m_DogzName;
         [SerializeField] Text m_DogzGrade;
         [SerializeField] Button m_DogzBtn;
+        [SerializeField] RedpointBehaviour redpointBehav;
 
         DogzModel m_Model;
         DogzModel model
@@ -34,6 +35,7 @@
             bool isActive = (_dogzEquips == null || _dogzEquips.Count < 5) ? false : true;
             m_DogzName.text = _dogzCfg.Name;
             m_DogzGrade.text = StringUtility.Contact("璇勫垎锛�", 100);
+            redpointBehav.redpointId = model.GetSingleDogzRedpointById(_dogzCfg.ID).id;
             if (isActive)
             {
                 m_DogzIcon.material = MaterialUtility.GetUIDefaultGraphicMaterial();
diff --git a/System/Dogz/DogzModel.cs b/System/Dogz/DogzModel.cs
index 25fc8c0..f6b1194 100644
--- a/System/Dogz/DogzModel.cs
+++ b/System/Dogz/DogzModel.cs
@@ -14,6 +14,7 @@
         public override void Init()
         {
             ParseConfig();
+            SetDogzAndEquipPlaceRedKey();
         }
 
         public void OnBeforePlayerDataInitialize()
@@ -37,6 +38,9 @@
             SetDogzEquipInfo();
             playerPack.RefreshItemCountAct -= RefreshDogzEquipInfo;
             playerPack.RefreshItemCountAct += RefreshDogzEquipInfo;
+            UpdateDogzAssistRed();
+            UpdateDogzEquipPlaceRed();
+            UpdateAssistNumRed();
         }
 
         public override void UnInit()
@@ -164,6 +168,16 @@
             }
         }
 
+        public bool CheckIsAddAssistNum()
+        {
+            var _itemConfig = Config.Instance.Get<ItemConfig>(AddAssistItem);
+            if(GetAssistItemCnt() <= playerPack.GetItemCountByID(PackType.rptItem, AddAssistItem))
+            {
+                return true;
+            }
+            return false;
+        }
+
         #region 鍗忚
 
         public int addAssistCnt { get; private set; } //棰濆璐拱鐨勫姪鎴樻暟
@@ -175,6 +189,8 @@
             {
                 UpdateAssistDogzEvent();
             }
+            UpdateDogzAssistRed();
+            UpdateDogzEquipPlaceRed();
         }
 
         public event Action UpdateAssistDogzEvent;
@@ -194,6 +210,9 @@
             {
                 UpdateAssistDogzEvent();
             }
+
+            UpdateDogzAssistRed();
+            UpdateDogzEquipPlaceRed();
         }
 
         public int GetAssistDogzCount()
@@ -218,7 +237,7 @@
 
         public void SetDogzEquipInfo()
         {
-            m_DogzEquipDict = new Dictionary<int, List<ItemModel>>();
+            m_DogzEquipDict.Clear();
             SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptDogzEquip);
             if (singlePack == null) return;
 
@@ -244,63 +263,75 @@
         public Action<int> RefreshDogzEquipAct;
         private void RefreshDogzEquipInfo(PackType type, int index, int id)
         {
-            if (type != PackType.rptDogzEquip) return;
-
-            ItemModel itemModel = playerPack.GetItemModelByIndex(type, index);
-            int dogzId = GetDogzIDByIndex(index);
-            List<ItemModel> modellist = GetDogzEquips(dogzId);
-            if(modellist != null)
+            if(type == PackType.rptItem && id == AddAssistItem)
             {
-                if (itemModel != null)
+                UpdateAssistNumRed();
+            }
+            else if(type == PackType.rptDogzItem)
+            {
+                UpdateDogzAssistRed();
+                UpdateDogzEquipPlaceRed();
+            }
+            else if(type == PackType.rptDogzEquip)
+            {
+                ItemModel itemModel = playerPack.GetItemModelByIndex(type, index);
+                int dogzId = GetDogzIDByIndex(index);
+                List<ItemModel> modellist = GetDogzEquips(dogzId);
+                if (modellist != null)
                 {
-                    bool isAdd = true;
-                    for (int i = 0; i < modellist.Count; i++)
+                    if (itemModel != null)
                     {
-                        if (modellist[i].itemInfo.ItemPlace == index)
+                        bool isAdd = true;
+                        for (int i = 0; i < modellist.Count; i++)
                         {
-                            isAdd = false;
-                            modellist[i] = itemModel;
-                            break;
+                            if (modellist[i].itemInfo.ItemPlace == index)
+                            {
+                                isAdd = false;
+                                modellist[i] = itemModel;
+                                break;
+                            }
+                        }
+                        if (isAdd)
+                        {
+                            modellist.Add(itemModel);
                         }
                     }
-                    if(isAdd)
+                    else
                     {
-                       modellist.Add(itemModel);
+                        for (int i = 0; i < modellist.Count; i++)
+                        {
+                            if (modellist[i].itemInfo.ItemPlace == index)
+                            {
+                                modellist.RemoveAt(i);
+                                break;
+                            }
+                        }
                     }
                 }
                 else
                 {
-                    for (int i = 0; i < modellist.Count; i++)
+                    if (itemModel != null)
                     {
-                        if (modellist[i].itemInfo.ItemPlace == index)
-                        {
-                            modellist.RemoveAt(i);
-                            break;
-                        }
+                        List<ItemModel> equipDatas = new List<ItemModel>();
+                        equipDatas.Add(itemModel);
+                        m_DogzEquipDict.Add(dogzId, equipDatas);
                     }
                 }
-            }
-            else
-            {
-                if(itemModel != null)
-                {
-                    List<ItemModel> equipDatas = new List<ItemModel>();
-                    equipDatas.Add(itemModel);
-                    m_DogzEquipDict.Add(dogzId,equipDatas);
-                }
-            }
-          
 
-            if(RefreshDogzEquipAct != null)
-            {
-                RefreshDogzEquipAct(dogzId);
+                if (RefreshDogzEquipAct != null)
+                {
+                    RefreshDogzEquipAct(dogzId);
+                }
+
+                UpdateDogzAssistRed();
+                UpdateDogzEquipPlaceRed();
             }
         }
 
         /// <summary>
         /// 鑾峰緱绁炲吔绌挎埓鐨勮澶囨暟鎹�
         /// </summary>
-        public Dictionary<int, List<ItemModel>> m_DogzEquipDict { get; private set; }
+        private Dictionary<int, List<ItemModel>> m_DogzEquipDict = new Dictionary<int, List<ItemModel>>();
 
         public List<ItemModel> GetDogzEquips(int _dogzId)
         {
@@ -547,27 +578,6 @@
         }
         #endregion
 
-        #region 瑁呭璇︾粏淇℃伅
-        public DogzEquipData viewDetailData { get; private set; }
-
-        public bool viewDetailCompare { get; private set; }
-
-        public void ViewDetail(int _itemId, bool compare = false)
-        {
-            //viewDetailData = new DogzEquipData(_itemId);
-            //viewDetailCompare = compare;
-            //if (!WindowCenter.Instance.CheckOpen<DogzDetailsWin>())
-            //{
-            //    WindowCenter.Instance.Open<DogzDetailsWin>();
-            //}
-        }
-
-        public int DogzEquipScore(DogzEquipData data)
-        {
-            return 0;
-        }
-        #endregion
-
         #region 榛樿閫夋嫨閫昏緫澶勭悊
         public void SetDefaultSelectDogz()
         {
@@ -585,6 +595,263 @@
             }
         }
         #endregion
+
+        #region 绾㈢偣閫昏緫澶勭悊
+        public const int MAINDOGZ_REDKEY = 112;
+        public const int DOGZFUNC_REDKEY = 11201;
+        public const int ADDASSISTDOGZ_REDKEY = 1120100002;
+        public Redpoint mainDogzRedpoint = new Redpoint(MainRedDot.RedPoint_key, MAINDOGZ_REDKEY);
+        public Redpoint dogzFuncRedpoint = new Redpoint(MAINDOGZ_REDKEY,DOGZFUNC_REDKEY);
+        public Redpoint addAssistDogzRedpoint = new Redpoint(DOGZFUNC_REDKEY,ADDASSISTDOGZ_REDKEY);
+        private Dictionary<int, Redpoint> singleDogzRedDict = new Dictionary<int, Redpoint>();
+        private Dictionary<int, Redpoint> dogzAssistRedDict = new Dictionary<int, Redpoint>();
+        private Dictionary<int, Dictionary<int, Redpoint>> dogzEquipPlaceRedDict = new Dictionary<int, Dictionary<int, Redpoint>>();
+        public void SetDogzAndEquipPlaceRedKey()
+        {
+            singleDogzRedDict.Clear();
+            dogzEquipPlaceRedDict.Clear();
+            dogzAssistRedDict.Clear();
+            int i = 0;
+            foreach(var dogzId in m_DogzEquipLimit.Keys)
+            {
+                i += 1;
+                int dogzRedKey = DOGZFUNC_REDKEY * 100 + i;
+                Redpoint dogzRedPoint = new Redpoint(DOGZFUNC_REDKEY,dogzRedKey);
+                singleDogzRedDict.Add(dogzId, dogzRedPoint);
+                int dogzAssistRedKey = dogzRedKey * 100 + i;
+                Redpoint dogzAssistRedPoint = new Redpoint(dogzRedKey, dogzAssistRedKey);
+                dogzAssistRedDict.Add(dogzId,dogzAssistRedPoint);
+                Dictionary<int, Redpoint> equipPlaceRedDict = new Dictionary<int, Redpoint>();
+                dogzEquipPlaceRedDict.Add(dogzId,equipPlaceRedDict);
+                int equipPlaceNum = m_DogzEquipLimit[dogzId].Count;
+                for (int j = 0; j < equipPlaceNum; j++)
+                {
+                    int equipPlaceRedKey = dogzRedKey * 10 + j;
+                    Redpoint equipPlaceRedpoint = new Redpoint(dogzRedKey,equipPlaceRedKey);
+                    equipPlaceRedDict.Add(j, equipPlaceRedpoint);
+                }
+
+            }
+        }
+
+        public Redpoint GetSingleDogzRedpointById(int dogzId)
+        {
+            Redpoint redpoint = null;
+            singleDogzRedDict.TryGetValue(dogzId, out redpoint);
+            return redpoint;
+        }
+
+        public Redpoint GetDogzAssistRedpointById(int dogzId)
+        {
+            Redpoint redpoint = null;
+            dogzAssistRedDict.TryGetValue(dogzId,out redpoint);
+            return redpoint;
+        }
+
+        public Redpoint GetDogzEquipPlaceRedpointById(int dogzId,int index)
+        {
+            Redpoint redpoint = null;
+            if(dogzEquipPlaceRedDict.ContainsKey(dogzId))
+            {
+                dogzEquipPlaceRedDict[dogzId].TryGetValue(index, out redpoint);
+            }
+            return redpoint;
+        }
+
+        public void UpdateDogzAssistRed()
+        {
+            foreach(var value in dogzAssistRedDict.Values)
+            {
+                value.state = RedPointState.None;
+            }
+            bool isMaxAssistNum = GetAssistDogzCount() >= DogzAssistDefaultCnt ? true : false;
+            if(!isMaxAssistNum)
+            {
+                int maxDogzId = 0;
+                foreach(var dogzId in m_DogzEquipLimit.Keys)
+                {
+                    var equips = GetDogzEquips(dogzId);
+                    int equipNum = equips == null ? 0 : equips.Count;
+                    if(equipNum >= 5 && maxDogzId < dogzId
+                        && !TryGetAssistDogzState(dogzId))
+                    {
+                        maxDogzId = dogzId;
+                    }
+                }
+                if(maxDogzId > 0)
+                {
+                    Redpoint assistRedpoint = GetDogzAssistRedpointById(maxDogzId);
+                    if(assistRedpoint.state == RedPointState.None)
+                    {
+                        assistRedpoint.state = RedPointState.Simple;
+                    }
+                }
+            }
+            else
+            {
+                foreach (var dogzId in m_DogzEquipLimit.Keys)
+                {
+                    var equips = GetDogzEquips(dogzId);
+                    int equipNum = equips == null ? 0 : equips.Count;
+                    if(!TryGetAssistDogzState(dogzId) && equipNum == 5)
+                    {
+                        Redpoint assistRedpoint = GetDogzAssistRedpointById(dogzId);
+                        if (assistRedpoint.state == RedPointState.None)
+                        {
+                            assistRedpoint.state = RedPointState.Simple;
+                        }
+                        break;
+                    }
+                }
+            }
+        }
+
+        public void UpdateDogzEquipPlaceRed()
+        {
+            foreach(var value in dogzEquipPlaceRedDict.Values)
+            {
+                foreach(var value2 in value.Values)
+                {
+                    value2.state = RedPointState.None;
+                }
+            }
+
+            foreach(var value in dogzAssistRedDict.Values)
+            {
+                if(value.state == RedPointState.Simple)
+                {
+                    return;
+                }
+            }
+            bool isMaxAssistNum = GetAssistDogzCount() >= DogzAssistDefaultCnt ? true : false;
+            if (!isMaxAssistNum)
+            {
+                int maxEquipNum = 0;
+                int spaceDogzId = 0;
+                foreach (var dogzId in m_DogzEquipLimit.Keys)
+                {
+                    var equips = GetDogzEquips(dogzId);
+                    int equipNum = equips == null ? 0 : equips.Count;
+                    if (equipNum < 5)
+                    {
+                        if (spaceDogzId == 0)
+                        {
+                            if (maxEquipNum <= equipNum)
+                            {
+                                maxEquipNum = equipNum;
+                                spaceDogzId = dogzId;
+                            }
+                        }
+                        else
+                        {
+                            if (maxEquipNum < equipNum)
+                            {
+                                maxEquipNum = equipNum;
+                                spaceDogzId = dogzId;
+                            }
+                        }
+                    }
+                }
+
+                if(spaceDogzId != 0)
+                {
+                    for(int i = 0; i < 5; i++)
+                    {
+                        ItemModel _data;
+                        bool _equiped = TryGetDogzEquip(spaceDogzId, i + 101, out _data);
+                        if(!_equiped)
+                        {
+                            GetDogzItemListByIndex(i);
+                            if (selectEquipPlacelist.Count > 0)
+                            {
+                                Redpoint equipPlaceRedpoint = GetDogzEquipPlaceRedpointById(spaceDogzId,i);
+                                if(equipPlaceRedpoint.state == RedPointState.None)
+                                {
+                                    equipPlaceRedpoint.state = RedPointState.Simple;
+                                }
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+            else
+            {
+                int minAlreadyAssistId = 0;
+                foreach (var dogzId in m_DogzEquipLimit.Keys)
+                {
+                    if(TryGetAssistDogzState(dogzId)
+                        && minAlreadyAssistId != 0
+                        && minAlreadyAssistId < dogzId)
+                    {
+                        minAlreadyAssistId = dogzId;
+                    }
+                }
+
+                foreach (var dogzId in m_DogzEquipLimit.Keys)
+                {
+                    var equips = GetDogzEquips(dogzId);
+                    int equipNum = equips == null ? 0 : equips.Count;
+                    bool isBetterDogz = true;
+                    if(!TryGetAssistDogzState(dogzId) && dogzId > minAlreadyAssistId && equipNum < 5)
+                    {
+                        for (int i = 0; i < 5; i++)
+                        {
+                            ItemModel _data;
+                            bool _equiped = TryGetDogzEquip(dogzId, i + 101, out _data);
+                            if (!_equiped)
+                            {
+                                GetDogzItemListByIndex(i);
+                                if (selectEquipPlacelist.Count < 1)
+                                {
+                                    isBetterDogz = false;
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                    else
+                    {
+                        isBetterDogz = false;
+                    }
+
+                    if(isBetterDogz)
+                    {
+                        for (int i = 0; i < 5; i++)
+                        {
+                            ItemModel _data;
+                            bool _equiped = TryGetDogzEquip(dogzId, i + 101, out _data);
+                            if (!_equiped)
+                            {
+                                Redpoint equipPlaceRedpoint = GetDogzEquipPlaceRedpointById(dogzId, i);
+                                if (equipPlaceRedpoint.state == RedPointState.None)
+                                {
+                                    equipPlaceRedpoint.state = RedPointState.Simple;
+                                    break;
+                                }
+                            }
+                        }
+                        break;
+                    }
+                }
+            }
+        }
+
+        public void UpdateAssistNumRed()
+        {
+          if(CheckIsAddAssistNum())
+           {
+                if(addAssistDogzRedpoint.state == RedPointState.None)
+                {
+                    addAssistDogzRedpoint.state = RedPointState.Simple;
+                }
+            }
+          else
+            {
+                addAssistDogzRedpoint.state = RedPointState.None;
+            }
+        }
+        #endregion
     }
 }
 
diff --git a/System/Dogz/DogzPackWin.cs b/System/Dogz/DogzPackWin.cs
index b9db389..87aa527 100644
--- a/System/Dogz/DogzPackWin.cs
+++ b/System/Dogz/DogzPackWin.cs
@@ -16,7 +16,7 @@
     public class DogzPackWin : Window
     {
         [SerializeField] List<DogzEquip> m_DogzEquips;
-        [SerializeField] List<Button> m_DogzUnEquipBtns;
+        [SerializeField] List<DogzUnEquip> m_DogzUnEquipBtns;
         [SerializeField] List<Text> m_DogzUnEquipContents;
         [SerializeField] Image m_DogzHeadIcon;
         [SerializeField] Button m_CloseBtn;
@@ -106,7 +106,8 @@
                 ItemModel _data;
                 int index = i;
                 bool _equiped = dogzModel.TryGetDogzEquip(dogzModel.presentSelectDogz, i+101, out _data);
-                m_DogzUnEquipBtns[i].gameObject.SetActive(!_equiped);
+                m_DogzUnEquipBtns[i].DogzUnEquipBtn.gameObject.SetActive(!_equiped);
+                m_DogzUnEquipBtns[i].RedpointBeh.redpointId = dogzModel.GetDogzEquipPlaceRedpointById(dogzModel.presentSelectDogz,i).id;
                 m_DogzEquips[i].gameObject.SetActive(_equiped);
                 if (_equiped)
                 {
@@ -118,8 +119,8 @@
                     m_DogzUnEquipContents[i].text = StringUtility.Contact(DogzModel.GetItemColorName(_itemColor),
                         DogzModel.GetDogzPartNameByIndex(i));
                     m_DogzUnEquipContents[i].color = UIHelper.GetUIColor(_itemColor);
-                    m_DogzUnEquipBtns[i].RemoveAllListeners();
-                    m_DogzUnEquipBtns[i].AddListener(() => { ClickEquipIndex(index); });
+                    m_DogzUnEquipBtns[i].DogzUnEquipBtn.RemoveAllListeners();
+                    m_DogzUnEquipBtns[i].DogzUnEquipBtn.AddListener(() => { ClickEquipIndex(index); });
                 }
             }
         }
@@ -177,6 +178,7 @@
         private void GetEquipBtn()
         {
             //--鐣岄潰璺宠浆
+            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DogzDungeon);
         }
 
         private void ClickStarSelect()
@@ -188,6 +190,15 @@
         {
             qualitySort.gameObject.SetActive(!qualitySort.gameObject.activeInHierarchy);
         }
+
+        [Serializable]
+        public class DogzUnEquip
+        {
+            [SerializeField] Button m_DogzUnEquipBtn;
+            public Button DogzUnEquipBtn { get { return m_DogzUnEquipBtn; } }
+            [SerializeField] RedpointBehaviour m_RedpointBeh;
+            public RedpointBehaviour RedpointBeh { get { return m_RedpointBeh; } }
+        }
     }
 
 }
diff --git a/System/Dungeon/TrialDungeonModel.cs b/System/Dungeon/TrialDungeonModel.cs
index f477264..2975386 100644
--- a/System/Dungeon/TrialDungeonModel.cs
+++ b/System/Dungeon/TrialDungeonModel.cs
@@ -113,9 +113,17 @@
 
         private void RefreshItemCountAct(PackType packType, int arg2, int itemId)
         {
-            if (packType == PackType.rptItem && trialTokens.Contains(itemId))
+            var config = Config.Instance.Get<ItemConfig>(itemId);
+            if (config == null)
             {
-                UpdateRedpoint();
+                return;
+            }
+            if (packType == PackType.rptItem)
+            {
+                if (trialTokens.Contains(itemId) || config.EquipPlace > 0)
+                {
+                    UpdateRedpoint();
+                }
             }
             else if (packType == PackType.rptEquip)
             {
@@ -263,8 +271,29 @@
             {
                 return 0;
             }
-            var singlepack = packModel.GetSinglePackModel(PackType.rptEquip);
-            if (singlepack == null)
+            var singlepack = packModel.GetSinglePackModel(PackType.rptItem);
+            if (singlepack != null)
+            {
+                var dict = singlepack.GetPackModelIndexDict();
+                if (dict != null)
+                {
+                    foreach (var itemModel in dict.Values)
+                    {
+                        if (itemModel.chinItemModel.EquipPlace == config.EquipPlace
+                            && (itemModel.chinItemModel.JobLimit / 100 == PlayerDatas.Instance.baseData.Job
+                            || itemModel.chinItemModel.JobLimit == 0))
+                        {
+                            var compare = EquipCompare(itemModel, config);
+                            if (compare == -1 || compare == 0)
+                            {
+                                return compare;
+                            }
+                        }
+                    }
+                }
+            }
+            singlepack = packModel.GetSinglePackModel(PackType.rptEquip);
+            if (singlepack != null)
             {
                 return 1;
             }
@@ -273,7 +302,12 @@
             {
                 return 1;
             }
-            var compareConfig = Config.Instance.Get<ItemConfig>(equipItem.itemId);
+            return EquipCompare(equipItem, config);
+        }
+
+        int EquipCompare(ItemModel compareItem, ItemConfig config)
+        {
+            var compareConfig = Config.Instance.Get<ItemConfig>(compareItem.itemId);
             if (compareConfig == null)
             {
                 return 1;
diff --git a/System/Dungeon/TrialExchangeWin.cs b/System/Dungeon/TrialExchangeWin.cs
index 8dc8e8d..96b6686 100644
--- a/System/Dungeon/TrialExchangeWin.cs
+++ b/System/Dungeon/TrialExchangeWin.cs
@@ -82,6 +82,7 @@
             model.SelectEquipClassEvent += SelectEquipClassEvent;
             packModel.RefreshItemCountAct += RefreshItemCountAct;
             Display();
+            JumpToRedpoint();
         }
 
         protected override void OnAfterOpen()
@@ -170,10 +171,18 @@
 
         private void RefreshItemCountAct(PackType packtype, int arg2, int itemId)
         {
-            if (packtype == PackType.rptItem && model.trialTokens.Contains(itemId))
+            var config = Config.Instance.Get<ItemConfig>(itemId);
+            if (config == null)
             {
-                m_Controller.m_Scorller.RefreshActiveCellViews();
-                DisplayTokens();
+                return;
+            }
+            if (packtype == PackType.rptItem)
+            {
+                if (model.trialTokens.Contains(itemId) || config.EquipPlace > 0)
+                {
+                    m_Controller.m_Scorller.RefreshActiveCellViews();
+                    DisplayTokens();
+                }
             }
             else if (packtype == PackType.rptEquip)
             {
@@ -215,6 +224,62 @@
             DisplayTokens();
             bool _up = m_SelectClassBehaviour.gameObject.activeSelf;
             m_SelectClassUp.transform.localEulerAngles = Vector3.zero.SetZ(_up ? 0 : 180);
+            JumpToRedpoint();
+        }
+
+        private void JumpToRedpoint()
+        {
+            if (model.selectEquipClass == 1)
+            {
+                var trialClasses = model.GetTotalClass();
+                var index = 0;
+                for (int i = 0; i < trialClasses.Count; i++)
+                {
+                    var line = 0;
+                    index += 1;
+                    if (JumpToRedpoint(trialClasses[i], out line))
+                    {
+                        m_Controller.JumpIndex(index + line);
+                        return;
+                    }
+                    else
+                    {
+                        List<TrialExchangeConfig> list;
+                        if (model.TryGetTrialExchanges(trialClasses[i], out list))
+                        {
+                            index += Mathf.CeilToInt((float)list.Count / 3);
+                        }
+                    }
+                }
+            }
+            else
+            {
+                var line = 0;
+                JumpToRedpoint(model.selectEquipClass, out line);
+                m_Controller.JumpIndex(line);
+            }
+        }
+
+        private bool JumpToRedpoint(int _class, out int line)
+        {
+            var itemId = 0;
+            line = 0;
+            if (model.IsAnySatisfyExchangeBetterEquip(_class, out itemId))
+            {
+                List<TrialExchangeConfig> list;
+                if (model.TryGetTrialExchanges(_class, out list))
+                {
+                    for (int i = 0; i < list.Count; i++)
+                    {
+                        if (list[i].id == itemId)
+                        {
+                            line = i / 3;
+                            return true;
+                        }
+                    }
+                }
+            }
+            return false;
         }
     }
 
diff --git a/System/Treasure/TreasurePotentialPanel.cs b/System/Treasure/TreasurePotentialPanel.cs
index a3d20d2..9b91016 100644
--- a/System/Treasure/TreasurePotentialPanel.cs
+++ b/System/Treasure/TreasurePotentialPanel.cs
@@ -599,6 +599,7 @@
             m_SuccessRatio.color = UIHelper.GetUIColor(model.selectedPotentialBook != 0 && levelUpConfig.rate > 0
                 ? TextColType.DarkGreen : TextColType.LightYellow);
             m_UpgradeImage.gray = levelUpConfig.rate == 0 && model.selectedPotentialBook == 0;
+            m_Upgrade.interactable = levelUpConfig.rate != 0 || model.selectedPotentialBook != 0;
         }
 
         private void DisplayAddBookRedpoint()
diff --git a/System/WindowBase/WindowCenter.cs b/System/WindowBase/WindowCenter.cs
index ba3afe0..33a4290 100644
--- a/System/WindowBase/WindowCenter.cs
+++ b/System/WindowBase/WindowCenter.cs
@@ -72,7 +72,7 @@
                 }
                 else
                 {
-                    DebugEx.Log(string.Format("{0} 绐楀彛宸茬粡鎵撳紑锛�", typeof(T)));
+                    DebugEx.LogFormat("{0} 绐楀彛宸茬粡鎵撳紑锛�", typeof(T));
                 }
             }
             else
@@ -146,7 +146,7 @@
                 }
                 else
                 {
-                    DebugEx.Log(string.Format("{0} 绐楀彛宸茬粡鎵撳紑锛�", typeof(T)));
+                    DebugEx.LogFormat("{0} 绐楀彛宸茬粡鎵撳紑锛�", typeof(T));
                 }
 
                 return (T)win;
@@ -201,13 +201,13 @@
                 }
                 else
                 {
-                    DebugEx.Log(string.Format("{0} 绐楀彛宸茬粡鍏抽棴锛�", typeof(T)));
+                    DebugEx.LogFormat("{0} 绐楀彛宸茬粡鍏抽棴锛�", typeof(T));
                 }
             }
             else
             {
                 asyncLoad.StopTask(typeof(T).Name);
-                DebugEx.Log(string.Format("{0} 绐楀彛鏃犳硶鑾峰緱锛�", typeof(T)));
+                DebugEx.LogFormat("{0} 绐楀彛鏃犳硶鑾峰緱锛�", typeof(T));
             }
 
             return win;
@@ -224,13 +224,13 @@
                 }
                 else
                 {
-                    DebugEx.Log(string.Format("{0} 绐楀彛宸茬粡鍏抽棴锛�", typeof(T)));
+                    DebugEx.LogFormat("{0} 绐楀彛宸茬粡鍏抽棴锛�", typeof(T));
                 }
             }
             else
             {
                 asyncLoad.StopTask(typeof(T).Name);
-                DebugEx.Log(string.Format("{0} 绐楀彛鏃犳硶鑾峰緱锛�", typeof(T)));
+                DebugEx.LogFormat("{0} 绐楀彛鏃犳硶鑾峰緱锛�", typeof(T));
             }
 
             return win;
@@ -385,7 +385,7 @@
             }
             else
             {
-                DebugEx.Log(string.Format("{0} 绐楀彛鏃犳硶鑾峰緱锛�", typeof(T)));
+                DebugEx.LogFormat("{0} 绐楀彛鏃犳硶鑾峰緱锛�", typeof(T));
             }
         }
 
@@ -544,7 +544,7 @@
                 }
                 else
                 {
-                    DebugEx.Log(string.Format("{0} 绐楀彛宸茬粡鎵撳紑锛�", typeof(T)));
+                    DebugEx.LogFormat("{0} 绐楀彛宸茬粡鎵撳紑锛�", typeof(T));
                 }
 
                 return (T)win;
@@ -577,7 +577,7 @@
                             }
                             else
                             {
-                                DebugEx.Log(string.Format("{0} 绐楀彛宸茬粡鎵撳紑锛�", typeof(T)));
+                                DebugEx.LogFormat("{0} 绐楀彛宸茬粡鎵撳紑锛�", typeof(T));
                             }
                         }
                     }
diff --git a/System/WindowJump/WindowJumpMgr.cs b/System/WindowJump/WindowJumpMgr.cs
index 5759e78..5d0e8c9 100644
--- a/System/WindowJump/WindowJumpMgr.cs
+++ b/System/WindowJump/WindowJumpMgr.cs
@@ -558,6 +558,7 @@
                 SetJumpLogic<FindPreciousFrameWin>(_tagWinSearchModel.TABID);
                 break;
             case JumpUIType.LootPreciousFrameFunc1:
+            case JumpUIType.DogzDungeon:
                 SetJumpLogic<LootPreciousFrameWin>(_tagWinSearchModel.TABID);
                 break;
             case JumpUIType.LootPreciousFrameSpec:
@@ -1180,6 +1181,7 @@
     WelfareFunc1 = 102, //绛惧埌
     WelfareFunc2 = 103,  //绁堟効
     LootPreciousFrameFunc1 = 104, //灏侀瓟鍧�
+    DogzDungeon = 242, //寮傚吔涔嬪湴
     SystemSettingFunc1 = 109,//鎸傛満璁剧疆
 
     RebornOpenBag = 113,//姝讳骸澶嶆椿鎵撳紑鑳屽寘
diff --git a/System/WorldMap/WorldMapWin.cs b/System/WorldMap/WorldMapWin.cs
index 4906a0a..20a6f1d 100644
--- a/System/WorldMap/WorldMapWin.cs
+++ b/System/WorldMap/WorldMapWin.cs
@@ -92,7 +92,7 @@
 
             WorldMapAreaBehaviour playerAtBehaviour = null;
             var currentMapId = PlayerDatas.Instance.baseData.MapID;
-
+            m_ContainerPlayerHead.gameObject.SetActive(false);
             for (int i = 0; i < m_AreaBehaviours.Length; i++)
             {
                 var behaviourTable = m_AreaBehaviours[i];
@@ -104,6 +104,7 @@
                     behaviourTable.areaBehaviour.Init(area);
                     if (behaviourTable.id == currentMapId.ToString())
                     {
+                        m_ContainerPlayerHead.gameObject.SetActive(true);
                         playerAtBehaviour = behaviourTable.areaBehaviour;
                         m_ContainerPlayerHead.SetParentEx(behaviourTable.areaBehaviour.playerHead, Vector3.zero, Vector3.zero, Vector3.one);
                     }

--
Gitblit v1.8.0