Skip to content

Commit

Permalink
Merge pull request #3957 from vigo2/vigo/weapon-preps
Browse files Browse the repository at this point in the history
Vigo/weapon preps
  • Loading branch information
vigo2 authored Oct 28, 2023
2 parents b568d3d + 13ae60c commit eb79430
Show file tree
Hide file tree
Showing 58 changed files with 2,583 additions and 2,680 deletions.
10 changes: 5 additions & 5 deletions sim/common/tbc/enchant_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ func init() {

// TODO: Crusader, Mongoose, and Executioner could also be modelled as AddWeaponEffect instead
core.AddWeaponEffect(1897, func(agent core.Agent, slot proto.ItemSlot) {
w := &agent.GetCharacter().AutoAttacks.MH
w := agent.GetCharacter().AutoAttacks.MH()
if slot == proto.ItemSlot_ItemSlotOffHand {
w = &agent.GetCharacter().AutoAttacks.OH
w = agent.GetCharacter().AutoAttacks.OH()
}
w.BaseDamageMin += 5
w.BaseDamageMax += 5
Expand Down Expand Up @@ -47,9 +47,9 @@ func init() {
})

core.AddWeaponEffect(963, func(agent core.Agent, slot proto.ItemSlot) {
w := &agent.GetCharacter().AutoAttacks.MH
w := agent.GetCharacter().AutoAttacks.MH()
if slot == proto.ItemSlot_ItemSlotOffHand {
w = &agent.GetCharacter().AutoAttacks.OH
w = agent.GetCharacter().AutoAttacks.OH()
}
w.BaseDamageMin += 7
w.BaseDamageMax += 7
Expand Down Expand Up @@ -134,7 +134,7 @@ func init() {
})

core.AddWeaponEffect(2723, func(agent core.Agent, _ proto.ItemSlot) {
w := &agent.GetCharacter().AutoAttacks.Ranged
w := agent.GetCharacter().AutoAttacks.Ranged()
w.BaseDamageMin += 12
w.BaseDamageMax += 12
})
Expand Down
16 changes: 4 additions & 12 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,17 +40,9 @@ func init() {
Label: "Hand of Justice",
Duration: core.NeverExpires,
OnInit: func(aura *core.Aura, sim *core.Simulation) {
handOfJusticeSpell = character.GetOrRegisterSpell(core.SpellConfig{
ActionID: core.ActionID{ItemID: 11815},
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeMHAuto,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagIncludeTargetBonusDamage | core.SpellFlagNoOnCastComplete,
ApplyEffects: character.AutoAttacks.MHConfig.ApplyEffects,

DamageMultiplier: 1,
CritMultiplier: character.DefaultMeleeCritMultiplier(),
ThreatMultiplier: 1,
})
config := character.AutoAttacks.MHConfig
config.ActionID = core.ActionID{ItemID: 11815}
handOfJusticeSpell = character.GetOrRegisterSpell(config)
},
OnReset: func(aura *core.Aura, sim *core.Simulation) {
aura.Activate(sim)
Expand Down
4 changes: 2 additions & 2 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 @@ -193,7 +193,7 @@ func init() {
},
})

if character.AutoAttacks.IsDualWielding {
if character.AutoAttacks.IsDualWielding() {
ohSpell = character.GetOrRegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 71434}, // "Manifest Anger"
SpellSchool: core.SpellSchoolPhysical,
Expand Down
2 changes: 1 addition & 1 deletion sim/common/wotlk/enchant_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func init() {
})

core.AddWeaponEffect(3843, func(agent core.Agent, _ proto.ItemSlot) {
w := &agent.GetCharacter().AutoAttacks.Ranged
w := agent.GetCharacter().AutoAttacks.Ranged()
w.BaseDamageMin += 15
w.BaseDamageMax += 15
})
Expand Down
Loading

0 comments on commit eb79430

Please sign in to comment.