Beispiel #1
0
        private static void InitCards(IDataReader reader)
        {
            while (reader.Read())
            {
                int id = reader.GetInt32(0);
                CardData card = new CardData(id)
                {
                    AliasId = reader.GetInt32(1),
                    Type = reader.GetInt32(2),
                    Level = reader.GetInt32(3) & 0xFF,
                    Race = reader.GetInt32(4),
                    Attribute = reader.GetInt32(5),
                    Atk = reader.GetInt32(6),
                    Def = reader.GetInt32(7),
                    Name = reader.GetString(8),
                    Description = reader.GetString(9)
                };
                _cards.Add(id, card);

            }
        }
Beispiel #2
0
 private void AddCard(CardData card)
 {
     if (card.IsExtraCard())
         ExtraCards.Add(card);
     else
         Cards.Add(card);
 }