【灵兽特惠】倒计时修改

dev_chengFeng
ZhangBiao 2021-11-29 13:40:53 +08:00
parent 42923df528
commit d39153607b
9 changed files with 39 additions and 41 deletions

View File

@ -139,7 +139,7 @@ function this.InitActivityServerData(msg, isUpdate)
this.CheckMoneyProgress(v)
this.mission[v.activityId] = v
LogYellow("刷新活动数据activityId" .. v.activityId .. " value" .. v.value)
-- LogYellow("刷新活动数据activityId" .. v.activityId .. " value" .. v.value)
for n, m in ipairs(v.mission) do
--LogGreen(" 刷新活动数据missionId" .. m.missionId .. " state" .. m.state .. " progress" .. m.progress)
if (v.activityId == ActivityTypeDef.OnlineGift) then
@ -176,11 +176,11 @@ function this.InitActivityServerData(msg, isUpdate)
LuckyCatManager.GetRewardProgress(v.mission, v.activityId, v.value)
end
end
if (v.activityId == ActivityTypeDef.SupremeHero) then
for n, m in ipairs(v.mission) do
LogGreen("v.activityId:"..v.activityId.." m.missionId:"..m.missionId.." m.state:"..m.state)
end
end
-- if (v.activityId == ActivityTypeDef.SupremeHero) then
-- for n, m in ipairs(v.mission) do
-- LogGreen("v.activityId:"..v.activityId.." m.missionId:"..m.missionId.." m.state:"..m.state)
-- end
-- end
this.CheckActiveIsOpen(v)
else
LogError("服务器发送了前端不存在的活动ID"..v.activityId)
@ -419,7 +419,7 @@ function this.RefreshActivityData(respond)
--newOpen
if respond.activityInfo then
for i = 1, #respond.activityInfo do
Log("活动开启 " .. respond.activityInfo[i].activityId)
-- Log("活动开启 " .. respond.activityInfo[i].activityId)
this.mission[respond.activityInfo[i].activityId] = respond.activityInfo[i]
local activityType = this.GetActivityTypeFromId(respond.activityInfo[i].activityId)
if activityType == ActivityTypeDef.LuckyCat then --招财猫

View File

@ -78,8 +78,7 @@ function LingShowTeHui:OnShow(_sortingOrder,_parent)
end
end
self:OnShowData()
self.time.text = "每周一零点刷新"
-- self:SetTime()
self:SetTime()
end
local FrameSprite = {
[3] = "l_lishoutehui_ziyuan",
@ -144,25 +143,26 @@ function LingShowTeHui:OnShowData()
end
end
-- function LingShowTeHui:SetTime()
-- if self.timer then
-- self.timer:Stop()
-- self.timer = nil
-- end
-- local endTime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.LingShowTeHui)
-- local timeDown = endTime - GetTimeStamp()
-- self.time.text = "每周一零点刷新"--Language[10470]..TimeToDHMS(timeDown)
-- self.timer = Timer.New(function()
-- timeDown = timeDown - 1
-- if timeDown < 1 then
-- self.timer:Stop()
-- self.timer = nil
-- self.time.text = Language[10470]..TimeToDHMS(0)
-- end
-- self.time.text = Language[10470]..TimeToDHMS(timeDown)
-- end, 1, -1, true)
-- self.timer:Start()
-- end
function LingShowTeHui:SetTime()
if self.timer then
self.timer:Stop()
self.timer = nil
end
-- local endTime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.LingShowTeHui)
local endTime = math.ceil((GetTimeStamp() - PlayerManager.ServerOpenTime)/604800)*604800 + PlayerManager.ServerOpenTime
local timeDown = endTime - GetTimeStamp()
self.time.text = Language[10470]..TimeToDHMS(timeDown)
self.timer = Timer.New(function()
timeDown = timeDown - 1
if timeDown < 1 then
self.timer:Stop()
self.timer = nil
self.time.text = Language[10470]..TimeToDHMS(0)
end
self.time.text = Language[10470]..TimeToDHMS(timeDown)
end, 1, -1, true)
self.timer:Start()
end
function LingShowTeHui:OnClose()
self.spLoader:Destroy()

View File

@ -47,9 +47,7 @@ end
-- 初始化关卡状态, state , 1 已开启未通过 2 :已通过 -1 已开启等级未解锁
function this.InitAllFightPointState(msg)
Log("当前关卡ID " .. msg.fightId)
Log("当前关卡的状态 " .. msg.state)
Log("当前已经挂机的时长 " .. msg.duration)
Log("当前关卡ID " .. tostring(msg.fightId).." 当前关卡的状态:" ..tostring(msg.state).." 当前已经挂机的时长:" .. tostring(msg.duration).." 挂机奖励:"..tostring(msg.reward))
if msg.duration < 0 then
Log("服务器返回的挂机时长是负数,是不是调时间??")
end
@ -62,7 +60,7 @@ function this.InitAllFightPointState(msg)
this.curFightState = msg.state
this.adventrueEnemyList=msg.adventureBossInfo
this.HangOnReward=msg.reward
Log("挂机奖励:"..this.HangOnReward)
Log()
this.maxChapterNum = LengthOfTable(GameDataBase.SheetBase.GetKeys(ConfigManager.GetConfig(ConfigName.MainLevelSettingConfig)))
end

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

View File

@ -93,7 +93,7 @@ function this.GetLingMaiServerData(msg,func)
-- .." practiceLevel:"..tostring(msg.lingmaiData[i].practiceLevel).." servername:"..tostring(msg.lingmaiData[i].servername))
msg.lingmaiData[i].name = PracticeManager.SetNameColor(msg.lingmaiData[i].name,msg.lingmaiData[i].practiceLevel)
end
Log("state:"..tostring(msg.state).." myPlaceId:"..tostring(msg.myOccupyId).." startTime:"..tostring(msg.myOccupyTime)
Log("灵脉秘境:state:"..tostring(msg.state).." myPlaceId:"..tostring(msg.myOccupyId).." startTime:"..tostring(msg.myOccupyTime)
.." fightTime:"..tostring(msg.remainChangeTimes).." lingmaiData:"..tostring(#msg.lingmaiData).." curPage:"..tostring(this.curPage).." timePoint:"..tostring(msg.timePoint))
if func then
func()

View File

@ -942,7 +942,7 @@ function this.TreasureStateIndicaion(buffer)
msg:ParseFromString(data)
-- --LogGreen("msg.score :"..msg.score.." msg.resetTime:"..msg.resetTime)
TreasureOfHeavenManger.UpdateData(msg)
LogPink("推回来的数据长度"..#msg.treasureRewardState)
-- LogPink("推回来的数据长度"..#msg.treasureRewardState)
end
function this.GuildTranscriptIndication(buffer)

View File

@ -11,7 +11,7 @@ end
-- 更新所有周卡数据
function this.UpdateAllWeekCard(msg)
_WeekCardData = {}
LogRed("周卡信息初始化 "..#msg.allWeekCardInfo)
Log("周卡信息初始化 "..#msg.allWeekCardInfo)
for i, data in ipairs(msg.allWeekCardInfo) do
this.UpdateWeekCardData(data)
end
@ -20,7 +20,7 @@ function this.UpdateAllWeekCard(msg)
end
-- 更新月卡数据
function this.UpdateWeekCardData(data)
LogRed("月卡信息更新 "..data.id.." "..tostring(data.isBuy).." "..data.leaveGetRewardDays)
-- LogRed("月卡信息更新 "..data.id.." "..tostring(data.isBuy).." "..data.leaveGetRewardDays)
local week = {}
week.id = data.id
week.isBuy = data.isBuy

View File

@ -90,7 +90,7 @@ function SurpriseBox:SetItemList()
end
function SurpriseBox:ShowSingleData(item,data,index)
Log("PackId:"..tostring(data.otherData.PackId).." State:"..tostring(data.progress))
-- Log("PackId:"..tostring(data.otherData.PackId).." State:"..tostring(data.progress))
local box = Util.GetGameObject(item,"box"):GetComponent("Image")
local lock = Util.GetGameObject(item,"lock")
local getBtn = Util.GetGameObject(item,"getBtn")

View File

@ -53,9 +53,9 @@ end
function this.SetRewardData(data,time)
rewardState=data
challengeTime=time
for i = 1, #data do
Log("宝箱状态========"..data[1])
end
-- for i = 1, #data do
-- Log("宝箱状态========"..data[1])
-- end
end