Skip to content

Commit

Permalink
Merge pull request #3985 from vigo2/vigo/auto-attacks
Browse files Browse the repository at this point in the history
Vigo/auto attacks
  • Loading branch information
vigo2 authored Nov 1, 2023
2 parents 38edbcb + 73e8c8e commit 8079287
Show file tree
Hide file tree
Showing 53 changed files with 7,247 additions and 7,311 deletions.
4 changes: 2 additions & 2 deletions sim/common/tbc/melee_trinkets.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func init() {

core.NewItemEffect(11815, func(agent core.Agent) {
character := agent.GetCharacter()
if !character.AutoAttacks.AutoSwingMelee() {
if !character.AutoAttacks.AutoSwingMelee {
return
}

Expand All @@ -40,7 +40,7 @@ func init() {
Label: "Hand of Justice",
Duration: core.NeverExpires,
OnInit: func(aura *core.Aura, sim *core.Simulation) {
config := character.AutoAttacks.MHConfig
config := *character.AutoAttacks.MHConfig()
config.ActionID = core.ActionID{ItemID: 11815}
handOfJusticeSpell = character.GetOrRegisterSpell(config)
},
Expand Down
16 changes: 8 additions & 8 deletions sim/common/wotlk/capacitors.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func init() {

core.NewItemEffect(itemID, func(agent core.Agent) {
character := agent.GetCharacter()
if !character.AutoAttacks.AutoSwingMelee() {
if !character.AutoAttacks.AutoSwingMelee {
return
}

Expand All @@ -184,24 +184,24 @@ func init() {
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeMHSpecial,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagIncludeTargetBonusDamage | core.SpellFlagNoOnCastComplete,
DamageMultiplier: character.AutoAttacks.MHConfig.DamageMultiplier * 0.5,
CritMultiplier: character.AutoAttacks.MHConfig.CritMultiplier,
ThreatMultiplier: character.AutoAttacks.MHConfig.ThreatMultiplier,
DamageMultiplier: character.AutoAttacks.MHConfig().DamageMultiplier * 0.5,
CritMultiplier: character.AutoAttacks.MHConfig().CritMultiplier,
ThreatMultiplier: character.AutoAttacks.MHConfig().ThreatMultiplier,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := character.MHWeaponDamage(sim, spell.MeleeAttackPower())
spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeWeaponSpecialHitAndCrit)
},
})

if character.AutoAttacks.IsDualWielding() {
if character.AutoAttacks.IsDualWielding {
ohSpell = character.GetOrRegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 71434}, // "Manifest Anger"
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeOHSpecial,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagIncludeTargetBonusDamage | core.SpellFlagNoOnCastComplete,
DamageMultiplier: character.AutoAttacks.OHConfig.DamageMultiplier * 0.5,
CritMultiplier: character.AutoAttacks.OHConfig.CritMultiplier,
ThreatMultiplier: character.AutoAttacks.OHConfig.ThreatMultiplier,
DamageMultiplier: character.AutoAttacks.OHConfig().DamageMultiplier * 0.5,
CritMultiplier: character.AutoAttacks.OHConfig().CritMultiplier,
ThreatMultiplier: character.AutoAttacks.OHConfig().ThreatMultiplier,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := character.OHWeaponDamage(sim, spell.MeleeAttackPower())
spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeWeaponSpecialHitAndCrit)
Expand Down
Loading

0 comments on commit 8079287

Please sign in to comment.