diff --git a/Assets/ManagedResources/~Lua/Common/functions.lua b/Assets/ManagedResources/~Lua/Common/functions.lua index 5e39d31ca0..28cead745b 100644 --- a/Assets/ManagedResources/~Lua/Common/functions.lua +++ b/Assets/ManagedResources/~Lua/Common/functions.lua @@ -2837,6 +2837,7 @@ function CheckFunctionOpen(_funId) end -- 当前玩家等级 local playerLv = PlayerManager.level + local tip="" --开启规则 --1关卡开启 --2玩家等级开启 @@ -2846,7 +2847,7 @@ function CheckFunctionOpen(_funId) if openRule then if openRule[1] == 1 and not FightPointPassManager.IsFightPointPass(openRule[2]) then -- 关卡开启 return false - elseif openRule[1] == 2 and playerLv < openRule[2] then -- 等级开启 + elseif openRule[1] == 2 and playerLv < openRule[2] then -- 等级开启 return false elseif openRule[1] == 3 and HarmonyManager.GetSingleAdditions(HarmonyAddType.AddLv) < openRule[2] then -- 鸿蒙阵神将共鸣等级 return false @@ -2875,6 +2876,59 @@ function CheckFunctionOpen(_funId) return true end +function GetFunctionOpenTip(_funId) + local data = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,_funId) + if data.IsOpen==0 then + return "功能未开启" + end + -- 当前玩家等级 + local playerLv = PlayerManager.level + local tip="" + --开启规则 + --1关卡开启 + --2玩家等级开启 + --3鸿蒙阵神将等级 + --4购买礼包开启 + local openRule = data.OpenRules + if openRule then + if openRule[1] == 1 and not FightPointPassManager.IsFightPointPass(openRule[2]) then -- 关卡开启 + local name=ConfigManager.GetConfigData(ConfigName.MainLevelConfig,openRule[2]).Name or "" + tip=string.format(Language[10295], GetLanguageStrById(name)) + return tip + elseif openRule[1] == 2 and playerLv < openRule[2] then -- 等级开启 + tip=string.format(Language[10293],openRule[2]) + return tip + elseif openRule[1] == 3 and HarmonyManager.GetSingleAdditions(HarmonyAddType.AddLv) < openRule[2] then -- 鸿蒙阵神将共鸣等级 + tip=string.format("鸿蒙阵共鸣神将等级达到%s开启", openRule[2]) + return tip + elseif openRule[1] == 4 and not OperatingManager.IsBuyGift(openRule[2]) then + return tip + elseif openRule[1] == 5 and GodsWayTowerManager.GetTowerFloorByType(1) < openRule[2] then + return tip + end + end + --1#创角 + --2#开服 + local curTime=GetTimeStamp() + if data.IfOpen then + local type=data.IfOpen[1] + local dayNum=data.IfOpen[2] + if type==1 then + if curTime%s次必得五星神将",RecruitManager.GetRecruit3MustCount()) + self.tenTipText.text = string.format("剩余%s次必得五星神将法宝",RecruitManager.GetRecruit2MustCount()) end end @@ -368,13 +368,19 @@ function RecruitEquipPanelNew:UpdatePanelData() end Util.AddOnceClick(m.btn,function() + local isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish) + local tip=GetFunctionOpenTip(FUNCTION_OPEN_TYPE.EquipWish) + if isOpen==false then + PopupTipPanel.ShowTip(tip) + return + end if not isFree then if BagManager.GetItemCountById(itemId)