BigDebuffs

BigDebuffs

20M Downloads

Add support for Threat Plates

Backupiseasy opened this issue ยท 3 comments

commented

Some people asked why BigDebuffs does not work with Threat Plates. So, I looked into your code and saw that you handle certain nameplate addons, but not Threat Plates. I fixed it for myself, not sure if it's correct, but I'll post it here. Maybe you add it to BigDebuffs. I did not create a pull request for it as I don't have the time currently.

Two changes in BigDebuffs.lua:

Add to GetNameplateAnchor:

    ThreatPlates = function(frame)
        if frame.TPFrame and frame.TPFrame.visual.healthbar and frame.TPFrame.visual.healthbar:IsShown() then
            return frame.TPFrame.visual.healthbar, frame.TPFrame
        elseif frame.TPFrame and frame.TPFrame.visual.name and frame.TPFrame.visual.name:IsShown() then
            return frame.TPFrame.visual.name, frame.TPFrame
        elseif frame.TPFrame then
            return frame.TPFrame, frame.TPFrame
        end
    end,

And

local nameplatesAnchors = {
	[1] = {
        used = function()
			return ElvUI and ElvUI[1].NamePlates and ElvUI[1].NamePlates.Initialized
		end,
        func = GetNameplateAnchor.ElvUINameplates,
    },
	[2] = {
        used = function()
			return KuiNameplates ~= nil
		end,
        func = GetNameplateAnchor.KuiNameplate,
    },
	[3] = {
        used = function()
			return Plater ~= nil
		end,
        func = GetNameplateAnchor.Plater,
    },
    [3] = {
        used = function()
            return TidyPlatesThreat ~= nil
        end,
        func = GetNameplateAnchor.ThreatPlates,
    },
	[4] = {
        used = function(frame) return frame.UnitFrame ~= nil end,
        func = GetNameplateAnchor.Blizzard,
    },
}

That should work, I think.

commented

Some people asked why BigDebuffs does not work with Threat Plates. So, I looked into your code and saw that you handle certain nameplate addons, but not Threat Plates. I fixed it for myself, not sure if it's correct, but I'll post it here. Maybe you add it to BigDebuffs. I did not create a pull request for it as I don't have the time currently.

Two changes in BigDebuffs.lua:

Add to GetNameplateAnchor:

    ThreatPlates = function(frame)
        if frame.TPFrame and frame.TPFrame.visual.healthbar and frame.TPFrame.visual.healthbar:IsShown() then
            return frame.TPFrame.visual.healthbar, frame.TPFrame
        elseif frame.TPFrame and frame.TPFrame.visual.name and frame.TPFrame.visual.name:IsShown() then
            return frame.TPFrame.visual.name, frame.TPFrame
        elseif frame.TPFrame then
            return frame.TPFrame, frame.TPFrame
        end
    end,

And

local nameplatesAnchors = {
	[1] = {
        used = function()
			return ElvUI and ElvUI[1].NamePlates and ElvUI[1].NamePlates.Initialized
		end,
        func = GetNameplateAnchor.ElvUINameplates,
    },
	[2] = {
        used = function()
			return KuiNameplates ~= nil
		end,
        func = GetNameplateAnchor.KuiNameplate,
    },
	[3] = {
        used = function()
			return Plater ~= nil
		end,
        func = GetNameplateAnchor.Plater,
    },
    [3] = {
        used = function()
            return TidyPlatesThreat ~= nil
        end,
        func = GetNameplateAnchor.ThreatPlates,
    },
	[4] = {
        used = function(frame) return frame.UnitFrame ~= nil end,
        func = GetNameplateAnchor.Blizzard,
    },
}

That should work, I think.

Thank you!! That works :D

commented

yes, please! Add support to Threat plate

commented

does it support tidyplates addon as well?

Ty