示例#1
0
        public void SwitchTo(Attribute attribute)
        {
            if (!CanBeCasted() || (IsDisabled() && !Menu.Recovery.Active))
            {
                return;
            }

            var currentAttribute = powerTreads.ActiveAttribute;

            if (attribute == Attribute.Invalid)
            {
                attribute = Hero.PrimaryAttribute;
            }

            switch (attribute)
            {
            case Attribute.Agility:
                if (currentAttribute == Attribute.Strength)
                {
                    powerTreads.UseAbility();
                    powerTreads.UseAbility();
                }
                else if (currentAttribute == Attribute.Intelligence)
                {
                    powerTreads.UseAbility();
                }
                break;

            case Attribute.Strength:
                if (currentAttribute == Attribute.Intelligence)
                {
                    powerTreads.UseAbility();
                    powerTreads.UseAbility();
                }
                else if (currentAttribute == Attribute.Agility)
                {
                    powerTreads.UseAbility();
                }
                break;

            case Attribute.Intelligence:
                if (currentAttribute == Attribute.Agility)
                {
                    powerTreads.UseAbility();
                    powerTreads.UseAbility();
                }
                else if (currentAttribute == Attribute.Strength)
                {
                    powerTreads.UseAbility();
                }
                break;
            }

            Sleeper.Sleep(Game.Ping + 150, Name);
        }
示例#2
0
        public void SwitchTo(Attribute attribute, bool queue = false)
        {
            SetSleep(200);

            switch (attribute)
            {
            case Attribute.Strength:
                if (ActiveAttribute == Attribute.Intelligence)
                {
                    powerTreads.UseAbility(queue);
                    powerTreads.UseAbility(queue);
                }
                else if (ActiveAttribute == Attribute.Agility)
                {
                    powerTreads.UseAbility(queue);
                }
                break;

            case Attribute.Intelligence:
                if (ActiveAttribute == Attribute.Agility)
                {
                    powerTreads.UseAbility(queue);
                    powerTreads.UseAbility(queue);
                }
                else if (ActiveAttribute == Attribute.Strength)
                {
                    powerTreads.UseAbility(queue);
                }
                break;

            case Attribute.Agility:
                if (ActiveAttribute == Attribute.Strength)
                {
                    powerTreads.UseAbility(queue);
                    powerTreads.UseAbility(queue);
                }
                else if (ActiveAttribute == Attribute.Intelligence)
                {
                    powerTreads.UseAbility(queue);
                }
                break;
            }
        }