【登录】除流畅,拥挤和爆满外的其他状态全部不可进入游戏

dev_chengFeng
gaoxin 2021-07-29 11:44:35 +08:00
parent f935fb163b
commit 381d537a4e
2 changed files with 13 additions and 7 deletions

View File

@ -1725,10 +1725,11 @@ GLOBAL_CHAT_TYPE = {
PUBLIC_CHAT_MAX_NUM = 50 PUBLIC_CHAT_MAX_NUM = 50
ServerStateDef = { ServerStateDef = {
Maintenance = 1, UnSee = 0, -- 不可见
Fluency = 2, Maintenance = 1, -- 维护
Full = 3, Fluency = 2, -- 流畅
Congestion = 4--拥挤,服务器不存在此状态 Congestion = 3, -- 拥挤
Full = 4, -- 爆满
} }
BindPhoneState = { BindPhoneState = {

View File

@ -692,7 +692,10 @@ function this.OnLoginClick()
PopupTipPanel.ShowTip("为了保证您的个人隐私和隐私安全,请详细阅读并同意用户协议及隐私政策") PopupTipPanel.ShowTip("为了保证您的个人隐私和隐私安全,请详细阅读并同意用户协议及隐私政策")
return return
end end
if LoginManager.state == 0 or LoginManager.state == 1 then -- 只要不是流畅,拥挤,爆满状态就不让登录
if LoginManager.state ~= ServerStateDef.Fluency
and LoginManager.state ~= ServerStateDef.Congestion
and LoginManager.state ~= ServerStateDef.Full then
local function reServerCallback(str) local function reServerCallback(str)
if str == nil then if str == nil then
return return
@ -703,8 +706,10 @@ function this.OnLoginClick()
local data = json.decode(str) local data = json.decode(str)
---selectServerPart ---selectServerPart
this.SetServerList(data) this.SetServerList(data)
-- 还是不可进状态则请求 -- 还是不可进状态则提示服务器维护中
if LoginManager.state == 0 or LoginManager.state == 1 then if LoginManager.state ~= ServerStateDef.Fluency
and LoginManager.state ~= ServerStateDef.Congestion
and LoginManager.state ~= ServerStateDef.Full then
PopupTipPanel.ShowTip(Language[11142]) PopupTipPanel.ShowTip(Language[11142])
RequestPanel.Hide() RequestPanel.Hide()
else else