Quantcast
Retrieve buff id by name - WoWInterface
Thread Tools Display Modes
08-10-15, 07:11 PM   #1
Benalish
A Theradrim Guardian
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 60
Retrieve buff id by name

Hi everyone, there is an API that allows, if I have for example the buff "Blood Shield," to give me his id? Not the spell ID, but the buff index that I can then use in the API GameTooltip:SetUnitBuff ("UnitID", buffIndex).

Thank you in advance

Last edited by Benalish : 08-10-15 at 08:47 PM.
  Reply With Quote
08-11-15, 01:10 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
GameTooltip:SetUnitAura/Buff/Debuff actually works the same way that UnitAura/Buff/Debuff does -- you can just pass it a name directly. I just verified with this:

GameTooltip:SetUnitBuff("player", "Lightning Shield")
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Donít message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Retrieve buff id by name

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off