Example #1
0
        public void FillLocalizations(LocalizationRepository localizationRepository)
        {
            //var generatedManaMismatchCards = new List<Card>();

            for (int i = 0; i < Cards.Count; i++)
            {
                var card = Cards[i];
                card.Localization = localizationRepository.GetLocalization(card);

                //if (!string.IsNullOrEmpty(card.Localization?.GeneratedMana) && string.IsNullOrEmpty(card.GeneratedMana))
                //{
                //	generatedManaMismatchCards.Add(card);
                //}
            }

            IsLocalizationLoadingComplete = true;
            LocalizationLoadingComplete?.Invoke();
        }
Example #2
0
        public void FillLocalizations(LocalizationRepository localizationRepository)
        {
            //var generatedManaMismatchCards = new List<Card>();

            for (int i = 0; i < Cards.Count; i++)
            {
                var card = Cards[i];
                card.Localization = localizationRepository.GetLocalization(card);

                //if (!string.IsNullOrEmpty(card.Localization?.GeneratedMana) && string.IsNullOrEmpty(card.GeneratedMana))
                //{
                //	generatedManaMismatchCards.Add(card);
                //}

                card.Namesakes = CardsByName[card.NameNormalized]
                                 .Where(c => c != card)
                                 .OrderByDescending(c => c.ReleaseDate)
                                 .ToArray();
            }

            IsLocalizationLoadingComplete = true;
            LocalizationLoadingComplete?.Invoke();
        }