Skip to content

Commit fdf97f9

Browse files
committed
fix formatBuffs for herotalent
1 parent 862e3a2 commit fdf97f9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

main.lua

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -548,13 +548,15 @@ local function formatBuffs(input, type, unit)
548548
for _, spellId in pairs(sorted) do
549549
if not specDB.SpellsWithPvpTalent[spellId] and not bannedAuras[spellId] then
550550
local withTalent = "";
551-
if (specDB.spellIdToTalentId[spellId]) then
551+
local spellName = GetSpellInfo(spellId)
552+
if specDB.spellIDIsHero[spellId] then
553+
withTalent = (", herotalent = %d"):format(specDB.spellIdToTalentId[spellId])
554+
elseif specDB.spellNameIsHero[spellName] then
555+
withTalent = (", herotalent = %d"):format(specDB.spellNameToTalentId[spellName])
556+
elseif specDB.spellIdToTalentId[spellId] then
552557
withTalent = (", talent = %d"):format(specDB.spellIdToTalentId[spellId])
553-
else
554-
local spellName = GetSpellInfo(spellId)
555-
if specDB.spellNameToTalentId[spellName] then
556-
withTalent = (", talent = %d"):format(specDB.spellNameToTalentId[spellName])
557-
end
558+
elseif specDB.spellNameToTalentId[spellName] then
559+
withTalent = (", talent = %d"):format(specDB.spellNameToTalentId[spellName])
558560
end
559561
local spellName = GetSpellInfo(spellId)
560562
if not cacheSpellName[spellName] then

0 commit comments

Comments
 (0)