From 6ab05a95fbab68af6ee40723f3a9ea96c2210799 Mon Sep 17 00:00:00 2001 From: Adrian Klingen Date: Fri, 17 Jan 2025 11:32:38 +0100 Subject: [PATCH 1/2] Add full item swap to Sub sim --- ui/rogue/subtlety/sim.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ui/rogue/subtlety/sim.ts b/ui/rogue/subtlety/sim.ts index 3866e0ed2e..f1923c76a8 100644 --- a/ui/rogue/subtlety/sim.ts +++ b/ui/rogue/subtlety/sim.ts @@ -136,7 +136,25 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecSubtletyRogue, { OtherInputs.InputDelay, ], }, - itemSwapSlots: [ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand], + itemSwapSlots: [ + ItemSlot.ItemSlotHead, + ItemSlot.ItemSlotNeck, + ItemSlot.ItemSlotShoulder, + ItemSlot.ItemSlotBack, + ItemSlot.ItemSlotChest, + ItemSlot.ItemSlotWrist, + ItemSlot.ItemSlotHands, + ItemSlot.ItemSlotWaist, + ItemSlot.ItemSlotLegs, + ItemSlot.ItemSlotFeet, + ItemSlot.ItemSlotFinger1, + ItemSlot.ItemSlotFinger2, + ItemSlot.ItemSlotTrinket1, + ItemSlot.ItemSlotTrinket2, + ItemSlot.ItemSlotMainHand, + ItemSlot.ItemSlotOffHand, + ItemSlot.ItemSlotRanged, + ], encounterPicker: { // Whether to include 'Execute Duration (%)' in the 'Encounter' section of the settings tab. showExecuteProportion: false, From 0e902b52cd7ee036bcdf7ff4f688e39453fd22cd Mon Sep 17 00:00:00 2001 From: Adrian Klingen Date: Fri, 17 Jan 2025 12:25:00 +0100 Subject: [PATCH 2/2] Fix Rogue ItemSwap crash --- sim/core/attack.go | 7 +++++++ sim/rogue/poisons.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sim/core/attack.go b/sim/core/attack.go index c0dd6f5c50..8821b67e9d 100644 --- a/sim/core/attack.go +++ b/sim/core/attack.go @@ -845,6 +845,13 @@ func (aa *AutoAttacks) NewPPMManager(ppm float64, procMask ProcMask) *DynamicPro return &dpm } +// PPMManager for static ProcMasks and no item swap callback +func (aa *AutoAttacks) NewStaticPPMManager(ppm float64, procMask ProcMask) *DynamicProcManager { + dpm := aa.newDynamicProcManager(ppm, 0, procMask) + + return &dpm +} + // Dynamic Proc Manager for dynamic ProcMasks on weapon enchants func (aa *AutoAttacks) NewDynamicProcManagerForEnchant(effectID int32, ppm float64, fixedProcChance float64) *DynamicProcManager { return aa.newDynamicProcManagerWithDynamicProcMask(ppm, fixedProcChance, func() ProcMask { diff --git a/sim/rogue/poisons.go b/sim/rogue/poisons.go index 81d6db8917..c14404e50a 100644 --- a/sim/rogue/poisons.go +++ b/sim/rogue/poisons.go @@ -331,7 +331,7 @@ func (rogue *Rogue) UpdateInstantPoisonPPM(bonusChance float64) { const basePPM = 0.2 / (1.4 / 60) // ~8.57, the former 20% normalized to a 1.4 speed weapon ppm := basePPM * (1 + core.TernaryFloat64(rogue.Spec == proto.Spec_SpecAssassinationRogue, 0.5, 0) + bonusChance) - rogue.instantPoisonPPMM = rogue.AutoAttacks.NewPPMManager(ppm, procMask) + rogue.instantPoisonPPMM = rogue.AutoAttacks.NewStaticPPMManager(ppm, procMask) } func (rogue *Rogue) applyInstantPoison() {