From b2ded28299cd907a9d3fd8025fda968b57b6eaab Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期二, 30 十月 2018 21:30:13 +0800
Subject: [PATCH] 4435 子 【开发】【1.2.0】功能预告界面修改,新增可领取奖励 / 【前端】【1.2.0】功能预告界面修改,新增可领取奖励
---
System/MainInterfacePanel/FeatureNoticeModel.cs | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/System/MainInterfacePanel/FeatureNoticeModel.cs b/System/MainInterfacePanel/FeatureNoticeModel.cs
index eb7263c..e93ac03 100644
--- a/System/MainInterfacePanel/FeatureNoticeModel.cs
+++ b/System/MainInterfacePanel/FeatureNoticeModel.cs
@@ -14,6 +14,7 @@
public class FeatureNoticeModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
{
public List<FunctionForecastConfig> FunctionList = new List<FunctionForecastConfig>();
+ public Dictionary<int, ImpactRankModel.RankAwardItem> DicAwardItem = new Dictionary<int, ImpactRankModel.RankAwardItem>();//濂栧姳鐗╁搧
private const int Redpoint_key1 = 38;
public Redpoint redPointStre1 = new Redpoint(Redpoint_key1);
private int OpenFuncId = 0;
@@ -23,6 +24,7 @@
public override void Init()
{
AddList();
+ AddAwardItem();
}
public void OnBeforePlayerDataInitialize()
@@ -97,6 +99,43 @@
}
}
+ private void AddAwardItem()
+ {
+ if (DicAwardItem.Count <= 0)
+ {
+ var configs = Config.Instance.GetAllKeys<FunctionForecastConfig>();
+ foreach (var key in configs)
+ {
+ var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(key);
+ if (!DicAwardItem.ContainsKey(functionForecastConfig.FuncId) && functionForecastConfig.Display==1)
+ {
+ ImpactRankModel.RankAwardItem _award = new ImpactRankModel.RankAwardItem();
+ if (functionForecastConfig.Award == string.Empty)
+ {
+ continue;
+ }
+ var _jsonData = LitJson.JsonMapper.ToObject(functionForecastConfig.Award);
+ foreach (string _key in _jsonData.Keys)
+ {
+ var _job = int.Parse(key);
+ var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[_key].ToJson());
+ for (int j = 0; j < _itemArray.Length; j++)
+ {
+ _award.Add(_job, new AwardItem()
+ {
+ item = new Item(_itemArray[j][0], _itemArray[j][1]),
+ isBind = 1,
+ });
+ }
+ }
+ DicAwardItem.Add(functionForecastConfig.FuncId, _award);
+ }
+ }
+ // DebugEx.LogError(DicAwardItem);
+ }
+
+ }
+
private void RedDotStatus()
{
for (int i = 0; i < FunctionList.Count; i++)
--
Gitblit v1.8.0