Skip to content

Commit

Permalink
Fix test (current dps + exception on missing source of triggered skills)
Browse files Browse the repository at this point in the history
  • Loading branch information
Musholic committed Apr 22, 2024
1 parent ea7ecec commit b0e353e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/System/TestBuildImport_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ expose("BuildImport #buildImport", function()

--TODO: Ignite dps, Blessing support
assert.are.equals("Fireball", build.calcsTab.mainEnv.player.mainSkill.skillCfg.skillName)
assert.are.equals(5226, round(build.calcsTab.mainOutput.FullDPS))
assert.are.equals(4848, round(build.calcsTab.mainOutput.FullDPS))
end)
end)
2 changes: 1 addition & 1 deletion src/Modules/CalcSetup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,7 @@ function calcs.initEnv(build, mode, override, specEnv)
end
end
end
if not GlobalCache.grantedTriggeredSkills or #GlobalCache.grantedTriggeredSkills < #grantedTriggeredSkills then
if not GlobalCache.grantedTriggeredSkills or #GlobalCache.grantedTriggeredSkills ~= #grantedTriggeredSkills then
GlobalCache.grantedTriggeredSkills = grantedTriggeredSkills
build.buildFlag = true
end
Expand Down
3 changes: 3 additions & 0 deletions src/Modules/CalcTriggers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,9 @@ local configTable = {
break
end
end
if not source then
return
end

-- The triggered skill inherits the source skill mods
calcs.mergeSkillInstanceMods(env, env.player.mainSkill.skillModList, source.activeEffect)
Expand Down

0 comments on commit b0e353e

Please sign in to comment.