Esempio n. 1
0
    /*
     * CombatRotation()
     */
    public void CombatRotation()
    {
        if (doKicks())
        {
            return;
        }

        if (doResist())
        {
            return;
        }

        if (Garrote.KnownSpell && Garrote.IsSpellUsable &&
            (!ObjectManager.Target.HaveBuff("Garrote") || MyHelpers.TargetDebuffTimeLeft("Garrote") < 2))
        {
            MyHelpers.castSpell(Garrote.Name);
            Lua.LuaDoString(@"dRotationFrame.text:SetText(""Garrote"")");
            return;
        }
        if (EquippedItems.GetEquippedItems().Find(x => x.GetItemInfo.ItemName == ItemsManager.GetNameById(169311)) != null &&
            MyHelpers.getTargetDistance() <= MyHelpers.getMeleeRange() &&
            ObjectManager.Target.IsAttackable &&
            Lua.LuaDoString <bool>(@"if GetItemCooldown(169311) == 0  then return true; else return false; end") &&
            (!ObjectManager.Target.BuffCastedByAll("Razor Coral").Contains(ObjectManager.Me.Guid) || ObjectManager.Target.BuffCastedByAll("Vendetta").Contains(ObjectManager.Me.Guid)))
        {
            ItemsManager.UseItem(169311);
            Lua.LuaDoString(@"dRotationFrame.text:SetText(""Razor Coral"")");
            return;
        }

        if (Rupture.KnownSpell && Rupture.IsSpellUsable &&
            MyHelpers.getComboPoint() > 4 &&
            (!ObjectManager.Target.HaveBuff("Rupture") || MyHelpers.TargetDebuffTimeLeft("Rupture") < 2))
        {
            MyHelpers.castSpell(Rupture.Name);
            Lua.LuaDoString(@"dRotationFrame.text:SetText(""Rupture"")");
            return;
        }

        if (Vendetta.KnownSpell && Vendetta.IsSpellUsable && (MyHelpers.haveOP() > 20 || MyHelpers.haveBL()))
        {
            MyHelpers.castSpell(Vendetta.Name);
            Lua.LuaDoString(@"dRotationFrame.text:SetText(""Vendetta"")");
            return;
        }
        if (Berserking.KnownSpell && Berserking.IsSpellUsable && ObjectManager.Target.BuffCastedByAll("Vendetta").Contains(ObjectManager.Me.Guid))
        {
            MyHelpers.castSpell(Berserking.Name);
            Lua.LuaDoString(@"dRotationFrame.text:SetText(""GuardianofAzeroth"")");
            return;
        }

        if (GuardianofAzeroth.KnownSpell && GuardianofAzeroth.IsSpellUsable && ObjectManager.Target.BuffCastedByAll("Vendetta").Contains(ObjectManager.Me.Guid))
        {
            MyHelpers.castSpell(GuardianofAzeroth.Name);
            Lua.LuaDoString(@"dRotationFrame.text:SetText(""GuardianofAzeroth"")");
            return;
        }
        if (ToxicBlade.KnownSpell && ToxicBlade.IsSpellUsable && ((!Vendetta.IsSpellUsable && ObjectManager.Target.HaveBuff("Rupture") && MyHelpers.haveBuff("Envenom")) || ObjectManager.Target.BuffCastedByAll("Vendetta").Contains(ObjectManager.Me.Guid)))
        {
            MyHelpers.castSpell(ToxicBlade.Name);
            Lua.LuaDoString(@"dRotationFrame.text:SetText(""Toxic Blade"")");
            return;
        }
        if (Vanish.KnownSpell && Vanish.IsSpellUsable && Garrote.IsSpellUsable && ObjectManager.Target.BuffCastedByAll("Vendetta").Contains(ObjectManager.Me.Guid))
        {
            MyHelpers.castSpell(Vanish.Name);
            Lua.LuaDoString(@"dRotationFrame.text:SetText(""Garrote"")");
            return;
        }

        if (Envenom.KnownSpell && Envenom.IsSpellUsable &&
            MyHelpers.getComboPoint() > 4)
        {
            MyHelpers.castSpell(Envenom.Name);
            Lua.LuaDoString(@"dRotationFrame.text:SetText(""Envenom"")");
            return;
        }

        if (Mutilate.KnownSpell && Mutilate.IsSpellUsable &&
            MyHelpers.getComboPoint() <= 4)
        {
            MyHelpers.castSpell(Mutilate.Name);
            Lua.LuaDoString(@"dRotationFrame.text:SetText(""Mutilate"")");
            return;
        }
    }