public void RemoveComposableTokenInfo(LBD.TokenInfo ptokenInfo, LBD.TokenInfo ctokenInfo) { var deckInfo = deckInfos.Find(x => x.GetDeckUid() == ptokenInfo.GetTokenId()); var ackData = new TcpMsg.AckDeckChildrenCardRemove(); if (null != deckInfo) { var removeToken = deckInfo.unitList.Find(x => x.GetCardID() == ctokenInfo.GetTokenId()); if (null != removeToken) { deckInfo.unitList.Remove(removeToken); ackData.deckInfo = deckInfo; } else { ackData.errCode = TcpMsg.Error.NotFoundTokenInfo; } } else { ackData.errCode = TcpMsg.Error.NotFoundDeckInfo; } if (ackData.errCode != TcpMsg.Error.None) { logger.Warn($"UID={UID} Error Code={ackData.errCode.ToString()}"); } stateType = UserStateType.None; Send(new Packet(ackData)); }
public void IntlMsg_TransactionError(InternalMsg.InternalBaseMsg msg) { var intlMsg = msg as InternalMsg.IntlMsg_TransactionError; if (null != user) { TcpMsg.MessageResponse ackData; switch (intlMsg.errorCode) { case InternalMsg.Error.AddTokenParent: user.stateType = UserStateType.None; ackData = new TcpMsg.AckDeckChildrenCardAdd() { errCode = TcpMsg.Error.DeckAddError, statusCode = intlMsg.statusCode, statusMessage = intlMsg.statusMessage }; break; case InternalMsg.Error.RemoveTokenParent: user.stateType = UserStateType.None; ackData = new TcpMsg.AckDeckChildrenCardRemove() { errCode = TcpMsg.Error.DeckRemoveError, statusCode = intlMsg.statusCode, statusMessage = intlMsg.statusMessage }; break; default: logger.Warn($"Not Found ErrorCode={intlMsg.errorCode}"); return; } user.Send(new Packet(ackData)); } else { logger.Warn($"Is User Null~~~"); } }