// ------------------------------------------------------------------------------- // ReqAccountLogout // ------------------------------------------------------------------------------- public void ReqAccountLogout(Action <string[]> callbackFunction) { DictionaryAddAction(callbackFunction); MsgReqAccountLogout message = new MsgReqAccountLogout { sName = clientAccount.sName }; networkManager.client.Send(MsgReqAccountLogout.nId, message); }
// ------------------------------------------------------------------------------- // ReqAccountLogout // ------------------------------------------------------------------------------- public MsgAckAccountLogout ReqAccountLogout(MsgReqAccountLogout message, NetworkConnection connection = null) { bool _bSuccess = false; if (AccountOnline(connection)) { dictLobby.Remove(connection); _bSuccess = true; } return(new MsgAckAccountLogout { bSuccess = _bSuccess }); }
// ------------------------------------------------------------------------------- // OnReqAccountLogout // ------------------------------------------------------------------------------- public void OnReqAccountLogout(NetworkMessage networkMessage) { MsgReqAccountLogout message = networkMessage.ReadMessage <MsgReqAccountLogout>(); networkMessage.conn.Send(MsgAckAccountLogout.nId, accountManager.ReqAccountLogout(message, networkMessage.conn)); }