diff --git a/PerfectRaid.lua b/PerfectRaid.lua
index 0ec2a13..8cc4dcf 100644
--- a/PerfectRaid.lua
+++ b/PerfectRaid.lua
@@ -12,7 +12,7 @@
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
- * Neither the name of PerfectRaid nor the names of its contributors
+ * Neither the name of PerfectRaid nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
@@ -125,11 +125,11 @@ function PerfectRaid:SavePosition(name)
local f = getglobal(name)
local x,y = f:GetLeft(), f:GetTop()
local s = f:GetEffectiveScale()
-
+
x,y = x*s,y*s
-
+
local opt = self.db.profile.positions[name]
- if not opt then
+ if not opt then
self.db.profile.positions[name] = {}
opt = self.db.profile.positions[name]
end
@@ -140,7 +140,7 @@ end
function PerfectRaid:RestorePosition(name)
local f = getglobal(name)
local opt = self.db.profile.positions[name]
- if not opt then
+ if not opt then
self.db.profile.positions[name] = {}
opt = self.db.profile.positions[name]
end
@@ -149,11 +149,11 @@ function PerfectRaid:RestorePosition(name)
local y = opt.PosY
local s = f:GetEffectiveScale()
-
+
if not x or not y then
f:ClearAllPoints()
f:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
- return
+ return
end
x,y = x/s,y/s
@@ -183,7 +183,7 @@ function PerfectRaid:CreateRaidFrame(idx)
local options = self.db.profile.headers[idx]
local name = "PRHeader"..idx
local template = "SecureGroupHeaderTemplate"
-
+
local frame = getglobal(name)
if not frame then
@@ -193,10 +193,10 @@ function PerfectRaid:CreateRaidFrame(idx)
frame.title:SetPoint("BOTTOM", frame, "TOP", 0, 3)
frame.backdrop = {
- bgFile = "Interface\\AddOns\\PerfectRaid\\images\\bgFile",
- tile = true, tileSize = 32,
+ bgFile = "Interface\\AddOns\\PerfectRaid\\images\\bgFile",
+ tile = true, tileSize = 32,
edgeFile = "Interface\\AddOns\\PerfectRaid\\images\\edgeFile",
- edgeSize = 16,
+ edgeSize = 16,
insets = {
left = 6,
right = 5,
@@ -239,7 +239,7 @@ function PerfectRaid:CreateRaidFrame(idx)
frame:SetAttribute("groupBy", options.groupBy)
local groupOrder
if options.groupBy == "CLASS" then
- groupOrder="WARRIOR,DEATHKNIGHT,PRIEST,DRUID,SHAMAN,MONK,PALADIN,MAGE,ROGUE,WARLOCK,HUNTER"
+ groupOrder="WARRIOR,DEATHKNIGHT,PRIEST,DRUID,SHAMAN,MONK,PALADIN,MAGE,ROGUE,WARLOCK,HUNTER"
elseif options.groupBy == "GROUP" then
groupOrder="1,2,3,4,5,6,7,8"
end
@@ -310,7 +310,7 @@ function PerfectRaid:UNIT_HEALTH(event, unit)
local class = select(2, UnitClass(unit))
local perc = (health/max) or 0
- if deficit > 999 then
+ if deficit > 999 then
deficit = string.format("%.1fk", deficit / 1000)
elseif deficit == 0 then
deficit = ""
@@ -330,13 +330,13 @@ function PerfectRaid:UNIT_HEALTH(event, unit)
unavail[unit] = true
- if UnitIsDead(unit) then
+ if UnitIsDead(unit) then
status = L["Dead"]
elseif UnitIsGhost(unit) then
status = L["Ghost"]
elseif not UnitIsConnected(unit) then
status = L["Offline"]
- end
+ end
for frame in pairs(frames[unit]) do
frame.healthbar:SetValue(max)
@@ -359,7 +359,7 @@ function PerfectRaid:UNIT_HEALTH(event, unit)
local color = frame.manacolor
frame.manabar:SetStatusBarColor(color.r, color.g, color.b)
-
+
local value = health
if options.reverse then
value = max - health
@@ -409,7 +409,7 @@ end
function PerfectRaid:UNIT_MAXPOWER(event, unit, powerType)
if not frames[unit] then return end
-
+
local currentType, currentToken = UnitPowerType(unit)
if currentToken == powerType then
local max = UnitPowerMax(unit, currentType)
@@ -439,7 +439,7 @@ local function OnShow(frame)
end
local unitname = UnitName(unit)
- if not frame.unitname then
+ if not frame.unitname then
frame.unitname = unitname
else
if frame.unitname == unitname then
@@ -501,12 +501,12 @@ function OnAttributeChanged(frame, name, value)
-- frame.name:SetText(UnitName(unit))G
local class = select(2, UnitClass(unit)) or "WARRIOR"
- frame.class = class
+ frame.class = class
frame.classcolor = RAID_CLASS_COLORS[class]
- frame.manacolor = PowerBarColor[UnitPowerType(unit)]
+ frame.manacolor = PowerBarColor[UnitPowerType(unit)]
local color = frame.classcolor
- frame.healthbar:SetStatusBarColor(color.r, color.g, color.b)
+ frame.healthbar:SetStatusBarColor(color.r, color.g, color.b)
frame.healthbar:SetMinMaxValues(0, UnitHealthMax(unit))
frame.healthbar:SetValue(UnitHealth(unit))
-- frame:SetBackdropBorderColor(color.r, color.g, color.b)
@@ -561,7 +561,7 @@ end
function PerfectRaid.ConfigureButton(header, buttonName)
local self = PerfectRaid
- local button
+ local button
if type(buttonName) == "string" then
button = _G[buttonName]
end
@@ -708,7 +708,7 @@ function PerfectRaid:GROUP_ROSTER_UPDATE()
function PerfectRaid:UNIT_DISPLAYPOWER(event, unit)
if not frames[unit] then return end
- local color = PowerBarColor[UnitPowerType(unit)]
+ local color = PowerBarColor[UnitPowerType(unit)]
local show = UnitPowerType(unit) == 0
local max = UnitManaMax(unit)
local mana = UnitMana(unit)
@@ -725,7 +725,7 @@ function PerfectRaid:UNIT_DISPLAYPOWER(event, unit)
bar:Show()
elseif manaonly then
bar:Hide()
- end
+ end
end
end
diff --git a/PerfectRaid_Aggro.lua b/PerfectRaid_Aggro.lua
index 8f4cee4..c3dfaaa 100644
--- a/PerfectRaid_Aggro.lua
+++ b/PerfectRaid_Aggro.lua
@@ -12,7 +12,7 @@
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
- * Neither the name of PerfectRaid nor the names of its contributors
+ * Neither the name of PerfectRaid nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
@@ -63,7 +63,7 @@ function Aggro:Disable()
end
for k,v in pairs(aggro) do aggro[k] = 0 end
end
-
+
function Aggro:DONGLE_PROFILE_CHANGED(event, addon, svname, name)
if svname == "PerfectRaidDB" then
rate = PerfectRaid.db.profile.AggroRate
@@ -104,12 +104,12 @@ function Aggro.OnUpdate(frame, elapsed)
aggro[unit2] = val + 10
end
end
- end
+ end
end
end
-
+
-- aggro update
- for unit, tbl in pairs(frames) do
+ for unit, tbl in pairs(frames) do
-- Aggro decay (thanks BanzaiLib)
if aggro[unit] >= 5 then
aggro[unit] = aggro[unit] - 5
@@ -128,7 +128,7 @@ function Aggro.OnUpdate(frame, elapsed)
end
end
elapsed_counter = 0
- end
+ end
end
local options
@@ -157,7 +157,7 @@ function Aggro:CreateOptions(opt)
cancel:SetPoint("BOTTOMRIGHT", 0, 5)
cancel:SetScript("OnClick", function() self:OnShow() end)
cancel:Show()
-
+
local save = CreateFrame("Button", "PRAggro_Save", options, "PRButtonTemplate")
save:SetText(L["Save"])
save:SetPoint("BOTTOMRIGHT", cancel, "BOTTOMLEFT", -10, 0)
@@ -183,7 +183,7 @@ end
function Aggro:SaveOptions()
local profile = PerfectRaid.db.profile
-
+
profile.AggroCheck = PRAggro_Enable:GetChecked() or false
profile.AggroRate = PRAggro_Rate:GetValue()
diff --git a/PerfectRaid_Buffs.lua b/PerfectRaid_Buffs.lua
index 9800aba..52048ed 100644
--- a/PerfectRaid_Buffs.lua
+++ b/PerfectRaid_Buffs.lua
@@ -12,7 +12,7 @@
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
- * Neither the name of PerfectRaid nor the names of its contributors
+ * Neither the name of PerfectRaid nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
@@ -36,7 +36,7 @@ local timerFrame
-- Speed up this module as much as possible
local genv = _G
-local PerfectRaid = genv.PerfectRaid
+local PerfectRaid = genv.PerfectRaid
local setmetatable = genv.setmetatable
local pairs = genv.pairs
local table = genv.table
@@ -65,10 +65,10 @@ function Buffs:Initialize()
self:RegisterMessage("PERFECTRAID_TAB_CHANGED")
end
-function Buffs:Enable()
+function Buffs:Enable()
self:RegisterEvent("UNIT_AURA")
self:RegisterEvent("GROUP_ROSTER_UPDATE")
-
+
if GetNumGroupMembers() > 0 then
self:GROUP_ROSTER_UPDATE()
end
@@ -77,7 +77,7 @@ function Buffs:Enable()
for unit in pairs(frames) do
self:UNIT_AURA(nil, unit)
- end
+ end
-- Create a simple OnUpdate timer that triggers an update every second
local updateInterval = 1.0 -- How often the OnUpdate code will run (in seconds)
@@ -106,7 +106,7 @@ function Buffs:DONGLE_PROFILE_CREATED(event, db, addon, svname, profileKey)
if not v.disabled then
self:AddDefaultBuff(buffs, v)
end
- end
+ end
end
function Buffs:PERFECTRAID_TAB_CHANGED(old,new)
@@ -128,7 +128,7 @@ function Buffs:GROUP_ROSTER_UPDATE()
raidLookup[unit] = group
end
end
-end
+end
function Buffs:ConfigureButton(button)
local font = button:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
@@ -186,7 +186,7 @@ function Buffs:UNIT_AURA(event, unit)
end
buffcache[name] = (buffcache[name] or 0) + 1
- end
+ end
local debuffType
for i=1,40 do
@@ -258,7 +258,7 @@ function Buffs:UNIT_AURA(event, unit)
local conds = self.conditions
local group = raidLookup[unit]
local mine = mybuffs[buffname]
-
+
if entry.missing then
if not buffname then
checkcond = true
@@ -276,13 +276,13 @@ function Buffs:UNIT_AURA(event, unit)
if entry.strict then
-- Set up a boolean value so we can trip it if a filter fails
local pass = true
-
+
for i,name in pairs(entry.cond) do
if conds[name] and not conds[name](unit, class, group, mine) then
pass = false
end
end
-
+
if pass then
self:CreateBuffEntry(buffname, entry)
end
@@ -307,7 +307,7 @@ function Buffs:CreateBuffEntry(buffname, entry)
local expires = buffexpiry[buffname]
local num = buffcache[buffname]
local mine = mybuffs[buffname]
-
+
if num and num > 1 and not entry.onlymine then
local num = num
-- If the buff is mine, and it should be masked
@@ -320,7 +320,7 @@ function Buffs:CreateBuffEntry(buffname, entry)
work[#work + 1] = string.format("%s(%d)(%d)", entry.colortext, num, -1 * (GetTime() - expires))
else
work[#work + 1] = string.format("%s(%d)", entry.colortext, num)
- end
+ end
else
if (entry.onlymine and not mine) or (not entry.onlymine and mymask[buffname]) then
-- Don't show
@@ -347,7 +347,7 @@ function Buffs:CreateOptions(opt)
button:Click()
self:EditEntry()
end
-
+
for i=1,num_entries do
local button = scrollframe.entries[i]
button:SetScript("OnDoubleClick", OnDoubleClick)
@@ -365,7 +365,7 @@ function Buffs:CreateOptions(opt)
if idx <= #list then
local entry = list[idx]
local display = entry.buffname
-
+
if entry.groupname then
display = display .. "/"..entry.groupname
end
@@ -387,7 +387,7 @@ function Buffs:CreateOptions(opt)
end
end
end
-
+
scrollframe.update = update
scrollframe:SetScript("OnVerticalScroll", function(frame, value)
@@ -418,7 +418,7 @@ function Buffs:CreateOptions(opt)
edit:SetPoint("BOTTOMRIGHT", delete, "BOTTOMLEFT", -10, 0)
edit:SetScript("OnClick", function() self:EditEntry() end)
edit:Show()
-
+
local add = CreateFrame("Button", "PRBuffs_Add", options, "PRButtonTemplate")
add:SetText(L["Add"])
add:SetPoint("BOTTOMRIGHT", edit, "BOTTOMLEFT", -10, 0)
@@ -520,12 +520,12 @@ function Buffs:CreateEditFrame(parent)
if ( color ) then
r, g, b, a = unpack(color);
end
-
+
self.r, self.g, self.b = r, g, b
self.opacityFunc = colorSwatchOpacity;
self.swatchFunc = colorSwatchColor;
self.cancelFunc = colorSwatchCancel;
-
+
ColorPickerFrame.object = self;
UIDropDownMenuButton_OpenColorPicker(self);
ColorPickerFrame:SetFrameStrata("TOOLTIP");
@@ -558,12 +558,12 @@ function Buffs:CreateEditFrame(parent)
bg:SetTexture(.2,.2,.2);
bg:SetPoint("TOPLEFT", swatch, 1, -1);
bg:SetPoint("BOTTOMRIGHT", swatch, 0, 1);
-
+
normalTexture:SetVertexColor(1,1,1)
-
+
swatch.bg, swatch.normalTexture = bg, normalTexture;
swatch.object, swatch.hasAlpha = self, 1
-
+
swatch:SetScript("OnLeave", colorSwatchOnLeave);
swatch:SetScript("OnEnter", colorSwatchOnEnter);
swatch:SetScript("OnClick", colorSwatchOnClick);
@@ -588,7 +588,7 @@ function Buffs:CreateEditFrame(parent)
checks[1]:SetPoint("TOPLEFT", disptext, "BOTTOMLEFT", 0, -20)
checks[1]:Show()
- for i=2,6 do
+ for i=2,6 do
checks[i] = makeCheck(self.conditions[i])
checks[i]:SetPoint("TOPLEFT", checks[i-1], "TOPRIGHT", 60, 0)
checks[i]:Show()
@@ -598,7 +598,7 @@ function Buffs:CreateEditFrame(parent)
checks[7]:SetPoint("TOPLEFT", checks[1], "BOTTOMLEFT", 0, -10)
checks[7]:Show()
- for i=8,12 do
+ for i=8,12 do
checks[i] = makeCheck(self.conditions[i])
checks[i]:SetPoint("TOPLEFT", checks[i-1], "TOPRIGHT", 60, 0)
checks[i]:Show()
@@ -608,7 +608,7 @@ function Buffs:CreateEditFrame(parent)
checks[13]:SetPoint("TOPLEFT", checks[7], "BOTTOMLEFT", 0, -10)
checks[13]:Show()
- for i=14,18 do
+ for i=14,18 do
checks[i] = makeCheck(self.conditions[i])
checks[i]:SetPoint("TOPLEFT", checks[i-1], "TOPRIGHT", 60, 0)
checks[i]:Show()
@@ -618,7 +618,7 @@ function Buffs:CreateEditFrame(parent)
checks[19]:SetPoint("TOPLEFT", checks[13], "BOTTOMLEFT", 0, -10)
checks[19]:Show()
- for i=20,22 do
+ for i=20,22 do
checks[i] = makeCheck(self.conditions[i])
checks[i]:SetPoint("TOPLEFT", checks[i-1], "TOPRIGHT", 60, 0)
checks[i]:Show()
@@ -775,7 +775,7 @@ function Buffs:DeleteEntry()
table.remove(PerfectRaid.db.profile.buffs, selected)
PROptions_Buffs.selected = nil
-
+
scrollframe.update()
self:EnableButtons()
self:UpdateBuffTable()
@@ -810,9 +810,9 @@ function Buffs:UpdateBuffTable()
for unit in pairs(frames) do
self:UNIT_AURA(nil, unit)
- end
+ end
end
-
+
function Buffs:SaveEntry()
local frame = PROptions_Buffs_Edit
@@ -828,7 +828,7 @@ function Buffs:SaveEntry()
end
if err then
- StaticPopupDialogs["PR_BUFF_SAVE_ERROR"].text = err
+ StaticPopupDialogs["PR_BUFF_SAVE_ERROR"].text = err
StaticPopup_Show("PR_BUFF_SAVE_ERROR")
return
end
@@ -1083,14 +1083,14 @@ Buffs.defaults = {
color = "bc64aa",
showexpiry = true,
disabled = (class ~= "DRUID"),
- },
+ },
{
conds = "All",
buffname = L["Lifebloom"],
disptext = L["STATUS_LIFEBLOOM"],
color = "50fe37",
disabled = (class ~= "DRUID"),
- },
+ },
{
conds = "All",
buffname = L["Regrowth"],
@@ -1098,7 +1098,7 @@ Buffs.defaults = {
color = "00FF10",
showexpiry = true,
disabled = (class ~= "DRUID"),
- },
+ },
{
conds = "All",
buffname = L["Thorns"],
@@ -1136,7 +1136,7 @@ Buffs.defaults = {
color = "F48CBA",
missing = true,
disabled = (class ~= "PALADIN"),
- },
+ },
{
conds = "NonTank",
buffname = L["Blessing of Salvation"],
@@ -1145,7 +1145,7 @@ Buffs.defaults = {
color = "F48CBA",
missing = true,
disabled = (class ~= "PALADIN"),
- },
+ },
{
conds = "All",
buffname = L["Blessing of Light"],
@@ -1154,7 +1154,7 @@ Buffs.defaults = {
color = "F48CBA",
missing = true,
disabled = (class ~= "PALADIN"),
- },
+ },
{
conds = "All",
buffname = L["Blessing of Sanctuary"],
@@ -1163,7 +1163,7 @@ Buffs.defaults = {
color = "F48CBA",
missing = true,
disabled = (class ~= "PALADIN"),
- },
+ },
{
conds = "All",
buffname = L["Blessing of Kings"],
diff --git a/PerfectRaid_Config.lua b/PerfectRaid_Config.lua
index 798d6f6..5abaf80 100644
--- a/PerfectRaid_Config.lua
+++ b/PerfectRaid_Config.lua
@@ -12,7 +12,7 @@
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
- * Neither the name of PerfectRaid nor the names of its contributors
+ * Neither the name of PerfectRaid nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
@@ -70,7 +70,7 @@ function Config:CreateOptions(opt)
local check = CreateFrame("CheckButton", "PRConfig_RaidIcons", options, "PRCheckTemplate")
check.Label:SetText(L["Show raid icons"])
table.insert(options.widgets, check)
-
+
local iconPositionDropDown = CreateFrame("Frame", "PRConfig_IconPositionDropDown", options, "UIDropDownMenuTemplate")
local clickFunc = function(self) UIDropDownMenu_SetSelectedValue(iconPositionDropDown, self.value) end
iconPositionDropDown.Initialize = function()
@@ -84,15 +84,15 @@ function Config:CreateOptions(opt)
UIDropDownMenu_SetSelectedValue(iconPositionDropDown,"LNAME")
end)
iconPositionDropDown:SetWidth(200);
- iconPositionDropDown:SetPoint("LEFT", check, "RIGHT", 100, 0)
+ iconPositionDropDown:SetPoint("LEFT", check, "RIGHT", 100, 0)
options.iconposition = iconPositionDropDown;
-
+
local cancel = CreateFrame("Button", "PRConfig_Cancel", options, "PRButtonTemplate")
cancel:SetText(L["Cancel"])
cancel:SetPoint("BOTTOMRIGHT", 0, 5)
cancel:SetScript("OnClick", function() options:CancelOptions() end)
cancel:Show()
-
+
local save = CreateFrame("Button", "PRConfig_Save", options, "PRButtonTemplate")
save:SetText(L["Save"])
save:SetPoint("BOTTOMRIGHT", cancel, "BOTTOMLEFT", -10, 0)
@@ -106,14 +106,14 @@ function Config:CreateOptions(opt)
local locked = PRConfig_Lock:GetChecked() and true or false
local showRaidIcons = PRConfig_RaidIcons:GetChecked() and true or false
local raidIconPosition = UIDropDownMenu_GetSelectedValue(PRConfig_IconPositionDropDown)
-
+
PerfectRaid.db.profile.hideparty = hideParty
PerfectRaid.db.profile.showmanaonly = showMana
PerfectRaid.db.profile.clickcast = clickCast
PerfectRaid.db.profile.locked = locked
PerfectRaid.db.profile.showraidicons = showRaidIcons
PerfectRaid.db.profile.raidiconposition = raidIconPosition
-
+
PerfectRaid:TriggerMessage("PERFECTRAID_CONFIG_CHANGED")
Config:PartyVisibility()
end
@@ -154,7 +154,7 @@ function Config:PartyVisibility()
if PartyMemberBackground and SHOW_PARTY_BACKGROUND == "1" then
PartyMemberBackground:Hide()
end
-
+
ShowPartyFrame = function() end
HidePartyFrame()
elseif self.hidingparty then
diff --git a/PerfectRaid_Highlight.lua b/PerfectRaid_Highlight.lua
index 6f211f0..6c46f16 100644
--- a/PerfectRaid_Highlight.lua
+++ b/PerfectRaid_Highlight.lua
@@ -12,7 +12,7 @@
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
- * Neither the name of PerfectRaid nor the names of its contributors
+ * Neither the name of PerfectRaid nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
@@ -50,8 +50,8 @@ end
-- Create the backdrop, and the OnEnter/OnLeave scripts
local backdrop = {
- bgFile = "Interface\\AddOns\\PerfectRaid\\images\\bgFile",
- tile = true, tileSize = 32,
+ bgFile = "Interface\\AddOns\\PerfectRaid\\images\\bgFile",
+ tile = true, tileSize = 32,
insets = {
left = 6,
right = 6,
@@ -121,7 +121,7 @@ function Highlight:PERFECTRAID_DEBUFFTYPE_LOST(msg, unit, type)
status[unit] = status[unit] - BIT_CURSE
end
- if status[unit] < 0 then
+ if status[unit] < 0 then
status[unit] = 0
end
@@ -208,7 +208,7 @@ function Highlight:CreateOptions(opt)
cancel:SetPoint("BOTTOMRIGHT", 0, 5)
cancel:SetScript("OnClick", function() options:CancelOptions() end)
cancel:Show()
-
+
local save = CreateFrame("Button", "PRHighlight_Save", options, "PRButtonTemplate")
save:SetText(L["Save"])
save:SetPoint("BOTTOMRIGHT", cancel, "BOTTOMLEFT", -10, 0)
@@ -233,7 +233,7 @@ function Highlight:CreateOptions(opt)
-- Trigger update here
for unit in pairs(frames) do
Highlight:UpdateUnit(unit)
- end
+ end
end
function options:CancelOptions()
@@ -249,7 +249,7 @@ function Highlight:CreateOptions(opt)
-- Trigger update here
for unit in pairs(frames) do
Highlight:UpdateUnit(unit)
- end
+ end
end
-- Force an update when tab is clicked
diff --git a/PerfectRaid_Options.lua b/PerfectRaid_Options.lua
index 233cf75..5e5f942 100644
--- a/PerfectRaid_Options.lua
+++ b/PerfectRaid_Options.lua
@@ -12,7 +12,7 @@
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
- * Neither the name of PerfectRaid nor the names of its contributors
+ * Neither the name of PerfectRaid nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
@@ -37,7 +37,7 @@ end
function Options:Enable()
self.cmd = self:InitializeSlashCommand("PerfectRaid Options", "PERFECTRAID", "praid", "perfectraid")
- self.cmd:RegisterSlashHandler(L["Show options GUI"], "^$", "ShowOptions")
+ self.cmd:RegisterSlashHandler(L["Show options GUI"], "^$", "ShowOptions")
self.cmd:RegisterSlashHandler(L["lock - Lock frames"], "^lock$", "LockFrames")
self.cmd:RegisterSlashHandler(L["unlock - Unlock frames"], "^unlock$", "UnlockFrames")
--self.cmd:InjectDBCommands(PerfectRaid.db, "copy", "delete", "list", "reset", "set")
@@ -82,7 +82,7 @@ function Options:CreateOptions()
end
table.sort(sortTbl)
-
+
for idx,name in ipairs(sortTbl) do
local module = sortTbl[name]
if module ~= self and type(module.CreateOptions) == "function" then
@@ -107,7 +107,7 @@ function Options:AddOptionsTab(title, frame)
local prev = getglobal("PROptionsTab"..num-1)
tab:SetPoint("TOPLEFT", prev, "TOPRIGHT", -16, 0)
end
-
+
tab:SetText(title)
tab.frame = frame
tab.title = title
@@ -160,7 +160,7 @@ function Options:CreateListFrame(parent, num)
parent.entries[parent.selected - offset]:SetChecked(false)
end
end
-
+
parent.selected = idx
end
@@ -202,7 +202,7 @@ function Options:CreateListFrame(parent, num)
end
entries[1]:SetPoint("TOPLEFT",0,0)
-
+
for i=2,num do
entries[i]:SetPoint("TOPLEFT", entries[i-1], "BOTTOMLEFT", 0, 0)
end
diff --git a/PerfectRaid_RaidIcons.lua b/PerfectRaid_RaidIcons.lua
index e6d33d1..8bbee17 100644
--- a/PerfectRaid_RaidIcons.lua
+++ b/PerfectRaid_RaidIcons.lua
@@ -4,7 +4,7 @@
*
* Written by: Panoramix
* Version: 1.0
- *
+ *
---------------------------------------------------------------------------]]
local RaidIcons = PerfectRaid:NewModule("PerfectRaid-RaidIcons")
@@ -12,12 +12,12 @@ local L = PerfectRaidLocals
local utils, frames
function RaidIcons:Initialize()
-
+
frames = PerfectRaid.frames
utils = PerfectRaid.utils
self:RegisterMessage("DONGLE_PROFILE_CHANGED")
- self:RegisterMessage("PERFECTRAID_CONFIG_CHANGED")
+ self:RegisterMessage("PERFECTRAID_CONFIG_CHANGED")
end
-- Update Raid Icons when profiles changes
@@ -29,12 +29,12 @@ end
-- Update Raid Icons when config is changed
function RaidIcons:PERFECTRAID_CONFIG_CHANGED(event, addon, svname, name)
- self:ShowRaidIcons(PerfectRaid.db.profile.showraidicons)
+ self:ShowRaidIcons(PerfectRaid.db.profile.showraidicons)
end
-- Update Raid Icons when addon is enabled
function RaidIcons:Enable()
- self:ShowRaidIcons(PerfectRaid.db.profile.showraidicons)
+ self:ShowRaidIcons(PerfectRaid.db.profile.showraidicons)
end
-- Show/Hide raid icons depending on value
@@ -43,7 +43,7 @@ function RaidIcons:ShowRaidIcons(value)
self:RegisterEvent("RAID_TARGET_UPDATE", "UpdateAllUnits")
self:RegisterMessage("PERFECTRAID_FRAME_LAYOUT_CHANGED", "UpdateAllUnits")
else
- self:UnregisterEvent("RAID_TARGET_UPDATE")
+ self:UnregisterEvent("RAID_TARGET_UPDATE")
self:UnregisterMessage("PERFECTRAID_FRAME_LAYOUT_CHANGED")
end
self:UpdateAllUnits()
@@ -63,21 +63,21 @@ function RaidIcons:UpdateAllUnits()
if (showraidicons and raidicon and frames and frames[unit]) then
for frame in pairs(frames[unit]) do
-- create indicator and texture
- if (not frame.raidicon) then
+ if (not frame.raidicon) then
--frame.indicator = CreateFrame("Frame", nil, frame.leftbox)
frame.indicator = CreateFrame("Frame", nil, frame.healthbar)
frame.indicator:SetHeight(frame:GetHeight())
- frame.indicator:SetWidth(frame:GetHeight( ))
+ frame.indicator:SetWidth(frame:GetHeight( ))
frame.indicator:SetFrameLevel(frame.leftbox:GetFrameLevel()+1)
-
+
frame.raidicon = frame.indicator:CreateTexture(nil, "OVERLAY")
frame.raidicon:SetAllPoints()
frame.raidicon:SetTexture("Interface\\TargetingFrame\\UI-RaidTargetingIcons")
end
-
+
-- resize the texture and show it
frame.indicator:ClearAllPoints()
-
+
if iconposition == "LNAME" then
frame.indicator:SetParent(frame.leftbox)
frame.indicator:SetPoint("RIGHT", -3-frame.name:GetWidth(), 0)
@@ -92,10 +92,10 @@ function RaidIcons:UpdateAllUnits()
frame.indicator:SetPoint("RIGHT", 0, 0)
end
SetRaidTargetIconTexture(frame.raidicon, raidicon)
- frame.raidicon:Show()
- end
+ frame.raidicon:Show()
+ end
end
-
+
-- unit doesn't have raidtarget icon, hide it
if ((not showraidicons or not raidicon) and frames and frames[unit]) then
for frame in pairs(frames[unit]) do
@@ -104,5 +104,5 @@ function RaidIcons:UpdateAllUnits()
end
end
end
- end
+ end
end
diff --git a/PerfectRaid_Range.lua b/PerfectRaid_Range.lua
index 73fcd23..5194129 100644
--- a/PerfectRaid_Range.lua
+++ b/PerfectRaid_Range.lua
@@ -12,7 +12,7 @@
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
- * Neither the name of PerfectRaid nor the names of its contributors
+ * Neither the name of PerfectRaid nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
@@ -89,7 +89,7 @@ function Range.OnUpdate(frame, elapsed)
if elapsed_counter >= rate then
for unit,tbl in pairs(frames) do
- local inRange, checkedRange = UnitInRange(unit)
+ local inRange, checkedRange = UnitInRange(unit)
if checkedRange and not inRange then
alpha = outalpha
@@ -102,7 +102,7 @@ function Range.OnUpdate(frame, elapsed)
end
end
elapsed_counter = 0
- end
+ end
end
local options
@@ -147,7 +147,7 @@ function Range:CreateOptions(opt)
cancel:SetPoint("BOTTOMRIGHT", 0, 5)
cancel:SetScript("OnClick", function() self:OnShow() end)
cancel:Show()
-
+
local save = CreateFrame("Button", "PRRange_Save", options, "PRButtonTemplate")
save:SetText(L["Save"])
save:SetPoint("BOTTOMRIGHT", cancel, "BOTTOMLEFT", -10, 0)
@@ -175,7 +175,7 @@ end
function Range:SaveOptions()
local profile = PerfectRaid.db.profile
-
+
profile.RangeCheck = PRRange_Enable:GetChecked() or false
profile.RangeRate = PRRange_Rate:GetValue()
profile.RangeInAlpha = PRRange_InAlpha:GetValue()