mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- added some protection against error messages that were popping up related to SetTexCoord
- added some protection against a nil access in the player's cast bar under certain circumstances
This commit is contained in:
@ -207,15 +207,18 @@ end
|
||||
|
||||
|
||||
function IceCastBar.prototype:StartBar(action, message)
|
||||
self.action = action
|
||||
self.actionStartTime = GetTime()
|
||||
self.actionMessage = message
|
||||
|
||||
local spell, rank, displayName, icon, startTime, endTime, isTradeSkill = UnitCastingInfo(self.unit)
|
||||
if not (spell) then
|
||||
spell, rank, displayName, icon, startTime, endTime = UnitChannelInfo(self.unit)
|
||||
end
|
||||
|
||||
|
||||
if not spell then
|
||||
return
|
||||
end
|
||||
|
||||
self.action = action
|
||||
self.actionStartTime = GetTime()
|
||||
self.actionMessage = message
|
||||
|
||||
if (startTime and endTime) then
|
||||
self.actionDuration = (endTime - startTime) / 1000
|
||||
|
Reference in New Issue
Block a user