public static Deck FromHearthDbDeck(HearthDb.Deckstrings.Deck hDbDeck)
        {
            var deck = new Deck
            {
                Name  = hDbDeck.Name,
                Class = Database.GetCardFromDbfId(hDbDeck.HeroDbfId, false).PlayerClass
            };

            foreach (var c in hDbDeck.GetCards())
            {
                deck.Cards.Add(new Card(c.Key)
                {
                    Count = c.Value
                });
            }
            return(deck);
        }
Ejemplo n.º 2
0
 public static Deck GetDeckFromDbfIds(string playerClass, CardSet set, IEnumerable <int> dbfIds)
 {
     return(GetDeck(playerClass, set, dbfIds.Select(dbfId => Database.GetCardFromDbfId(dbfId))));
 }