Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buff spacing #5

Closed
rakkarage opened this issue Apr 11, 2017 · 3 comments
Closed

buff spacing #5

rakkarage opened this issue Apr 11, 2017 · 3 comments

Comments

@rakkarage
Copy link

rakkarage commented Apr 11, 2017

2017-04-11

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;


@Grimsbain
Copy link
Owner

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.

@rakkarage
Copy link
Author

rakkarage commented Apr 12, 2017

the taint comes from friendly plate in instance
the easiest way to test this is to go to your garrison because it counts as instance in this case
target a friendly npc in garrison and get a taint error dialog?
as far as I can tell... but I hope it does work :) it should
thanks

@rakkarage
Copy link
Author

rakkarage commented Apr 13, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants