Skip to content

Commit b3bcaf4

Browse files
author
LocalIdentity
committed
Make duplicate global buffs not apply
Fixes exposure from Oil Barrage applying 3 times
1 parent be9142c commit b3bcaf4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/Modules/CalcActiveSkill.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ function calcs.mergeSkillInstanceMods(env, modList, skillEffect, statSet, extraS
8686
return
8787
end
8888
local grantedEffect = skillEffect.grantedEffect
89+
local selectedGlobalStats = { }
8990
local function mergeStatSet(set, onlyGlobals)
9091
local stats = calcLib.buildSkillInstanceStats(skillEffect, grantedEffect, set)
9192
if extraStats and extraStats[1] then
@@ -98,7 +99,11 @@ function calcs.mergeSkillInstanceMods(env, modList, skillEffect, statSet, extraS
9899
if map then
99100
-- Some mods need different scalars for different stats, but the same value. Putting them in a group allows this
100101
for _, modOrGroup in ipairs(map) do
101-
if not onlyGlobals or isGlobalEffect(modOrGroup) then
102+
local isGlobal = isGlobalEffect(modOrGroup)
103+
if isGlobal and not onlyGlobals then
104+
selectedGlobalStats[stat] = true
105+
end
106+
if (not onlyGlobals or isGlobal) and not (onlyGlobals and selectedGlobalStats[stat]) then
102107
local scalar = checkForScalarMultiplier(modOrGroup, modList)
103108
-- Found a mod, since all mods have names
104109
if modOrGroup.name then

0 commit comments

Comments
 (0)