Skip to content

Commit

Permalink
formatBuffs: don't add a line if unit isn't player and player has the…
Browse files Browse the repository at this point in the history
… buff
  • Loading branch information
mrbuds committed Aug 11, 2024
1 parent 01d69a2 commit b6cdc3f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,10 @@ local function formatBuffs(input, type, unit)
local output = "";
local cacheSpellName = {}
for _, spellId in pairs(sorted) do
if not specDB.SpellsWithPvpTalent[spellId] and not bannedAuras[spellId] then
if not specDB.SpellsWithPvpTalent[spellId]
and not bannedAuras[spellId]
and not (unit ~= "player" and specDB.playerBuffs[spellId])
then
local withTalent = "";
local spellName = GetSpellInfo(spellId)
if specDB.spellIDIsHero[spellId] then
Expand All @@ -559,7 +562,6 @@ local function formatBuffs(input, type, unit)
elseif specDB.spellNameToTalentId[spellName] then
withTalent = (", talent = %d"):format(specDB.spellNameToTalentId[spellName])
end
local spellName = GetSpellInfo(spellId)
if not cacheSpellName[spellName] then
output = output .. " { spell = " .. spellId .. ", type = \"" .. type .. "\", unit = \"" .. unit .. "\"" .. withTalent .. " }, -- " .. spellName .. "\n";
cacheSpellName[spellName] = true
Expand Down

0 comments on commit b6cdc3f

Please sign in to comment.