getting name or spellid for buffs/debuffs
 Posted: Mon Oct 05, 2015 12:38 pm
Posted: Mon Oct 05, 2015 12:38 pmis this basically impossible? even api like GetPlayerBuffName() doesn't seem to exist in 1.12. i'm looking to match names or ids from a table when UNIT_AURA is called — but there's pretty much bugger all way to do it as I can see.
best alternative i can find is matching based on the icon texture path:
but obviously this is a terrible and non-workable method, nobody is gonna know what the texture path for their spell is
			best alternative i can find is matching based on the icon texture path:
- Code: Select all
- f:SetScript('OnEvent', function()
 local buffs = {}
 local aura_on
 local j = 0
 for i = 1, 16 do
 local icon = UnitBuff('player', i)
 if icon ~= nil then
 buffs[i] = icon
 j = j + 1
 end
 end
 for i = 1, j do
 local aura_on = string.find(buffs[i], table.iconpath)
 if aura_on ~= nil then
 DEFAULT_CHAT_FRAME:AddMessage'icon match'
 end
 end
 end)
but obviously this is a terrible and non-workable method, nobody is gonna know what the texture path for their spell is