- pedantically replaced sets of spaces with tabs. i'm that guy.

This commit is contained in:
Parnic
2010-11-05 01:48:46 +00:00
parent 508b022572
commit a93bcaf190
6 changed files with 136 additions and 136 deletions

View File

@ -61,7 +61,7 @@ function IceCastBar.prototype:GetDefaultSettings()
settings["auraIconXOffset"] = 40 settings["auraIconXOffset"] = 40
settings["auraIconYOffset"] = 0 settings["auraIconYOffset"] = 0
settings["auraIconScale"] = 1 settings["auraIconScale"] = 1
settings["reverseChannel"] = true settings["reverseChannel"] = true
return settings return settings
end end

View File

@ -1017,12 +1017,12 @@ function PlayerHealth.prototype:CheckPartyRole()
IceHUD:Debug( tostring(proposalExists) .."**".. tostring(typeID) .."**".. tostring(id) .."**".. tostring(name) .."**".. tostring(texture) .."**".. tostring(role) .."**".. tostring(hasResponded) .."**".. tostring(totalEncounters) .."**".. tostring(completedEncounters) .."**".. tostring(numMembers) .."**".. tostring(isleader) ) IceHUD:Debug( tostring(proposalExists) .."**".. tostring(typeID) .."**".. tostring(id) .."**".. tostring(name) .."**".. tostring(texture) .."**".. tostring(role) .."**".. tostring(hasResponded) .."**".. tostring(totalEncounters) .."**".. tostring(completedEncounters) .."**".. tostring(numMembers) .."**".. tostring(isleader) )
if proposalExists == true then if proposalExists == true then
IceHUD:Debug(tostring(typeID).." "..role) IceHUD:Debug(tostring(typeID).." "..role)
isTank = (role == "TANK") isTank = (role == "TANK")
isHeal = (role == "HEALER") isHeal = (role == "HEALER")
isDPS = (role == "DAMAGER") isDPS = (role == "DAMAGER")
else else
IceHUD:Debug("NoProposal") IceHUD:Debug("NoProposal")
end end
IceHUD:Debug("---") IceHUD:Debug("---")

View File

@ -252,7 +252,7 @@ function Runes.prototype:UpdateRunePower(event, rune, dontFlash)
self.frame.graphical[rune].cd:Show() self.frame.graphical[rune].cd:Show()
elseif self.moduleSettings.cooldownMode == "Alpha" then elseif self.moduleSettings.cooldownMode == "Alpha" then
self.frame.graphical[rune]:SetAlpha(0.2) self.frame.graphical[rune]:SetAlpha(0.2)
elseif self.moduleSettings.cooldownMode == "Both" then elseif self.moduleSettings.cooldownMode == "Both" then
self.frame.graphical[rune].cd:SetCooldown(GetRuneCooldown(rune)) self.frame.graphical[rune].cd:SetCooldown(GetRuneCooldown(rune))
self.frame.graphical[rune].cd:Show() self.frame.graphical[rune].cd:Show()
self.frame.graphical[rune]:SetAlpha(0.2) self.frame.graphical[rune]:SetAlpha(0.2)

View File

@ -67,70 +67,70 @@ end
-- OVERRIDE -- OVERRIDE
function SliceAndDice.prototype:GetDefaultSettings() function SliceAndDice.prototype:GetDefaultSettings()
local settings = SliceAndDice.super.prototype.GetDefaultSettings(self) local settings = SliceAndDice.super.prototype.GetDefaultSettings(self)
settings["enabled"] = false settings["enabled"] = false
settings["shouldAnimate"] = false settings["shouldAnimate"] = false
settings["desiredLerpTime"] = nil settings["desiredLerpTime"] = nil
settings["lowThreshold"] = 0 settings["lowThreshold"] = 0
settings["side"] = IceCore.Side.Right settings["side"] = IceCore.Side.Right
settings["offset"] = 6 settings["offset"] = 6
settings["upperText"]="SnD:" settings["upperText"]="SnD:"
settings["showAsPercentOfMax"] = true settings["showAsPercentOfMax"] = true
settings["durationAlpha"] = 0.6 settings["durationAlpha"] = 0.6
settings["usesDogTagStrings"] = false settings["usesDogTagStrings"] = false
settings["lockLowerFontAlpha"] = false settings["lockLowerFontAlpha"] = false
settings["lowerTextString"] = "" settings["lowerTextString"] = ""
settings["lowerTextVisible"] = false settings["lowerTextVisible"] = false
settings["hideAnimationSettings"] = true settings["hideAnimationSettings"] = true
settings["bAllowExpand"] = true settings["bAllowExpand"] = true
return settings return settings
end end
-- OVERRIDE -- OVERRIDE
function SliceAndDice.prototype:GetOptions() function SliceAndDice.prototype:GetOptions()
local opts = SliceAndDice.super.prototype.GetOptions(self) local opts = SliceAndDice.super.prototype.GetOptions(self)
opts["textSettings"].args["upperTextString"]["desc"] = "The text to display under this bar. # will be replaced with the number of Slice and Dice seconds remaining." opts["textSettings"].args["upperTextString"]["desc"] = "The text to display under this bar. # will be replaced with the number of Slice and Dice seconds remaining."
opts["showAsPercentOfMax"] = opts["showAsPercentOfMax"] =
{ {
type = 'toggle', type = 'toggle',
name = L["Show bar as % of maximum"], name = L["Show bar as % of maximum"],
desc = L["If this is checked, then the SnD buff time shows as a percent of the maximum attainable (taking set bonuses and talents into account). Otherwise, the bar always goes from full to empty when applying SnD no matter the duration."], desc = L["If this is checked, then the SnD buff time shows as a percent of the maximum attainable (taking set bonuses and talents into account). Otherwise, the bar always goes from full to empty when applying SnD no matter the duration."],
get = function() get = function()
return self.moduleSettings.showAsPercentOfMax return self.moduleSettings.showAsPercentOfMax
end, end,
set = function(info, v) set = function(info, v)
self.moduleSettings.showAsPercentOfMax = v self.moduleSettings.showAsPercentOfMax = v
end, end,
disabled = function() disabled = function()
return not self.moduleSettings.enabled return not self.moduleSettings.enabled
end end
} }
opts["durationAlpha"] = opts["durationAlpha"] =
{ {
type = "range", type = "range",
name = L["Potential SnD time bar alpha"], name = L["Potential SnD time bar alpha"],
desc = L["What alpha value to use for the bar that displays how long your SnD will last if you activate it. (This gets multiplied by the bar's current alpha to stay in line with the bar on top of it)"], desc = L["What alpha value to use for the bar that displays how long your SnD will last if you activate it. (This gets multiplied by the bar's current alpha to stay in line with the bar on top of it)"],
min = 0, min = 0,
max = 100, max = 100,
step = 5, step = 5,
get = function() get = function()
return self.moduleSettings.durationAlpha * 100 return self.moduleSettings.durationAlpha * 100
end, end,
set = function(info, v) set = function(info, v)
self.moduleSettings.durationAlpha = v / 100.0 self.moduleSettings.durationAlpha = v / 100.0
self:Redraw() self:Redraw()
end, end,
disabled = function() disabled = function()
return not self.moduleSettings.enabled return not self.moduleSettings.enabled
end end
} }
return opts return opts
end end
function SliceAndDice.prototype:CreateFrame() function SliceAndDice.prototype:CreateFrame()
@ -172,32 +172,32 @@ end
-- 'Protected' methods -------------------------------------------------------- -- 'Protected' methods --------------------------------------------------------
function SliceAndDice.prototype:GetBuffDuration(unitName, buffName) function SliceAndDice.prototype:GetBuffDuration(unitName, buffName)
local i = 1 local i = 1
local buff, rank, texture, count, type, duration, endTime, remaining local buff, rank, texture, count, type, duration, endTime, remaining
if IceHUD.WowVer >= 30000 then if IceHUD.WowVer >= 30000 then
buff, rank, texture, count, type, duration, endTime = UnitBuff(unitName, i) buff, rank, texture, count, type, duration, endTime = UnitBuff(unitName, i)
else else
buff, rank, texture, count, duration, remaining = UnitBuff(unitName, i) buff, rank, texture, count, duration, remaining = UnitBuff(unitName, i)
end end
while buff do while buff do
if (texture and string.match(texture, buffName)) then if (texture and string.match(texture, buffName)) then
if endTime and not remaining then if endTime and not remaining then
remaining = endTime - GetTime() remaining = endTime - GetTime()
end end
return duration, remaining return duration, remaining
end end
i = i + 1; i = i + 1;
if IceHUD.WowVer >= 30000 then if IceHUD.WowVer >= 30000 then
buff, rank, texture, count, type, duration, endTime = UnitBuff(unitName, i) buff, rank, texture, count, type, duration, endTime = UnitBuff(unitName, i)
else else
buff, rank, texture, count, duration, remaining = UnitBuff(unitName, i) buff, rank, texture, count, duration, remaining = UnitBuff(unitName, i)
end end
end end
return nil, nil return nil, nil
end end
function SliceAndDice.prototype:MyOnUpdate() function SliceAndDice.prototype:MyOnUpdate()
@ -208,54 +208,54 @@ function SliceAndDice.prototype:MyOnUpdate()
end end
function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate) function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate)
if unit and unit ~= self.unit then if unit and unit ~= self.unit then
return return
end end
local now = GetTime() local now = GetTime()
local remaining = nil local remaining = nil
if not fromUpdate or IceHUD.WowVer < 30000 then if not fromUpdate or IceHUD.WowVer < 30000 then
sndDuration, remaining = self:GetBuffDuration(self.unit, "Ability_Rogue_SliceDice") sndDuration, remaining = self:GetBuffDuration(self.unit, "Ability_Rogue_SliceDice")
if not remaining then if not remaining then
sndEndTime = 0 sndEndTime = 0
else else
sndEndTime = remaining + now sndEndTime = remaining + now
end end
end end
if sndEndTime and sndEndTime >= now then if sndEndTime and sndEndTime >= now then
if not fromUpdate then if not fromUpdate then
self.bUpdateSnd = true self.bUpdateSnd = true
end end
self:Show(true) self:Show(true)
if not remaining then if not remaining then
remaining = sndEndTime - now remaining = sndEndTime - now
end end
local denominator = (self.moduleSettings.showAsPercentOfMax and CurrMaxSnDDuration or sndDuration) local denominator = (self.moduleSettings.showAsPercentOfMax and CurrMaxSnDDuration or sndDuration)
self:UpdateBar(denominator ~= 0 and remaining / denominator or 0, "SliceAndDice") self:UpdateBar(denominator ~= 0 and remaining / denominator or 0, "SliceAndDice")
formatString = self.moduleSettings.upperText or '' formatString = self.moduleSettings.upperText or ''
else else
self:UpdateBar(0, "SliceAndDice") self:UpdateBar(0, "SliceAndDice")
if ((IceHUD.WowVer >= 30000 and GetComboPoints(self.unit, "target") == 0) or (IceHUD.WowVer < 30000 and GetComboPoints() == 0)) or not UnitExists("target") then if ((IceHUD.WowVer >= 30000 and GetComboPoints(self.unit, "target") == 0) or (IceHUD.WowVer < 30000 and GetComboPoints() == 0)) or not UnitExists("target") then
if self.bIsVisible then if self.bIsVisible then
self.bUpdateSnd = nil self.bUpdateSnd = nil
end end
if not self.moduleSettings.alwaysFullAlpha then if not self.moduleSettings.alwaysFullAlpha then
self:Show(false) self:Show(false)
end end
end end
end end
-- somewhat redundant, but we also need to check potential remaining time -- somewhat redundant, but we also need to check potential remaining time
if (remaining ~= nil) or PotentialSnDDuration > 0 then if (remaining ~= nil) or PotentialSnDDuration > 0 then
self:SetBottomText1(self.moduleSettings.upperText .. tostring(floor(remaining or 0)) .. " (" .. PotentialSnDDuration .. ")") self:SetBottomText1(self.moduleSettings.upperText .. tostring(floor(remaining or 0)) .. " (" .. PotentialSnDDuration .. ")")
end end
end end
function SliceAndDice.prototype:UpdateDurationBar(event, unit) function SliceAndDice.prototype:UpdateDurationBar(event, unit)
@ -293,7 +293,7 @@ function SliceAndDice.prototype:UpdateDurationBar(event, unit)
-- sadly, animation uses bar-local variables so we can't use the animation for 2 bar textures on the same bar element -- sadly, animation uses bar-local variables so we can't use the animation for 2 bar textures on the same bar element
if (self.moduleSettings.reverse) then if (self.moduleSettings.reverse) then
scale = 1 - scale scale = 1 - scale
end end
self.durationFrame.bar:SetVertexColor(self:GetColor("SliceAndDicePotential", self.alpha * self.moduleSettings.durationAlpha)) self.durationFrame.bar:SetVertexColor(self:GetColor("SliceAndDicePotential", self.alpha * self.moduleSettings.durationAlpha))
@ -305,27 +305,27 @@ function SliceAndDice.prototype:UpdateDurationBar(event, unit)
end end
function SliceAndDice.prototype:GetMaxBuffTime(numComboPoints) function SliceAndDice.prototype:GetMaxBuffTime(numComboPoints)
local maxduration local maxduration
if numComboPoints == 0 then if numComboPoints == 0 then
return 0 return 0
end end
maxduration = baseTime + ((numComboPoints - 1) * gapPerComboPoint) maxduration = baseTime + ((numComboPoints - 1) * gapPerComboPoint)
if self:HasNetherbladeBonus() then if self:HasNetherbladeBonus() then
maxduration = maxduration + netherbladeBonus maxduration = maxduration + netherbladeBonus
end end
if self:HasGlyphBonus() then if self:HasGlyphBonus() then
maxduration = maxduration + glyphBonusSec maxduration = maxduration + glyphBonusSec
end end
_, _, _, _, rank = GetTalentInfo(impSndTalentPage, impSndTalentIdx) _, _, _, _, rank = GetTalentInfo(impSndTalentPage, impSndTalentIdx)
maxduration = maxduration * (1 + (rank * impSndBonusPerRank)) maxduration = maxduration * (1 + (rank * impSndBonusPerRank))
return maxduration return maxduration
end end
function SliceAndDice.prototype:HasNetherbladeBonus() function SliceAndDice.prototype:HasNetherbladeBonus()
@ -395,5 +395,5 @@ end
local _, unitClass = UnitClass("player") local _, unitClass = UnitClass("player")
-- Load us up -- Load us up
if unitClass == "ROGUE" then if unitClass == "ROGUE" then
IceHUD.SliceAndDice = SliceAndDice:new() IceHUD.SliceAndDice = SliceAndDice:new()
end end

View File

@ -1074,9 +1074,9 @@ function IceTargetHealth.prototype:CheckPartyRole()
end end
if proposalExists == true then if proposalExists == true then
isTank = (role == "TANK") isTank = (role == "TANK")
isHeal = (role == "HEALER") isHeal = (role == "HEALER")
isDPS = (role == "DAMAGER") isDPS = (role == "DAMAGER")
end end
if proposalExists == nil then if proposalExists == nil then

View File

@ -1112,14 +1112,14 @@ do
local anchor, spaceOffset local anchor, spaceOffset
local newRow = ((i % self.moduleSettings.perRow) == 1 or self.moduleSettings.perRow == 1) local newRow = ((i % self.moduleSettings.perRow) == 1 or self.moduleSettings.perRow == 1)
if newRow then if newRow then
lastX = 0 lastX = 0
lastY = lastY + largestHeightThisRow lastY = lastY + largestHeightThisRow
largestHeightThisRow = 0 largestHeightThisRow = 0
lastAuraSize = 0 lastAuraSize = 0
spaceOffset = 0 spaceOffset = 0
else else
spaceOffset = self.moduleSettings.spaceBetweenBuffs spaceOffset = self.moduleSettings.spaceBetweenBuffs
end end
if left then if left then
@ -1149,7 +1149,7 @@ do
end end
-- Rokiyo: Can't locally buffering these until I'm sure they exist :( -- Rokiyo: Can't locally buffering these until I'm sure they exist :(
local frame = iconFrames[i] local frame = iconFrames[i]
local icon = frame.icon local icon = frame.icon
frame:ClearAllPoints() frame:ClearAllPoints()
frame:SetPoint(anchor, offset_x, offset_y) frame:SetPoint(anchor, offset_x, offset_y)