[PTR] Action[SetPoint] failed because[SetPoint would result in anchor family connection]
Causese opened this issue ยท 1 comments
Describe the bug
I just expected it to not throw an error. Anchoring itself works just fine.
Do you have an error log of what happened?
4x Action[SetPoint] failed because[SetPoint would result in anchor family connection]: attempted from: <unnamed>:SetPoint.
[C]: in function `xpcall'
...aceWeakAuras\RegionTypes\RegionPrototype.lua:212: in function <...aceWeakAuras\RegionTypes\RegionPrototype.lua:204>
...aceWeakAuras\RegionTypes\RegionPrototype.lua:231: in function `SetAnchor'
WeakAuras\WeakAuras-@[email protected]:5672: in function `AnchorFrame'
...aceWeakAuras\RegionTypes\RegionPrototype.lua:335: in function `modify'
WeakAuras\RegionTypes\Icon.lua:395: in function `modify'
WeakAuras\WeakAuras-@[email protected]:3461: in function `SetRegion'
WeakAuras\WeakAuras-@[email protected]:3495: in function <WeakAuras\WeakAuras.lua:3491>
(tail call): ?
WeakAuras\WeakAuras-@[email protected]:4817: in function <WeakAuras\WeakAuras.lua:4805>
WeakAuras\WeakAuras-@[email protected]:4907: in function `UpdatedTriggerState'
WeakAuras\GenericTrigger.lua:677: in function `ScanEventsInternal'
WeakAuras\GenericTrigger.lua:632: in function `ScanEvents'
WeakAuras\GenericTrigger.lua:721: in function <WeakAuras\GenericTrigger.lua:712>
To Reproduce
- Import: https://wago.io/P1h-c2a6L
- reveal an enemy nameplate
Did you try having WeakAuras as the only enabled addon and everything else (especially something like ElvUI) disabled?
yes
Which version of WeakAuras are you using?
master but seems to happen on any version
Additional context
recent ptr patch might've caused it
The method which is encountering an error is this:
local function UpdatePosition(self)
if (not self.anchorPoint or not self.relativeTo or not self.relativePoint) then
return;
end
local xOffset = self.xOffset + (self.xOffsetAnim or 0);
local yOffset = self.yOffset + (self.yOffsetAnim or 0);
xpcall(self.SetPoint, geterrorhandler(), self, self.anchorPoint, self.relativeTo, self.relativePoint, xOffset, yOffset);
end
Since you wrote this code:
function()
if aura_env.state and aura_env.state.PassUnit then
local region = aura_env.region
local plate = C_NamePlate.GetNamePlateForUnit(aura_env.state.PassUnit)
if plate then
region:ClearAllPoints()
region:SetPoint("BOTTOM", plate, "TOP", 0, 0)
region:Show()
else
region:Hide()
end
end
end
The actual attachment point is not what WeakAuras expects, and since you did not notify WeakAuras of this via SetAnchor, you are seeing an error message.
In the future, use SetAnchor as has been recommended to you previously.