huoqu huodongzhuangtai tijiao
parent
3a16bedd0d
commit
fa6bdeeb6a
|
@ -132,7 +132,7 @@ function this.InitActivityServerData(msg, isUpdate)
|
|||
end
|
||||
for i, v in ipairs(msg.activityInfo) do
|
||||
this.mission[v.activityId] = v
|
||||
--LogGreen("刷新活动数据activityId:" .. v.activityId .. " value:" .. v.value)
|
||||
LogGreen("刷新活动数据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
|
||||
|
@ -228,7 +228,6 @@ function this.GetActivityTypeInfo(type)
|
|||
local missionData = nil
|
||||
table.walk(globalActConfigs, function(actConfigInfo)
|
||||
if this.mission[actConfigInfo.Id] then
|
||||
--LogError("actConfigInfo.Id "..actConfigInfo.Id)
|
||||
missionData = this.mission[actConfigInfo.Id]
|
||||
end
|
||||
end)
|
||||
|
@ -276,8 +275,9 @@ function this.SetActivityInfo(type, Id, state)
|
|||
end
|
||||
|
||||
function this.GetActivityOpenStatus(type)
|
||||
if this.mission[type] then
|
||||
return this.mission[type].reallyOpen == 1
|
||||
local id = this.GetActivityIdByType(type)
|
||||
if this.mission[id] then
|
||||
return this.mission[id].reallyOpen == 1
|
||||
else
|
||||
Log(string.format(Language[10002], type))
|
||||
return false
|
||||
|
|
|
@ -1327,10 +1327,10 @@ function this.TimeFormat()
|
|||
local dynamicAct = ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.FindFairy)
|
||||
if dynamicAct then
|
||||
local info = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FindFairy)
|
||||
info = info.endTime - PlayerManager.serverTime
|
||||
info = math.floor(info/86400)
|
||||
local tempTime = info.endTime - PlayerManager.serverTime
|
||||
tempTime = math.floor(tempTime/86400)
|
||||
if ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FindFairy) then
|
||||
this.DynamicActivityTime.text = info.."天"
|
||||
this.DynamicActivityTime.text = tempTime.."天"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -122,8 +122,7 @@ end
|
|||
--切换视图
|
||||
function this.SwitchView(_index)
|
||||
if _index == 2 or _index == 3 then
|
||||
local id =ActivityGiftManager.GetActivityIdByType(8)
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(id) then
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) then
|
||||
PopupTipPanel.ShowTip("未在活动时间范围内")
|
||||
return
|
||||
end
|
||||
|
|
|
@ -69,9 +69,8 @@ function this:RemoveListener()
|
|||
end
|
||||
this.Closefunction = function()
|
||||
Timer.New(function()
|
||||
local id = ActivityGiftManager.GetActivityIdByType(8)
|
||||
LogBlue("收到了关闭活动的消息,id:"..id)
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(id) then
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) then
|
||||
PopupTipPanel.ShowTip("活动已结束")
|
||||
parent:ClosePanel()
|
||||
return
|
||||
else
|
||||
|
|
|
@ -77,9 +77,8 @@ end
|
|||
|
||||
this.Closefunction = function()
|
||||
Timer.New(function()
|
||||
local id = ActivityGiftManager.GetActivityIdByType(8)
|
||||
LogBlue("收到了关闭活动的消息,id:"..id)
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(id) then
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) then
|
||||
PopupTipPanel.ShowTip("活动已结束")
|
||||
parent:ClosePanel()
|
||||
return
|
||||
else
|
||||
|
|
|
@ -170,7 +170,7 @@ function this.GetQinglongSerectTreasureRedPot()
|
|||
end
|
||||
|
||||
function this.GetSerectTreasureTrailRedPot()
|
||||
if this.activityId == 0 or not ActivityGiftManager.GetActivityOpenStatus(this.activityId) then
|
||||
if this.activityId == 0 or not ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) then
|
||||
return false
|
||||
end
|
||||
for i = 1,2 do
|
||||
|
|
|
@ -100,7 +100,7 @@ function GrowthGiftPage:RefreshShowData(item, data)
|
|||
local GrowthRewardId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.GrowthReward)--当前礼包奖励的活动类型(6\7\8\9\16)(成长礼包的不同档位奖励ActivityId不同,虽然同为成长基金)
|
||||
local singleRewardData = ActivityGiftManager.GetActivityInfo(GrowthRewardId, data.Id)--获取活动数据 self.context.Id
|
||||
local havaBought = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, GlobalActivity[GrowthRewardId].CanBuyRechargeId)--当前礼包ID(101\102\103\104\105)
|
||||
local openStatus = ActivityGiftManager.GetActivityOpenStatus(GrowthRewardId)
|
||||
local openStatus = ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.GrowthReward)
|
||||
--item
|
||||
local shadow = Util.GetGameObject(item, "shadow")
|
||||
local grid = Util.GetGameObject(item, "scrollView/grid")
|
||||
|
|
|
@ -79,9 +79,8 @@ function GrowthGiftTaskItem:SetValue()
|
|||
--OperatingManager.GetGrowthRedPointState(GrowthRewardId)
|
||||
end
|
||||
|
||||
function GrowthGiftTaskItem:OnBtnDealClicked()
|
||||
|
||||
local openStatus = ActivityGiftManager.GetActivityOpenStatus(GrowthRewardId)
|
||||
function GrowthGiftTaskItem:OnBtnDealClicked()
|
||||
local openStatus = ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.GrowthReward)
|
||||
local goods = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, GlobalActivity[GrowthRewardId].CanBuyRechargeId)
|
||||
if not openStatus or (goods and goods.buyTimes < 1) then
|
||||
PopupTipPanel.ShowTip(Language[11474])
|
||||
|
|
Loading…
Reference in New Issue