Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop
commit
f2ae18778c
|
|
@ -134,7 +134,7 @@ function this.InitActivityServerData(msg, isUpdate)
|
|||
|
||||
this.CheckMoneyProgress(v)
|
||||
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
|
||||
|
|
@ -231,7 +231,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)
|
||||
|
|
@ -285,8 +284,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
|
||||
|
|
|
|||
|
|
@ -1329,10 +1329,10 @@ function this.TimeFormat()
|
|||
local dynamicAct = not not ActivityGiftManager.GetActivityTypeInfo(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
|
||||
--青龙秘宝
|
||||
|
|
|
|||
|
|
@ -118,8 +118,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,10 +69,10 @@ function this:RemoveListener()
|
|||
end
|
||||
this.Closefunction = function()
|
||||
Timer.New(function()
|
||||
local id = ActivityGiftManager.GetActivityIdByType(8)
|
||||
LogBlue("收到了关闭活动的消息,id:"..id)
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(id) then
|
||||
parent.SwitchView(1)
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) then
|
||||
PopupTipPanel.ShowTip("活动已结束")
|
||||
parent:ClosePanel()
|
||||
|
||||
return
|
||||
else
|
||||
this.refresh()
|
||||
|
|
@ -97,13 +97,14 @@ function this:OnSortingOrderChange(sortingOrder)
|
|||
end
|
||||
|
||||
function this:OnClose()
|
||||
if self.localTimer then
|
||||
self.localTimer:Stop()
|
||||
self.localTimer = nil
|
||||
end
|
||||
|
||||
end
|
||||
function this:OnDestroy()
|
||||
itemsList={}
|
||||
if self.timer then
|
||||
self.timer :Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
end
|
||||
|
||||
this.refresh = function()
|
||||
|
|
|
|||
|
|
@ -77,10 +77,10 @@ end
|
|||
|
||||
this.Closefunction = function()
|
||||
Timer.New(function()
|
||||
local id = ActivityGiftManager.GetActivityIdByType(8)
|
||||
LogBlue("收到了关闭活动的消息,id:"..id)
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(id) then
|
||||
parent.SwitchView(1)
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) then
|
||||
PopupTipPanel.ShowTip("活动已结束")
|
||||
parent:ClosePanel()
|
||||
|
||||
return
|
||||
else
|
||||
this.refresh(curType)
|
||||
|
|
@ -133,13 +133,13 @@ function this:OnSortingOrderChange(sortingOrder)
|
|||
end
|
||||
|
||||
function this:OnClose()
|
||||
if self.localTimer then
|
||||
self.localTimer:Stop()
|
||||
self.localTimer = nil
|
||||
end
|
||||
|
||||
end
|
||||
function this:OnDestroy()
|
||||
|
||||
if self.timer then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
end
|
||||
function this.refresh(type)
|
||||
this:SetTopBar()
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ function this.GetQinglongTaskData(_curtype)
|
|||
end
|
||||
|
||||
function this.GetQinglongSerectTreasureRedPot()
|
||||
if this.activityId==0 or not ActivityGiftManager.GetActivityOpenStatus(this.activityId) then
|
||||
if not ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) then
|
||||
return false
|
||||
end
|
||||
local state = this.GetTreasureState()
|
||||
|
|
@ -170,7 +170,7 @@ function this.GetQinglongSerectTreasureRedPot()
|
|||
end
|
||||
|
||||
function this.GetSerectTreasureTrailRedPot()
|
||||
if this.activityId == 0 or not ActivityGiftManager.GetActivityOpenStatus(this.activityId) then
|
||||
if 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