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")
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  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