Originally Posted by Xrystal
That reminds me of one of my first addons back in the old Burning Crusade days when I was mage tanking Krosh Firehand. Wrote an addon to track the shield buff on him so I could steal it rofl.
I also did one more recently ( several expansions back ) where I watched for power shield on my priest. Or something similar.
Neither addon would work now ( if I still had the code somewhere ) unfortunately but could be a good starting point.
I'll monitor the post to see if you get any joy.
|
Forgot to mention this is to work on a private server 3.3.5 Wotlk so maybe it would work?
I want it to look like this combat indicator, next to my player frame just tracking how much SnD I have left:
Originally Posted by Fizzlemizz
It's a bit of a loaded question as it's missing details (most of which probably come with WeakAuras). You could start with something like:
Lua Code:
local spellID, SnDID = 315496 -- S&D local _, _, icon = GetSpellInfo(spellID) local f = CreateFrame("Frame", "Kovexpulthul_Buff", PlayerFrame, "AuraButtonArtTemplate") f:Hide() f:SetSize(40, 40) f.Icon:SetTexture(icon) f:SetPoint("RIGHT", PlayerFrame, "LEFT", 0, 0) f:RegisterEvent("UNIT_AURA") f:SetScript("OnEvent", function(self, event, ...) local unit, auraInfo = ... local added, updated, removed, full = auraInfo.addedAuras, auraInfo.updatedAuraInstanceIDs, auraInfo.removedAuraInstanceIDs, auraInfo.isFullUpdate if added then for k, v in pairs(added) do if v.spellId == spellID then SnDID = v.auraInstanceID self:Show() break end end end if removed then for k, id in pairs(removed) do if id == SnDID then SnDID = nil self:Hide() break end end end end)
It's been a while since I looked at auras so there may well be a better way.
|
It doesn't seem to work. I changed spellID to correct one (6774, because I forgot to mention this is to work on private server on 3.3.5 patch) and it doesn't work, doesn't show anything