Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

Allow IsUsableItem/IsUsableSpell to be used on other units #489

Open rowaasr13 opened 9 months ago

rowaasr13 commented 9 months ago

Those two functions were added back in Burning Crusade and allow to check if spell is usable right now or (in default UI) should be dimmed out. They check both for mana (for spells) and special requirements, notably health percent or special buffs, so for item https://www.wowhead.com/item=208321/iridal-the-earths-master IsUsableItem has 1st return true when target falls below 35% and for Hunter's ability https://www.wowhead.com/spell=53351/kill-shot 1st return becomes true when target has < 20% health OR Kill Shot effect from Deathblow talent is active.

Unfortunately both functions cannot report anything but "target" unit. It would be nice if they had 2nd argument unit, so you could check against other units.