| | |
| | | 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;
|
| | |
| | | public override void Init()
|
| | | {
|
| | | AddList();
|
| | | AddAwardItem();
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | 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++)
|