Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-21-21, 08:43 PM   #1
Hzereve
A Defias Bandit
Join Date: Jan 2021
Posts: 2
Filter on nameplates debuffs.

Hello there !

I'm a long time user of the Blizzard nameplates and i know this can be done by just getting Plater or whatever.

I'm currently working on a small addon who will allow me to show all my debuffs over the ennemy nameplates. Today, with the help of Tomcat (twitch.tv/TomCat), he explained me a lot about it and deep dived for me in the nameplates features.

Right now, the code is looking like this :

Lua Code:
  1. local function UpdateBuffs(self, unit, filter, showAll)
  2.     if (not showAll) then
  3.         self:UpdateBuffs(unit, filter, true)
  4.     end
  5. end
  6.  
  7. local updateFrame = CreateFrame("FRAME")
  8.  
  9. local tracker = { }
  10.  
  11. local minDelay = 1.0
  12. local totalElapsed = 0
  13.  
  14. local function OnUpdate(self, elapsed)
  15.     totalElapsed = totalElapsed + elapsed
  16.     if (totalElapsed > minDelay) then
  17.         totalElapsed = 0
  18.         for i = 1, 20 do
  19.             if (not tracker[i]) then
  20.                 local nameplate = _G["NamePlate" .. i]
  21.                 if (nameplate and nameplate.UnitFrame and nameplate.UnitFrame.BuffFrame) then
  22.                     tracker[i] = true
  23.                     hooksecurefunc(nameplate.UnitFrame.BuffFrame, "UpdateBuffs", UpdateBuffs)
  24.                 end
  25.             end
  26.         end
  27.     end
  28. end
  29.  
  30. updateFrame:SetScript("OnUpdate", OnUpdate)

What is does : showing all the debuffs over the nameplates, including your friends warrior debuffs for example.

What i want in the final : showing all my debuffs and only mine, and if it includes also my pet mortal wounds, better but i guess, harder to do.

For this problem, i found many ask how to do that, some solutions who seems to not work nowadays like :

https://www.mmo-champion.com/threads...-BuffContainer

Here are 2 solutions, the first one isnt working and my understanding in lua is not enough to fix it on my own. And the second one who is a whitelisting but removing everything else and also, doesn't work with some things like Sinful Revelation.

The goal is to show like a concussive shots like a debuff over the nameplates. This will help many PvPer who dont wanna jump in a full nameplates addon.

If you have any suggestions, any time to help me, i will be super grateful.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Filter on nameplates debuffs.


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