From f786e6bfb3c888a58e8076c99b11381b36bd42b2 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 19 九月 2018 15:06:00 +0800
Subject: [PATCH] 3677 【前端】功能预告逻辑优化
---
System/MainInterfacePanel/FeaturesType1.cs | 11 +++++
System/MainInterfacePanel/FeaturesType2.cs | 11 +++++
System/MainInterfacePanel/FeatureNoticeModel.cs | 14 +++++++
System/MainInterfacePanel/FeatureNoticeWin.cs | 44 +++++++++++++++++-----
4 files changed, 68 insertions(+), 12 deletions(-)
diff --git a/System/MainInterfacePanel/FeatureNoticeModel.cs b/System/MainInterfacePanel/FeatureNoticeModel.cs
index 5505a36..e2b91db 100644
--- a/System/MainInterfacePanel/FeatureNoticeModel.cs
+++ b/System/MainInterfacePanel/FeatureNoticeModel.cs
@@ -280,6 +280,20 @@
return mapConfig != null && mapConfig.MapFBType != 0;
}
+ public int GetOpenLv(int Inedx)
+ {
+ int lv = 0;
+ var functionForecastValue = Config.Instance.GetAllValues<FunctionForecastConfig>();
+ foreach (var value in functionForecastValue)
+ {
+ if (value.OpenNumber == Inedx)
+ {
+ lv = value.DisplayLevel;
+ return lv;
+ }
+ }
+ return lv;
+ }
}
diff --git a/System/MainInterfacePanel/FeatureNoticeWin.cs b/System/MainInterfacePanel/FeatureNoticeWin.cs
index 2b338f6..a8599fd 100644
--- a/System/MainInterfacePanel/FeatureNoticeWin.cs
+++ b/System/MainInterfacePanel/FeatureNoticeWin.cs
@@ -71,8 +71,8 @@
m_FeatureNoticeTip.Init();
OnCreateGridLineCell(m_ScrollerController);
ContentDisplay();
-
-
+
+
}
protected override void OnActived()
{
@@ -84,7 +84,7 @@
FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnPlayersUpLV;
treasureModel.treasureStateChangeEvent += treasureStateChangeEvent;
- treasureModel.treasureStageUpEvent += treasureStageUpEvent;
+ treasureModel.treasureStageUpEvent += treasureStageUpEvent;
if (!IsJump)//鏄惁缁忓巻璺宠浆鎵撳紑
{
m_ScaleTween.Play(false, IsOpen);
@@ -241,7 +241,15 @@
{
return;
}
- if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber-1 > featureNoticeModel.FunctionForecastIndex)
+ bool Type = false;
+ int NeedLv = 0;
+ int playerLv = PlayerDatas.Instance.baseData.LV;
+ if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex)
+ {
+ Type = true;
+ NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2);
+ }
+ if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && Type && NeedLv > playerLv)
{
m_Text_ShowA.gameObject.SetActive(false);
m_TextShowB.gameObject.SetActive(false);
@@ -290,7 +298,15 @@
UI3DModelExhibition.Instance.StopShowWing();
UI3DTreasureExhibition.Instance.StopShow();
var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
- if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber-1 > featureNoticeModel.FunctionForecastIndex)
+ bool Type = false;
+ int NeedLv = 0;
+ int playerLv = PlayerDatas.Instance.baseData.LV;
+ if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex)
+ {
+ Type = true;
+ NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2);
+ }
+ if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && Type && NeedLv > playerLv)
{
m_FeaturesImage.gameObject.SetActive(true);
m_FeaturesImage.SetSprite("YGWENHAO");
@@ -346,22 +362,30 @@
m_ButtonGoto.gameObject.SetActive(false);
FuncOpenLVConfig funcoPenConfig = Config.Instance.Get<FuncOpenLVConfig>(funcID);
var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
- if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber-1 > featureNoticeModel.FunctionForecastIndex)
+ bool Type = false;
+ int NeedLv = 0;
+ int playerLv = PlayerDatas.Instance.baseData.LV;
+ if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex)
+ {
+ Type = true;
+ NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2);
+ }
+ if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && Type && NeedLv > playerLv)
{
var functionForecastValue = Config.Instance.GetAllValues<FunctionForecastConfig>();
string StrNanme = string.Empty;
foreach (var value in functionForecastValue)
{
- if (value.OpenNumber == functionForecastConfig.OpenNumber -2)
+ if (value.OpenNumber == functionForecastConfig.OpenNumber - 2)
{
StrNanme = value.FuncName;
- }
+ }
}
m_TextUnopened.gameObject.SetActive(true);
- m_TextUnopened.text = string.Format(Language.Get("NextYGLimit"), StrNanme, functionForecastConfig.FuncName);
+ m_TextUnopened.text = string.Format(Language.Get("NextYGLimit"), NeedLv, functionForecastConfig.FuncName);
return;
}
- if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
+ if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
{
if (funcoPenConfig.LimitMagicWeapon != 0)//娉曞疂
{
diff --git a/System/MainInterfacePanel/FeaturesType1.cs b/System/MainInterfacePanel/FeaturesType1.cs
index 3fab881..7fac5a6 100644
--- a/System/MainInterfacePanel/FeaturesType1.cs
+++ b/System/MainInterfacePanel/FeaturesType1.cs
@@ -40,7 +40,16 @@
}
m_FunctionName.text = functionForecastConfig.FuncName;
m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString()+ Language.Get("Z1041");
- if (!FuncOpen.Instance.IsFuncOpen(funcId) && functionForecastConfig.OpenNumber-1 > featureNoticeModel.FunctionForecastIndex)
+
+ bool Type = false;
+ int NeedLv = 0;
+ int playerLv = PlayerDatas.Instance.baseData.LV;
+ if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex)
+ {
+ Type = true;
+ NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2);
+ }
+ if (!FuncOpen.Instance.IsFuncOpen(funcId) && Type && NeedLv > playerLv)
{
m_FeaturesTypeIcon.SetSprite("UnKnowIcon");
}
diff --git a/System/MainInterfacePanel/FeaturesType2.cs b/System/MainInterfacePanel/FeaturesType2.cs
index fccb772..025a9a5 100644
--- a/System/MainInterfacePanel/FeaturesType2.cs
+++ b/System/MainInterfacePanel/FeaturesType2.cs
@@ -32,6 +32,7 @@
FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
public void GetTheFeatureID(int funcId)
{
+ DebugEx.LogError("ID"+ featureNoticeModel.FunctionForecastIndex);
var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcId);
if (functionForecastConfig == null)
{
@@ -39,7 +40,15 @@
}
m_FunctionName.text = functionForecastConfig.FuncName;
m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString()+Language.Get("Z1041");
- if (!FuncOpen.Instance.IsFuncOpen(funcId) && functionForecastConfig.OpenNumber-1 > featureNoticeModel.FunctionForecastIndex)
+ bool Type = false;
+ int NeedLv = 0;
+ int playerLv = PlayerDatas.Instance.baseData.LV;
+ if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex)
+ {
+ Type = true;
+ NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2);
+ }
+ if (!FuncOpen.Instance.IsFuncOpen(funcId) && Type && NeedLv> playerLv)
{
m_FeaturesTypeIcon.SetSprite("UnKnowIcon");
}
--
Gitblit v1.8.0