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/earthliving fix #3600

Merged
merged 2 commits into from
Sep 5, 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
13 changes: 0 additions & 13 deletions sim/core/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,12 @@ const (

ProcMaskDirect = ProcMaskMelee | ProcMaskRanged | ProcMaskSpellDamage

ProcMaskTwoRoll = ProcMaskRanged | ProcMaskMeleeSpecial

ProcMaskSpecial = ProcMaskMeleeOrRangedSpecial | ProcMaskSpellDamage

ProcMaskMeleeOrProc = ProcMaskMelee | ProcMaskProc
ProcMaskSpellOrProc = ProcMaskSpellDamage | ProcMaskProc
)

func GetMeleeProcMaskForHands(mh bool, oh bool) ProcMask {
mask := ProcMaskUnknown
if mh {
mask |= ProcMaskMeleeMH
}
if oh {
mask |= ProcMaskMeleeOH
}
return mask
}

// Possible outcomes of any hit/damage roll.
type HitOutcome uint16

Expand Down
8 changes: 4 additions & 4 deletions sim/shaman/elemental/elemental.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ func NewElementalShaman(character core.Character, options *proto.Player) *Elemen
}
ele.EnableResumeAfterManaWait(ele.tryUseGCD)

if ele.HasMHWeapon() {
ele.ApplyFlametongueImbueToItem(ele.GetMHWeapon(), false)
if mh := ele.GetMHWeapon(); mh != nil {
ele.ApplyFlametongueImbueToItem(mh, false)
}

if ele.HasOHWeapon() {
ele.ApplyFlametongueImbueToItem(ele.GetOHWeapon(), false)
if oh := ele.GetOHWeapon(); oh != nil {
ele.ApplyFlametongueImbueToItem(oh, false)
}

if ele.Talents.FeralSpirit {
Expand Down
28 changes: 15 additions & 13 deletions sim/shaman/enhancement/enhancement.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,10 @@ func NewEnhancementShaman(character core.Character, options *proto.Player) *Enha
enh.SelfBuffs.ImbueOH = proto.ShamanImbue_NoImbue
}

enh.RegisterFlametongueImbue(
enh.SelfBuffs.ImbueMH == proto.ShamanImbue_FlametongueWeapon,
enh.SelfBuffs.ImbueOH == proto.ShamanImbue_FlametongueWeapon)
enh.RegisterFlametongueDownrankImbue(
enh.SelfBuffs.ImbueMH == proto.ShamanImbue_FlametongueWeaponDownrank,
enh.SelfBuffs.ImbueOH == proto.ShamanImbue_FlametongueWeaponDownrank)
enh.RegisterWindfuryImbue(
enh.SelfBuffs.ImbueMH == proto.ShamanImbue_WindfuryWeapon,
enh.SelfBuffs.ImbueOH == proto.ShamanImbue_WindfuryWeapon)
enh.RegisterFlametongueImbue(enh.getImbueProcMask(proto.ShamanImbue_FlametongueWeapon), false)
enh.RegisterFlametongueImbue(enh.getImbueProcMask(proto.ShamanImbue_FlametongueWeaponDownrank), true)
enh.RegisterWindfuryImbue(enh.getImbueProcMask(proto.ShamanImbue_WindfuryWeapon))
enh.RegisterFrostbrandImbue(enh.getImbueProcMask(proto.ShamanImbue_FrostbrandWeapon))

enh.SpiritWolves = &shaman.SpiritWolves{
SpiritWolf1: enh.NewSpiritWolf(1),
Expand All @@ -99,6 +94,17 @@ func NewEnhancementShaman(character core.Character, options *proto.Player) *Enha
return enh
}

func (enh *EnhancementShaman) getImbueProcMask(imbue proto.ShamanImbue) core.ProcMask {
var mask core.ProcMask
if enh.SelfBuffs.ImbueMH == imbue {
mask |= core.ProcMaskMeleeMH
}
if enh.SelfBuffs.ImbueOH == imbue {
mask |= core.ProcMaskMeleeOH
}
return mask
}

type EnhancementShaman struct {
*shaman.Shaman

Expand All @@ -115,10 +121,6 @@ func (enh *EnhancementShaman) GetShaman() *shaman.Shaman {
func (enh *EnhancementShaman) Initialize() {
enh.Shaman.Initialize()

enh.RegisterFrostbrandImbue(
enh.SelfBuffs.ImbueMH == proto.ShamanImbue_FrostbrandWeapon,
enh.SelfBuffs.ImbueOH == proto.ShamanImbue_FrostbrandWeapon)

if enh.ItemSwap.IsEnabled() {
mh := enh.ItemSwap.GetItem(proto.ItemSlot_ItemSlotMainHand)
enh.ApplyFlametongueImbueToItem(mh, true)
Expand Down
Loading
Loading