buff spacing
rakkarage opened this issue ยท 3 comments
EDIT: actually I guess this does cause same error sorry argh
but now that friendly not being modified the self buffs are wonky again... spaced so far away from bar
that part is changeable, i made a small addon to remove that space
it just changes baseYOffset and does not taint
perhaps you could add something similar?
edit: and maybe adjust or add option for z/layer/strata of player bar too if possible? i guess not
thanks!
-- http://www.mmo-champion.com/threads/2003404-Question-about-the-Legion-center-screen-HP-resource-bar
-- small name font
local frame = CreateFrame("FRAME", "RagePlateFrame");
frame:RegisterEvent("PLAYER_ENTERING_WORLD");
local function eventHandler(self, event, ...)
DefaultCompactNamePlateFrameSetUpOptions.useLargeNameFont = false;
end
frame:SetScript("OnEvent", eventHandler);
-- position buffs & debuffs
local function fn(...)
for _,v in pairs(C_NamePlate.GetNamePlates()) do
local bf = v.UnitFrame.BuffFrame;
bf.baseYOffset = 0;
bf:UpdateAnchor();
end
-- for _,v in pairs(C_NamePlate.GetNamePlateForUnit("target")) do
-- local df = v.TargetFrame.BuffFrame;
-- df.baseYOffset = 0;
-- df:UpdateAnchor();
-- end
end
NamePlateDriverFrame:HookScript("OnEvent", fn);
-- show debuffs
-- local gn = UnitAura;
-- local function fn(...)
-- local a = {gn(...)};
-- a[15] = a[6] ~= nil and abs(a[6] - 31) < 31;
-- return unpack(a);
-- end
-- UnitAura=fn;
--/run local b={196608,126896};local gn=UnitAura;local function fn(...)local a={gn(...)};a[15]=a[6]~=nil and not tContains(b,a[11])and abs(a[6]-31)<31;return unpack(a);end UnitAura=fn;
When was it causing an error for you? I added
-- Buff Frame Offsets
local function UpdateBuffFrame(...)
for _,v in pairs(C_NamePlate.GetNamePlates()) do
local bf = v.UnitFrame.BuffFrame;
if ( v.UnitFrame.displayedUnit and UnitShouldDisplayName(v.UnitFrame.displayedUnit) ) then
bf.baseYOffset = v.UnitFrame.name:GetHeight()+1;
elseif ( v.UnitFrame.displayedUnit ) then
bf.baseYOffset = 0;
end
bf:UpdateAnchor();
end
end
NamePlateDriverFrame:HookScript("OnEvent", UpdateBuffFrame);
To the end my core.lua. And it seems to be working well so far but I haven't done any real group content with it like that.
seems to work in new version but how did you do it without taint? idk. thanks
edit: works in garrison but sometimes seems to taint in raid will try to replicate without other addons eventually