Skip to content

Commit

Permalink
[core] rename DualWielding() "back" to IsDualWielding()
Browse files Browse the repository at this point in the history
  • Loading branch information
vigo2 committed Oct 26, 2023
1 parent 3ae07b3 commit a6c8c67
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sim/common/wotlk/capacitors.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func init() {
},
})

if character.AutoAttacks.DualWielding() {
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/core/attack.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (spell *Spell) IsMelee() bool {
return spell.ProcMask.Matches(ProcMaskMelee)
}

func (aa *AutoAttacks) DualWielding() bool {
func (aa *AutoAttacks) IsDualWielding() bool {
return aa.isDualWielding
}

Expand Down
4 changes: 2 additions & 2 deletions sim/core/spell_outcome.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ func (spell *Spell) fixedCritCheck(sim *Simulation, critChance float64) bool {

func (result *SpellResult) applyAttackTableMiss(spell *Spell, attackTable *AttackTable, roll float64, chance *float64) bool {
missChance := attackTable.BaseMissChance - spell.PhysicalHitChance(attackTable)
if spell.Unit.AutoAttacks.DualWielding() && !spell.Unit.PseudoStats.DisableDWMissPenalty {
if spell.Unit.AutoAttacks.IsDualWielding() && !spell.Unit.PseudoStats.DisableDWMissPenalty {
missChance += 0.19
}
*chance = max(0, missChance)
Expand Down Expand Up @@ -505,7 +505,7 @@ func (result *SpellResult) applyAttackTableHit(spell *Spell) {

func (result *SpellResult) applyEnemyAttackTableMiss(spell *Spell, attackTable *AttackTable, roll float64, chance *float64) bool {
missChance := attackTable.BaseMissChance + spell.Unit.PseudoStats.IncreasedMissChance + result.Target.GetDiminishedMissChance() + result.Target.PseudoStats.ReducedPhysicalHitTakenChance
if spell.Unit.AutoAttacks.DualWielding() && !spell.Unit.PseudoStats.DisableDWMissPenalty {
if spell.Unit.AutoAttacks.IsDualWielding() && !spell.Unit.PseudoStats.DisableDWMissPenalty {
missChance += 0.19
}
*chance = max(0, missChance)
Expand Down
2 changes: 1 addition & 1 deletion sim/shaman/enhancement/priority_rotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (rotation *PriorityRotation) buildPriorityRotation(enh *EnhancementShaman)
lavaLash := Spell{
condition: func(sim *core.Simulation, target *core.Unit) bool {
//Checking if we learned the spell, ie untalented
return enh.LavaLash != nil && enh.AutoAttacks.DualWielding()
return enh.LavaLash != nil && enh.AutoAttacks.IsDualWielding()
},
cast: func(sim *core.Simulation, target *core.Unit) bool {
//TODO add in LL delay so we don't lose flametongues, if Last attack = current time
Expand Down
2 changes: 1 addition & 1 deletion sim/shaman/stormstrike.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (shaman *Shaman) registerStormstrikeSpell() {

mhHit(sim, target, spell)

if shaman.AutoAttacks.DualWielding() {
if shaman.AutoAttacks.IsDualWielding() {
ohHit(sim, target, spell)
}

Expand Down
4 changes: 2 additions & 2 deletions sim/warrior/talents.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (warrior *Warrior) applyTitansGrip() {
if !warrior.Talents.TitansGrip {
return
}
if !warrior.AutoAttacks.DualWielding() {
if !warrior.AutoAttacks.IsDualWielding() {
return
}
if warrior.MainHand().HandType != proto.HandType_HandTypeTwoHand && warrior.OffHand().HandType != proto.HandType_HandTypeTwoHand {
Expand Down Expand Up @@ -788,7 +788,7 @@ func (warrior *Warrior) RegisterBladestormCD() {
numHits := min(4, warrior.Env.GetNumTargets())
results := make([]*core.SpellResult, numHits)

if warrior.AutoAttacks.DualWielding() {
if warrior.AutoAttacks.IsDualWielding() {
warrior.BladestormOH = warrior.RegisterSpell(core.SpellConfig{
ActionID: actionID,
SpellSchool: core.SpellSchoolPhysical,
Expand Down
2 changes: 1 addition & 1 deletion sim/warrior/whirlwind.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func (warrior *Warrior) registerWhirlwindSpell() {
numHits := min(4, warrior.Env.GetNumTargets())
results := make([]*core.SpellResult, numHits)

if warrior.AutoAttacks.DualWielding() && warrior.GetOHWeapon().WeaponType != proto.WeaponType_WeaponTypeStaff &&
if warrior.AutoAttacks.IsDualWielding() && warrior.GetOHWeapon().WeaponType != proto.WeaponType_WeaponTypeStaff &&
warrior.GetOHWeapon().WeaponType != proto.WeaponType_WeaponTypePolearm {
warrior.WhirlwindOH = warrior.RegisterSpell(core.SpellConfig{
ActionID: actionID.WithTag(1),
Expand Down

0 comments on commit a6c8c67

Please sign in to comment.