abunai10 / CaffeineIssues

0 stars 0 forks source link

GetCastLength() returns also Range, Spell ID and wrong Formatted Time. #17

Closed Dreamzlol closed 10 months ago

Dreamzlol commented 10 months ago

Hey There!

GetCastLength() returns stuff we dont actually need and also the SpellCastTime is wrong formatted. Atleast in Wrath, Retail i dont know.

Screenshot 2023-11-08 at 10 31 47

Issue

Caffeine:Print(spells.vampiricTouch:GetCastLength())

Returns

[Caffeine] 1421 0 36 48160

SpellCastTime GCD? Spell Range Spell ID
1421 0 36 48160

Task

Please refactor the GetCastLength() function, so it does only return the SpellCastTime of the givin Spell. Something like this.

function Spell:GetCastLength()
    local castTime = select(4, GetSpellInfo(self:GetID()))
    return castTime / 1000  -- convert to seconds
end
abunai10 commented 10 months ago

Should be fixed on next update.