[200~1112晚上,挤号~
parent
1d27d4aaf7
commit
32a8159557
|
|
@ -180,7 +180,7 @@ function M:connect(host, groupId, callback)
|
|||
end
|
||||
end)
|
||||
else
|
||||
self.connecting = false
|
||||
self:disconnect()
|
||||
_mgr_client:destroy()
|
||||
if callback then
|
||||
callback({ ReturnCode = 101 })
|
||||
|
|
|
|||
|
|
@ -580,8 +580,22 @@ function M:EnterGroup(fgCtr, id)
|
|||
ViewUtil:CloseModalWait2()
|
||||
if res.ReturnCode ~= 0 then
|
||||
if res.ReturnCode == 101 then
|
||||
ViewUtil:ShowModalWait2(0.01)
|
||||
self:EnterGroup(fgCtr, id)
|
||||
-- ViewUtil:ShowModalWait2(0.01)
|
||||
-- self:EnterGroup(fgCtr, id)
|
||||
local _curren_msg =
|
||||
MsgWindow.new(
|
||||
self._root_view,
|
||||
'您的账号在另一个地点登录, 请确定您的账号是否泄密',
|
||||
MsgWindow.MsgMode.OnlyOk
|
||||
)
|
||||
PlayerPrefs.DeleteKey('session_id')
|
||||
PlayerPrefs.Save()
|
||||
_curren_msg.onOk:Add(
|
||||
function()
|
||||
RestartGame()
|
||||
end
|
||||
)
|
||||
_curren_msg:Show()
|
||||
return
|
||||
end
|
||||
ViewUtil.ErrorTip(res.ReturnCode, "获取房间列表列表失败")
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ local function __NetTip(txt_msg)
|
|||
end
|
||||
|
||||
local function __OnGameConnectAction(state)
|
||||
--print("state:"..state)
|
||||
-- print("state:" .. state)
|
||||
NetResetConnectWindow.CloseNetReset()
|
||||
if state == SocketCode.Connect then
|
||||
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id)
|
||||
|
|
@ -63,9 +63,23 @@ local function __OnGameConnectAction(state)
|
|||
--这两种情况默认重连
|
||||
elseif state == SocketCode.DisconnectByServer then
|
||||
-- __NetTip("网络断开连接!")
|
||||
NetResetConnectWindow.ShowNetReset()
|
||||
ControllerManager.reset_join_room = 0
|
||||
ControllerManager.ResetJionRoom()
|
||||
-- NetResetConnectWindow.ShowNetReset()
|
||||
local _curren_msg =
|
||||
MsgWindow.new(
|
||||
nil,
|
||||
'您的账号在另一个地点登录, 请确定您的账号是否泄密',
|
||||
MsgWindow.MsgMode.OnlyOk
|
||||
)
|
||||
PlayerPrefs.DeleteKey('session_id')
|
||||
PlayerPrefs.Save()
|
||||
_curren_msg.onOk:Add(
|
||||
function()
|
||||
RestartGame()
|
||||
end
|
||||
)
|
||||
_curren_msg:Show()
|
||||
-- ControllerManager.reset_join_room = 0
|
||||
-- ControllerManager.ResetJionRoom()
|
||||
elseif state == SocketCode.ExceptionOnConnect or state == SocketCode.NetworkException then
|
||||
-- __NetTip("请检查您的网络环境!")
|
||||
NetResetConnectWindow.ShowNetReset()
|
||||
|
|
|
|||
Loading…
Reference in New Issue