private static IDeck GetDuelsDeck(HearthstoneImage image)
 {
     return(new Deck
     {
         DeckList = DuelsInfoReader.ReadDuelsInfo(image)?.DeckList?.Select(dbfId => dbfId.ToString())?.ToList(),
     });
 }
示例#2
0
        public static bool IsMaybeOnDuelsRewardsScreen([NotNull] HearthstoneImage image)
        {
            try
            {
                if (image == null)
                {
                    throw new ArgumentNullException(nameof(image));
                }

                var display           = image["PvPDungeonRunScene"]["m_instance"]["m_display"];
                var backButtonEnabled = display["m_backButton"]["m_enabled"];
                var sessionActive     = display["m_dataModel"]["m_IsSessionActive"];
                var hasSession        = display["m_dataModel"]["m_HasSession"];
                var duelsInfo         = DuelsInfoReader.ReadDuelsInfo(image);
                var isRunActive       = duelsInfo?.RunActive ?? 0;
                return(!backButtonEnabled && !sessionActive && hasSession && (isRunActive == 0));
            }
            catch (Exception e)
            {
                return(false);
            }
        }
        //public bool GetCollectionCardRecords() => CollectionCardRecordReader.ReadCollectionCardRecords(this.image);

        public IDuelsInfo GetDuelsInfo() => DuelsInfoReader.ReadDuelsInfo(this.image);