Skip to content

Commit b6cdc3f

Browse files
committed
formatBuffs: don't add a line if unit isn't player and player has the buff
1 parent 01d69a2 commit b6cdc3f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,10 @@ local function formatBuffs(input, type, unit)
547547
local output = "";
548548
local cacheSpellName = {}
549549
for _, spellId in pairs(sorted) do
550-
if not specDB.SpellsWithPvpTalent[spellId] and not bannedAuras[spellId] then
550+
if not specDB.SpellsWithPvpTalent[spellId]
551+
and not bannedAuras[spellId]
552+
and not (unit ~= "player" and specDB.playerBuffs[spellId])
553+
then
551554
local withTalent = "";
552555
local spellName = GetSpellInfo(spellId)
553556
if specDB.spellIDIsHero[spellId] then
@@ -559,7 +562,6 @@ local function formatBuffs(input, type, unit)
559562
elseif specDB.spellNameToTalentId[spellName] then
560563
withTalent = (", talent = %d"):format(specDB.spellNameToTalentId[spellName])
561564
end
562-
local spellName = GetSpellInfo(spellId)
563565
if not cacheSpellName[spellName] then
564566
output = output .. " { spell = " .. spellId .. ", type = \"" .. type .. "\", unit = \"" .. unit .. "\"" .. withTalent .. " }, -- " .. spellName .. "\n";
565567
cacheSpellName[spellName] = true

0 commit comments

Comments
 (0)