Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/wowsims/wotlk
Browse files Browse the repository at this point in the history
  • Loading branch information
NerdEgghead committed Sep 5, 2023
2 parents cd04151 + 93edbdb commit 3b3eaf4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
3 changes: 3 additions & 0 deletions sim/core/apl_values_operators.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ type APLValueMath struct {

func (rot *APLRotation) newValueMath(config *proto.APLValueMath) APLValue {
lhs, rhs := rot.newAPLValue(config.Lhs), rot.newAPLValue(config.Rhs)
if config.Op == proto.APLValueMath_OpAdd || config.Op == proto.APLValueMath_OpSub {
lhs, rhs = rot.coerceToSameType(lhs, rhs)
}
if lhs == nil || rhs == nil {
return nil
}
Expand Down
2 changes: 0 additions & 2 deletions sim/core/energy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (

// Time between energy ticks.
const EnergyTickDuration = time.Millisecond * 100

// Extra 0.2 because Blizzard
const EnergyPerTick = 1.0

// OnEnergyGain is called any time energy is increased.
Expand Down
12 changes: 12 additions & 0 deletions sim/core/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,15 @@ func (unit *Unit) RegisterPrepullAction(doAt time.Duration, action func(*Simulat
Action: action,
})
}

func (env *Environment) PrepullStartTime() time.Duration {
if !env.IsFinalized() {
panic("Env not yet finalized")
}

if len(env.prepullActions) == 0 {
return 0
} else {
return env.prepullActions[0].DoAt
}
}
2 changes: 1 addition & 1 deletion sim/core/sim.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func (sim *Simulation) runPendingActions(max time.Duration) {

func (sim *Simulation) PrePull() {
if len(sim.Environment.prepullActions) > 0 {
sim.CurrentTime = sim.Environment.prepullActions[0].DoAt
sim.CurrentTime = sim.Environment.PrepullStartTime()

for _, prepullAction := range sim.Environment.prepullActions {
if prepullAction.DoAt > sim.CurrentTime {
Expand Down
5 changes: 4 additions & 1 deletion sim/rogue/fan_of_knives.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ const FanOfKnivesSpellID int32 = 51723
func (rogue *Rogue) makeFanOfKnivesWeaponHitSpell(isMH bool) *core.Spell {
var procMask core.ProcMask
var weaponMultiplier float64
var actionID core.ActionID
if isMH {
actionID = core.ActionID{SpellID: FanOfKnivesSpellID}.WithTag(1)
weaponMultiplier = core.TernaryFloat64(rogue.HasDagger(core.MainHand), 1.05, 0.7)
procMask = core.ProcMaskMeleeMHSpecial
} else {
actionID = core.ActionID{SpellID: FanOfKnivesSpellID}.WithTag(2)
weaponMultiplier = core.TernaryFloat64(rogue.HasDagger(core.OffHand), 1.05, 0.7)
weaponMultiplier *= rogue.dwsMultiplier()
procMask = core.ProcMaskMeleeOHSpecial
}

return rogue.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: FanOfKnivesSpellID},
ActionID: actionID,
SpellSchool: core.SpellSchoolPhysical,
ProcMask: procMask,
Flags: core.SpellFlagMeleeMetrics | SpellFlagColdBlooded,
Expand Down
4 changes: 2 additions & 2 deletions ui/core/components/individual_sim_ui/settings_tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ export class SettingsTab extends SimTab {

const miscBuffOptions = this.simUI.splitRelevantOptions([
{ item: IconInputs.HeroicPresence, stats: [Stat.StatMeleeHit, Stat.StatSpellHit] },
{ item: IconInputs.BraidedEterniumChain, stats: [Stat.StatMeleeCrit] },
{ item: IconInputs.ChainOfTheTwilightOwl, stats: [Stat.StatSpellCrit] },
{ item: IconInputs.BraidedEterniumChain, stats: [Stat.StatMeleeCrit, Stat.StatSpellCrit] },
{ item: IconInputs.ChainOfTheTwilightOwl, stats: [Stat.StatSpellCrit, Stat.StatMeleeCrit] },
{ item: IconInputs.FocusMagic, stats: [Stat.StatSpellCrit] },
{ item: IconInputs.EyeOfTheNight, stats: [Stat.StatSpellPower] },
{ item: IconInputs.Thorns, stats: [Stat.StatArmor] },
Expand Down

0 comments on commit 3b3eaf4

Please sign in to comment.