Exemplo n.º 1
0
        internal Champion GetChampion(ESummoner summoner)
        {
            if (!SummonerToChampion.TryGetValue(summoner, out var champion))
            {
                champion = Champion.Default;
                Logger.Instance.LogMessage(TracingLevel.ERROR, $"Champion for Summoner not found: {summoner}");
            }

            return(champion);
        }
Exemplo n.º 2
0
        public Spell GetSpell(ESummoner summoner, ESpell spellId)
        {
            if (!SummonerToSpells.TryGetValue(summoner, out var spells))
            {
                Logger.Instance.LogMessage(TracingLevel.ERROR, $"Summoner not found: {summoner} - {spellId}");
                return(Spell.Default);
            }

            if (!spells.TryGetValue(spellId, out var spell))
            {
                Logger.Instance.LogMessage(TracingLevel.ERROR, $"Spell not found: {summoner} - {spellId}");
                return(Spell.Default);
            }

            return(spell);
        }