Skip to content

Commit 726959b

Browse files
1 parent 3faef2d commit 726959b

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
@@ -381,10 +381,10 @@ function CalcBreakdownClass:AddModSection(sectionData, modList)
381381
-- Multiple stat names specified, add this modifier's stat to the table
382382
row.name = self:FormatModName(row.mod.name)
383383
end
384-
local sourceType = row.mod.source:match("[^:]+")
384+
local sourceType = row.mod.source:match("[^:]+") or ""
385+
row.source = sourceType
385386
if not modList and not sectionData.modSource then
386387
-- No modifier source specified, add the source type to the table
387-
row.source = sourceType
388388
row.sourceTooltip = function(tooltip)
389389
tooltip:AddLine(16, "Total from "..sourceType..":")
390390
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
@@ -2182,6 +2182,19 @@ function calcs.perform(env, skipEHP)
21822182
if activeSkill.minion and activeSkill.minion.activeSkillList then
21832183
local castingMinion = activeSkill.minion
21842184
for _, activeMinionSkill in ipairs(activeSkill.minion.activeSkillList) do
2185+
local function setSpectreSource(modList, sourceSkill)
2186+
if activeSkill.skillFlags.spectre then
2187+
local source = "Spectre:"
2188+
if sourceSkill then
2189+
source = source..sourceSkill.." - "..castingMinion.minionData.name
2190+
else
2191+
source = source..castingMinion.minionData.name
2192+
end
2193+
for i = 1, #modList do
2194+
modList[i].source = source
2195+
end
2196+
end
2197+
end
21852198
local skillModList = activeMinionSkill.skillModList
21862199
local skillCfg = activeMinionSkill.skillCfg
21872200
for _, buff in ipairs(activeMinionSkill.buffList) do
@@ -2259,6 +2272,7 @@ function calcs.perform(env, skipEHP)
22592272
local srcList = new("ModList")
22602273
srcList:ScaleAddList(buff.modList, mult)
22612274
srcList:ScaleAddList(extraAuraModList, mult)
2275+
setSpectreSource(srcList, buff.name)
22622276
mergeBuff(srcList, buffs, buff.name)
22632277
end
22642278
end
@@ -2273,6 +2287,7 @@ function calcs.perform(env, skipEHP)
22732287
local srcList = new("ModList")
22742288
srcList:ScaleAddList(buff.modList, mult)
22752289
srcList:ScaleAddList(extraAuraModList, mult)
2290+
setSpectreSource(srcList, buff.name)
22762291
mergeBuff(srcList, minionBuffs, buff.name)
22772292
end
22782293
end
@@ -2282,6 +2297,7 @@ function calcs.perform(env, skipEHP)
22822297
local newModList = new("ModList")
22832298
newModList:AddList(buff.modList)
22842299
newModList:AddList(extraAuraModList)
2300+
setSpectreSource(newModList, buff.name)
22852301
if buffExports["Aura"][buff.name] then
22862302
buffExports["Aura"][buff.name.."_Debuff"] = buffExports["Aura"][buff.name]
22872303
end
@@ -2320,6 +2336,7 @@ function calcs.perform(env, skipEHP)
23202336
end
23212337
end
23222338
end
2339+
setSpectreSource(srcList)
23232340
mergeBuff(srcList, buffs, "Totem "..buff.name)
23242341
end
23252342
end

0 commit comments

Comments
 (0)