Exemple #1
0
        public static void CastSpell(string spellName)
        {
            BarSpell spell = (from barSpell in Spells where barSpell.Key == spellName select barSpell.Value).FirstOrDefault();

            if (spell != null)
            {
                Logging.Write("[Mapper]Casting " + spellName);
                spell.CastSpell();
            }
        }
Exemple #2
0
        public static void CastSpell(string spellName)
        {
            BarSpell Spell = Enumerable.FirstOrDefault <BarSpell>(Enumerable.Select <KeyValuePair <string, BarSpell>, BarSpell>(Enumerable.Where <KeyValuePair <string, BarSpell> >((IEnumerable <KeyValuePair <string, BarSpell> >)BarMapper.Spells, (Func <KeyValuePair <string, BarSpell>, bool>)(barSpell => barSpell.Key == spellName)), (Func <KeyValuePair <string, BarSpell>, BarSpell>)(barSpell => barSpell.Value)));

            if (Spell == null)
            {
                return;
            }
            Logging.Write("[Mapper]Casting " + spellName, new object[0]);
            Spell.CastSpell();
        }