- fixed an error that could crop up when tweaking colors

This commit is contained in:
Parnic
2010-10-26 01:13:05 +00:00
parent c8de97e7b7
commit c67036a5e0
2 changed files with 5 additions and 1 deletions

View File

@ -1117,6 +1117,10 @@ function IceHUD:GetDebuffCount(unit, ability, onlyMine, matchByName)
end end
function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName) function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
if not unit then
return 0
end
if unit == "main hand weapon" or unit == "off hand weapon" then if unit == "main hand weapon" or unit == "off hand weapon" then
local hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges local hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges
= GetWeaponEnchantInfo() = GetWeaponEnchantInfo()

View File

@ -405,7 +405,7 @@ function IceCustomCount.prototype:Enable(core)
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateCustomCount") self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateCustomCount")
self:RegisterEvent("PLAYER_DEAD", "UpdateCustomCount") self:RegisterEvent("PLAYER_DEAD", "UpdateCustomCount")
self.unit = self.moduleSettings.auraTarget self.unit = self.moduleSettings.auraTarget or "player"
if not tonumber(self.moduleSettings.maxCount) or tonumber(self.moduleSettings.maxCount) <= 0 then if not tonumber(self.moduleSettings.maxCount) or tonumber(self.moduleSettings.maxCount) <= 0 then
self.moduleSettings.maxCount = 5 self.moduleSettings.maxCount = 5