Skip to content

Commit 33db9c7

Browse files
committed
Check nested mods when type is "LIST" and use ReplaceMod for GrantReserved(Life/Mana)AsAura
1 parent dbd3ba0 commit 33db9c7

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/Classes/ModDB.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ function ModDBClass:ReplaceModInternal(mod)
4545
local modIndex = -1
4646
for i = 1, #modList do
4747
local curMod = modList[i]
48-
if mod.name == curMod.name and mod.type == curMod.type and mod.flags == curMod.flags and mod.keywordFlags == curMod.keywordFlags and mod.source == curMod.source and not curMod.replaced then
48+
if mod.type ~= "LIST" and mod.name == curMod.name and mod.type == curMod.type and mod.flags == curMod.flags and mod.keywordFlags == curMod.keywordFlags and mod.source == curMod.source and not curMod.replaced
49+
or mod.type == "LIST" and mod.value.mod.name == curMod.value.mod.name and mod.value.mod.type == curMod.value.mod.type and mod.value.mod.flags == curMod.value.mod.flags and mod.value.mod.keywordFlags == curMod.value.mod.keywordFlags and mod.value.mod.source == curMod.value.mod.source and not curMod.replaced then
4950
modIndex = i
5051
mod.replaced = true
5152
break;

src/Modules/CalcPerform.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ function doActorLifeManaReservation(actor)
534534
for _, value in ipairs(modDB:List(nil, "GrantReserved"..pool.."AsAura")) do
535535
local auraMod = copyTable(value.mod)
536536
auraMod.value = m_floor(auraMod.value * m_min(reserved, max))
537-
modDB:NewMod("ExtraAura", "LIST", { mod = auraMod })
537+
modDB:ReplaceMod("ExtraAura", "LIST", { mod = auraMod })
538538
end
539539
end
540540
end

0 commit comments

Comments
 (0)