示例#1
0
文件: User.cs 项目: Raphiiee/MTCG
        public int BuyCard(int packId)
        {
            int[] cardArray = new int[20000];
            Array.Fill(cardArray, -1);
            int i = 0;

            foreach (KeyValuePair <int, Card> kvp in Stack)
            {
                cardArray[i] = kvp.Value.CardId;
                i++;
            }
            foreach (KeyValuePair <int, Card> kvp in Deck)
            {
                cardArray[i] = kvp.Value.CardId;
                i++;
            }

            return(_cData.BuyCard(Username, _db.CoinHandler(Username, CoinProperty.Load), packId, cardArray));
        }