心愿法宝抽卡入口改成开服n天后显示

dev_fengTi_And
PC-202302260912\Administrator 2023-07-10 17:09:33 +08:00
parent cf6de3c6e5
commit 22122de56a
3 changed files with 26 additions and 2 deletions

View File

@ -1771,6 +1771,7 @@ FUNCTION_OPEN_TYPE = {
GodsWayTower_1=139,--多对塔1
GodsWayTower_2=140,--多对塔2
GodWeapon=141,--神兵
EquipWish=142,--法宝心愿
Number_Game=149,--数字游戏
}

View File

@ -108,7 +108,7 @@ function this.InitMsg(msg)
this.serData[id].restTime = restTime
this.serData[id].switch = switch
--LogGreen(string.format("--- 功能解锁数据 id = %s, startTime = %s, endTime = %s, switch = %s",id, startTime, endTime, switch))
LogGreen(string.format("--- 功能解锁数据 id = %s, startTime = %s, endTime = %s, switch = %s",id, startTime, endTime, switch))
-- 用于标记是否解锁使用
local typeId = AllActSetConfig[id].IsIDdSame
@ -320,6 +320,23 @@ function this.IsQualifiled(id)
elseif openRule[1] == 3 then -- 鸿蒙阵神将共鸣等级
qualifiled = HarmonyManager.GetSingleAdditions(HarmonyAddType.AddLv) >= openRule[2]
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<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 qualifiled
end

View File

@ -387,7 +387,11 @@ function this:RefreshTabData()
this.itemList[i].go.name = "tab_"..i
this.itemList[i].tran = this.itemList[i].go:GetComponent("RectTransform")
local vec = this.itemList[i].tran.anchoredPosition
vec.x = this.off * (i - 2) + (i - 1) * this.itemWidth - 30
if #self.dicData==1 then
vec.x=this.off * (#this.itemList - 1) + (#this.itemList) * this.itemWidth - 30
else
vec.x = this.off * (i - 2) + (i - 1) * this.itemWidth - 30
end
vec.y = 50
this.itemList[i].tran.anchoredPosition = vec
this.itemList[i].pos = this.itemList[i].tran.anchoredPosition
@ -403,6 +407,8 @@ function this:RefreshTabData()
end
end
this.pos4 = Vector3.New(this.off * (#this.itemList - 1) + (#this.itemList) * this.itemWidth - 30,50,0)
--print(tostring(this.pos4))
LogError(tostring(this.pos4))
end
function this:SetIndex()