Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-17-22, 06:48 AM   #1
xdka
A Kobold Labourer
Join Date: Dec 2022
Posts: 1
(lua) Reduce target debuff max row size

Hello everyone,

I'm currently trying to learn .lua and to mess with my interface but I'm currently blocked with what I want to achieve.

Long story short, I updated the target debuff size with the following code :

Code:
hooksecurefunc("TargetFrame_UpdateDebuffAnchor", function(_, debuff)
    debuff:SetSize(28, 28)
end)
It's working but unfortunately, because of the debuff size, it overlaps on my target frame since too many debuffs are displayed (5). BUT, this issue doesn't appear when my target has an active Target of Target (ToT) because only 4 debuffs are being displayed.

I checked the following resource : tomrus88/BlizzardInterfaceCode

I noticed two things :
  1. two local variables manage the width of rows:
    • local AURA_ROW_WIDTH = 122;
    • local TOT_AURA_ROW_WIDTH = 101;
  2. inside the UpdateAuraFrame there is the following comparison:
    • Code:
      local -- update debuff positions
      maxRowWidth = (haveTargetofTarget and self.auraRows < NUM_TOT_AURA_ROWS and self.TOT_AURA_ROW_WIDTH) or AURA_ROW_WIDTH

My guess is that I need to either:
  1. update the AURA_ROW_WIDTH to be the same size as TOT_AURA_ROW_WIDTH (101)
  2. set haveTargetofTarget to true

Unfortunately, I don't know if this is the right approach or if it's possible to achieve this with hooksecurefunc (ie: by hooking the UpdateAuras function)

If you have any idea or any ways of achieving this, I would be amazing !

Thanks a lot and have a nice week-end
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » (lua) Reduce target debuff max row size


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