diff --git a/HeroLib/Class/Item.lua b/HeroLib/Class/Item.lua index 6e3a83dc..d02650cc 100755 --- a/HeroLib/Class/Item.lua +++ b/HeroLib/Class/Item.lua @@ -228,7 +228,10 @@ end function Item:BuffDuration() if not self:IsUsable() then return 0 end if not self:OnUseSpell() then return 0 end - local BuffLength = DBC.SpellDuration[self:OnUseSpell():ID()][1] + local BuffLength + if DBC.SpellDuration[self:OnUseSpell():ID()] then + BuffLength = DBC.SpellDuration[self:OnUseSpell():ID()][1] + end if not BuffLength then return 0 end if BuffLength > 1000 then BuffLength = BuffLength / 1000 end return BuffLength