Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Classes/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,7 @@ function ItemClass:BuildModList()
end
end
for _, mod in ipairs(modLine.modList) do
mod = modLib.setSource(mod, self.modSource)
mod = modLib.withSource(mod, self.modSource)
baseList:AddMod(mod)
end
if modLine.modTags and #modLine.modTags > 0 then
Expand Down
12 changes: 7 additions & 5 deletions src/Classes/ModStore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ local ModStoreClass = newClass("ModStore", function(self, parent)
self.actor = parent and parent.actor or { }
self.multipliers = { }
self.conditions = { }
-- ModDB/ModList instances participate in actor/parent graphs and are not plain copyTable() targets.
graphNodeTag(self, self._className or "ModStore")
end)

function ModStoreClass:ScaleAddMod(mod, scale, replace)
Expand All @@ -45,7 +47,7 @@ function ModStoreClass:ScaleAddMod(mod, scale, replace)
if scale == 1 or unscalable then
self:AddMod(mod)
else
local scaledMod = copyTable(mod)
local scaledMod = type(mod.value) == "table" and copyTableSafe(mod, false) or copyTable(mod)
local subMod = scaledMod
if type(scaledMod.value) == "table" then
if scaledMod.value.mod then
Expand Down Expand Up @@ -367,7 +369,7 @@ function ModStoreClass:EvalMod(mod, cfg, globalLimits)
mult = 1 / mult
end
if type(value) == "table" then
value = copyTable(value)
value = copyTableSafe(value, false)
if value.mod then
value.mod.value = value.mod.value * mult + (tag.base or 0)
if limitTotal then
Expand Down Expand Up @@ -453,7 +455,7 @@ function ModStoreClass:EvalMod(mod, cfg, globalLimits)
end
end
if type(value) == "table" then
value = copyTable(value)
value = copyTableSafe(value, false)
if value.mod then
value.mod.value = value.mod.value * mult + (tag.base or 0)
if limitTotal then
Expand Down Expand Up @@ -502,7 +504,7 @@ function ModStoreClass:EvalMod(mod, cfg, globalLimits)
end
end
if type(value) == "table" then
value = copyTable(value)
value = copyTableSafe(value, false)
if value.mod then
value.mod.value = m_ceil(value.mod.value * mult + (tag.base or 0))
if limitTotal then
Expand Down Expand Up @@ -901,4 +903,4 @@ function ModStoreClass:EvalMod(mod, cfg, globalLimits)
end
end
return value
end
end
2 changes: 1 addition & 1 deletion src/Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,7 @@ function PassiveSpecClass:NodeAdditionOrReplacementFromString(node,sd,replacemen
for _, mod in pairs(addition.mods) do
if mod.list and not mod.extra then
for i, mod in ipairs(mod.list) do
mod = modLib.setSource(mod, "Tree:"..node.id)
mod = modLib.withSource(mod, "Tree:"..node.id)
addition.modList:AddMod(mod)
end
end
Expand Down
2 changes: 1 addition & 1 deletion src/Classes/PassiveTree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ function PassiveTreeClass:ProcessStats(node, startIndex)
local mod = node.mods[i]
if mod.list and not mod.extra then
for i, mod in ipairs(mod.list) do
mod = modLib.setSource(mod, "Tree:"..node.id)
mod = modLib.withSource(mod, "Tree:"..node.id)
node.modList:AddMod(mod)
end
end
Expand Down
6 changes: 3 additions & 3 deletions src/Data/Skills/sup_str.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,8 @@ skills["AvengingFlame"] = {
castTime = 1,
preDamageFunc = function(activeSkill, output)
local uuid = activeSkill.skillData.triggerSourceUUID
local cache = uuid and (GlobalCache.cachedData["MAIN"][uuid] or GlobalCache.cachedData["CALCS"][uuid])
local totemLife = cache and cache.Env.player.output.TotemLife or 0
local cache = uuid and (getGlobalCacheTable("MAIN")[uuid] or getGlobalCacheTable("CALCS")[uuid])
local totemLife = cache and cache.Output.TotemLife or 0

local add = totemLife * activeSkill.skillData.lifeDealtAsFire / 100
activeSkill.skillData.FireMax = (activeSkill.skillData.FireMax or 0) + add
Expand Down Expand Up @@ -5575,4 +5575,4 @@ skills["SupportExpertRetaliation"] = {
[39] = { 107, 53, levelRequirement = 99, manaMultiplier = 30, statInterpolation = { 1, 1, }, },
[40] = { 108, 54, levelRequirement = 100, manaMultiplier = 30, statInterpolation = { 1, 1, }, },
},
}
}
6 changes: 3 additions & 3 deletions src/Export/Skills/sup_str.txt
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ local skills, mod, flag, skill = ...
#skill AvengingFlame
preDamageFunc = function(activeSkill, output)
local uuid = activeSkill.skillData.triggerSourceUUID
local cache = uuid and (GlobalCache.cachedData["MAIN"][uuid] or GlobalCache.cachedData["CALCS"][uuid])
local totemLife = cache and cache.Env.player.output.TotemLife or 0
local cache = uuid and (getGlobalCacheTable("MAIN")[uuid] or getGlobalCacheTable("CALCS")[uuid])
local totemLife = cache and cache.Output.TotemLife or 0

local add = totemLife * activeSkill.skillData.lifeDealtAsFire / 100
activeSkill.skillData.FireMax = (activeSkill.skillData.FireMax or 0) + add
Expand Down Expand Up @@ -796,4 +796,4 @@ local skills, mod, flag, skill = ...
mod("CooldownRecovery", "MORE", nil),
},
},
#mods
#mods
Loading
Loading