From 60b5d0ae152a6c22c0f66def2783afdfc19cd7fd Mon Sep 17 00:00:00 2001 From: wangzhenxing <1545929779@qq.com> Date: Fri, 22 Dec 2023 19:26:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AF=BB=E4=BB=99=E6=8B=9B=E5=8B=9F]=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Common/functions.lua | 108 ++++++++++++++++++ .../DynamicActivity/TimeLimitUpHero.lua | 2 +- .../~Lua/Modules/Recruit/RecruitMainPanel.lua | 5 +- 3 files changed, 112 insertions(+), 3 deletions(-) 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