View Single Post
08-22-17, 04:57 PM   #1
Dasteman
A Murloc Raider
 
Dasteman's Avatar
Join Date: Feb 2017
Posts: 8
Question Moving "DebuffButton1" separately from BuffFrame

Hi,

Got this script and I have some issue with it. I have the second script to move Buffs only and this one to move Debuffs only. The script itself works but it is giving me a lot of errors in PVP fights.
Do you know guys how to fix it?
Lua Code:
  1. hooksecurefunc("AuraButton_Update", function(buttonName, index, filter)
  2.  local buffName = buttonName .. index
  3.  if "DebuffButton1" ~= buffName then return end
  4.  local buff = _G[buffName]
  5.  if nil == buff or buff.moved then return end
  6.  buff:ClearAllPoints()
  7.  buff:SetPoint("TOP", PlayerFrame, "BOTTOM", 98, -10)
  8.  buff.SetPoint = function() end
  9.  buff.moved = true
  10.  end)


Lua Code:
  1. 5x [ADDON_ACTION_BLOCKED] AddOn 'Scripts' tried to call the protected function 'ArenaEnemyFrames:ClearAllPoints()'.
  2. !BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
  3. [C]: in function `ClearAllPoints'
  4. FrameXML\UIParent.lua:2854: in function `UIParentManageFramePositions'
  5. FrameXML\UIParent.lua:2142: in function <FrameXML\UIParent.lua:2129>
  6. [C]: in function `SetAttribute'
  7. FrameXML\UIParent.lua:2892: in function `UIParent_ManageFramePositions'
  8. FrameXML\BuffFrame.lua:331: in function `BuffFrame_UpdateAllBuffAnchors'
  9. FrameXML\BuffFrame.lua:104: in function `BuffFrame_Update'
  10. FrameXML\BuffFrame.lua:49: in function <FrameXML\BuffFrame.lua:45>
  11.  
  12. Locals:
  Reply With Quote