diff --git a/Assets/ManagedResources/~Lua/Common/functions.lua b/Assets/ManagedResources/~Lua/Common/functions.lua index 377fede33a..ca01b85183 100644 --- a/Assets/ManagedResources/~Lua/Common/functions.lua +++ b/Assets/ManagedResources/~Lua/Common/functions.lua @@ -2902,6 +2902,114 @@ function CheckFunctionOpen(_funId) end return true end +--客户端判断功能是否开启 +function CheckFunctionOpenClient(_funId) + local data = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,_funId) + if data.IsOpen==0 then + return false + end + -- 当前玩家等级 + local playerLv = PlayerManager.level + local tip="" + --开启规则 + --1关卡开启 + --2玩家等级开启 + --3鸿蒙阵神将等级 + --4购买礼包开启 + --6修行等级 + local openRule = data.OpenRules + 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 -- 等级开启 + return false + elseif openRule[1] == 3 and HarmonyManager.GetSingleAdditions(HarmonyAddType.AddLv) < openRule[2] then -- 鸿蒙阵神将共鸣等级 + return false + elseif openRule[1] == 4 and not OperatingManager.IsBuyGift(openRule[2]) then + return false + elseif openRule[1] == 5 and GodsWayTowerManager.GetTowerFloorByType(1) < openRule[2] then + return false + elseif openRule[1] == 6 and PracticeManager.PracticeLevel