[200~1112晚上,挤号~
parent
1d27d4aaf7
commit
32a8159557
|
|
@ -180,7 +180,7 @@ function M:connect(host, groupId, callback)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
self.connecting = false
|
self:disconnect()
|
||||||
_mgr_client:destroy()
|
_mgr_client:destroy()
|
||||||
if callback then
|
if callback then
|
||||||
callback({ ReturnCode = 101 })
|
callback({ ReturnCode = 101 })
|
||||||
|
|
|
||||||
|
|
@ -580,8 +580,22 @@ function M:EnterGroup(fgCtr, id)
|
||||||
ViewUtil:CloseModalWait2()
|
ViewUtil:CloseModalWait2()
|
||||||
if res.ReturnCode ~= 0 then
|
if res.ReturnCode ~= 0 then
|
||||||
if res.ReturnCode == 101 then
|
if res.ReturnCode == 101 then
|
||||||
ViewUtil:ShowModalWait2(0.01)
|
-- ViewUtil:ShowModalWait2(0.01)
|
||||||
self:EnterGroup(fgCtr, id)
|
-- 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
|
return
|
||||||
end
|
end
|
||||||
ViewUtil.ErrorTip(res.ReturnCode, "获取房间列表列表失败")
|
ViewUtil.ErrorTip(res.ReturnCode, "获取房间列表列表失败")
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ local function __NetTip(txt_msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function __OnGameConnectAction(state)
|
local function __OnGameConnectAction(state)
|
||||||
--print("state:"..state)
|
-- print("state:" .. state)
|
||||||
NetResetConnectWindow.CloseNetReset()
|
NetResetConnectWindow.CloseNetReset()
|
||||||
if state == SocketCode.Connect then
|
if state == SocketCode.Connect then
|
||||||
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id)
|
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id)
|
||||||
|
|
@ -63,9 +63,23 @@ local function __OnGameConnectAction(state)
|
||||||
--这两种情况默认重连
|
--这两种情况默认重连
|
||||||
elseif state == SocketCode.DisconnectByServer then
|
elseif state == SocketCode.DisconnectByServer then
|
||||||
-- __NetTip("网络断开连接!")
|
-- __NetTip("网络断开连接!")
|
||||||
NetResetConnectWindow.ShowNetReset()
|
-- NetResetConnectWindow.ShowNetReset()
|
||||||
ControllerManager.reset_join_room = 0
|
local _curren_msg =
|
||||||
ControllerManager.ResetJionRoom()
|
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
|
elseif state == SocketCode.ExceptionOnConnect or state == SocketCode.NetworkException then
|
||||||
-- __NetTip("请检查您的网络环境!")
|
-- __NetTip("请检查您的网络环境!")
|
||||||
NetResetConnectWindow.ShowNetReset()
|
NetResetConnectWindow.ShowNetReset()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue