コード例 #1
0
 public Collection(ulong accountHi, ulong accountLo, BattleTag battleTag, HearthMirror.Objects.Collection collection)
 {
     AccountHi = accountHi;
     AccountLo = accountLo;
     BattleTag = $"{battleTag.Name}#{battleTag.Number}";
     Cards     = new SortedDictionary <int, int[]>(
         collection.Cards.GroupBy(x => x.Id)
         .ToDictionary(x => GetDbfId(x.Key),
                       x => new[] { x.FirstOrDefault(c => !c.Premium)?.Count ?? 0, x.FirstOrDefault(c => c.Premium)?.Count ?? 0 }));
     FavoriteHeroes   = new SortedDictionary <int, int>(collection.FavoriteHeroes.ToDictionary(x => x.Key, x => GetDbfId(x.Value.Id)));
     CardBacks        = collection.CardBacks.OrderBy(x => x).ToList();
     FavoriteCardBack = collection.FavoriteCardBack;
     Dust             = collection.Dust;
 }
コード例 #2
0
 public MockGameData(MatchInfo matchinfo   = null, GameServerInfo serverInfo = null, AccountId accountId                 = null,
                     ArenaInfo arenaInfo   = null, BattleTag battleTag       = null, BrawlInfo brawlInfo                 = null,
                     Collection collection = null, Card[] draftChoices       = null, List <Card> packCards               = null,
                     int packId            = 0, DungeonInfo[] dungeonInfo    = null, bool friendlyChallengeDialogVisible = false)
 {
     _matchinfo    = matchinfo;
     _serverInfo   = serverInfo;
     _accountId    = accountId;
     _arenaInfo    = arenaInfo;
     _battleTag    = battleTag;
     _brawlInfo    = brawlInfo;
     _collection   = collection;
     _draftChoices = draftChoices;
     _packCards    = packCards;
     _packId       = packId;
     _dungeonInfo  = dungeonInfo;
     _friendlyChallengeDialogVisible = friendlyChallengeDialogVisible;
 }