public void ReqVerifyAccessToken(NetMessage message) { var reqData = message.GetData <TcpMsg.ReqVerifyAccessToken>(); if (null != user) { if (!string.IsNullOrEmpty(reqData.accessToken)) { user.SetAccessToken(reqData.accessToken); LDC.LDCApiManager.Instance.AddLDCCmd(new LDC.Msg.LDCMsg_VerifyAccessToken() { guid = user.Id.ToString(), accessToken = reqData.accessToken }); } else { var ackData = new TcpMsg.AckVerifyAccessToken(); ackData.errCode = TcpMsg.Error.AccessToken_NullOrEmpty; ackData.authType = TcpMsg.AuthType.AuthFail; user.Send(new Packet(ackData)); logger.Warn($"GUID={user.Id.ToString()} Error Code={ackData.errCode.ToString()}"); } } else { logger.Warn($"Is User Null~~~"); } }
public void ReqCreateNickName(NetMessage message) { var reqData = message.GetData <TcpMsg.ReqCreateNickName>(); if (null != user) { user.CreateNickName(reqData.nickName); } else { logger.Warn($"Is User Null~~~"); } }
public void ReqDeckNameChange(NetMessage message) { var reqData = message.GetData <TcpMsg.ReqDeckNameChange>(); if (null != user) { user.DeckNameChange(reqData.deckuid, reqData.deckName); } else { logger.Warn($"Is User Null~~~"); } }
public void ReqRegisterDeck(NetMessage message) { var reqData = message.GetData <TcpMsg.ReqRegisterDeck>(); if (null != user) { user.RegisterDeck(reqData.tokenId, reqData.deckName); } else { logger.Warn($"Is User Null~~~"); } }
public void ReqEcho(NetMessage message) { var reqData = message.GetData <TcpMsg.ReqEcho>(); logger.Debug($"uid={reqData.uid} message={reqData.message}"); var ackData = new TcpMsg.AckEcho() { uid = user.UID, message = reqData.message }; user.Send(new Packet(ackData)); }
public void ReqDeckChildrenCardAdd(NetMessage message) { var reqData = message.GetData <TcpMsg.ReqDeckChildrenCardAdd>(); if (null != user) { var errorCode = user.CheckDeckCount(reqData.deckuid); if (errorCode == TcpMsg.Error.None) { user.stateType = UserStateType.DeckCardAdd; LBD.LBDApiManager.Instance.AddLBDCmd(new LBD.Msg.LBDMsg_GetComposableToken() { uid = user.UID, guid = user.Id.ToString(), type = TcpMsg.GetComposableType.GetTokenParent, tokenType = LBD.LBDApiManager.TokenIdToTokenType(reqData.tokenid), tokenIdx = LBD.LBDApiManager.TokenIdToTokenIndex(reqData.tokenid), limit = 50, orderBy = string.Empty, page = 1, value = reqData.deckuid }); return; } var ackData = new TcpMsg.AckDeckChildrenCardAdd(); ackData.errCode = errorCode; user.Send(new Packet(ackData)); } else { logger.Warn($"Is User Null~~~"); } }
public void ReqDeckChildrenCardRemove(NetMessage message) { var reqData = message.GetData <TcpMsg.ReqDeckChildrenCardRemove>(); if (null != user) { user.stateType = UserStateType.DeckCardRemove; LBD.LBDApiManager.Instance.AddLBDCmd(new LBD.Msg.LBDMsg_RemoveTokenParent() { uid = user.UID, guid = user.Id.ToString(), holderAddr = string.Empty, holderUserId = user.lineUID, cTokenType = LBD.LBDApiManager.TokenIdToTokenType(reqData.tokenid), cTokenIdx = LBD.LBDApiManager.TokenIdToTokenIndex(reqData.tokenid) }); } else { logger.Warn($"Is User Null~~~"); } }