Skip to content

Commit

Permalink
remove compat code
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Mar 28, 2017
1 parent 0aa8402 commit 760f707
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions Transcriptor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -671,24 +671,14 @@ do
if safeUnit(unit) then
local _, _, _, icon, startTime, endTime = UnitCastingInfo(unit)
local time = ((endTime or 0) - (startTime or 0)) / 1000
if type(icon) == "number" then -- XXX 7.2 compat
return format("%s(%s) - %d - %ssec [[%s]]", UnitName(unit), UnitName(unit.."target"), icon or 0, time, strjoin(":", tostringall(unit, ...)))
else
icon = icon and icon:gsub(".*\\([^\\]+)$", "%1") or "no icon"
return format("%s(%s) - %s - %ssec [[%s]]", UnitName(unit), UnitName(unit.."target"), icon, time, strjoin(":", tostringall(unit, ...)))
end
return format("%s(%s) - %d - %ssec [[%s]]", UnitName(unit), UnitName(unit.."target"), icon, time, strjoin(":", tostringall(unit, ...)))
end
end
function sh.UNIT_SPELLCAST_CHANNEL_START(unit, ...)
if safeUnit(unit) then
local _, _, _, icon, startTime, endTime = UnitChannelInfo(unit)
local time = ((endTime or 0) - (startTime or 0)) / 1000
if type(icon) == "number" then -- XXX 7.2 compat
return format("%s(%s) - %s - %ssec [[%s]]", UnitName(unit), UnitName(unit.."target"), icon or 0, time, strjoin(":", tostringall(unit, ...)))
else
icon = icon and icon:gsub(".*\\([^\\]+)$", "%1") or "no icon"
return format("%s(%s) - %s - %ssec [[%s]]", UnitName(unit), UnitName(unit.."target"), icon, time, strjoin(":", tostringall(unit, ...)))
end
return format("%s(%s) - %s - %ssec [[%s]]", UnitName(unit), UnitName(unit.."target"), icon, time, strjoin(":", tostringall(unit, ...)))
end
end
end
Expand Down

0 comments on commit 760f707

Please sign in to comment.