Beispiel #1
0
        /// <summary>
        /// Casts a spell on yourself
        /// </summary>
        /// <param name="Spell">The spell you want to cast.</param>
        /// <param name="reqs">The requirements to cast the spell.</param>
        /// <returns></returns>
        public static async Task <bool> Buff(int Spell, System.Windows.Media.Color newColor, bool reqs = true, string addLog = "")
        {
            if (!reqs)
            {
                return(false);
            }
            if (!SpellManager.CanCast(WoWSpell.FromId(Spell), Me, false, false, false)) //Should we check for if we are moving? *Second false
            {
                return(false);
            }
            if (!SpellManager.Cast(Spell, Me))
            {
                return(false);
            }
            lastSpellCast = Spell;
            L.defensiveLog("~" + WoWSpell.FromId(Spell).Name + (String.IsNullOrEmpty(addLog) || !GeneralSettings.Instance.GeneralDebug ? "" : " - " + addLog), newColor);
            await CommonCoroutines.SleepForLagDuration();

            return(true);
        }