Skip to content

Commit 8836b1d

Browse files
LocalIdentityLocalIdentity
andauthored
Add source for Spectre Aura skills in breakdown (#9313)
Adds the source column to the buffs and debuffs breakdown so its easier to see where the buffs / debuffs are coming from Also changes the buffs / debuffs applied by spectres to show the spectre name in the source name column Co-authored-by: LocalIdentity <[email protected]>
1 parent df04f47 commit 8836b1d

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

src/Classes/CalcBreakdownControl.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,10 @@ function CalcBreakdownClass:AddModSection(sectionData, modList)
380380
-- Multiple stat names specified, add this modifier's stat to the table
381381
row.name = self:FormatModName(row.mod.name)
382382
end
383-
local sourceType = row.mod.source:match("[^:]+")
383+
local sourceType = row.mod.source:match("[^:]+") or ""
384+
row.source = sourceType
384385
if not modList and not sectionData.modSource then
385386
-- No modifier source specified, add the source type to the table
386-
row.source = sourceType
387387
row.sourceTooltip = function(tooltip)
388388
tooltip:AddLine(16, "Total from "..sourceType..":")
389389
for _, line in ipairs(sourceTotals[sourceType]) do

src/Modules/CalcPerform.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,6 +2526,19 @@ function calcs.perform(env, skipEHP)
25262526
if activeSkill.minion and activeSkill.minion.activeSkillList then
25272527
local castingMinion = activeSkill.minion
25282528
for _, activeMinionSkill in ipairs(activeSkill.minion.activeSkillList) do
2529+
local function setSpectreSource(modList, sourceSkill)
2530+
if activeSkill.skillFlags.spectre then
2531+
local source = "Spectre:"
2532+
if sourceSkill then
2533+
source = source..sourceSkill.." - "..castingMinion.minionData.name
2534+
else
2535+
source = source..castingMinion.minionData.name
2536+
end
2537+
for i = 1, #modList do
2538+
modList[i].source = source
2539+
end
2540+
end
2541+
end
25292542
local skillModList = activeMinionSkill.skillModList
25302543
local skillCfg = activeMinionSkill.skillCfg
25312544
for _, buff in ipairs(activeMinionSkill.buffList) do
@@ -2603,6 +2616,7 @@ function calcs.perform(env, skipEHP)
26032616
local srcList = new("ModList")
26042617
srcList:ScaleAddList(buff.modList, mult)
26052618
srcList:ScaleAddList(extraAuraModList, mult)
2619+
setSpectreSource(srcList, buff.name)
26062620
mergeBuff(srcList, buffs, buff.name)
26072621
end
26082622
end
@@ -2617,6 +2631,7 @@ function calcs.perform(env, skipEHP)
26172631
local srcList = new("ModList")
26182632
srcList:ScaleAddList(buff.modList, mult)
26192633
srcList:ScaleAddList(extraAuraModList, mult)
2634+
setSpectreSource(srcList, buff.name)
26202635
mergeBuff(srcList, minionBuffs, buff.name)
26212636
end
26222637
end
@@ -2626,6 +2641,7 @@ function calcs.perform(env, skipEHP)
26262641
local newModList = new("ModList")
26272642
newModList:AddList(buff.modList)
26282643
newModList:AddList(extraAuraModList)
2644+
setSpectreSource(newModList, buff.name)
26292645
if buffExports["Aura"][buff.name] then
26302646
buffExports["Aura"][buff.name.."_Debuff"] = buffExports["Aura"][buff.name]
26312647
end
@@ -2658,6 +2674,7 @@ function calcs.perform(env, skipEHP)
26582674
end
26592675
end
26602676
end
2677+
setSpectreSource(srcList)
26612678
mergeBuff(srcList, buffs, "Totem "..buff.name)
26622679
end
26632680
end

0 commit comments

Comments
 (0)