Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev
commit
0b42597919
|
@ -698,6 +698,7 @@ function this.ExecuteLoading()
|
||||||
--[[[54] =]]function() NetManager.RequestArenaRankData(1,LoadingPanel.OnStep) end, --获取竞技场数据
|
--[[[54] =]]function() NetManager.RequestArenaRankData(1,LoadingPanel.OnStep) end, --获取竞技场数据
|
||||||
--[[[55] =]]function() HomeLandManager.GetData(LoadingPanel.OnStep) end, --家园获取数据
|
--[[[55] =]]function() HomeLandManager.GetData(LoadingPanel.OnStep) end, --家园获取数据
|
||||||
--[[[56] =]]function() NetManager.ExplorerMapInfoRequest(LoadingPanel.OnStep) end, --灵脉秘境
|
--[[[56] =]]function() NetManager.ExplorerMapInfoRequest(LoadingPanel.OnStep) end, --灵脉秘境
|
||||||
|
--[[[57] =]]function() CommonActPageManager.GetPowerRicePower(LoadingPanel.OnStep) end, --战力冲刺
|
||||||
function() -- 登录请求最终接口,所有请求放在此接口之前
|
function() -- 登录请求最终接口,所有请求放在此接口之前
|
||||||
-- 登录成功确认
|
-- 登录成功确认
|
||||||
NetManager.LoginConfimRequest()
|
NetManager.LoginConfimRequest()
|
||||||
|
|
|
@ -4,6 +4,7 @@ local dataList = {}
|
||||||
this.TaSuiLingXiaoMsg = nil
|
this.TaSuiLingXiaoMsg = nil
|
||||||
this.TaSuiLingXiaoHistoryDmg = 0
|
this.TaSuiLingXiaoHistoryDmg = 0
|
||||||
this.DynamicActType = 0
|
this.DynamicActType = 0
|
||||||
|
this.powerRicePower = 0
|
||||||
|
|
||||||
function this.Initialize()
|
function this.Initialize()
|
||||||
this.args = {}
|
this.args = {}
|
||||||
|
@ -847,16 +848,28 @@ function this.ChaoZhiJiJin328Red()
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--获取战力冲刺战力
|
||||||
|
function this.GetPowerRicePower(func)
|
||||||
|
if ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.PowerRice) then
|
||||||
|
RankingManager.InitData(RANK_TYPE.POWER_RICE,function ()
|
||||||
|
local allRankData,myRankData = RankingManager.GetRankingInfo()
|
||||||
|
this.powerRicePower = myRankData.param1
|
||||||
|
end,0)
|
||||||
|
end
|
||||||
|
if func then
|
||||||
|
func()
|
||||||
|
end
|
||||||
|
end
|
||||||
function this.PowerRiceRedCheck()
|
function this.PowerRiceRedCheck()
|
||||||
local data = this.GetData(ActivityTypeDef.PowerRice)
|
local data = this.GetData(ActivityTypeDef.PowerRice)
|
||||||
if data then
|
if data then
|
||||||
for i = 1, #data.rewards do
|
for i = 1, #data.rewards do
|
||||||
if data.rewards[i].state == 0 and data.rewards[i].otherData.Values[1][1] <= PlayerManager.maxForce then
|
if data.rewards[i].state == 0 and data.rewards[i].otherData.Values[1][1] <= this.powerRicePower then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
return false
|
return false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return CommonActPageManager
|
return CommonActPageManager
|
|
@ -6,6 +6,7 @@ local STATE = {
|
||||||
[0] = {Img = "s_slbz_1anniuhuangse",text = Language[10556]},
|
[0] = {Img = "s_slbz_1anniuhuangse",text = Language[10556]},
|
||||||
[1] = {Img = "s_slbz_1anniuongse",text = Language[11948]},
|
[1] = {Img = "s_slbz_1anniuongse",text = Language[11948]},
|
||||||
[2] = {Img = "s_slbz_1anniuhuise",text = Language[10101]},
|
[2] = {Img = "s_slbz_1anniuhuise",text = Language[10101]},
|
||||||
|
[3] = {Img = "s_slbz_1anniuhuise",text = "已结束"},
|
||||||
}
|
}
|
||||||
|
|
||||||
local TabBoxRedPoints = {}
|
local TabBoxRedPoints = {}
|
||||||
|
@ -113,37 +114,35 @@ end
|
||||||
|
|
||||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||||
function PowerRice:OnShow()
|
function PowerRice:OnShow()
|
||||||
curIndex = 1
|
if curIndex ~= 1 then
|
||||||
PowerRice:Refresh(curIndex,true,true)
|
this.TabCtrl:ChangeTab(1)
|
||||||
if this.TabCtrl then
|
|
||||||
this.TabCtrl:ChangeTab(curIndex)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function PowerRice:Refresh(_curIndex,isTop,isAni)
|
function PowerRice:Refresh(_curIndex,isTop,isAni)
|
||||||
CheckRedPointStatus(RedPointType.PowerRiceGool)
|
|
||||||
self.power.text = PlayerManager.maxForce
|
self.power.text = PlayerManager.maxForce
|
||||||
for index, value in ipairs(self.ScrollList) do
|
for index, value in ipairs(self.ScrollList) do
|
||||||
value.gameObject:SetActive(index == _curIndex)
|
value.gameObject:SetActive(index == _curIndex)
|
||||||
end
|
end
|
||||||
if _curIndex == 1 then
|
RankingManager.InitData(RANK_TYPE.POWER_RICE,function ()
|
||||||
|
local allRankData,myRankData = RankingManager.GetRankingInfo()
|
||||||
|
self.myRank = myRankData.rank
|
||||||
|
self.myPower = myRankData.param1
|
||||||
|
CommonActPageManager.powerRicePower = myRankData.param1
|
||||||
self.actData = CommonActPageManager.GetData(ActivityTypeDef.PowerRice)
|
self.actData = CommonActPageManager.GetData(ActivityTypeDef.PowerRice)
|
||||||
|
if _curIndex == 1 then
|
||||||
PowerRice:SetRewards1(isTop,isAni)
|
PowerRice:SetRewards1(isTop,isAni)
|
||||||
self.text1.text = "目标战力"
|
self.text1.text = "目标战力"
|
||||||
self.text2.text = "奖励 领取奖励"
|
self.text2.text = "奖励 领取奖励"
|
||||||
elseif _curIndex == 2 then
|
elseif _curIndex == 2 then
|
||||||
self.text1.text = "名次"
|
self.text1.text = "名次"
|
||||||
self.text2.text = "奖励 战力要求"
|
self.text2.text = "奖励 战力要求"
|
||||||
|
|
||||||
RankingManager.InitData(RANK_TYPE.POWER_RICE,function ()
|
|
||||||
local allRankData,myRankData = RankingManager.GetRankingInfo()
|
|
||||||
self.myRank = myRankData.rank
|
|
||||||
PowerRice:SetRewards2(isTop,isAni)
|
PowerRice:SetRewards2(isTop,isAni)
|
||||||
end,0)
|
|
||||||
|
|
||||||
end
|
end
|
||||||
PowerRice:SetTime()
|
PowerRice:SetTime()
|
||||||
PowerRice:SetLive2D()
|
PowerRice:SetLive2D()
|
||||||
|
CheckRedPointStatus(RedPointType.PowerRiceGool)
|
||||||
|
end,0)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PowerRice:SetLive2D()
|
function PowerRice:SetLive2D()
|
||||||
|
@ -167,12 +166,16 @@ function PowerRice:SingleDataShow(item,data,index)
|
||||||
local getBtn = Util.GetGameObject(item,"getBtn")
|
local getBtn = Util.GetGameObject(item,"getBtn")
|
||||||
local btnImage = Util.GetGameObject(item,"getBtn"):GetComponent("Image")
|
local btnImage = Util.GetGameObject(item,"getBtn"):GetComponent("Image")
|
||||||
local btnText = Util.GetGameObject(item,"getBtn/Text"):GetComponent("Text")
|
local btnText = Util.GetGameObject(item,"getBtn/Text"):GetComponent("Text")
|
||||||
|
local gapTime = globalActConfig[self.actData.activityId].GapTime*86400
|
||||||
|
|
||||||
local state = 0
|
local state = 0
|
||||||
if data.state == 1 then
|
if data.state == 1 then
|
||||||
state = 2
|
state = 2
|
||||||
elseif data.otherData.Values[1][1] > PlayerManager.maxForce then
|
elseif data.otherData.Values[1][1] > self.myPower then
|
||||||
state = 0
|
state = 0
|
||||||
|
if self.actData.endTime - GetTimeStamp() < gapTime then
|
||||||
|
state = 3
|
||||||
|
end
|
||||||
else
|
else
|
||||||
state = 1
|
state = 1
|
||||||
end
|
end
|
||||||
|
@ -199,6 +202,8 @@ function PowerRice:SingleDataShow(item,data,index)
|
||||||
PowerRice:Refresh(curIndex,false,false)
|
PowerRice:Refresh(curIndex,false,false)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
elseif state == 3 then
|
||||||
|
PopupTipPanel.ShowTip("活动已结束")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
getBtn:GetComponent("Button").interactable = state ~= 2
|
getBtn:GetComponent("Button").interactable = state ~= 2
|
||||||
|
@ -291,7 +296,6 @@ function PowerRice:OnClose()
|
||||||
self.timer:Stop()
|
self.timer:Stop()
|
||||||
self.timer = nil
|
self.timer = nil
|
||||||
end
|
end
|
||||||
curIndex = 1
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面销毁时调用(用于子类重写)
|
--界面销毁时调用(用于子类重写)
|
||||||
|
@ -309,6 +313,7 @@ function PowerRice:OnDestroy()
|
||||||
ClearRedPointObject(_TabData[i].redPointType,TabBoxRedPoints[i])
|
ClearRedPointObject(_TabData[i].redPointType,TabBoxRedPoints[i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
curIndex = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
return PowerRice
|
return PowerRice
|
Loading…
Reference in New Issue