Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-15-22, 02:59 AM   #1
siweia
A Flamescale Wyrmkin
 
siweia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 126
Relationship between FilterAura and button?

Before oUF 11, I use customFilter to consolidate all bolster in mythic plus.

The code is what I did before, but in oUF 11, button no longer accessable in FilterAura.

Lua Code:
  1. local function PreUpdate(element)
  2.     element.bolster = 0
  3.     element.bolsterIndex = nil
  4. end
  5.  
  6. local function CustomFilter(element, unit, button, name, _, _, _, _, _, _, _, _, spellID)
  7.     if name and spellID == 209859 then
  8.         element.bolster = element.bolster + 1
  9.         if not element.bolsterIndex then
  10.             element.bolsterIndex = button
  11.             return true
  12.         end
  13.     end
  14. end
  15.  
  16. local function PostUpdate(element)
  17.     local button = element.bolsterIndex
  18.     if button then
  19.         button.Count:SetText(element.bolster)
  20.     end
  21. end

Last edited by siweia : 11-16-22 at 12:05 AM.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Relationship between FilterAura and button?


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