Skip to content

Commit

Permalink
fix overrides 0 showing up when eval mod fails (#8306)
Browse files Browse the repository at this point in the history
  • Loading branch information
Regisle authored Sep 20, 2024
1 parent 9341aa0 commit f91ce7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Classes/ModDB.lua
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,9 @@ function ModDBClass:TabulateInternal(context, result, modType, cfg, flags, keywo
if (mod.type == modType or not modType) and band(flags, mod.flags) == mod.flags and MatchKeywordFlags(keywordFlags, mod.keywordFlags) and (not source or mod.source:match("[^:]+") == source) then
local value
if mod[1] then
value = context:EvalMod(mod, cfg) or 0
value = context:EvalMod(mod, cfg)
if mod[1].globalLimit and mod[1].globalLimitKey then
value = value or 0
globalLimits[mod[1].globalLimitKey] = globalLimits[mod[1].globalLimitKey] or 0
if globalLimits[mod[1].globalLimitKey] + value > mod[1].globalLimit then
value = mod[1].globalLimit - globalLimits[mod[1].globalLimitKey]
Expand Down

0 comments on commit f91ce7b

Please sign in to comment.