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

Request: Buff White- and Blacklist - and example for priests #43

Open
GPIforGit opened this issue Nov 2, 2019 · 0 comments
Open

Request: Buff White- and Blacklist - and example for priests #43

GPIforGit opened this issue Nov 2, 2019 · 0 comments

Comments

@GPIforGit
Copy link

I play a priest, in raid I want to see every
Power Word: Fortitude / Prayer of Fortitude
Divine Spirit / Prayer of Spirit
Shadow Protection / Prayer of Shadow Protection
not only the ones, I had casted. But when in combat, i never need this information
Because only one Priest can cast "renew" and powerword: shild on one player, I want always see all of them.

I modified the code a litte bit:
I added at the beginning of BigDebuffs.lua this code:

local MyAllwaysShowOutCombat={1243,1244,1245,2791,10937,10938, 21562,21564, --Power Word: Fortitude / Prayer of Fortitude
	14752,14818,14819,27841, 27681, -- Divine Spirit / Prayer of Spirit
	976,10957,10958, 27683,-- Shadow Protection / Prayer of Shadow Protection
	}
local MyNeverShowCombat={1243,1244,1245,2791,10937,10938, 21562,21564, --Power Word: Fortitude / Prayer of Fortitude
	14752,14818,14819,27841, 27681, -- Divine Spirit / Prayer of Spirit
	976,10957,10958, 27683,-- Shadow Protection / Prayer of Shadow Protection
	}
local MyAllwaysShow={
	139,6074,6075,6076,6077,6078,10927,10928,10929,25315, --renew
	17,592,600,3747,6065,6066,10898,10899,10900,10901, -- powerword: shild
	}
	
	
local function MyCompactUnitFrame_UtilShouldDisplayBuff(unit, index, filter)
-- copied from CompactUnitFrame.lua from blizzard
	local name, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, _, spellId, canApplyAura = UnitBuff(unit, index, filter);
--new
	if UnitAffectingCombat("player") then
		if tContains(MyNeverShowCombat,spellId) then
			return false
		end
		if tContains(MyAllwaysShow,spellId) then
			return true
		end
	else 
		if tContains(MyAllwaysShowOutCombat,spellId) or tContains(MyAllwaysShow,spellId) then
			return true
		end
	end
--endnew		
	
	local hasCustom, alwaysShowMine, showForMySpec = SpellGetVisibilityInfo(spellId, UnitAffectingCombat("player") and "RAID_INCOMBAT" or "RAID_OUTOFCOMBAT");

	if ( hasCustom ) then
		return showForMySpec or (alwaysShowMine and (unitCaster == "player" or unitCaster == "pet" or unitCaster == "vehicle"));
	else
		return (unitCaster == "player" or unitCaster == "pet" or unitCaster == "vehicle") and canApplyAura and not SpellIsSelfBuff(spellId);
	end
end

And replace the two CompactUnitFrame_UtilShouldDisplayBuff in BigDebuffs.lua with MyCompactUnitFrame_UtilShouldDisplayBuff

of course for other classes (mages, druids) need other buffs, this is only a "hotfix" for the priest-class

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

1 participant