Skip to content

Commit

Permalink
Merge pull request #1310 from wowsims/feature/add-trinket-swapping
Browse files Browse the repository at this point in the history
Add full item swap to Sub sim
  • Loading branch information
1337LutZ authored Jan 17, 2025
2 parents 883b546 + 0e902b5 commit 86c2697
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
7 changes: 7 additions & 0 deletions sim/core/attack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion sim/rogue/poisons.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
20 changes: 19 additions & 1 deletion ui/rogue/subtlety/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 86c2697

Please sign in to comment.