Quantcast rBuffFrame SetPoint error - WoWInterface
Thread Tools Display Modes
07-06-19, 10:53 PM   #1
superfula
A Deviate Faerie Dragon
Join Date: Mar 2006
Posts: 14
rBuffFrame SetPoint error

This seems to be a common error since 8.2 and unfortunately Zork has been away so I'm not sure if the addons will be updated. I'm a bit of a novice still when it comes to lua but from what I've read, adding ClearAllPoints() prior to any SetPoint lines may fix the issue. Well in this case the error below is still popping. Any help would be appreciated.

The error specifically references the debuff button but I'm not entirely sure if that's where the offending code is. Posted below just in case.

Code:
FrameXML\BuffFrame.lua:354: Action[SetPoint] failed because[SetPoint would result in anchor family connection]: attempted from: DebuffButton1:SetPoint.
[C]: in function `SetPoint'
FrameXML\BuffFrame.lua:354: in function <FrameXML\BuffFrame.lua:338>
[C]: ?
[C]: in function `DebuffButton_UpdateAnchors'
FrameXML\BuffFrame.lua:152: in function `AuraButton_Update'
FrameXML\BuffFrame.lua:100: in function `BuffFrame_Update'
FrameXML\BuffFrame.lua:50: in function <FrameXML\BuffFrame.lua:46>

Locals:
(*temporary) = DebuffButton1 {
 0 = <userdata>
 timeMod = 1
 symbol = <unnamed> {
 }
 parent = BuffFrame {
 }
 duration = DebuffButton1Duration {
 }
 expirationTime = 998515.116000
 unit = "player"
 __normalTextureFile = "interface\addons\rButtonTemplate_Lyn\media\border"
 count = DebuffButton1Count {
 }
 filter = "HARMFUL"
 __styled = true
 offsetY = 60
 timeLeft = 241.652000
 SetNormalTexture = <function> defined =[C]:-1
}
(*temporary) = "TOPRIGHT"
(*temporary) = BuffFrame {
 0 = <userdata>
 numEnchants = 0
 BuffFrameFlashState = 1
 BuffFrameFlashTime = 0.258998
 BuffFrameUpdateTime = 0.007992
 BuffAlphaValue = 0.758269
 bottomEdgeExtent = 13
}
(*temporary) = "BOTTOMRIGHT"
(*temporary) = 0
(*temporary) = -60
And the debuff button section of rBuffFrame

Code:
function rBuffFrame:CreateDebuffFrame(addonName,cfg)
  cfg.frameName = addonName.."DebuffFrame"
  cfg.frameParent = cfg.frameParent or UIParent
  cfg.frameTemplate = nil
  --create new parent frame for buttons
  local frame = CreateFrame("Frame", cfg.frameName, cfg.frameParent, cfg.frameTemplate)
  --Added fix for 8.2
  frame:ClearAllPoints()
  frame:SetPoint(unpack(cfg.framePoint))
  frame:SetScale(cfg.frameScale)
  local function UpdateAllDebuffAnchors(buttonName, index)
    --add all other debuff buttons
    local buttonList = GetButtonList("DebuffButton",DEBUFF_MAX_DISPLAY)
    --adjust frame by button list
    SetupButtonFrame(frame, cfg.framePadding, buttonList, cfg.buttonWidth, cfg.buttonHeight, cfg.buttonMargin, cfg.numCols, cfg.startPoint)
  end
  hooksecurefunc("DebuffButton_UpdateAnchors", UpdateAllDebuffAnchors)
  --add drag functions
  local relativeToName, _, relativeTo  = nil, unpack(cfg.framePoint)
  if type(relativeTo) == "table" then
    relativeToName = relativeTo:GetName()
  elseif type(relativeTo) == "string" and _G[relativeTo] then
    relativeToName = relativeTo
  end
  if relativeToName ~= addonName.."BuffFrame" then
    rLib:CreateDragFrame(frame, L.dragFrames, -2, true)
  end
  return frame
end

Last edited by superfula : 07-07-19 at 06:19 PM.
  Reply With Quote
07-06-19, 10:55 PM   #2
superfula
A Deviate Faerie Dragon
Join Date: Mar 2006
Posts: 14
And just in case, this is the layout for rBuffFrame that I am using.


Code:
-----------------------------
-- Variables
-----------------------------

local A, L = ...

-----------------------------
-- buffFrameConfig
-----------------------------

local buffFrameConfig = {
  --framePoint      = { "TOPRIGHT", Minimap, "TOPLEFT", -15, -22 },
  framePoint      = { "TOPRIGHT", Minimap, "TOPLEFT", -20, -27 },
  frameScale      = 1,
  framePadding    = 4,
  buttonWidth     = 32,
  buttonHeight    = 32,
  buttonMargin    = 8,
  numCols         = 18,
  startPoint      = "TOPRIGHT",
}
--create
local buffFrame = rBuffFrame:CreateBuffFrame(A, buffFrameConfig)

-----------------------------
-- debuffFrameConfig
-----------------------------

local debuffFrameConfig = {
  framePoint      = { "TOPRIGHT", buffFrame, "BOTTOMRIGHT", 0, -5 },
  frameScale      = 1,
  framePadding    = 4,
  buttonWidth     = 64,
  buttonHeight    = 64,
  buttonMargin    = 8,
  numCols         = 8,
  startPoint      = "TOPRIGHT",
}
--create
rBuffFrame:CreateDebuffFrame(A, debuffFrameConfig)
  Reply With Quote
07-08-19, 05:32 PM   #3
moet
A Kobold Labourer
Join Date: Aug 2018
Posts: 1
I have encountered the same issue and would be amazing if anyone has a fix. Seems like a lot of addons suffer from the frame changes in 8.2 (https://wow.gamepedia.com/Patch_8.2.0/API_changes)
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » rBuffFrame SetPoint error

Thread Tools
Display Modes

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