private SelectCards BuildSelectCardsModel(IEnumerable <Card> cards, UserModel userModel, int amountOfCards, int page) { var resultCards = new SelectCards { Cards = cards .OrderBy(x => x.ManaCost) .ThenBy(x => x.Name), PageInfo = new PageInfo { CurrentPage = page, ItemsPerPage = _pageSize, TotalItems = amountOfCards }, UserModel = userModel }; return(resultCards); }
/// <summary> /// 发送手牌选择(开局首摸) /// </summary> public static void SendSeletFirstHandCards(SelectCards selectCards) { byte[] byt = Incode.IncodeSecondaryCommand(TYPE, (int)SecondCommands.DEAL, DataDo.Object2Json(selectCards)); NetStart.SendContend(byt); }