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

---
 System/MainInterfacePanel/FeaturesType1.cs                  |   14 ++
 System/MainInterfacePanel/FeaturesType2.cs                  |   13 ++
 Core/GameEngine/Login/Launch.cs                             |   69 ++++++++--------
 System/FairyAu/PlayerMethodData.cs                          |   11 ++
 System/MainInterfacePanel/FeatureNoticeModel.cs             |    1 
 System/ClientVersion/VersionUtility.cs                      |    1 
 Core/GameEngine/Model/Config/FunctionForecastConfig.cs      |    9 +
 Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta |    2 
 System/MainInterfacePanel/FeatureNoticeWin.cs               |   74 ++++++++++++++----
 9 files changed, 130 insertions(+), 64 deletions(-)

diff --git a/Core/GameEngine/Login/Launch.cs b/Core/GameEngine/Login/Launch.cs
index bea9868..a3bd2eb 100644
--- a/Core/GameEngine/Login/Launch.cs
+++ b/Core/GameEngine/Login/Launch.cs
@@ -13,11 +13,9 @@
     static public LaunchStage currentStage { get { return m_CurrentStage; } }
 
     static float m_Progress = 0f;
-    static public float progress
-    {
+    static public float progress {
         get { return m_Progress; }
-        set
-        {
+        set {
             if (m_Progress != value)
             {
                 m_Progress = value;
@@ -185,7 +183,6 @@
         OperationLogCollect.Instance.RecordEvent(2);
 
         m_CurrentStage = LaunchStage.ClientVersion;
-
         if (!Application.isEditor || InGameDownTestUtility.enable)
         {
             VersionUtility.Instance.RequestVersionCheck();
@@ -201,43 +198,45 @@
             }
         }
 
-        m_CurrentStage = LaunchStage.DownLoad;
-        switch (VersionConfig.Get().assetAccess)
+        if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 1)
         {
-            case InstalledAsset.IngoreDownLoad:
-                break;
-            case InstalledAsset.NullAsset:
-            case InstalledAsset.HalfAsset:
-            case InstalledAsset.FullAsset:
-                AssetVersionUtility.GetAssetVersionFile();
+            m_CurrentStage = LaunchStage.DownLoad;
+            switch (VersionConfig.Get().assetAccess)
+            {
+                case InstalledAsset.IngoreDownLoad:
+                    break;
+                case InstalledAsset.NullAsset:
+                case InstalledAsset.HalfAsset:
+                case InstalledAsset.FullAsset:
+                    AssetVersionUtility.GetAssetVersionFile();
 
-                progressBuf = progress;
-                timer = 0f;
-                duration = 1.5f;
-
-                while (!AssetVersionUtility.checkAssetCompleted)
-                {
-                    timer += Time.deltaTime;
-                    progress = Mathf.Clamp(progressBuf + timer / duration * 0.3f, progressBuf, progressBuf + 0.3f);
-                    yield return null;
-                }
-
-                if (!AssetVersionUtility.priorAssetDownLoadDone)
-                {
-                    AssetVersionUtility.BeginDownLoadTask(true);
-                    while (!AssetVersionUtility.priorAssetDownLoadDone)
+                    progressBuf = progress;
+                    timer = 0f;
+                    duration = 1.5f;
+                    while (!AssetVersionUtility.checkAssetCompleted)
                     {
+                        timer += Time.deltaTime;
+                        progress = Mathf.Clamp(progressBuf + timer / duration * 0.3f, progressBuf, progressBuf + 0.3f);
                         yield return null;
                     }
 
-                    yield return WaitingForSecondConst.WaitMS200;
-                }
+                    if (!AssetVersionUtility.priorAssetDownLoadDone)
+                    {
+                        AssetVersionUtility.BeginDownLoadTask(true);
+                        while (!AssetVersionUtility.priorAssetDownLoadDone)
+                        {
+                            yield return null;
+                        }
 
-                if (!AssetVersionUtility.unPriorAssetDownLoadDone)
-                {
-                    AssetVersionUtility.BeginDownLoadTask(false);
-                }
-                break;
+                        yield return WaitingForSecondConst.WaitMS200;
+                    }
+
+                    if (!AssetVersionUtility.unPriorAssetDownLoadDone)
+                    {
+                        AssetVersionUtility.BeginDownLoadTask(false);
+                    }
+                    break;
+            }
         }
 
         if (!AssetSource.allFromEditor)
diff --git a/Core/GameEngine/Model/Config/FunctionForecastConfig.cs b/Core/GameEngine/Model/Config/FunctionForecastConfig.cs
index 99ab8de..3e8880f 100644
--- a/Core/GameEngine/Model/Config/FunctionForecastConfig.cs
+++ b/Core/GameEngine/Model/Config/FunctionForecastConfig.cs
@@ -1,6 +1,6 @@
 锘�//--------------------------------------------------------
 //    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Wednesday, September 12, 2018
+//    [  Date ]:		   Monday, September 17, 2018
 //--------------------------------------------------------
 
 using UnityEngine;
@@ -24,7 +24,8 @@
 		public int Display { get ; private set ; }
 		public int RedPointLV { get ; private set ; }
 		public int RedPointPercentage { get ; private set ; }
-		public int FrameLevel { get ; private set ; }
+		public int FrameLevel { get ; private set ; }
+		public int OpenNumber { get ; private set ; }
 
 		public override string getKey()
         {
@@ -60,7 +61,9 @@
 			
 				RedPointPercentage=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; 
 			
-				FrameLevel=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; 
+				FrameLevel=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; 
+			
+				OpenNumber=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0; 
             }
             catch (Exception ex)
             {
diff --git a/Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta b/Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta
index 9f47e68..4278008 100644
--- a/Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta
+++ b/Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta
@@ -1,6 +1,6 @@
 fileFormatVersion: 2
 guid: bced258647f0fa940b752dd56e6a27e0
-timeCreated: 1536737693
+timeCreated: 1537175111
 licenseType: Free
 MonoImporter:
   serializedVersion: 2
diff --git a/System/ClientVersion/VersionUtility.cs b/System/ClientVersion/VersionUtility.cs
index c4354b0..53cdaa9 100644
--- a/System/ClientVersion/VersionUtility.cs
+++ b/System/ClientVersion/VersionUtility.cs
@@ -181,6 +181,7 @@
         public JsonData resource_url;
         public JsonData notice_flag;
         public Version[] versions;
+        public int downAsset =1;
 
         public Version GetLatestVersion()
         {
diff --git a/System/FairyAu/PlayerMethodData.cs b/System/FairyAu/PlayerMethodData.cs
index 6ccd648..eec2e6c 100644
--- a/System/FairyAu/PlayerMethodData.cs
+++ b/System/FairyAu/PlayerMethodData.cs
@@ -28,11 +28,20 @@
     public Dictionary<int, int> MethodDataNeedLVDic = new Dictionary<int, int>();//蹇冩硶涓嬭〃瀵瑰簲鐨勬墍闇�瀛︿範绛夌骇
 
     FairyModel fairyModel { get { return ModelCenter.Instance.GetModel<FairyModel>(); } }
+    private int FairyHallMax = 0;
     public override void Init()
     {
         string str = Config.Instance.Get<FuncConfigConfig>("FamilyTechNeedLV").Numerical1;
         MethodDataNeedLVDic = ConfigParse.GetDic<int, int>(str);
+        var fairy = Config.Instance.GetAllValues<FamilyConfig>();
+        foreach (var value in fairy)
+        {
+            if (value.familyLV > FairyHallMax)
+            {
+                FairyHallMax = value.familyLV;
+            }
 
+        }
 
     }
 
@@ -151,7 +160,7 @@
         {
             return;
         }
-        if ((int)PlayerDatas.Instance.fairyData.mine.FamilyLV >= 2)
+        if ((int)PlayerDatas.Instance.fairyData.mine.FamilyLV >= 2 && (int)PlayerDatas.Instance.fairyData.mine.FamilyLV < FairyHallMax)
         {
             int _familyLV = (int)PlayerDatas.Instance.fairyData.fairy.FamilyLV;
             if ((int)PlayerDatas.Instance.fairyData.fairy.FamilyMoney >= Config.Instance.Get<FamilyConfig>(_familyLV).needMoney)
diff --git a/System/MainInterfacePanel/FeatureNoticeModel.cs b/System/MainInterfacePanel/FeatureNoticeModel.cs
index ddc66b6..509917c 100644
--- a/System/MainInterfacePanel/FeatureNoticeModel.cs
+++ b/System/MainInterfacePanel/FeatureNoticeModel.cs
@@ -19,6 +19,7 @@
     private int OpenFuncId = 0;
     private bool RedPointChange = false;
     private bool IsRedPoint = false;
+    public int FunctionForecastIndex = 0;
     public override void Init()
     {
         AddList();
diff --git a/System/MainInterfacePanel/FeatureNoticeWin.cs b/System/MainInterfacePanel/FeatureNoticeWin.cs
index 9430245..9b4def7 100644
--- a/System/MainInterfacePanel/FeatureNoticeWin.cs
+++ b/System/MainInterfacePanel/FeatureNoticeWin.cs
@@ -14,10 +14,10 @@
     //鍔熻兘棰勫憡闈㈡澘
     public enum FeatureNoticeEnum
     {
-        Pet=6,//鐏靛疇
-        Horse=8,//鍧愰獞
-        Wing=97,//缈呰唨
-        GossipFurnace=87,//鍏崷鐐�
+        Pet = 6,//鐏靛疇
+        Horse = 8,//鍧愰獞
+        Wing = 97,//缈呰唨
+        GossipFurnace = 87,//鍏崷鐐�
     }
 
     public class FeatureNoticeWin : Window
@@ -49,7 +49,7 @@
 
         protected override void AddListeners()
         {
-            m_CloseButton.AddListener(()=> { Close(); });
+            m_CloseButton.AddListener(() => { Close(); });
         }
 
         protected override void OnPreOpen()
@@ -57,8 +57,8 @@
             if (!WindowJumpMgr.Instance.IsJumpState)//鏄惁缁忓巻璺宠浆鎵撳紑
             {
                 DefaultSelection();//鑾峰彇榛樿閫夋嫨
-            }      
-            m_ScrollerController.OnRefreshCell += OnRefreshGridCell;       
+            }
+            m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
             OnCreateGridLineCell(m_ScrollerController);
             ContentDisplay();
             m_ScrollerController.JumpIndex(JumpIndex());
@@ -147,7 +147,7 @@
                 {
                     featuresType1.ImageSelected.SetActive(false);
                 }
-                featuresType1.Button.SetListener(()=> 
+                featuresType1.Button.SetListener(() =>
                 {
                     if (funcId != ClickFuncID)
                     {
@@ -181,7 +181,7 @@
             }
         }
 
-      
+
         #endregion
         private void DefaultSelection()//鑾峰彇榛樿閫夋嫨
         {
@@ -192,6 +192,7 @@
                 if (!FuncOpen.Instance.IsFuncOpen(openTag))
                 {
                     ClickFuncID = openTag;
+                    featureNoticeModel.FunctionForecastIndex = config.OpenNumber;
                     return;
                 }
             }
@@ -204,7 +205,7 @@
         private int JumpIndex()//Jump閫変腑
         {
             int Index = 0;
-            Index = featureNoticeModel.FunctionList.FindIndex((x)=> 
+            Index = featureNoticeModel.FunctionList.FindIndex((x) =>
             {
                 return x.FuncId == ClickFuncID;
             });
@@ -217,6 +218,20 @@
             if (functionForecastConfig == null)
             {
                 return;
+            }
+            if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
+            {
+                m_Text_ShowA.gameObject.SetActive(false);
+                m_TextShowB.gameObject.SetActive(false);
+                m_TextShowC.gameObject.SetActive(false);
+                m_TextShowD.gameObject.SetActive(false);
+            }
+            else
+            {
+                m_Text_ShowA.gameObject.SetActive(true);
+                m_TextShowB.gameObject.SetActive(true);
+                m_TextShowC.gameObject.SetActive(true);
+                m_TextShowD.gameObject.SetActive(true);
             }
             m_TextAdvanceName.text = functionForecastConfig.FuncName;
             DisplayIcon(ClickFuncID);
@@ -253,9 +268,16 @@
             UI3DModelExhibition.Instance.StopShowWing();
             UI3DTreasureExhibition.Instance.StopShow();
             var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
+            if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
+            {
+                m_FeaturesImage.gameObject.SetActive(true);
+                m_FeaturesImage.SetSprite("YGWENHAO");
+                m_FeaturesImage.SetNativeSize();
+                return;
+            }
             switch (funcID)
             {
-                case (int)FeatureNoticeEnum.Pet:                  
+                case (int)FeatureNoticeEnum.Pet:
                     m_RawImage1.gameObject.SetActive(true);
                     var npcConfig = Config.Instance.Get<NPCConfig>(50106001);
                     UI3DModelExhibition.Instance.BeginShowNPC(50106001, npcConfig.UIModeLOffset, npcConfig.UIModelRotation, m_RawImage1);
@@ -267,7 +289,7 @@
                     break;
                 case (int)FeatureNoticeEnum.Wing:
                     m_RawImage3.gameObject.SetActive(true);
-                    var vec3 = new Vector3(0,90,-90);
+                    var vec3 = new Vector3(0, 90, -90);
                     int job = PlayerDatas.Instance.baseData.Job;
                     if (job == 1)
                     {
@@ -301,7 +323,23 @@
             m_Textschedule.gameObject.SetActive(false);
             m_ButtonGoto.gameObject.SetActive(false);
             FuncOpenLVConfig funcoPenConfig = Config.Instance.Get<FuncOpenLVConfig>(funcID);
-            if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
+            var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
+            if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
+            {
+                var functionForecastValue = Config.Instance.GetAllValues<FunctionForecastConfig>();
+                string StrNanme = string.Empty;
+                foreach (var value in functionForecastValue)
+                {
+                    if (value.OpenNumber == functionForecastConfig.OpenNumber - 1)
+                    {
+                        StrNanme = value.FuncName;
+                    }                   
+                }
+                m_TextUnopened.gameObject.SetActive(true);
+                m_TextUnopened.text = string.Format(Language.Get("NextYGLimit"), StrNanme, functionForecastConfig.FuncName);
+                return;
+            }
+                if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
             {
                 if (funcoPenConfig.LimitMagicWeapon != 0)//娉曞疂
                 {
@@ -320,14 +358,14 @@
                     {
                         m_TextUnopened.text = string.Format(Language.Get("YGTask"), funcoPenConfig.LimitLV, PlayerDatas.Instance.baseData.LV, funcoPenConfig.LimitLV);
                     }
-                   
+
                     return;
                 }
             }
             else//绛夌骇
             {
                 m_TextUnopened.gameObject.SetActive(true);
-                m_TextUnopened.text= string.Format(Language.Get("YGFuncLevel"), funcoPenConfig.LimitLV,PlayerDatas.Instance.baseData.LV, funcoPenConfig.LimitLV);
+                m_TextUnopened.text = string.Format(Language.Get("YGFuncLevel"), funcoPenConfig.LimitLV, PlayerDatas.Instance.baseData.LV, funcoPenConfig.LimitLV);
                 return;
             }
         }
@@ -338,7 +376,7 @@
             m_ButtonGoto.gameObject.SetActive(true);
             Treasure treasure;
             TreasureConfig _treasure = Config.Instance.Get<TreasureConfig>(fabaoID);
-            m_ButtonGoto.SetListener(()=> 
+            m_ButtonGoto.SetListener(() =>
             {
                 var config = Config.Instance.Get<TreasureConfig>(fabaoID);
                 treasureModel.selectedTreasure = fabaoID;
@@ -370,10 +408,10 @@
                         }
                         else
                         {
-                            double dou=Math.Round((double)treasure.exp / treasure.treasureStages[funcStage].exp,2);
+                            double dou = Math.Round((double)treasure.exp / treasure.treasureStages[funcStage].exp, 2);
                             string str = dou * 100 + "%";
                             m_Textschedule.text = string.Format(Language.Get("YGYouFB"), str);
-                        }                       
+                        }
                     }
                     else
                     {
diff --git a/System/MainInterfacePanel/FeaturesType1.cs b/System/MainInterfacePanel/FeaturesType1.cs
index b5bdca0..1451a34 100644
--- a/System/MainInterfacePanel/FeaturesType1.cs
+++ b/System/MainInterfacePanel/FeaturesType1.cs
@@ -29,8 +29,8 @@
         {
             get { return m_Button; }
             set { m_Button = value; }
-        }
-
+        }
+        FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
         public void GetTheFeatureID(int funcId)
         {
             var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcId);
@@ -40,7 +40,15 @@
             }
             m_FunctionName.text = functionForecastConfig.FuncName;
             m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString()+ Language.Get("Z1041");
-            m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey);
+            if (!FuncOpen.Instance.IsFuncOpen(funcId) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
+            {
+                m_FeaturesTypeIcon.SetSprite("UnKnowIcon");
+            }
+            else
+            {
+                m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey);
+            }
+           
             if (PlayerDatas.Instance.baseData.LV >= functionForecastConfig.DisplayLevel)
             {
                 m_FunctionalLevel.color = new Color32(141,220,17,255);
diff --git a/System/MainInterfacePanel/FeaturesType2.cs b/System/MainInterfacePanel/FeaturesType2.cs
index c62cedf..a94ed5a 100644
--- a/System/MainInterfacePanel/FeaturesType2.cs
+++ b/System/MainInterfacePanel/FeaturesType2.cs
@@ -28,8 +28,8 @@
         {
             get { return m_Button; }
             set { m_Button = value; }
-        }
-
+        }
+        FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
         public void GetTheFeatureID(int funcId)
         {
             var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcId);
@@ -39,7 +39,14 @@
             }
             m_FunctionName.text = functionForecastConfig.FuncName;
             m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString()+Language.Get("Z1041");
-            m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey);
+            if (!FuncOpen.Instance.IsFuncOpen(funcId) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
+            {
+                m_FeaturesTypeIcon.SetSprite("UnKnowIcon");
+            }
+            else
+            {
+                m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey);
+            }
             if (PlayerDatas.Instance.baseData.LV >= functionForecastConfig.DisplayLevel)
             {
                 m_FunctionalLevel.color = new Color32(141, 220, 17,255);

--
Gitblit v1.8.0