Compare commits

...

6 Commits
1.9 ... 1.9.3

6 changed files with 27 additions and 20 deletions

2
.mailmap Normal file
View File

@ -0,0 +1,2 @@
Parnic <parnic@parnic.com> Parnic <chris@parnic.com>
rokiyo <rokiyo@example.com> Rokiyo <Rokiyo@example.com>

View File

@ -261,12 +261,12 @@ end
function IceCore.prototype:RedirectRemovedModules()
local _, class = UnitClass("player")
if class == "WARRIOR" and self.settings.modules["SunderCount"] then
if class == "WARRIOR" and self.settings.modules["SunderCount"] and IceHUD.WowVer < 60000 then
if self.settings.modules["SunderCount"].enabled or self.settings.modules["SunderCount"].enabled == nil then
local bFound = false
for k,v in pairs(self.elements) do
if v.moduleSettings.customBarType == "Counter"
if v.moduleSettings.customBarType == "Counter" and v.moduleSettings.auraName
and string.upper(v.moduleSettings.auraName) == string.upper(GetSpellInfo(SUNDER_SPELL_ID)) then
bFound = true
break
@ -302,7 +302,7 @@ function IceCore.prototype:RedirectRemovedModules()
if self.settings.modules["LacerateCount"].enabled or self.settings.modules["LacerateCount"].enabled == nil then
local bFound = false
for k,v in pairs(self.elements) do
if v.moduleSettings.customBarType == "Counter"
if v.moduleSettings.customBarType == "Counter" and v.moduleSettings.auraName
and string.upper(v.moduleSettings.auraName) == string.upper(GetSpellInfo(LACERATE_SPELL_ID)) then
bFound = true
break
@ -339,7 +339,7 @@ function IceCore.prototype:RedirectRemovedModules()
if self.settings.modules["MaelstromCount"].enabled or self.settings.modules["MaelstromCount"].enabled == nil then
local bFound = false
for k,v in pairs(self.elements) do
if v.moduleSettings.customBarType == "Counter"
if v.moduleSettings.customBarType == "Counter" and v.moduleSettings.auraName
and string.upper(v.moduleSettings.auraName) == string.upper(GetSpellInfo(MAELSTROM_SPELL_ID)) then
bFound = true
break

View File

@ -372,7 +372,7 @@ function IceHUD:GetDebuffCount(unit, ability, onlyMine, matchByName)
end
function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
if not unit then
if not unit or not ability then
return 0
end

View File

@ -166,7 +166,7 @@ end
function IceCustomCDBar.prototype:GetDisplayText(fromValue)
local v = fromValue
if self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
if not self.moduleSettings.cooldownType or self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
if tonumber(fromValue) ~= nil then
local spellName = GetSpellInfo(tonumber(fromValue))
if spellName then
@ -250,11 +250,11 @@ function IceCustomCDBar.prototype:GetOptions()
desc = L["The type of thing to track the cooldown of"],
values = cooldownTypes,
get = function()
return self.moduleSettings.cooldownType
return self.moduleSettings.cooldownType or COOLDOWN_TYPE_SPELL
end,
set = function(info, v)
local updateUpperText = false
local dispStr = self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL and self.moduleSettings.cooldownToTrack or self.moduleSettings.itemToTrack
local dispStr = (not self.moduleSettings.cooldownType or self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL) and self.moduleSettings.cooldownToTrack or self.moduleSettings.itemToTrack
if self:GetDisplayText(dispStr)
== self.moduleSettings.upperText then
updateUpperText = true
@ -262,7 +262,7 @@ function IceCustomCDBar.prototype:GetOptions()
self.moduleSettings.cooldownType = v
dispStr = self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL and self.moduleSettings.cooldownToTrack or self.moduleSettings.itemToTrack
dispStr = (not self.moduleSettings.cooldownType or self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL) and self.moduleSettings.cooldownToTrack or self.moduleSettings.itemToTrack
if updateUpperText then
self.moduleSettings.upperText = self:GetDisplayText(dispStr)
end
@ -302,7 +302,7 @@ function IceCustomCDBar.prototype:GetOptions()
return not self.moduleSettings.enabled
end,
hidden = function()
return self.moduleSettings.cooldownType ~= COOLDOWN_TYPE_SPELL
return self.moduleSettings.cooldownType and self.moduleSettings.cooldownType ~= COOLDOWN_TYPE_SPELL
end,
usage = "<which spell to track>",
order = 30.6,
@ -314,7 +314,7 @@ function IceCustomCDBar.prototype:GetOptions()
desc = L["Which item cooldown this bar will be tracking."],
values = localizedInventorySlotNames,
get = function()
return self.moduleSettings.itemToTrack
return self.moduleSettings.itemToTrack or 15
end,
set = function(info, v)
if self:GetDisplayText(self.moduleSettings.itemToTrack) == self.moduleSettings.upperText then
@ -424,7 +424,7 @@ function IceCustomCDBar.prototype:GetOptions()
return not self.moduleSettings.enabled
end,
hidden = function()
return self.moduleSettings.cooldownType ~= COOLDOWN_TYPE_SPELL
return self.moduleSettings.cooldownType and self.moduleSettings.cooldownType ~= COOLDOWN_TYPE_SPELL
end,
order = 31.2,
}
@ -663,13 +663,13 @@ end
function IceCustomCDBar.prototype:UpdateIcon()
if self.barFrame.icon then
if self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
if not self.moduleSettings.cooldownType or self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
local name, rank, icon = GetSpellInfo(self.moduleSettings.cooldownToTrack)
if icon ~= nil then
self.barFrame.icon:SetTexture(icon)
end
else
elseif self.moduleSettings.itemToTrack then
local itemId = GetInventoryItemID("player", GetInventorySlotInfo(validInventorySlotNames[self.moduleSettings.itemToTrack]))
if itemId then
local name, _, _, _, _, _, _, _, _, texture = GetItemInfo(itemId)
@ -700,7 +700,7 @@ function IceCustomCDBar.prototype:UpdateItemUnitInventoryChanged(event, unit)
end
function IceCustomCDBar.prototype:UpdateCustomBarEvent()
if self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
if not self.moduleSettings.cooldownType or self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
self:UpdateCustomBar()
end
end
@ -711,10 +711,10 @@ function IceCustomCDBar.prototype:UpdateCustomBar(fromUpdate)
local auraIcon = nil
if not fromUpdate then
if self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
if not self.moduleSettings.cooldownType or self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
self.cooldownDuration, remaining =
self:GetCooldownDuration(self.moduleSettings.cooldownToTrack)
else
elseif self.moduleSettings.itemToTrack then
local start = nil
start, self.cooldownDuration = GetInventoryItemCooldown("player", GetInventorySlotInfo(validInventorySlotNames[self.moduleSettings.itemToTrack]))
if start and start > 0 then
@ -797,7 +797,7 @@ end
function IceCustomCDBar.prototype:IsReady()
local is_ready = nil
if self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
if not self.moduleSettings.cooldownType or self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
local checkSpell = self:GetSpellNameOrId(self.moduleSettings.cooldownToTrack)
if (IsUsableSpell(checkSpell)) then

View File

@ -549,6 +549,10 @@ end
function IceCustomCount.prototype:UpdateCustomCount()
if not self.moduleSettings.auraName then
return
end
local points
if IceHUD.IceCore:IsInConfigMode() then
points = tonumber(self.moduleSettings.maxCount)

View File

@ -120,6 +120,7 @@ end
-- Load for tanks only
local _, unitClass = UnitClass("player")
if ((unitClass == "DEATHKNIGHT" or unitClass == "DRUID" or unitClass == "PALADIN" or unitClass == "WARRIOR" or unitClass == "MONK") and IceHUD.WowVer >= 40000) then
if ((unitClass == "DEATHKNIGHT" or unitClass == "DRUID" or unitClass == "PALADIN" or unitClass == "WARRIOR" or unitClass == "MONK")
and IceHUD.WowVer >= 40000 and IceHUD.WowVer < 60000) then
IceHUD.Vengeance = Vengeance:new()
end
end