Skip to content

Commit

Permalink
fix(Item): Another attempt at smoothing out Item:IsReady
Browse files Browse the repository at this point in the history
  • Loading branch information
Cilraaz committed May 2, 2024
1 parent e9e045a commit 0d18b6e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions HeroLib/Class/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ end
-- Get wether an item is ready to be used
function Item:IsReady()
if not self:IsUsable() or not self:OnUseSpell() then return false end
local SpellGCD = DBC.SpellGCD[self:OnUseSpell():ID()] or 0
return (SpellGCD > 0) and self:CooldownRemains() <= Player:GCD() or self:CooldownUp()
return self:CooldownUp() or self:CooldownRemains() <= Player:GCDRemains()
end

-- Get whether an item is equipped and ready to be used
Expand Down

0 comments on commit 0d18b6e

Please sign in to comment.