Skip to content

Commit

Permalink
[Core] Item IsReady
Browse files Browse the repository at this point in the history
  • Loading branch information
Kutikuti committed Aug 22, 2017
1 parent 2977493 commit c133c8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions AethysCore/Class/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@
return select(1,IsUsableItem(self.ItemID))
end

-- Get wether an item is ready to be used
-- TODO : cache
function Item:IsReady()
return (self:IsUsable() and self:CooldownRemains()==0);
end

-- Get the CooldownInfo (from GetItemCooldown) and cache it.
function Item:CooldownInfo ()
if not Cache.ItemInfo[self.ItemID] then Cache.ItemInfo[self.ItemID] = {}; end
Expand Down

0 comments on commit c133c8f

Please sign in to comment.