Exemplo n.º 1
0
        private static LethalPoisonType PoisonCheck(LethalPoisonType poison)
        {
            // exit quickly if user wants control of poisons
            if (poison == LethalPoisonType.None)
            {
                return(poison);
            }

            // if user selects a poison rogue doesnt know, switch to auto selection
            if (poison > LethalPoisonType.Auto && !SpellManager.HasSpell((int)poison))
            {
                poison = LethalPoisonType.Auto;
            }

            // for auto selection, pick most likely desired poison for the moment
            if (poison == LethalPoisonType.Auto)
            {
                if (SingularRoutine.CurrentWoWContext == WoWContext.Battlegrounds && SpellManager.HasSpell((int)LethalPoisonType.Wound))
                {
                    poison = LethalPoisonType.Wound;
                }
                else if (SingularRoutine.CurrentWoWContext != WoWContext.Battlegrounds && SpellManager.HasSpell((int)LethalPoisonType.Agonizing))
                {
                    poison = LethalPoisonType.Agonizing;
                }
                else if (SpellManager.HasSpell((int)LethalPoisonType.Deadly))
                {
                    poison = LethalPoisonType.Deadly;
                }
                else
                {
                    return(LethalPoisonType.None);
                }
            }

            // validate spell is known.  if it is but an override exists, switch to the override id
            SpellFindResults sfr;

            if (!SpellManager.FindSpell((int)poison, out sfr))
            {
                poison = LethalPoisonType.None;
            }
            else if (sfr.Override != null)
            {
                poison = (LethalPoisonType)sfr.Override.Id;     // upgrade spell.Id if an override exists
            }
            if (poison != LethalPoisonType.None && Me.GetAuraTimeLeft((int)poison, true).TotalMinutes < RefreshAtMinutesLeft)
            {
                return(poison);
            }

            return(LethalPoisonType.None);
        }
Exemplo n.º 2
0
        private static LethalPoisonType PoisonCheck(LethalPoisonType poison)
        {
            if (poison > LethalPoisonType.Auto && !SpellManager.HasSpell((int)poison))
                poison = LethalPoisonType.Auto;

            if (poison == LethalPoisonType.Auto)
            {
                if (SingularRoutine.CurrentWoWContext == WoWContext.Battlegrounds && SpellManager.HasSpell((int)LethalPoisonType.Wound))
                    poison = LethalPoisonType.Wound;
                else if (SpellManager.HasSpell((int)LethalPoisonType.Deadly))
                    poison = LethalPoisonType.Deadly;
                else
                    poison = LethalPoisonType.None;
            }

            if ( poison != LethalPoisonType.None && Me.GetAuraTimeLeft((int)poison, true).TotalMinutes < RefreshAtMinutesLeft)
                return poison;

            return LethalPoisonType.None;
        }
Exemplo n.º 3
0
        private static LethalPoisonType PoisonCheck(LethalPoisonType poison)
        {
            // exit quickly if user wants control of poisons
            if (poison == LethalPoisonType.None)
                return poison;

            // if user selects a poison rogue doesnt know, switch to auto selection
            if (poison > LethalPoisonType.Auto && !SpellManager.HasSpell((int)poison))
                poison = LethalPoisonType.Auto;

            // for auto selection, pick most likely desired poison for the moment
            if (poison == LethalPoisonType.Auto)
            {
                if (SingularRoutine.CurrentWoWContext == WoWContext.Battlegrounds && SpellManager.HasSpell((int)LethalPoisonType.Wound))
                    poison = LethalPoisonType.Wound;
                else if (SpellManager.HasSpell((int)LethalPoisonType.Deadly))
                    poison = LethalPoisonType.Deadly;
                else
                    poison = LethalPoisonType.None;
            }

            // validate spell is known.  if it is but an override exists, switch to the override id
            SpellFindResults sfr;
            if (!SpellManager.FindSpell((int)poison, out sfr))
                poison = LethalPoisonType.None;
            else if (sfr.Override != null)
                poison = (LethalPoisonType)sfr.Override.Id;     // upgrade spell.Id if an override exists

            if (poison != LethalPoisonType.None && Me.GetAuraTimeLeft((int)poison, true).TotalMinutes < RefreshAtMinutesLeft)
            {
                return poison;
            }

            return LethalPoisonType.None;
        }