[寻仙招募]=====================开启时间修改

TCX_dev_realOne_master
wangzhenxing 2023-12-22 19:26:54 +08:00
parent dd17a13c6d
commit 60b5d0ae15
3 changed files with 112 additions and 3 deletions

View File

@ -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<openRule[2] then --修行等级
return false
end
end
--1#创角
--2#开服
local curTime=GetTimeStamp()
if data.ifopen1 then
local type=data.ifopen1[1]
local dayNum=data.ifopen1[2]
if type==1 then
if curTime<PlayerManager.userCreateTime+dayNum*24*60*60 then
return false
end
elseif type==2 then
if curTime<PlayerManager.GetServerOpenTime()+dayNum*24*60*60 then
return false
end
end
end
return true
end
function GetFunctionOpenTipClient(_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
elseif openRule[1] == 6 and PracticeManager.PracticeLevel<openRule[2] then
local name=ConfigManager.GetConfigData(ConfigName.XiuXianConfig,openRule[2]).RealmName or ""
tip=name.."期解锁"
return tip
end
end
--1#创角
--2#开服
local curTime=GetTimeStamp()
if data.ifopen1 then
local type=data.ifopen1[1]
local dayNum=data.ifopen1[2]
if type==1 then
if curTime<PlayerManager.userCreateTime+dayNum*24*60*60 then
tip=string.format("创角第%s天",dayNum)
return tip
end
elseif type==2 then
if curTime<PlayerManager.GetServerOpenTime()+dayNum*24*60*60 then
tip=string.format("开服第%s天开启",dayNum+1)
return tip
end
end
end
return tip
end
function GetFunctionOpenTip(_funId)
local data = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,_funId)

View File

@ -295,7 +295,7 @@ function TimeLimitUpHero:RefreshGetHeroTimes()
m.num.text= PrintWanNum2(itemNum)
end
local sureFunc=function()
local isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.ChouJiangRukou)
local isOpen =CheckFunctionOpenClient(FUNCTION_OPEN_TYPE.ChouJiangRukou)
local tip=GetFunctionOpenTip(FUNCTION_OPEN_TYPE.ChouJiangRukou)
if isOpen==false then
PopupTipPanel.ShowTip(tip)

View File

@ -341,6 +341,7 @@ end
function RecruitMainPanel:OnShow()
orginLayer = self.sortingOrder
self.dicData = RecruitManager.GetRecruitData()
LogError("#self.dicData====================="..#self.dicData)
this:RefreshTabData()
for i = 1,#self.dicData do
if self.dicData[i].ShopData[1][1] == self.CurRecruitId then
@ -411,8 +412,8 @@ function this:RefreshTabData()
isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish)
tip=GetFunctionOpenTip(FUNCTION_OPEN_TYPE.EquipWish)
elseif self.dicData[i].ActId==121 then
isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.ChouJiangRukou)
tip=GetFunctionOpenTip(FUNCTION_OPEN_TYPE.ChouJiangRukou)
isOpen=CheckFunctionOpenClient(FUNCTION_OPEN_TYPE.ChouJiangRukou)
tip=GetFunctionOpenTipClient(FUNCTION_OPEN_TYPE.ChouJiangRukou)
end
this.itemList[i].tipObj:SetActive(not isOpen)
this.itemList[i].tipTxt.text=tip