Пример #1
0
        private string GetChromaName(int id, int chromaId)
        {
            if ((Chromas == null) || !Chromas.ContainsKey(new KeyValuePair <Champion, byte>(Player.Instance.Hero, (byte)id)))
            {
                return(string.Empty);
            }

            var dictionary   = GetChromaList(id);
            var baseSkinName = Skins.FirstOrDefault(x => x.Value == id).Key;

            if (dictionary == null)
            {
                return(baseSkinName);
            }

            var chromaIdT = dictionary.ElementAtOrDefault(chromaId).Key;

            return(chromaIdT != default(string) ? $"{baseSkinName} : {chromaIdT} chroma" : baseSkinName);
        }
Пример #2
0
 private Dictionary <string, byte> GetChromaList(int id)
 =>
 !HasChromaPack(id)
             ? null
             : Chromas.FirstOrDefault(x => (x.Key.Key == Player.Instance.Hero) && (x.Key.Value == id)).Value;
Пример #3
0
 private bool HasChromaPack(int id)
 => (Chromas != null) && Chromas.ContainsKey(new KeyValuePair <Champion, byte>(Player.Instance.Hero, (byte)id));