Quantcast WoWInterface - View Single Post - Any idea to consolidate the bolster buffs?
View Single Post
04-26-18, 09:07 AM   #8
siweia
A Flamescale Wyrmkin
 
siweia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 114
Thank you Rainrider, you wake me up.

Code:
local function preUpdateForBolster(element)
	element.bolster = 0
	element.bolsterIndex = nil
end

local function customFilterForBolster(element, _, button, name, _, _, _, _, _, _, _, _, _, spellID)
	if name and spellID == 209859 then
		element.bolster = element.bolster + 1
		if not element.bolsterIndex then
			element.bolsterIndex = button
			return true
		end
	end
end

local function postUpdateForBolster(element)
	if not element.bolsterIndex then return end
	for _, button in pairs(element) do
		if button == element.bolsterIndex then
			button.count:SetText(element.bolster)
			return
		end
	end
end

Last edited by siweia : 04-26-18 at 12:24 PM.
  Reply With Quote