Пример #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();
            }
        }
Пример #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();
        }
Пример #3
0
        public override void Execute(int globalcooldown)
        {
            if (DoesKeyExist)
            {
                if (!KeyHelper.HasKey(_name))
                    _spell = null;
                //Load the spell and set the global cooldown
                if (_spell == null)
                {
                    _spell = BarMapper.GetSpellByName(_name);
                    _spell.SetCooldown(globalcooldown);
                    KeyHelper.AddKey(_name, "", _spell.Bar.ToString(), _spell.Key.ToString());
                }

                _spell.CastSpell();
            }
        }