Dry coded, untested. I am not sure what the arguments are for
TargetFrame_UpdateAuras, they could help in optimizing the code; I am also unsure as to how "
not s.maxBuffs or i<=s.maxBuffs" was intended to help, it seems a bit useless, but I left it.
Lua Code:
local _, playerClass = UnitClass("player")
if (not playerClass == "ROGUE") then return end
local spellIDs = {
49016 = true,
52610 = true,
5229 = true,
34692 = true,
19574 = true,
18499 = true
}
hooksecurefunc("TargetFrame_UpdateAuras", function(self)
for i = 1, MAX_TARGET_BUFFS do
local _, _, icon, _, debuffType, _, _, _, _, _, spellID = UnitBuiff(self.unit, i)
if (icon) and (not self.maxBuffs or i <= self.maxBuffs) and (spellIDs[spellID]) then
local stealableBorder = _G[self:GetName().."Buff"..i.."Stealable"]
if UnitIsEnemy("player", "target") and (debuffType == "Magic") then
stealableBorder:Show()
else
stealableBorder:Hide()
end
end
end
end)