What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

WOWItem Tool tip text?

jeffgtx

New Member
Joined
Sep 4, 2010
Messages
49
Reaction score
1
Is there any way I can determine an item is usable? I know there is the WowItem.Usable property. But for trinkets it always returns true. I only want it to return true if there an on use ability linked to it.

Anyone have any ideas?
 
try something like this.
Code:
        public void CastItem(string ItemName)
        {
            foreach (WoWItem Items in Me.BagItems)
            {
                if (Items.Name == ItemName && Items.BaseAddress != 0)
                {
                    if (Items.ItemSpells[0].IsValid && !Items.ItemSpells[0].ActualSpell.Cooldown)
                    {
                        Items.ItemSpells[0].ActualSpell.Cast();
                    }
                }
            }
        }
 
Thanks G, but not working for my purpose. I'm trying to find out if a trinket that is currently equipt, has a spell that can be used. No matter what I try I can't get HB to return a reliable result. Anyone come across this.
 
Thanks G, but not working for my purpose. I'm trying to find out if a trinket that is currently equipt, has a spell that can be used. No matter what I try I can't get HB to return a reliable result. Anyone come across this.
you need to re-write what i have there, but YES all the api you need to pull that information is there in the example.

it may change differently from item to item, since sometimes wowitems spells have multiple spell effects and such that vary.
 
Ok thanks, I'll try again after work today, but this is the gist of what I was doing. Trying to use the same composite for trinkets, enginnering gloves and belt.

public static Composite UseSlottedItem(WoWItem SlottedItem)
{
return new Decorator(
ret => (
SlottedItem != null &&
SlottedItem.BaseAddress != 0 &&
SlottedItem.ItemSpells[0].IsValid &&
SlottedItem.Cooldown == 0 &&
SlottedItem.ItemSpells[0].ActualSpell.Cooldown
),
new Action(delegate{
SlottedItem.Use();
Altarboy.Logger.Log("--> Using " + SlottedItem.Name + " <--");
} )
);

}
 
Back
Top