【灵兽特惠】倒计时修改
parent
42923df528
commit
d39153607b
|
@ -139,7 +139,7 @@ function this.InitActivityServerData(msg, isUpdate)
|
||||||
this.CheckMoneyProgress(v)
|
this.CheckMoneyProgress(v)
|
||||||
this.mission[v.activityId] = 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
|
for n, m in ipairs(v.mission) do
|
||||||
--LogGreen(" 刷新活动数据missionId:" .. m.missionId .. " state:" .. m.state .. " progress:" .. m.progress)
|
--LogGreen(" 刷新活动数据missionId:" .. m.missionId .. " state:" .. m.state .. " progress:" .. m.progress)
|
||||||
if (v.activityId == ActivityTypeDef.OnlineGift) then
|
if (v.activityId == ActivityTypeDef.OnlineGift) then
|
||||||
|
@ -176,11 +176,11 @@ function this.InitActivityServerData(msg, isUpdate)
|
||||||
LuckyCatManager.GetRewardProgress(v.mission, v.activityId, v.value)
|
LuckyCatManager.GetRewardProgress(v.mission, v.activityId, v.value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (v.activityId == ActivityTypeDef.SupremeHero) then
|
-- if (v.activityId == ActivityTypeDef.SupremeHero) then
|
||||||
for n, m in ipairs(v.mission) do
|
-- for n, m in ipairs(v.mission) do
|
||||||
LogGreen("v.activityId:"..v.activityId.." m.missionId:"..m.missionId.." m.state:"..m.state)
|
-- LogGreen("v.activityId:"..v.activityId.." m.missionId:"..m.missionId.." m.state:"..m.state)
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
this.CheckActiveIsOpen(v)
|
this.CheckActiveIsOpen(v)
|
||||||
else
|
else
|
||||||
LogError("服务器发送了前端不存在的活动ID:"..v.activityId)
|
LogError("服务器发送了前端不存在的活动ID:"..v.activityId)
|
||||||
|
@ -419,7 +419,7 @@ function this.RefreshActivityData(respond)
|
||||||
--newOpen
|
--newOpen
|
||||||
if respond.activityInfo then
|
if respond.activityInfo then
|
||||||
for i = 1, #respond.activityInfo do
|
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]
|
this.mission[respond.activityInfo[i].activityId] = respond.activityInfo[i]
|
||||||
local activityType = this.GetActivityTypeFromId(respond.activityInfo[i].activityId)
|
local activityType = this.GetActivityTypeFromId(respond.activityInfo[i].activityId)
|
||||||
if activityType == ActivityTypeDef.LuckyCat then --招财猫
|
if activityType == ActivityTypeDef.LuckyCat then --招财猫
|
||||||
|
|
|
@ -78,8 +78,7 @@ function LingShowTeHui:OnShow(_sortingOrder,_parent)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:OnShowData()
|
self:OnShowData()
|
||||||
self.time.text = "每周一零点刷新"
|
self:SetTime()
|
||||||
-- self:SetTime()
|
|
||||||
end
|
end
|
||||||
local FrameSprite = {
|
local FrameSprite = {
|
||||||
[3] = "l_lishoutehui_ziyuan",
|
[3] = "l_lishoutehui_ziyuan",
|
||||||
|
@ -144,25 +143,26 @@ function LingShowTeHui:OnShowData()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- function LingShowTeHui:SetTime()
|
function LingShowTeHui:SetTime()
|
||||||
-- if self.timer then
|
if self.timer then
|
||||||
-- self.timer:Stop()
|
self.timer:Stop()
|
||||||
-- self.timer = nil
|
self.timer = nil
|
||||||
-- end
|
end
|
||||||
-- local endTime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.LingShowTeHui)
|
-- local endTime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.LingShowTeHui)
|
||||||
-- local timeDown = endTime - GetTimeStamp()
|
local endTime = math.ceil((GetTimeStamp() - PlayerManager.ServerOpenTime)/604800)*604800 + PlayerManager.ServerOpenTime
|
||||||
-- self.time.text = "每周一零点刷新"--Language[10470]..TimeToDHMS(timeDown)
|
local timeDown = endTime - GetTimeStamp()
|
||||||
-- self.timer = Timer.New(function()
|
self.time.text = Language[10470]..TimeToDHMS(timeDown)
|
||||||
-- timeDown = timeDown - 1
|
self.timer = Timer.New(function()
|
||||||
-- if timeDown < 1 then
|
timeDown = timeDown - 1
|
||||||
-- self.timer:Stop()
|
if timeDown < 1 then
|
||||||
-- self.timer = nil
|
self.timer:Stop()
|
||||||
-- self.time.text = Language[10470]..TimeToDHMS(0)
|
self.timer = nil
|
||||||
-- end
|
self.time.text = Language[10470]..TimeToDHMS(0)
|
||||||
-- self.time.text = Language[10470]..TimeToDHMS(timeDown)
|
end
|
||||||
-- end, 1, -1, true)
|
self.time.text = Language[10470]..TimeToDHMS(timeDown)
|
||||||
-- self.timer:Start()
|
end, 1, -1, true)
|
||||||
-- end
|
self.timer:Start()
|
||||||
|
end
|
||||||
|
|
||||||
function LingShowTeHui:OnClose()
|
function LingShowTeHui:OnClose()
|
||||||
self.spLoader:Destroy()
|
self.spLoader:Destroy()
|
||||||
|
|
|
@ -47,9 +47,7 @@ end
|
||||||
|
|
||||||
-- 初始化关卡状态, state , 1 已开启未通过 2 :已通过 -1 已开启等级未解锁
|
-- 初始化关卡状态, state , 1 已开启未通过 2 :已通过 -1 已开启等级未解锁
|
||||||
function this.InitAllFightPointState(msg)
|
function this.InitAllFightPointState(msg)
|
||||||
Log("当前关卡ID " .. msg.fightId)
|
Log("当前关卡ID " .. tostring(msg.fightId).." 当前关卡的状态:" ..tostring(msg.state).." 当前已经挂机的时长:" .. tostring(msg.duration).." 挂机奖励:"..tostring(msg.reward))
|
||||||
Log("当前关卡的状态 " .. msg.state)
|
|
||||||
Log("当前已经挂机的时长 " .. msg.duration)
|
|
||||||
if msg.duration < 0 then
|
if msg.duration < 0 then
|
||||||
Log("服务器返回的挂机时长是负数,是不是调时间??")
|
Log("服务器返回的挂机时长是负数,是不是调时间??")
|
||||||
end
|
end
|
||||||
|
@ -62,7 +60,7 @@ function this.InitAllFightPointState(msg)
|
||||||
this.curFightState = msg.state
|
this.curFightState = msg.state
|
||||||
this.adventrueEnemyList=msg.adventureBossInfo
|
this.adventrueEnemyList=msg.adventureBossInfo
|
||||||
this.HangOnReward=msg.reward
|
this.HangOnReward=msg.reward
|
||||||
Log("挂机奖励:"..this.HangOnReward)
|
Log()
|
||||||
this.maxChapterNum = LengthOfTable(GameDataBase.SheetBase.GetKeys(ConfigManager.GetConfig(ConfigName.MainLevelSettingConfig)))
|
this.maxChapterNum = LengthOfTable(GameDataBase.SheetBase.GetKeys(ConfigManager.GetConfig(ConfigName.MainLevelSettingConfig)))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ function this.InitMsg(msg)
|
||||||
this.serData[id].restTime = restTime
|
this.serData[id].restTime = restTime
|
||||||
this.serData[id].switch = switch
|
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
|
local typeId = AllActSetConfig[id].IsIDdSame
|
||||||
|
|
|
@ -93,7 +93,7 @@ function this.GetLingMaiServerData(msg,func)
|
||||||
-- .." practiceLevel:"..tostring(msg.lingmaiData[i].practiceLevel).." servername:"..tostring(msg.lingmaiData[i].servername))
|
-- .." 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)
|
msg.lingmaiData[i].name = PracticeManager.SetNameColor(msg.lingmaiData[i].name,msg.lingmaiData[i].practiceLevel)
|
||||||
end
|
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))
|
.." fightTime:"..tostring(msg.remainChangeTimes).." lingmaiData:"..tostring(#msg.lingmaiData).." curPage:"..tostring(this.curPage).." timePoint:"..tostring(msg.timePoint))
|
||||||
if func then
|
if func then
|
||||||
func()
|
func()
|
||||||
|
|
|
@ -942,7 +942,7 @@ function this.TreasureStateIndicaion(buffer)
|
||||||
msg:ParseFromString(data)
|
msg:ParseFromString(data)
|
||||||
-- --LogGreen("msg.score :"..msg.score.." msg.resetTime:"..msg.resetTime)
|
-- --LogGreen("msg.score :"..msg.score.." msg.resetTime:"..msg.resetTime)
|
||||||
TreasureOfHeavenManger.UpdateData(msg)
|
TreasureOfHeavenManger.UpdateData(msg)
|
||||||
LogPink("推回来的数据长度"..#msg.treasureRewardState)
|
-- LogPink("推回来的数据长度"..#msg.treasureRewardState)
|
||||||
|
|
||||||
end
|
end
|
||||||
function this.GuildTranscriptIndication(buffer)
|
function this.GuildTranscriptIndication(buffer)
|
||||||
|
|
|
@ -11,7 +11,7 @@ end
|
||||||
-- 更新所有周卡数据
|
-- 更新所有周卡数据
|
||||||
function this.UpdateAllWeekCard(msg)
|
function this.UpdateAllWeekCard(msg)
|
||||||
_WeekCardData = {}
|
_WeekCardData = {}
|
||||||
LogRed("周卡信息初始化 "..#msg.allWeekCardInfo)
|
Log("周卡信息初始化 "..#msg.allWeekCardInfo)
|
||||||
for i, data in ipairs(msg.allWeekCardInfo) do
|
for i, data in ipairs(msg.allWeekCardInfo) do
|
||||||
this.UpdateWeekCardData(data)
|
this.UpdateWeekCardData(data)
|
||||||
end
|
end
|
||||||
|
@ -20,7 +20,7 @@ function this.UpdateAllWeekCard(msg)
|
||||||
end
|
end
|
||||||
-- 更新月卡数据
|
-- 更新月卡数据
|
||||||
function this.UpdateWeekCardData(data)
|
function this.UpdateWeekCardData(data)
|
||||||
LogRed("月卡信息更新 "..data.id.." "..tostring(data.isBuy).." "..data.leaveGetRewardDays)
|
-- LogRed("月卡信息更新 "..data.id.." "..tostring(data.isBuy).." "..data.leaveGetRewardDays)
|
||||||
local week = {}
|
local week = {}
|
||||||
week.id = data.id
|
week.id = data.id
|
||||||
week.isBuy = data.isBuy
|
week.isBuy = data.isBuy
|
||||||
|
|
|
@ -90,7 +90,7 @@ function SurpriseBox:SetItemList()
|
||||||
end
|
end
|
||||||
|
|
||||||
function SurpriseBox:ShowSingleData(item,data,index)
|
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 box = Util.GetGameObject(item,"box"):GetComponent("Image")
|
||||||
local lock = Util.GetGameObject(item,"lock")
|
local lock = Util.GetGameObject(item,"lock")
|
||||||
local getBtn = Util.GetGameObject(item,"getBtn")
|
local getBtn = Util.GetGameObject(item,"getBtn")
|
||||||
|
|
|
@ -53,9 +53,9 @@ end
|
||||||
function this.SetRewardData(data,time)
|
function this.SetRewardData(data,time)
|
||||||
rewardState=data
|
rewardState=data
|
||||||
challengeTime=time
|
challengeTime=time
|
||||||
for i = 1, #data do
|
-- for i = 1, #data do
|
||||||
Log("宝箱状态========"..data[1])
|
-- Log("宝箱状态========"..data[1])
|
||||||
end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue