Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vigo/weapon preps #3957

Merged
merged 4 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
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
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
Loading