【七界试炼】战斗层数锁住了
parent
60c954bf38
commit
4d8576d200
|
@ -163,6 +163,8 @@ function JumpServerPanel:BtnClick(id)
|
|||
if id == JumpServer_Type.QiJieShiLian then
|
||||
local qiejieConfig = ConfigManager.GetConfig(ConfigName.QijieStage)
|
||||
NetManager.SevenWorldInfoRequest(0,function (msg)
|
||||
QiJieShiLianManager.IsLock = false
|
||||
QiJieShiLianManager.curLockStageId = QiJieShiLianManager.curLevelId
|
||||
if qiejieConfig[msg.id] then
|
||||
UIManager.OpenPanel(UIName.QiJieShiLianPanel)
|
||||
else
|
||||
|
|
|
@ -16,6 +16,9 @@ function this.Initialize()
|
|||
this.curScore = 1
|
||||
this.QijieType = 1
|
||||
this.curProgress = 0
|
||||
this.curMaxStage = 0
|
||||
this.curLockStageId = 0
|
||||
this.IsLock = false
|
||||
|
||||
this.treasureList = {}
|
||||
this.treasureActiveList = {}
|
||||
|
@ -45,7 +48,7 @@ function this.InitTreasureData()
|
|||
end
|
||||
|
||||
--界面获取信息
|
||||
function this.GetQiJieData(targetLevel)
|
||||
function this.GetQiJieData()
|
||||
--上阵列表赋值
|
||||
local curFormation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)
|
||||
if FormationManager.GetFormationByID(FormationTypeDef.FORMATION_QIJIESHILIAN) then
|
||||
|
@ -71,13 +74,8 @@ function this.GetServerData(msg)
|
|||
this.curRank = msg.ranking
|
||||
this.curScore = msg.integral
|
||||
this.curProgress = msg.totalTier
|
||||
LogRed("id:"..tostring(msg.id).." ranking:"..tostring(msg.ranking).." integral:"..tostring(msg.integral).." totalTier:"..tostring(msg.totalTier))
|
||||
end
|
||||
|
||||
function this.CheckCurStageNum()
|
||||
local data = ConfigManager.GetAllConfigsDataByKey(ConfigName.QijieStage,"QijieType",this.QijieType)
|
||||
-- LogGreen(tostring(#data)..LengthOfTable(data))
|
||||
-- return ConfigManager.GetAllConfigsDataByKey(ConfigName.QijieStage,"QijieType",this.QijieType)
|
||||
this.curMaxStage = this.curMaxStage >= msg.id and this.curMaxStage or msg.id
|
||||
-- LogRed("id:"..tostring(msg.id).." ranking:"..tostring(msg.ranking).." integral:"..tostring(msg.integral).." totalTier:"..tostring(msg.totalTier))
|
||||
end
|
||||
|
||||
--获取下方滑动条数据
|
||||
|
@ -227,7 +225,7 @@ function this.GetTreasureEffect(treasureList)
|
|||
-- LogGreen("2")
|
||||
attriList1[tData.AttriType].title = tData.Desc
|
||||
if not attriList1[tData.AttriType].ValueList then
|
||||
LogGreen("3,tData.AttriType:"..tostring(tData.AttriType))
|
||||
-- LogGreen("3,tData.AttriType:"..tostring(tData.AttriType))
|
||||
attriList1[tData.AttriType].ValueList = {}
|
||||
end
|
||||
-- LogGreen("4,tData.Buff:"..tostring(tData.Buff))
|
||||
|
@ -278,4 +276,35 @@ function this.GetSring(stringList,type)
|
|||
return str
|
||||
end
|
||||
|
||||
--左右切换检测
|
||||
function this.SwitchBtnCheck(num,func)
|
||||
if num == -1 then
|
||||
this.IsLock = true
|
||||
if not QijieStage[this.curLockStageId - 1] then
|
||||
LogPink("最低层"..this.curLockStageId)
|
||||
return
|
||||
end
|
||||
this.curLockStageId = this.curLockStageId - 1
|
||||
elseif num == 1 then
|
||||
if not QijieStage[this.curLockStageId + 1] then
|
||||
LogPink("最高层"..this.curLockStageId)
|
||||
return
|
||||
end
|
||||
if this.curLockStageId + 1 > this.curMaxStage then
|
||||
LogPink("最大层"..this.curLockStageId.." "..this.curMaxStage)
|
||||
return
|
||||
end
|
||||
if this.curMaxStage == this.curLevelId then
|
||||
this.IsLock = false
|
||||
end
|
||||
this.curLockStageId = this.curLockStageId + 1
|
||||
end
|
||||
LogYellow("请求的Id:"..tostring(this.curLockStageId))
|
||||
NetManager.SevenWorldInfoRequest(this.curLockStageId,function ()
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
return QiJieShiLianManager
|
|
@ -128,21 +128,14 @@ function QiJieShiLianPanel:BindEvent()
|
|||
end
|
||||
end)
|
||||
Util.AddClick(self.lastBtn,function()
|
||||
self.tempId = self.tempId - 1
|
||||
if self.curStage - 1 > 0 then
|
||||
self.curStage = self.curStage - 1
|
||||
QiJieShiLianManager.SwitchBtnCheck(-1,function ()
|
||||
self:Refresh()
|
||||
else
|
||||
PopupTipPanel.ShowTip("当前为第一层!")
|
||||
end
|
||||
end)
|
||||
end)
|
||||
Util.AddClick(self.nextBtn,function()
|
||||
if self.curStage + 1 <= QiJieShiLianManager.CheckCurStageNum() then
|
||||
self.curStage = self.curStage + 1
|
||||
QiJieShiLianManager.SwitchBtnCheck(1,function ()
|
||||
self:Refresh()
|
||||
else
|
||||
PopupTipPanel.ShowTip("当前为最终层!")
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
|
@ -161,21 +154,23 @@ end
|
|||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function QiJieShiLianPanel:OnShow()
|
||||
self.curStage = 0
|
||||
NetManager.SevenWorldInfoRequest(0)
|
||||
if QiJieShiLianManager.IsLock then
|
||||
NetManager.SevenWorldInfoRequest(QiJieShiLianManager.curLockStageId)
|
||||
else
|
||||
NetManager.SevenWorldInfoRequest(0)
|
||||
QiJieShiLianManager.curLockStageId = QiJieShiLianManager.curLevelId
|
||||
end
|
||||
self:Refresh()
|
||||
end
|
||||
|
||||
function QiJieShiLianPanel:Refresh(targetLevel)
|
||||
if targetLevel then
|
||||
LogPink("targetLevel:"..tostring(targetLevel))
|
||||
end
|
||||
self.qijieData = QiJieShiLianManager.GetQiJieData(targetLevel)
|
||||
self.curStage = self.qijieData.curStageData.QijieType
|
||||
function QiJieShiLianPanel:Refresh()
|
||||
self.qijieData = QiJieShiLianManager.GetQiJieData()
|
||||
self.configData = self.qijieData.curStageData
|
||||
LogGreen("当前层数Id:"..tostring(self.qijieData.curLevelId).." tempId:"..tostring(self.tempId))
|
||||
local num = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,128).Value)
|
||||
self.giftBtn:SetActive(self.qijieData.curProgress >= num)
|
||||
self.lastBtn:SetActive(not not QijieStage[QiJieShiLianManager.curLevelId-1])
|
||||
self.nextBtn:SetActive(QiJieShiLianManager.curMaxStage~=QiJieShiLianManager.curLevelId)
|
||||
self:SetTabBox()
|
||||
self:SetTopBar()
|
||||
self:SetBottomBar()
|
||||
|
|
Loading…
Reference in New Issue