- 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["auraIconYOffset"] = 0
settings["auraIconScale"] = 1
settings["reverseChannel"] = true
settings["reverseChannel"] = true
return settings
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) )
if proposalExists == true then
IceHUD:Debug(tostring(typeID).." "..role)
isTank = (role == "TANK")
isHeal = (role == "HEALER")
isDPS = (role == "DAMAGER")
IceHUD:Debug(tostring(typeID).." "..role)
isTank = (role == "TANK")
isHeal = (role == "HEALER")
isDPS = (role == "DAMAGER")
else
IceHUD:Debug("NoProposal")
IceHUD:Debug("NoProposal")
end
IceHUD:Debug("---")

View File

@ -252,7 +252,7 @@ function Runes.prototype:UpdateRunePower(event, rune, dontFlash)
self.frame.graphical[rune].cd:Show()
elseif self.moduleSettings.cooldownMode == "Alpha" then
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:Show()
self.frame.graphical[rune]:SetAlpha(0.2)

View File

@ -67,70 +67,70 @@ end
-- OVERRIDE
function SliceAndDice.prototype:GetDefaultSettings()
local settings = SliceAndDice.super.prototype.GetDefaultSettings(self)
local settings = SliceAndDice.super.prototype.GetDefaultSettings(self)
settings["enabled"] = false
settings["shouldAnimate"] = false
settings["desiredLerpTime"] = nil
settings["lowThreshold"] = 0
settings["side"] = IceCore.Side.Right
settings["offset"] = 6
settings["upperText"]="SnD:"
settings["showAsPercentOfMax"] = true
settings["durationAlpha"] = 0.6
settings["usesDogTagStrings"] = false
settings["lockLowerFontAlpha"] = false
settings["lowerTextString"] = ""
settings["lowerTextVisible"] = false
settings["hideAnimationSettings"] = true
settings["bAllowExpand"] = true
settings["enabled"] = false
settings["shouldAnimate"] = false
settings["desiredLerpTime"] = nil
settings["lowThreshold"] = 0
settings["side"] = IceCore.Side.Right
settings["offset"] = 6
settings["upperText"]="SnD:"
settings["showAsPercentOfMax"] = true
settings["durationAlpha"] = 0.6
settings["usesDogTagStrings"] = false
settings["lockLowerFontAlpha"] = false
settings["lowerTextString"] = ""
settings["lowerTextVisible"] = false
settings["hideAnimationSettings"] = true
settings["bAllowExpand"] = true
return settings
return settings
end
-- OVERRIDE
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"] =
{
type = 'toggle',
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."],
get = function()
return self.moduleSettings.showAsPercentOfMax
end,
set = function(info, v)
self.moduleSettings.showAsPercentOfMax = v
end,
disabled = function()
return not self.moduleSettings.enabled
end
}
opts["showAsPercentOfMax"] =
{
type = 'toggle',
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."],
get = function()
return self.moduleSettings.showAsPercentOfMax
end,
set = function(info, v)
self.moduleSettings.showAsPercentOfMax = v
end,
disabled = function()
return not self.moduleSettings.enabled
end
}
opts["durationAlpha"] =
{
type = "range",
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)"],
min = 0,
max = 100,
step = 5,
get = function()
return self.moduleSettings.durationAlpha * 100
end,
set = function(info, v)
self.moduleSettings.durationAlpha = v / 100.0
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end
}
opts["durationAlpha"] =
{
type = "range",
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)"],
min = 0,
max = 100,
step = 5,
get = function()
return self.moduleSettings.durationAlpha * 100
end,
set = function(info, v)
self.moduleSettings.durationAlpha = v / 100.0
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end
}
return opts
return opts
end
function SliceAndDice.prototype:CreateFrame()
@ -172,32 +172,32 @@ end
-- 'Protected' methods --------------------------------------------------------
function SliceAndDice.prototype:GetBuffDuration(unitName, buffName)
local i = 1
local buff, rank, texture, count, type, duration, endTime, remaining
if IceHUD.WowVer >= 30000 then
buff, rank, texture, count, type, duration, endTime = UnitBuff(unitName, i)
else
buff, rank, texture, count, duration, remaining = UnitBuff(unitName, i)
end
local i = 1
local buff, rank, texture, count, type, duration, endTime, remaining
if IceHUD.WowVer >= 30000 then
buff, rank, texture, count, type, duration, endTime = UnitBuff(unitName, i)
else
buff, rank, texture, count, duration, remaining = UnitBuff(unitName, i)
end
while buff do
if (texture and string.match(texture, buffName)) then
if endTime and not remaining then
remaining = endTime - GetTime()
end
return duration, remaining
end
while buff do
if (texture and string.match(texture, buffName)) then
if endTime and not remaining then
remaining = endTime - GetTime()
end
return duration, remaining
end
i = i + 1;
i = i + 1;
if IceHUD.WowVer >= 30000 then
buff, rank, texture, count, type, duration, endTime = UnitBuff(unitName, i)
else
buff, rank, texture, count, duration, remaining = UnitBuff(unitName, i)
end
end
if IceHUD.WowVer >= 30000 then
buff, rank, texture, count, type, duration, endTime = UnitBuff(unitName, i)
else
buff, rank, texture, count, duration, remaining = UnitBuff(unitName, i)
end
end
return nil, nil
return nil, nil
end
function SliceAndDice.prototype:MyOnUpdate()
@ -208,54 +208,54 @@ function SliceAndDice.prototype:MyOnUpdate()
end
function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate)
if unit and unit ~= self.unit then
return
end
if unit and unit ~= self.unit then
return
end
local now = GetTime()
local remaining = nil
local now = GetTime()
local remaining = nil
if not fromUpdate or IceHUD.WowVer < 30000 then
sndDuration, remaining = self:GetBuffDuration(self.unit, "Ability_Rogue_SliceDice")
if not fromUpdate or IceHUD.WowVer < 30000 then
sndDuration, remaining = self:GetBuffDuration(self.unit, "Ability_Rogue_SliceDice")
if not remaining then
sndEndTime = 0
sndEndTime = 0
else
sndEndTime = remaining + now
end
end
sndEndTime = remaining + now
end
end
if sndEndTime and sndEndTime >= now then
if not fromUpdate then
if sndEndTime and sndEndTime >= now then
if not fromUpdate then
self.bUpdateSnd = true
end
end
self:Show(true)
if not remaining then
remaining = sndEndTime - now
end
local denominator = (self.moduleSettings.showAsPercentOfMax and CurrMaxSnDDuration or sndDuration)
self:UpdateBar(denominator ~= 0 and remaining / denominator or 0, "SliceAndDice")
self:Show(true)
if not remaining then
remaining = sndEndTime - now
end
local denominator = (self.moduleSettings.showAsPercentOfMax and CurrMaxSnDDuration or sndDuration)
self:UpdateBar(denominator ~= 0 and remaining / denominator or 0, "SliceAndDice")
formatString = self.moduleSettings.upperText or ''
else
formatString = self.moduleSettings.upperText or ''
else
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 self.bIsVisible then
self.bUpdateSnd = nil
end
if self.bIsVisible then
self.bUpdateSnd = nil
end
if not self.moduleSettings.alwaysFullAlpha then
self:Show(false)
end
end
end
end
-- somewhat redundant, but we also need to check potential remaining time
if (remaining ~= nil) or PotentialSnDDuration > 0 then
self:SetBottomText1(self.moduleSettings.upperText .. tostring(floor(remaining or 0)) .. " (" .. PotentialSnDDuration .. ")")
end
-- somewhat redundant, but we also need to check potential remaining time
if (remaining ~= nil) or PotentialSnDDuration > 0 then
self:SetBottomText1(self.moduleSettings.upperText .. tostring(floor(remaining or 0)) .. " (" .. PotentialSnDDuration .. ")")
end
end
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
if (self.moduleSettings.reverse) then
scale = 1 - scale
scale = 1 - scale
end
self.durationFrame.bar:SetVertexColor(self:GetColor("SliceAndDicePotential", self.alpha * self.moduleSettings.durationAlpha))
@ -305,27 +305,27 @@ function SliceAndDice.prototype:UpdateDurationBar(event, unit)
end
function SliceAndDice.prototype:GetMaxBuffTime(numComboPoints)
local maxduration
local maxduration
if numComboPoints == 0 then
return 0
end
if numComboPoints == 0 then
return 0
end
maxduration = baseTime + ((numComboPoints - 1) * gapPerComboPoint)
maxduration = baseTime + ((numComboPoints - 1) * gapPerComboPoint)
if self:HasNetherbladeBonus() then
maxduration = maxduration + netherbladeBonus
end
if self:HasNetherbladeBonus() then
maxduration = maxduration + netherbladeBonus
end
if self:HasGlyphBonus() then
maxduration = maxduration + glyphBonusSec
end
if self:HasGlyphBonus() then
maxduration = maxduration + glyphBonusSec
end
_, _, _, _, rank = GetTalentInfo(impSndTalentPage, impSndTalentIdx)
_, _, _, _, rank = GetTalentInfo(impSndTalentPage, impSndTalentIdx)
maxduration = maxduration * (1 + (rank * impSndBonusPerRank))
maxduration = maxduration * (1 + (rank * impSndBonusPerRank))
return maxduration
return maxduration
end
function SliceAndDice.prototype:HasNetherbladeBonus()
@ -395,5 +395,5 @@ end
local _, unitClass = UnitClass("player")
-- Load us up
if unitClass == "ROGUE" then
IceHUD.SliceAndDice = SliceAndDice:new()
IceHUD.SliceAndDice = SliceAndDice:new()
end

View File

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

View File

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