服务器维护时,不再请求连接服务器

dev_chengFeng
gaoxin 2020-07-30 18:50:41 +08:00
parent df84dd8577
commit e786a479f5
1 changed files with 6 additions and 0 deletions

View File

@ -98,6 +98,7 @@ function this:BindEvent()
LoginManager.SocketAddress = list.ip
LoginManager.SocketPort = list.port
LoginManager.ServerId = list.server_id
LoginManager.state = list.state
local severArea = tonumber(string.sub(list.server_id, 0, -5))
this.serverMes.text = PlayerManager.serverInfo.name .. "\t<color=#56F384FF>" .. severArea .. "</color>" .. Language[11120]
end
@ -349,6 +350,7 @@ function this.SetServerList(data)
LoginManager.SocketAddress = this.serverList[lastIndex].ip
LoginManager.SocketPort = tonumber(this.serverList[lastIndex].port)
LoginManager.ServerId = this.serverList[lastIndex].server_id
LoginManager.state = this.serverList[lastIndex].state
local severArea = tonumber(string.sub(this.serverList[lastIndex].server_id, 0, -5))
this.serverMes.text = PlayerManager.serverInfo.name .. "\t<color=#56F384FF>" .. severArea .. "</color>" .. Language[11120]
@ -503,6 +505,10 @@ function this.ExecuteLoading()
end
function this.OnLoginClick()
if LoginManager.state == 0 or LoginManager.state == 1 then
PopupTipPanel.ShowTip(Language[11132])
return
end
RequestPanel.Show(Language[11124])
SocketManager.AddNetwork(SocketType.LOGIN, LoginManager.SocketAddress, LoginManager.SocketPort)
SocketManager.TryConnect(SocketType.LOGIN)