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); }
private Dictionary <string, byte> GetChromaList(int id) => !HasChromaPack(id) ? null : Chromas.FirstOrDefault(x => (x.Key.Key == Player.Instance.Hero) && (x.Key.Value == id)).Value;
private bool HasChromaPack(int id) => (Chromas != null) && Chromas.ContainsKey(new KeyValuePair <Champion, byte>(Player.Instance.Hero, (byte)id));