Skip to content

Conversation

@Foknetics
Copy link
Contributor

Mostly based on the TBC implementation but had to make a few changes.

@Foknetics Foknetics requested a review from kayla-glick July 2, 2025 01:19
Comment on lines 3530 to 3551
trinketAura := character.RegisterAura(core.Aura{
Label: auraLabel,
ActionID: actionID,
Duration: time.Second * 30,
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
procAura.Deactivate(sim)
},
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if !result.Landed() {
return
}
if !spell.ProcMask.Matches(core.ProcMaskMeleeOrRanged) {
return
}
if !ppmm.ProcWithWeaponSpecials(sim, spell.ProcMask, auraLabel) {
return
}

procAura.Activate(sim)
procAura.AddStack(sim)
},
})
Copy link
Contributor

@kayla-glick kayla-glick Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simplify this by using the MakeProcTriggerAura helper (I edited this together in browser so I'd double check that I did all of the syntax correctly)

Suggested change
trinketAura := character.RegisterAura(core.Aura{
Label: auraLabel,
ActionID: actionID,
Duration: time.Second * 30,
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
procAura.Deactivate(sim)
},
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if !result.Landed() {
return
}
if !spell.ProcMask.Matches(core.ProcMaskMeleeOrRanged) {
return
}
if !ppmm.ProcWithWeaponSpecials(sim, spell.ProcMask, auraLabel) {
return
}
procAura.Activate(sim)
procAura.AddStack(sim)
},
})
trinketAura := core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: auraLabel,
ActionID: actionID,
Duration: time.Second * 30,
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMeleeOrRanged,
SpellFlagsExclude: core.SpellFlagSuppressEquipProcs,
PPM: 10.0,
Handler: func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) {
procAura.Activate(sim)
procAura.AddStack(sim)
},
})


spell := character.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: core.SpellFlagNoOnCastComplete,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Flags: core.SpellFlagNoOnCastComplete,
Flags: core.SpellFlagNoOnCastComplete | SpellFlagOffensiveEquipment,

@kayla-glick kayla-glick merged commit b9db158 into master Jul 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants