|
@@ -31,7 +31,7 @@ namespace GFGGame
|
|
|
}
|
|
|
if (!CheckIsChapterFunOpen(cfg, showTips)) return false;
|
|
|
if (!CheckIsLvFunOpen(cfg, showTips)) return false;
|
|
|
-
|
|
|
+ if (!CheckSpecialFunOpen(cfg, showTips)) return false;
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -67,17 +67,34 @@ namespace GFGGame
|
|
|
for (int i = 0; i < cfgs.Length; i++)
|
|
|
{
|
|
|
if (cfgs[i].show == 0) continue;
|
|
|
- if (lv != cfgs[i].lv || !CheckIsLvFunOpen(cfgs[i], false)) continue;
|
|
|
+ if (lv < cfgs[i].lv || !CheckIsLvFunOpen(cfgs[i], false)) continue;
|
|
|
if (!CheckIsChapterFunOpen(cfgs[i], false)) continue;
|
|
|
listCfg.Add(cfgs[i].id);
|
|
|
}
|
|
|
if (listCfg.Count > 0)
|
|
|
{
|
|
|
- // Timers.inst.Add(1, 0, FunctionOpen, listCfg);
|
|
|
ViewManager.Show<FunctionOpenView>(listCfg);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ public void CheckHasSpecialFunOpen()
|
|
|
+ {
|
|
|
+ FunctionOpenCfg[] cfgs = FunctionOpenCfgArray.Instance.dataArray;
|
|
|
+ List<string> listCfg = new List<string>();
|
|
|
+ for (int i = 0; i < cfgs.Length; i++)
|
|
|
+ {
|
|
|
+ if (cfgs[i].show == 0) continue;
|
|
|
+ if ((cfgs[i].special <= 0)) continue;
|
|
|
+ if (StorageDataManager.Instance.GetStorageValue(ConstStorageId.FUNCTION_OPEN + cfgs[i].index) == 1) continue;
|
|
|
+ if (CheckSpecialFunOpen(cfgs[i], false))
|
|
|
+ {
|
|
|
+ listCfg.Add(cfgs[i].id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (listCfg.Count > 0)
|
|
|
+ {
|
|
|
+ ViewManager.Show<FunctionOpenView>(listCfg);
|
|
|
+ }
|
|
|
+ }
|
|
|
// private void FunctionOpen(object param)
|
|
|
// {
|
|
|
// if (ViewManager.isViewOpen(typeof(RoleLvUpView).Name)) return;
|
|
@@ -115,5 +132,29 @@ namespace GFGGame
|
|
|
if (showTips) PromptController.Instance.ShowFloatTextPrompt(string.Format("角色达到{0}级解锁", cfg.lv));
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private bool CheckSpecialFunOpen(FunctionOpenCfg cfg, bool showTips = true)
|
|
|
+ {
|
|
|
+ if (cfg.special <= 0) return true;
|
|
|
+ if (cfg.id == typeof(SuitListView).Name)//服装升级获取第一套【天衣】套装后开启
|
|
|
+ {
|
|
|
+ if (StorageDataManager.Instance.GetStorageValue(ConstStorageId.FUNCTION_OPEN + cfg.index) == 1) return true;
|
|
|
+
|
|
|
+ List<int> _currentList3 = DressUpMenuSuitDataManager.GetSuitIDList();
|
|
|
+ if (_currentList3.Count == 0) return false;
|
|
|
+ _currentList3 = SuitUtil.SortSuitListByHighRarity(_currentList3);
|
|
|
+ if (SuitCfgArray.Instance.GetCfg(_currentList3[0]).rarity == ConstDressRarity.Rarity_TIANYI)
|
|
|
+ {
|
|
|
+ StorageSProxy.ReqSetClientValue(ConstStorageId.FUNCTION_OPEN + cfg.index, 1).Coroutine();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|