Пример #1
0
    private void SelectHealthstone()
    {
        string healthstoneToUse = Inventory.Instance.GetLastItem(healthstoneList);

        if (healthstoneToUse != "")
        {
            WoWItem Healthstone = Inventory.Instance.GetItem(healthstoneToUse);
            if (Healthstone.CanUse())
            {
                Healthstone.Use();
            }
        }
    }
Пример #2
0
    private void SelectHPotion()
    {
        string potToUse = Inventory.Instance.GetLastItem(potNames);

        if (potToUse != "")
        {
            WoWItem Potion = Inventory.Instance.GetItem(potToUse);
            if (Local.HealthPercent <= 20 && Potion.CanUse())
            {
                Potion.Use();
            }
        }
    }
Пример #3
0
 private void UseScrolls()
 {// Not checking for whether a buff is already active. I'm lazy.
     for (int i = scrollNames.Length - 1; i >= 0; i--)
     {
         if (Inventory.Instance.GetItemCount(scrollNames[i]) != 0)
         {
             WoWItem scroll = Inventory.Instance.GetItem(scrollNames[i]);
             if (scroll.CanUse())
             {
                 scroll.Use();
             }
         }
     }
     //string scrollToUse = Inventory.Instance.GetLastItem(scrollNames);
     //WoWItem Scroll = Inventory.Instance.GetItem(scrollToUse);
     //Scroll.Use();
 }
Пример #4
0
    private void SelectMPotion()
    {
        DebugMsg("Checking Mana Potions..");
        string potToUseM = Inventory.Instance.GetLastItem(potNamesMana);

        if (potToUseM != "" && Local.ManaPercent <= 35)
        {
            WoWItem MPotion = Inventory.Instance.GetItem(potToUseM);
            if (MPotion.CanUse())
            {
                if (Spell.IsShapeShifted)
                {
                    Spell.Instance.CancelShapeshift();
                }
                MPotion.Use();
            }
        }
    }
Пример #5
0
 private void SelectHPotion()
 {
     if (Local.HealthPercent <= 35)
     {
         DebugMsg("Checking Healing Potions..");
         string potToUseH = Inventory.Instance.GetLastItem(potNamesHeal);
         if (potToUseH != "")
         {
             WoWItem HPotion = Inventory.Instance.GetItem(potToUseH);
             if (HPotion.CanUse())
             {
                 if (Spell.IsShapeShifted)
                 {
                     Spell.Instance.CancelShapeshift();
                 }
                 HPotion.Use();
             }
         }
     }
 }