mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- added individual checkboxes to show buffs/debuffs in any info module that derives from (or is) TargetInfo (which should be all of them)
This commit is contained in:
@ -258,10 +258,27 @@ function IceTargetInfo.prototype:GetOptions()
|
||||
order = 35
|
||||
}
|
||||
|
||||
opts["showBuffs"] = {
|
||||
type = 'toggle',
|
||||
name = 'Show buffs',
|
||||
desc = 'Toggles whether or not buffs are displayed at all',
|
||||
get = function()
|
||||
return self.moduleSettings.showBuffs
|
||||
end,
|
||||
set = function(v)
|
||||
self.moduleSettings.showBuffs = v
|
||||
self:RedrawBuffs()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
order = 36
|
||||
}
|
||||
|
||||
opts["filterBuffs"] = {
|
||||
type = 'text',
|
||||
name = 'Filter buffs',
|
||||
desc = 'Toggles filtering buffs (uses Blizzard default filter code)',
|
||||
name = 'Only show buffs by me',
|
||||
desc = 'Will only show buffs that you cast instead of all buffs active',
|
||||
get = function()
|
||||
return self.moduleSettings.filterBuffs
|
||||
end,
|
||||
@ -270,16 +287,33 @@ function IceTargetInfo.prototype:GetOptions()
|
||||
self:RedrawBuffs()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
return not self.moduleSettings.enabled or not self.moduleSettings.showBuffs
|
||||
end,
|
||||
validate = { "Never", "In Combat", "Always" },
|
||||
order = 36
|
||||
order = 36.1
|
||||
}
|
||||
|
||||
opts["showDebuffs"] = {
|
||||
type = 'toggle',
|
||||
name = 'Show debuffs',
|
||||
desc = 'Toggles whether or not debuffs are displayed at all',
|
||||
get = function()
|
||||
return self.moduleSettings.showDebuffs
|
||||
end,
|
||||
set = function(v)
|
||||
self.moduleSettings.showDebuffs = v
|
||||
self:RedrawBuffs()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
order = 36.2
|
||||
}
|
||||
|
||||
opts["filterDebuffs"] = {
|
||||
type = 'text',
|
||||
name = 'Filter debuffs',
|
||||
desc = 'Toggles filtering debuffs (uses Blizzard default filter code)',
|
||||
name = 'Only show debuffs by me',
|
||||
desc = 'Will only show debuffs that you cast instead of all debuffs active',
|
||||
get = function()
|
||||
return self.moduleSettings.filterDebuffs
|
||||
end,
|
||||
@ -288,10 +322,10 @@ function IceTargetInfo.prototype:GetOptions()
|
||||
self:RedrawBuffs()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
return not self.moduleSettings.enabled or not self.moduleSettings.showDebuffs
|
||||
end,
|
||||
validate = { "Never", "In Combat", "Always" },
|
||||
order = 36.1
|
||||
order = 36.3
|
||||
}
|
||||
|
||||
opts["perRow"] = {
|
||||
@ -333,7 +367,7 @@ function IceTargetInfo.prototype:GetOptions()
|
||||
self:CreateBuffFrame()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
return not self.moduleSettings.enabled or not self.moduleSettings.showBuffs
|
||||
end,
|
||||
order = 37.1
|
||||
}
|
||||
@ -351,7 +385,7 @@ function IceTargetInfo.prototype:GetOptions()
|
||||
self:CreateBuffFrame()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
return not self.moduleSettings.enabled or not self.moduleSettings.showBuffs
|
||||
end,
|
||||
order = 37.2
|
||||
}
|
||||
@ -371,7 +405,7 @@ function IceTargetInfo.prototype:GetOptions()
|
||||
self:CreateBuffFrame()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
return not self.moduleSettings.enabled or not self.moduleSettings.showBuffs
|
||||
end,
|
||||
order = 37.3
|
||||
}
|
||||
@ -391,7 +425,7 @@ function IceTargetInfo.prototype:GetOptions()
|
||||
self:CreateBuffFrame()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
return not self.moduleSettings.enabled or not self.moduleSettings.showBuffs
|
||||
end,
|
||||
order = 37.4
|
||||
}
|
||||
@ -415,7 +449,7 @@ function IceTargetInfo.prototype:GetOptions()
|
||||
self:CreateDebuffFrame()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
return not self.moduleSettings.enabled or not self.moduleSettings.showDebuffs
|
||||
end,
|
||||
order = 37.81
|
||||
}
|
||||
@ -433,7 +467,7 @@ function IceTargetInfo.prototype:GetOptions()
|
||||
self:CreateDebuffFrame()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
return not self.moduleSettings.enabled or not self.moduleSettings.showDebuffs
|
||||
end,
|
||||
order = 37.82
|
||||
}
|
||||
@ -453,7 +487,7 @@ function IceTargetInfo.prototype:GetOptions()
|
||||
self:CreateDebuffFrame()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
return not self.moduleSettings.enabled or not self.moduleSettings.showDebuffs
|
||||
end,
|
||||
order = 37.83
|
||||
}
|
||||
@ -473,7 +507,7 @@ function IceTargetInfo.prototype:GetOptions()
|
||||
self:CreateDebuffFrame()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
return not self.moduleSettings.enabled or not self.moduleSettings.showDebuffs
|
||||
end,
|
||||
order = 37.84
|
||||
}
|
||||
@ -637,6 +671,8 @@ function IceTargetInfo.prototype:GetDefaultSettings()
|
||||
defaults["line4Tag"] = ""
|
||||
defaults["myTagVersion"] = 2
|
||||
defaults["alwaysFullAlpha"] = true
|
||||
defaults["showBuffs"] = true
|
||||
defaults["showDebuffs"] = true
|
||||
|
||||
return defaults
|
||||
end
|
||||
@ -871,6 +907,12 @@ function IceTargetInfo.prototype:CreateBuffFrame(redraw)
|
||||
local direction = self.moduleSettings.buffGrowDirection == "Left" and -1 or 1
|
||||
self.frame.buffFrame.buffs = self:CreateIconFrames(self.frame.buffFrame, direction, self.frame.buffFrame.buffs, "buff")
|
||||
end
|
||||
|
||||
if self.moduleSettings.showBuffs then
|
||||
self.frame.buffFrame:Show()
|
||||
else
|
||||
self.frame.buffFrame:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -894,6 +936,12 @@ function IceTargetInfo.prototype:CreateDebuffFrame(redraw)
|
||||
local direction = self.moduleSettings.debuffGrowDirection == "Left" and -1 or 1
|
||||
self.frame.debuffFrame.buffs = self:CreateIconFrames(self.frame.debuffFrame, direction, self.frame.debuffFrame.buffs, "debuff")
|
||||
end
|
||||
|
||||
if self.moduleSettings.showDebuffs then
|
||||
self.frame.debuffFrame:Show()
|
||||
else
|
||||
self.frame.debuffFrame:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -998,7 +1046,6 @@ function IceTargetInfo.prototype:CreateIconFrames(parent, direction, buffs, type
|
||||
end
|
||||
|
||||
function IceTargetInfo.prototype:SetBuffSize(buff)
|
||||
|
||||
end
|
||||
|
||||
function IceTargetInfo.prototype:UpdateBuffs()
|
||||
@ -1025,6 +1072,7 @@ function IceTargetInfo.prototype:UpdateBuffs()
|
||||
local hostile = UnitCanAttack("player", self.unit)
|
||||
|
||||
|
||||
if self.moduleSettings.showBuffs then
|
||||
for i = 1, IceCore.BuffLimit do
|
||||
local buffName, buffRank, buffTexture, buffApplications, buffType, buffDuration, buffTimeLeft, isFromMe, unitCaster;
|
||||
if IceHUD.WowVer >= 30000 then
|
||||
@ -1045,10 +1093,12 @@ function IceTargetInfo.prototype:UpdateBuffs()
|
||||
self.frame.buffFrame.buffs[i]:Hide()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local direction = self.moduleSettings.buffGrowDirection == "Left" and -1 or 1
|
||||
self.frame.buffFrame.buffs = self:CreateIconFrames(self.frame.buffFrame, direction, self.frame.buffFrame.buffs, "buff")
|
||||
|
||||
if self.moduleSettings.showDebuffs then
|
||||
for i = 1, IceCore.BuffLimit do
|
||||
local buffName, buffRank, buffTexture, buffApplications, debuffDispelType,
|
||||
debuffDuration, debuffTimeLeft, unitCaster = UnitAura(self.unit, i, "HARMFUL" .. (filterDebuffs and "|PLAYER" or "")) --UnitDebuff(self.unit, i, filterDebuffs and not hostile)
|
||||
@ -1095,6 +1145,7 @@ function IceTargetInfo.prototype:UpdateBuffs()
|
||||
self.frame.debuffFrame.buffs[i]:Hide()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local direction = self.moduleSettings.debuffGrowDirection == "Left" and -1 or 1
|
||||
self.frame.debuffFrame.buffs = self:CreateIconFrames(self.frame.debuffFrame, direction, self.frame.debuffFrame.buffs, "debuff")
|
||||
|
Reference in New Issue
Block a user