Skip to content

Commit

Permalink
Merge pull request #1315 from wowsims/feature/add-trinket-swapping
Browse files Browse the repository at this point in the history
Fix tinker item swap timer
  • Loading branch information
1337LutZ authored Jan 19, 2025
2 parents a2c2768 + 6ae0a6e commit 60f6cee
Show file tree
Hide file tree
Showing 3 changed files with 290 additions and 290 deletions.
4 changes: 2 additions & 2 deletions sim/core/item_swaps.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ func (swap *ItemSwap) ProcessTinker(spell *Spell, slots []proto.ItemSlot) {
isUniqueItem := swap.GetEquippedItemBySlot(slot).ID != swap.GetUnequippedItemBySlot(slot).ID

var newSpellCD time.Duration
timeToReady := spell.CD.TimeToReady(sim)
if isUniqueItem {
// Unique items have a 30s CD regardless of the spell CD being > 30s or not
newSpellCD = max(timeToReady, time.Second*30)
newSpellCD = time.Second * 30
} else {
// Items with the same ItemID share the CD and does not get reset to 30s
timeToReady := spell.CD.TimeToReady(sim)
newSpellCD = TernaryDuration(timeToReady > 30, timeToReady, time.Second*30)
}

Expand Down
Loading

0 comments on commit 60f6cee

Please sign in to comment.