WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   [Classic]HELP, Got tainted by Changing debuff grow up direction (https://www.wowinterface.com/forums/showthread.php?t=57951)

sh4dowburn 04-19-20 10:01 AM

[Classic]HELP, Got tainted by Changing debuff grow up direction
 
Hi guyz,

i move my BuffFrame to the bottom of screen and change the grow up direction(left to right then bottom to top),
the grow up direction is working fine, but it cause a tons of log and lag...

it happened while in combat, mostly in raid,
here is tainted log
Lua Code:
  1. 4/19 17:48:29.451  Interface\FrameXML\TargetFrame.lua:908 TargetofTarget_Update()
  2. 4/19 17:48:29.451  An action was blocked in combat because of taint from !buff - TargetFrameToT:Show()
  3. 4/19 17:48:29.451      Interface\FrameXML\TargetFrame.lua:910 TargetofTarget_Update()
  4. 4/19 17:48:29.451      Interface\FrameXML\TargetFrame.lua:420 TargetFrame_OnUpdate()
  5. 4/19 17:48:29.451      TargetFrame:OnUpdate()

my layout of debuff(modified from blz source code)
Lua Code:
  1. hooksecurefunc("DebuffButton_UpdateAnchors",function(buttonName, index)
  2.     local numBuffs = BUFF_ACTUAL_DISPLAY + BuffFrame.numEnchants;
  3.     local rows = ceil(numBuffs/BUFFS_PER_ROW);
  4.     --source code local rows = ceil(numBuffs/BUFFS_PER_ROW);
  5.     local buff = _G[buttonName..index];
  6.     local BUFFS_PER_ROW = 6  -- default is 10
  7.     -- Position debuffs
  8.     if ( (index > 1) and (mod(index, BUFFS_PER_ROW) == 1) ) then
  9.     --source code if ( (index > 1) and (mod(index, BUFFS_PER_ROW) == 1) ) then
  10.         -- New row
  11.         buff:SetPoint("BOTTOM", _G[buttonName..(index-BUFFS_PER_ROW)], "TOP", 0, BUFF_ROW_SPACING);  -- Grow Up
  12.         --source code buff:SetPoint("TOP", _G[buttonName..(index-BUFFS_PER_ROW)], "BOTTOM", 0, -BUFF_ROW_SPACING);
  13.     elseif ( index == 1 ) then
  14.         if ( rows < 2 ) then
  15.             DebuffButton1.offsetY = 1*((3*BUFF_ROW_SPACING)+2*BUFF_BUTTON_HEIGHT);
  16.             --source code DebuffButton1.offsetY = 1*((2*BUFF_ROW_SPACING)+BUFF_BUTTON_HEIGHT);
  17.         else
  18.             DebuffButton1.offsetY = rows*(BUFF_ROW_SPACING+BUFF_BUTTON_HEIGHT);
  19.             --source code DebuffButton1.offsetY = rows*(BUFF_ROW_SPACING+BUFF_BUTTON_HEIGHT);
  20.         end
  21.         buff:SetPoint("TOPRIGHT", BuffFrame, "BOTTOMRIGHT", -21, DebuffButton1.offsetY); --Grow Up
  22.         --source code buff:SetPoint("TOPRIGHT", BuffFrame, "BOTTOMRIGHT", 0, -DebuffButton1.offsetY);
  23.     else
  24.         buff:SetPoint("RIGHT", _G[buttonName..(index-1)], "LEFT", 65, 0);  --Left to Right
  25.         --source code buff:SetPoint("RIGHT", _G[buttonName..(index-1)], "LEFT", -5, 0);
  26.     end
  27. end)

highly appreciated if someone help out with it...BIG HUG~~~~~:p:p:p

Kanegasi 04-19-20 10:13 AM

Changing any of the global variables for the BuffFrame, such as BUFFS_PER_ROW, will cause taints.

sh4dowburn 04-19-20 10:41 AM

Quote:

Originally Posted by Kanegasi (Post 335706)
Changing any of the global variables for the BuffFrame, such as BUFFS_PER_ROW, will cause taints.

will it work if we replace BUFFS_PER_ROW to a specific value?

Kanegasi 04-19-20 11:10 AM

You should get no taints if you remove the following line:

local BUFFS_PER_ROW = 6 -- default is 10

d87 04-19-20 10:07 PM

BUFFS_PER_ROW is a local, the taint is probably because of writing to DebuffButton1.offsetY


All times are GMT -6. The time now is 02:26 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI