예제 #1
0
        private static ArenaInfo GetArenaDeckInternal()
        {
            var draftManager = GetService("DraftManager");

            if (draftManager == null)
            {
                return(null);
            }
            var deck = GetDeck(draftManager["m_draftDeck"]);

            if (deck == null)
            {
                return(null);
            }

            var season = draftManager["m_currentSeason"]?["_Season"]?["<GameContentSeason>k__BackingField"]?["<SeasonId>k__BackingField"];

            return(new ArenaInfo {
                Wins = draftManager["m_wins"],
                Losses = draftManager["m_losses"],
                CurrentSlot = draftManager["m_currentSlot"],
                Deck = deck,
                Rewards = RewardDataParser.Parse(draftManager["m_chest"]?["<Rewards>k__BackingField"]?["_items"]),
                Season = season
            });
        }
예제 #2
0
        private static ArenaInfo GetArenaDeckInternal()
        {
            var draftManager = Mirror.Root["DraftManager"]["s_instance"];
            var deck         = GetDeck(draftManager["m_draftDeck"]);

            if (deck == null)
            {
                return(null);
            }
            return(new ArenaInfo {
                Wins = draftManager["m_wins"],
                Losses = draftManager["m_losses"],
                CurrentSlot = draftManager["m_currentSlot"],
                Deck = deck,
                Rewards = RewardDataParser.Parse(draftManager["m_chest"]?["<Rewards>k__BackingField"]?["_items"])
            });
        }
예제 #3
0
        private static SeasonEndInfo GetSeasonEndInfoInternal()
        {
            var dialog = Mirror.Root["DialogManager"]["s_instance"]["m_currentDialog"];

            if (dialog?.Class.Name != "SeasonEndDialog" || !dialog["m_shown"])
            {
                return(null);
            }
            var info    = dialog["m_seasonEndInfo"];
            var rewards = RewardDataParser.Parse(info["m_rankedRewards"]["_items"]);

            return(new SeasonEndInfo(
                       (int)info["m_bonusStars"],
                       (int)info["m_boostedRank"],
                       (int)info["m_chestRank"],
                       (bool)info["m_isWild"],
                       (int)info["m_legendIndex"],
                       (int)info["m_rank"],
                       (int)info["m_seasonID"],
                       rewards));
        }
예제 #4
0
        private static IEnumerable <RewardData> GetArenaRewardsInternal()
        {
            var rewards = Mirror.Root["DraftManager"]["s_instance"]["m_chest"]?["<Rewards>k__BackingField"]?["_items"];

            return(RewardDataParser.Parse(rewards));
        }
예제 #5
0
        private static IEnumerable <RewardData> GetArenaRewardsInternal()
        {
            var rewards = GetService("DraftManager")?["m_chest"]?["<Rewards>k__BackingField"]?["_items"];

            return(RewardDataParser.Parse(rewards));
        }