コード例 #1
0
        private async void GetRunes(double summmonerId)
        {
            Data.Runes = new List <RuneData>();

            var runes = await Connection.GetSummonerRuneInventory(summmonerId);

            if (runes != null)
            {
                foreach (var rune in runes.SummonerRunes)
                {
                    var runeData = LeagueData.Runes.FirstOrDefault(r => r.Id == rune.RuneId);

                    if (runeData == null)
                    {
                        continue;
                    }

                    var rn = new RuneData
                    {
                        Name        = runeData.Name,
                        Description = runeData.Description,
                        Quantity    = rune.Quantity,
                        Tier        = runeData.Tier
                    };

                    Data.Runes.Add(rn);
                }
            }
        }