From fb5363f3ea0967e717c7033a22b75b736b30d4ef Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期一, 03 九月 2018 14:52:28 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 Core/GameEngine/Model/Config/TreasureUpConfig.cs.meta |    2 
 System/Treasure/TreasureCollectBriefInfoBehaviour.cs  |   46 +++++++++++----
 System/FairyAu/HallTipsWin.cs                         |    8 ++
 System/Treasure/TreasureData.cs                       |   21 ++++++
 System/FairyAu/PlayerMethodData.cs                    |   39 +++++++------
 Core/GameEngine/Model/Config/TreasureUpConfig.cs      |    5 +
 6 files changed, 87 insertions(+), 34 deletions(-)

diff --git a/Core/GameEngine/Model/Config/TreasureUpConfig.cs b/Core/GameEngine/Model/Config/TreasureUpConfig.cs
index fc7c72a..aaa7b2a 100644
--- a/Core/GameEngine/Model/Config/TreasureUpConfig.cs
+++ b/Core/GameEngine/Model/Config/TreasureUpConfig.cs
@@ -1,6 +1,6 @@
 锘�//--------------------------------------------------------
 //    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Thursday, August 16, 2018
+//    [  Date ]:		   Monday, September 03, 2018
 //--------------------------------------------------------
 
 using UnityEngine;
@@ -20,6 +20,7 @@
 		public int UnLockFuncID { get ; private set ; }
 		public int ActiveMWID { get ; private set ; }
 		public string ItemAward { get ; private set; } 
+		public string DescriptionMainWin { get ; private set; } 
 
 		public override string getKey()
         {
@@ -51,6 +52,8 @@
 				ActiveMWID=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0; 
 			
 				ItemAward = rawContents[8].Trim();
+			
+				DescriptionMainWin = rawContents[9].Trim();
             }
             catch (Exception ex)
             {
diff --git a/Core/GameEngine/Model/Config/TreasureUpConfig.cs.meta b/Core/GameEngine/Model/Config/TreasureUpConfig.cs.meta
index 4aeb44c..d220ac8 100644
--- a/Core/GameEngine/Model/Config/TreasureUpConfig.cs.meta
+++ b/Core/GameEngine/Model/Config/TreasureUpConfig.cs.meta
@@ -1,6 +1,6 @@
 fileFormatVersion: 2
 guid: 882666fd713678849aebb360643bfe19
-timeCreated: 1534419056
+timeCreated: 1535946483
 licenseType: Pro
 MonoImporter:
   serializedVersion: 2
diff --git a/System/FairyAu/HallTipsWin.cs b/System/FairyAu/HallTipsWin.cs
index 87e8bf6..cb40a08 100644
--- a/System/FairyAu/HallTipsWin.cs
+++ b/System/FairyAu/HallTipsWin.cs
@@ -80,6 +80,14 @@
         {
             if (PlayerDatas.Instance.fairyData.fairy == null) return;
             _FamilyPosition = (int)PlayerDatas.Instance.fairyData.mine.FamilyLV;
+            if (_FamilyPosition >= 2)
+            {
+                _UpdateBtn.gameObject.SetActive(true);
+            }
+            else
+            {
+                _UpdateBtn.gameObject.SetActive(false);
+            }
             AssignValueToRefresh();//灞炴�ц祴鍊煎拰鍒锋柊
         }
 
diff --git a/System/FairyAu/PlayerMethodData.cs b/System/FairyAu/PlayerMethodData.cs
index e303133..6ccd648 100644
--- a/System/FairyAu/PlayerMethodData.cs
+++ b/System/FairyAu/PlayerMethodData.cs
@@ -5,7 +5,7 @@
 using UnityEngine;
 using System;
 //蹇冩硶绉戞妧
-public  class SkillsInformation
+public class SkillsInformation
 {
     public int id;//鍗曚綅鏁癷d
     public int SkillID;//鎶�鑳絀D
@@ -14,7 +14,7 @@
 
 public class PlayerMethodData : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
 {
-  public  Dictionary<int, SkillsInformation> _DicSkill = new Dictionary<int, SkillsInformation>();//瀛樺偍蹇冩硶
+    public Dictionary<int, SkillsInformation> _DicSkill = new Dictionary<int, SkillsInformation>();//瀛樺偍蹇冩硶
 
     public Dictionary<int, Redpoint> MethodRedPointDic = new Dictionary<int, Redpoint>();//蹇冩硶鍒楄〃绾㈢偣
     public Dictionary<int, Redpoint> MethodRedPointBtnDic = new Dictionary<int, Redpoint>();//蹇冩硶鎸夐挳绾㈢偣
@@ -32,18 +32,18 @@
     {
         string str = Config.Instance.Get<FuncConfigConfig>("FamilyTechNeedLV").Numerical1;
         MethodDataNeedLVDic = ConfigParse.GetDic<int, int>(str);
-       
-      
+
+
     }
 
     public override void UnInit()
     {
-      
+
     }
 
     public void OnBeforePlayerDataInitialize()
     {
-      
+
         _ContributionNumber = 0;
     }
 
@@ -74,14 +74,14 @@
             }
         }
     }
-    private const int RedPoint_key1= 1070101;//蹇冩硶绾㈢偣
+    private const int RedPoint_key1 = 1070101;//蹇冩硶绾㈢偣
     private Redpoint redPointStre1 = new Redpoint(MainRedDot.FAIRY_REDPOINT_KEY2, RedPoint_key1);
     public Redpoint fairyHeartRedpoint { get { return redPointStre1; } }
     private const int RedPoint_key2 = 1070104;//浠欑洘澶у巺绾㈢偣
     private Redpoint redPointStre2 = new Redpoint(MainRedDot.FAIRY_REDPOINT_KEY2, RedPoint_key2);
     private void FairyAuMethodDic()//浠欑洘蹇冩硶鍒楄〃绾㈢偣
     {
-        if ( MethodRedPointDic.Count!=0)
+        if (MethodRedPointDic.Count != 0)
         {
             return;
         }
@@ -98,9 +98,9 @@
             }
         }
     }
-    private void  FairyAuMethodRedPoint()//浠欑洘蹇冩硶绾㈢偣
+    private void FairyAuMethodRedPoint()//浠欑洘蹇冩硶绾㈢偣
     {
-        if (!fairyModel.fairyMethodToOpen || MethodRedPointBtnDic.Count == 0)
+        if (MethodRedPointBtnDic.Count == 0)
         {
             return;
         }
@@ -108,7 +108,10 @@
         {
             MethodRedPointBtnDic[key].state = RedPointState.None;
         }
-
+        if (!fairyModel.fairyMethodToOpen)
+        {
+            return;
+        }
         foreach (var key in _DicSkill.Keys)
         {
             if (MethodDataNeedLVDic.ContainsKey(_DicSkill[key].id) && PlayerDatas.Instance.baseData.LV >= MethodDataNeedLVDic[_DicSkill[key].id])
@@ -116,7 +119,7 @@
                 var familyTechConfig = Config.Instance.Get<FamilyTechConfig>(_DicSkill[key].SkillID + 1);
                 if (_DicSkill[key].SkillLV > 0)
                 {
-                  
+
                     if (familyTechConfig == null)
                     {
                         continue;
@@ -162,16 +165,16 @@
     {
         for (int i = 0; i < info.TechCnt; i++)
         {
-           
+
             if (!_DicSkill.ContainsKey(info.TechInfoList[i].TechID))
             {
-                
+
                 SkillsInformation _skill = new SkillsInformation();
                 _skill.id = info.TechInfoList[i].TechID;
                 _skill.SkillID = Skill_ID(info.TechInfoList[i].TechID, info.TechInfoList[i].TechLV);
                 _skill.SkillLV = info.TechInfoList[i].TechLV;
                 _DicSkill.Add(info.TechInfoList[i].TechID, _skill);
-              
+
             }
             else
             {
@@ -181,10 +184,10 @@
                 _DicSkill[info.TechInfoList[i].TechID].SkillLV = info.TechInfoList[i].TechLV;
                 if (EventHA504 != null)
                     EventHA504();
-               
+
             }
         }
-      
+
         FairyAuMethodRedPoint();
         FairyAuMethodDic();
     }
@@ -217,5 +220,5 @@
             Event_CepaContribution();
     }
 
- 
+
 }
diff --git a/System/Treasure/TreasureCollectBriefInfoBehaviour.cs b/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
index f725b6a..a17e2d5 100644
--- a/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
+++ b/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
@@ -8,6 +8,7 @@
 using TableConfig;
 using System;
 using System.Collections.Generic;
+using LitJson;
 
 namespace Snxxz.UI
 {
@@ -28,9 +29,11 @@
         bool dirty = false;
 
         int m_DisplayTreasureId = 0;
-        int displayTreasureId {
+        int displayTreasureId
+        {
             get { return m_DisplayTreasureId; }
-            set {
+            set
+            {
                 if (m_DisplayTreasureId != value)
                 {
                     m_DisplayTreasureId = value;
@@ -40,9 +43,11 @@
         }
 
         DisplayState m_DisplayState = DisplayState.None;
-        DisplayState displayState {
+        DisplayState displayState
+        {
             get { return m_DisplayState; }
-            set {
+            set
+            {
                 if (m_DisplayState != value)
                 {
                     m_DisplayState = value;
@@ -52,9 +57,11 @@
         }
 
         int m_EffectState = 0;
-        int effectState {
+        int effectState
+        {
             get { return m_EffectState; }
-            set {
+            set
+            {
                 if (m_EffectState != value)
                 {
                     m_EffectState = value;
@@ -293,13 +300,7 @@
                         m_Description.text = Language.Get("FabaoState_Text_3");
                         break;
                     case DisplayState.AwakenUnderway:
-                        var progress = 1f;
-                        if (treasure != null && config.PreferredStage != 0)
-                        {
-                            progress = (float)treasure.stage / config.PreferredStage;
-                        }
-
-                        m_Description.text = Language.Get("FabaoState_Text_4", Mathf.RoundToInt(progress * 100f));
+                        DisplayTreasureUpStage(treasure.GetStageId(treasure.stage + 1));
                         break;
                     case DisplayState.WaitUnLock:
                         Achievement achievement = null;
@@ -534,6 +535,25 @@
             }
         }
 
+        private void DisplayTreasureUpStage(int _stage)
+        {
+            var config = Config.Instance.Get<TreasureUpConfig>(_stage);
+            if (config != null)
+            {
+                var json = JsonMapper.ToObject(config.DescriptionMainWin);
+                var job = PlayerDatas.Instance.baseData.Job;
+
+                if (json.Keys.Contains(job.ToString()))
+                {
+                    m_Description.text = json[job.ToString()].ToString();
+                }
+                else
+                {
+                    m_Description.text = json["0"].ToString();
+                }
+            }
+        }
+
         enum DisplayState
         {
             None,
diff --git a/System/Treasure/TreasureData.cs b/System/Treasure/TreasureData.cs
index bdc0a9f..5cb904a 100644
--- a/System/Treasure/TreasureData.cs
+++ b/System/Treasure/TreasureData.cs
@@ -239,6 +239,8 @@
             treasureStages.Add(_stage);
         }
 
+
+
         public void UpdateTreasureLevelExp(int _lv, int _exp, bool _hasClickChallenge)
         {
             stage = _lv;
@@ -272,6 +274,19 @@
                 return false;
             }
             return stage >= _stage.stage;
+        }
+
+        public int GetStageId(int _stageIndex)
+        {
+            foreach (var item in treasureStages)
+            {
+                if (item.stage == _stageIndex)
+                {
+                    return item.id;
+                }
+            }
+
+            return 0;
         }
 
         public int GetStageIndex(int _stage)
@@ -516,7 +531,7 @@
         public int successRate;
         public int levelUpId;
 
-        public PotentialBook(int _itemId, int _needCount, int _successRate,int _levelUpId)
+        public PotentialBook(int _itemId, int _needCount, int _successRate, int _levelUpId)
         {
             this.itemId = _itemId;
             this.needCount = _needCount;
@@ -534,6 +549,8 @@
 
     public class TreasureStage
     {
+        public int id { get; private set; }
+
         public int stage { get; set; }
         public TreasureStageUnlock unlockType { get; private set; }
         public Dictionary<int, int> propertyDict { get; private set; }
@@ -546,8 +563,10 @@
         public const int selectedSfxId = 5144;
         public string sfxGotState { get; private set; }
         public string sfxUnGotState { get; private set; }
+
         public TreasureStage(TreasureUpConfig _config)
         {
+            id = _config.ID;
             unlockType = TreasureStageUnlock.None;
             if (_config.UnLockFuncID != 0)
             {

--
Gitblit v1.8.0