- Fix an issue where oldStart could be nil

This commit is contained in:
ckknight
2008-06-20 15:10:20 +00:00
parent 99089c67a6
commit fbb17b12df

View File

@ -191,6 +191,9 @@ local function UNIT_SPELLCAST_DELAYED(event, unit)
local oldStart = castData[unit].startTime
startTime = startTime / 1000
if not oldStart then
oldStart = startTime
end
castData[unit].startTime = startTime
castData[unit].endTime = endTime / 1000
@ -217,6 +220,9 @@ local function UNIT_SPELLCAST_CHANNEL_UPDATE(event, unit)
local oldStart = castData[unit].startTime
startTime = startTime / 1000
if not oldStart then
oldStart = startTime
end
castData[unit].startTime = startTime
castData[unit].endTime = endTime / 1000
castData[unit].delay = castData[unit].delay + (oldStart - startTime)