【跨服天梯】国内提交+1

dev_chengFeng
zhangqiang 2021-07-14 21:43:03 +08:00
parent 3b9af50a15
commit 6a3c48e0b8
4 changed files with 9 additions and 3 deletions

View File

@ -388,6 +388,7 @@ GameEvent = {
},
Privilege={
OnPrivilegeUpdate = "Privilege.OnPrivilegeUpdate",
OnPrivilegeUpdate = "Privilege.OnPrivilegeZeroUpdate",
},
Battle = {
OnTimeScaleChanged = "Battle.OnTimeScaleChanged"

View File

@ -94,12 +94,14 @@ end
--添加事件监听(用于子类重写)
function JumpServerHightLadderPanel:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.JumpServerHeightLadder.UpdateHeightLadderPanel, this.OnShowPanel)
Game.GlobalEvent:AddEvent(GameEvent.Privilege.OnPrivilegeZeroUpdate, this.RefreshBuyNum)
-- Game.GlobalEvent:AddEvent(GameEvent.JumpServerHeightLadder.UpdateHeightLadderNum, this.RefreshBuyNum)
end
--移除事件监听(用于子类重写)
function JumpServerHightLadderPanel:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.JumpServerHeightLadder.UpdateHeightLadderPanel, this.OnShowPanel)
Game.GlobalEvent:RemoveEvent(GameEvent.Privilege.OnPrivilegeZeroUpdate, this.RefreshBuyNum)
-- Game.GlobalEvent:AddEvent(GameEvent.JumpServerHeightLadder.UpdateHeightLadderNum, this.RefreshBuyNum)
end
@ -234,9 +236,9 @@ function this.ShowSingleData(go,data,i)
JumpServerManager.StarFightHightLadder(data.personInfo,0,function(msg)
if msg then
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.JUMPSERVER_GIGHTLADDER_MIANFEINUM, 1)--更新特权
this.OnShowPanel()
end
this.RefreshBuyNum()
this.OnShowPanel()
end)
end)
end)

View File

@ -140,7 +140,8 @@ function this.StarFightHightLadder(personInfo,skipFight,callBack)
-- LogGreen("skipFight "..skipFight.." msg.err "..msg.err)
if skipFight == 0 then--挑战
if msg.err== -2 then
this.BattleHightLadderData(msg)
-- this.BattleHightLadderData(msg)--后端没给数据 前端自己请求
JumpServerManager.GetWorldArenaInfoRequest()
PopupTipPanel.ShowTip("无法挑战,目标玩家排名出现变化,已重新匹配对手!")
if callBack then
callBack()
@ -148,7 +149,8 @@ function this.StarFightHightLadder(personInfo,skipFight,callBack)
return
end
if msg.err== -3 then
this.BattleHightLadderData(msg)
-- this.BattleHightLadderData(msg)--后端没给数据 前端自己请求
JumpServerManager.GetWorldArenaInfoRequest()
PopupTipPanel.ShowTip("无法挑战,玩家排名出现变化,已重新匹配对手!")
if callBack then
callBack()

View File

@ -22,6 +22,7 @@ function PrivilegeManager.InitPrivilegeData(data)
end
table.insert(this._PrivilegeTypeList[config.PrivilegeType], config)
end
Game.GlobalEvent:DispatchEvent(GameEvent.Privilege.OnPrivilegeZeroUpdate)
end
--刷新从后端接收的到的特权表