Skip to content
Open
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
13 changes: 7 additions & 6 deletions src/Modules/CalcTriggers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -219,18 +219,19 @@ end
local function CWCHandler(env)
if not env.player.mainSkill.skillFlags.minion and not env.player.mainSkill.skillFlags.disable then
local triggeredSkills = {}
local trigRate = 0
local source = nil
local triggerName = "Cast While Channeling"
local output = env.player.output
local breakdown = env.player.breakdown
for _, skill in ipairs(env.player.activeSkillList) do
local match1 = env.player.mainSkill.activeEffect.grantedEffect.fromItem and skill.socketGroup and skill.socketGroup.slot == env.player.mainSkill.socketGroup.slot
local match2 = (not env.player.mainSkill.activeEffect.grantedEffect.fromItem) and skill.socketGroup == env.player.mainSkill.socketGroup
if env.player.mainSkill.triggeredBy.gemData and calcLib.canGrantedEffectSupportActiveSkill(env.player.mainSkill.triggeredBy.gemData.grantedEffect, skill) and skill ~= env.player.mainSkill and (match1 or match2) and not isTriggered(skill) then
source, trigRate = findTriggerSkill(env, skill, source, trigRate)
local slotMatch = slotMatch(env, skill)
if not source then
local canSupport = env.player.mainSkill.triggeredBy.gemData and calcLib.canGrantedEffectSupportActiveSkill(env.player.mainSkill.triggeredBy.gemData.grantedEffect, skill)
if skill.skillData.triggerTime and canSupport and skill ~= env.player.mainSkill and slotMatch and not isTriggered(skill) then
source = skill
end
end
if skill.skillData.triggeredWhileChannelling and (match1 or match2) then
if skill.skillData.triggeredWhileChannelling and slotMatch then
t_insert(triggeredSkills, packageSkillDataForSimulation(skill, env))
end
end
Expand Down
Loading