Quantcast

* Removed unused externals

James Whitehead II [10-16-08 - 16:19]
* Removed unused externals
* Don't load the ace3 config since we don't use it
* Update the locals file using Babelfish
* Alter the range checking module to use UnitInRange so it should work for everyone
* Update options panel to work properly
* Fix mana bar coloring
* Updating .toc version
Filename
Babelfish.lua
Localization.enUS.lua
PerfectRaid.lua
PerfectRaid.toc
PerfectRaid_Buffs.lua
PerfectRaid_Frames.lua
PerfectRaid_Range.lua
diff --git a/Babelfish.lua b/Babelfish.lua
index af16102..18c9688 100644
--- a/Babelfish.lua
+++ b/Babelfish.lua
@@ -55,5 +55,5 @@ for idx,match in ipairs(work) do
 	print(string.format("\t[\"%s\"] = \"%s\",", match, val))
 end
 print("}\n")
---print("setmetatable(PerfectRaidLocals, {__index=function(t,k) if not rawget(t,k) then return k else return t[k] end end})")
+print("setmetatable(PerfectRaidLocals, {__index=function(t,k) if not rawget(t,k) then return k else return t[k] end end})")

diff --git a/Localization.enUS.lua b/Localization.enUS.lua
index 4583972..3ffa08e 100644
--- a/Localization.enUS.lua
+++ b/Localization.enUS.lua
@@ -2,14 +2,10 @@

 PerfectRaidLocals = {
 	[" *** DISABLED ***"] = " *** DISABLED ***",
-	["A list of players name to be shown.  This option will not be used if any of the group or class filters are set"] = "A list of players name to be shown.  This option will not be used if any of the group or class filters are set",
-	["A title to be displayed above the frame"] = "A title to be displayed above the frame",
 	["Add"] = "Add",
-	["Add new frame:"] = "Add new frame:",
 	["Adding a default raid layout to new profile \"%s\""] = "Adding a default raid layout to new profile \"%s\"",
 	["Adding default buffs to new profile \"%s\""] = "Adding default buffs to new profile \"%s\"",
 	["Aggro"] = "Aggro",
-	["Aggro Options"] = "Aggro Options",
 	["Align frames to BOTTOM"] = "Align frames to BOTTOM",
 	["Align frames to RIGHT"] = "Align frames to RIGHT",
 	["All Classes"] = "All Classes",
@@ -17,8 +13,6 @@ PerfectRaidLocals = {
 	["Arcane Brilliance"] = "Arcane Brilliance",
 	["Arcane Intellect"] = "Arcane Intellect",
 	["Auto-fill Default"] = "Auto-fill Default",
-	["Backdrop"] = "Backdrop",
-	["Backdrop color"] = "Backdrop color",
 	["Blessing of Kings"] = "Blessing of Kings",
 	["Blessing of Light"] = "Blessing of Light",
 	["Blessing of Might"] = "Blessing of Might",
@@ -27,54 +21,26 @@ PerfectRaidLocals = {
 	["Blessing of Wisdom"] = "Blessing of Wisdom",
 	["Buff Name:"] = "Buff Name:",
 	["Buffs/Debuffs"] = "Buffs/Debuffs",
-	["By name"] = "By name",
-	["By party/raid index"] = "By party/raid index",
 	["Cancel"] = "Cancel",
-	["Changes the delay between range checks"] = "Changes the delay between range checks",
-	["Changes the health display to only show percentages"] = "Changes the health display to only show percentages",
-	["Chooses the criteria used to group the frames"] = "Chooses the criteria used to group the frames",
-	["Chooses the sort method when sorting frames.  This sort is applied after the grouping order"] = "Chooses the sort method when sorting frames.  This sort is applied after the grouping order",
-	["Class"] = "Class",
-	["Classes"] = "Classes",
 	["Color bars by class"] = "Color bars by class",
 	["Column Anchor Point:"] = "Column Anchor Point:",
-	["Column anchor point"] = "Column anchor point",
-	["Column spacing"] = "Column spacing",
-	["Column spacing must be a number, or nil"] = "Column spacing must be a number, or nil",
-	["Columns"] = "Columns",
-	["Controls the delay between aggro calculations, in seconds"] = "Controls the delay between aggro calculations, in seconds",
 	["Dead"] = "Dead",
 	["Delete"] = "Delete",
 	["Disable"] = "Disable",
 	["Disabled: "] = "Disabled: ",
 	["Display Text:"] = "Display Text:",
-	["Display a backdrop behind frame"] = "Display a backdrop behind frame",
 	["Display a header backdrop"] = "Display a header backdrop",
-	["Displays the unit tooltip on mouseover"] = "Displays the unit tooltip on mouseover",
 	["Divine Spirit"] = "Divine Spirit",
 	["Do not check this buff (Disable)"] = "Do not check this buff (Disable)",
 	["Down"] = "Down",
 	["Druid"] = "Druid",
-	["Each frame must be given a unique name.  This is not the same as the title that can be displayed above the frame"] = "Each frame must be given a unique name.  This is not the same as the title that can be displayed above the frame",
 	["Edit"] = "Edit",
 	["Enable"] = "Enable",
 	["Enable click-casting on frames"] = "Enable click-casting on frames",
-	["Enable range checking"] = "Enable range checking",
-	["Enables adding the player to the party or solo frames"] = "Enables adding the player to the party or solo frames",
-	["Enables calculating which friendly units have aggro"] = "Enables calculating which friendly units have aggro",
 	["Fear Ward"] = "Fear Ward",
-	["Filters"] = "Filters",
-	["Filters which units are displayed in the frame"] = "Filters which units are displayed in the frame",
-	["Focus highlight color"] = "Focus highlight color",
-	["Forces the Blizzard party frames to be hidden"] = "Forces the Blizzard party frames to be hidden",
-	["Frame Editor"] = "Frame Editor",
 	["Frame Scale:"] = "Frame Scale:",
 	["Frames have been locked"] = "Frames have been locked",
 	["Frames have been unlocked"] = "Frames have been unlocked",
-	["From here you can configure the options for a display frame, including what units it displays and other options that change the look, feel and operation of the frame."] = "From here you can configure the options for a display frame, including what units it displays and other options that change the look, feel and operation of the frame.",
-	["General"] = "General",
-	["General Options"] = "General Options",
-	["General addon-wide options"] = "General addon-wide options",
 	["Ghost"] = "Ghost",
 	["Gift of the Wild"] = "Gift of the Wild",
 	["Greater Blessing of Kings"] = "Greater Blessing of Kings",
@@ -93,92 +59,49 @@ PerfectRaidLocals = {
 	["Group 8"] = "Group 8",
 	["Group Buff Name:"] = "Group Buff Name:",
 	["Group frames by:"] = "Group frames by:",
-	["Grouping"] = "Grouping",
-	["Grouping is the first level of sorting, allowing you to group all of the tanks together, and all of the healers together.  After grouping is done, the sort order is applied."] = "Grouping is the first level of sorting, allowing you to group all of the tanks together, and all of the healers together.  After grouping is done, the sort order is applied.",
-	["Grouping order:"] = "Grouping order:",
-	["Grouping/Sorting"] = "Grouping/Sorting",
-	["Groups"] = "Groups",
-	["Healing Touch"] = "Healing Touch",
-	["Healing Wave"] = "Healing Wave",
-	["Health bar options"] = "Health bar options",
-	["Height of power bar"] = "Height of power bar",
 	["Hide Blizzard Party Frames"] = "Hide Blizzard Party Frames",
-	["Hide Blizzard party frames"] = "Hide Blizzard party frames",
-	["Highlight Options"] = "Highlight Options",
-	["Highlight cursed units"] = "Highlight cursed units",
-	["Highlight diseased units"] = "Highlight diseased units",
 	["Highlight on mouseover"] = "Highlight on mouseover",
-	["Highlight player's focus"] = "Highlight player's focus",
-	["Highlight player's target"] = "Highlight player's target",
-	["Highlight poisoned units"] = "Highlight poisoned units",
-	["Highlight units with a magic debuff"] = "Highlight units with a magic debuff",
 	["Highlight when cursed"] = "Highlight when cursed",
 	["Highlight when diseased"] = "Highlight when diseased",
 	["Highlight when magic debuffed"] = "Highlight when magic debuffed",
 	["Highlight when poisoned"] = "Highlight when poisoned",
-	["Holy Light"] = "Holy Light",
 	["Hunter"] = "Hunter",
 	["If you choose any of the column options, all of them become required fields.  Please choose the number of columns, max units, column spacing and column anchor."] = "If you choose any of the column options, all of them become required fields.  Please choose the number of columns, max units, column spacing and column anchor.",
+	["In-Range Alpha"] = "In-Range Alpha",
 	["Innervate"] = "Innervate",
-	["Lesser Heal"] = "Lesser Heal",
 	["Lifebloom"] = "Lifebloom",
-	["Lock PerfectRaid"] = "Lock PerfectRaid",
 	["Lock frames"] = "Lock frames",
-	["Locks frames in place so they can't be moved accidentally"] = "Locks frames in place so they can't be moved accidentally",
 	["Mage"] = "Mage",
-	["Main assist"] = "Main assist",
-	["Main tank"] = "Main tank",
 	["Make filters strict"] = "Make filters strict",
 	["Mana Bar Height:"] = "Mana Bar Height:",
 	["Mark of the Wild"] = "Mark of the Wild",
 	["Max Units per Column:"] = "Max Units per Column:",
-	["Max column must be a number"] = "Max column must be a number",
-	["Max columns to display"] = "Max columns to display",
 	["Mortal Strike"] = "Mortal Strike",
-	["Name list"] = "Name list",
 	["No filters selected"] = "No filters selected",
-	["No grouping"] = "No grouping",
 	["Number of Columns:"] = "Number of Columns:",
-	["Number of units per column"] = "Number of units per column",
-	["Number of units per column must be a number, or nil"] = "Number of units per column must be a number, or nil",
 	["Offline"] = "Offline",
 	["Only show if this buff is missing"] = "Only show if this buff is missing",
 	["Only show mana bar for mana users"] = "Only show mana bar for mana users",
-	["Only show mana users"] = "Only show mana users",
 	["Only show my buffs"] = "Only show my buffs",
-	["Options for aggro calculation and display"] = "Options for aggro calculation and display",
-	["Options that allow you to split the dislpay of frames into columns"] = "Options that allow you to split the dislpay of frames into columns",
-	["Options that determine when the frames are shown"] = "Options that determine when the frames are shown",
-	["Options that set the grouping and sorting for the frame"] = "Options that set the grouping and sorting for the frame",
-	["Out of range alpha"] = "Out of range alpha",
 	["Out-of-Range Alpha"] = "Out-of-Range Alpha",
 	["Paladin"] = "Paladin",
 	["PerfectRaid Options"] = "PerfectRaid Options",
-	["Perform aggro check"] = "Perform aggro check",
 	["Perform aggro checking"] = "Perform aggro checking",
 	["Perform range checking"] = "Perform range checking",
 	["Power Infusion"] = "Power Infusion",
 	["Power Word: Fortitude"] = "Power Word: Fortitude",
 	["Power Word: Shield"] = "Power Word: Shield",
-	["Power bar options"] = "Power bar options",
 	["Prayer of Fortitude"] = "Prayer of Fortitude",
 	["Prayer of Mending"] = "Prayer of Mending",
 	["Prayer of Shadow Protection"] = "Prayer of Shadow Protection",
 	["Prayer of Spirit"] = "Prayer of Spirit",
 	["Priest"] = "Priest",
-	["Primary In-Range Alpha"] = "Primary In-Range Alpha",
-	["Primary Spell:"] = "Primary Spell:",
 	["Raid Frames"] = "Raid Frames",
-	["Raid group number"] = "Raid group number",
-	["Range checking delay"] = "Range checking delay",
-	["Range checking options"] = "Range checking options",
 	["Regrowth"] = "Regrowth",
 	["Rejuvenation"] = "Rejuvenation",
 	["Renew"] = "Renew",
 	["Reverse HP bars"] = "Reverse HP bars",
 	["Rogue"] = "Rogue",
-	["Role"] = "Role",
-	["Roles"] = "Roles",
 	["STATUS_ARCANEINT"] = "Int",
 	["STATUS_BLESSINGKINGS"] = "BoK",
 	["STATUS_BLESSINGLIGHT"] = "BoL",
@@ -208,57 +131,26 @@ PerfectRaidLocals = {
 	["STATUS_THORNS"] = "Th",
 	["STATUS_WEAKENEDSOUL"] = "Ws",
 	["Save"] = "Save",
-	["Secondary In-Range Alpha"] = "Secondary In-Range Alpha",
-	["Secondary Spell:"] = "Secondary Spell:",
-	["Sets the frames to work with addons such as Clique"] = "Sets the frames to work with addons such as Clique",
 	["Shadow Protection"] = "Shadow Protection",
 	["Shaman"] = "Shaman",
-	["Shorten large numbers"] = "Shorten large numbers",
-	["Shortens 1500 to 1.5k"] = "Shortens 1500 to 1.5k",
 	["Show HP deficit"] = "Show HP deficit",
 	["Show frame in raid"] = "Show frame in raid",
 	["Show frame when solo"] = "Show frame when solo",
 	["Show frame while in party"] = "Show frame while in party",
 	["Show group number"] = "Show group number",
-	["Show health deficit"] = "Show health deficit",
 	["Show options GUI"] = "Show options GUI",
-	["Show percentages only"] = "Show percentages only",
 	["Show player in frame"] = "Show player in frame",
-	["Show the frame when in a party, but not in a raid"] = "Show the frame when in a party, but not in a raid",
-	["Show the frame when in a raid"] = "Show the frame when in a raid",
-	["Show the frame when not grouped"] = "Show the frame when not grouped",
-	["Show the player when not in a raid"] = "Show the player when not in a raid",
-	["Show tooltips on mouseover"] = "Show tooltips on mouseover",
 	["Show unit tooltip on mouseover"] = "Show unit tooltip on mouseover",
-	["Shows the amount of health missing, rather than the amount of health the player has currently."] = "Shows the amount of health missing, rather than the amount of health the player has currently.",
 	["Sort Frames By:"] = "Sort Frames By:",
-	["Sort direction"] = "Sort direction",
-	["Sort method"] = "Sort method",
-	["Sorting"] = "Sorting",
 	["Soulstone Resurrection"] = "Soulstone Resurrection",
 	["Spacing between columns:"] = "Spacing between columns:",
-	["Specifies the sort order for grouping.  This should be a comma separated list of group numbers, uppercase english class names, or roles"] = "Specifies the sort order for grouping.  This should be a comma separated list of group numbers, uppercase english class names, or roles",
-	["Start index"] = "Start index",
-	["Start index must be a value between 1 and 40"] = "Start index must be a value between 1 and 40",
-	["Strict filtering"] = "Strict filtering",
-	["Target highlight color"] = "Target highlight color",
-	["Target/Focus"] = "Target/Focus",
-	["The anchor point for each new column.  Setting this to LEFT will cause the columns to grow to the right, for example."] = "The anchor point for each new column.  Setting this to LEFT will cause the columns to grow to the right, for example.",
-	["The color to be applied to the backdrop"] = "The color to be applied to the backdrop",
-	["The height of the power bar, in game pixels"] = "The height of the power bar, in game pixels",
-	["The opacity level to be set on frames that are out of range"] = "The opacity level to be set on frames that are out of range",
-	["The start index of the final sorted unit list at which to begin displaying units"] = "The start index of the final sorted unit list at which to begin displaying units",
-	["This option hides the power bars for non-mana users such as warriors and rogues."] = "This option hides the power bars for non-mana users such as warriors and rogues.",
 	["Thorns"] = "Thorns",
-	["Title of frame"] = "Title of frame",
 	["Title:"] = "Title:",
 	["Up"] = "Up",
 	["Update delay"] = "Update delay",
-	["Visibility"] = "Visibility",
 	["Warlock"] = "Warlock",
 	["Warrior"] = "Warrior",
 	["Weakened Soul"] = "Weakened Soul",
-	["When strict filtering is enabled, a unit must match all given filters in order to be shown."] = "When strict filtering is enabled, a unit must match all given filters in order to be shown.",
 	["You must select at least one class or group to display."] = "You must select at least one class or group to display.",
 	["inParty"] = "inParty",
 	["inRaid"] = "inRaid",
@@ -268,3 +160,4 @@ PerfectRaidLocals = {
 	["unlock - Unlock frames"] = "unlock - Unlock frames",
 }

+setmetatable(PerfectRaidLocals, {__index=function(t,k) if not rawget(t,k) then return k else return t[k] end end})
diff --git a/PerfectRaid.lua b/PerfectRaid.lua
index 2c9c372..f740f2f 100644
--- a/PerfectRaid.lua
+++ b/PerfectRaid.lua
@@ -497,7 +497,7 @@ function OnAttributeChanged(frame, name, value)
 		local class = select(2, UnitClass(unit)) or "WARRIOR"
 		frame.class = class
 		frame.classcolor = RAID_CLASS_COLORS[class]
-		frame.manacolor = ManaBarColor[UnitPowerType(unit)]
+		frame.manacolor = PowerBarColor[UnitPowerType(unit)]

 		local color = frame.classcolor
 		frame.healthbar:SetStatusBarColor(color.r, color.g, color.b)
@@ -692,7 +692,7 @@ function PerfectRaid:RAID_ROSTER_UPDATE()

 function PerfectRaid:UNIT_DISPLAYPOWER(event, unit)
 	if not frames[unit] then return end
-	local color = ManaBarColor[UnitPowerType(unit)]
+	local color = PowerBarColor[UnitPowerType(unit)]
 	local show = UnitPowerType(unit) == 0
 	local max = UnitManaMax(unit)
 	local mana = UnitMana(unit)
diff --git a/PerfectRaid.toc b/PerfectRaid.toc
index ac90b9f..facec9b 100644
--- a/PerfectRaid.toc
+++ b/PerfectRaid.toc
@@ -1,4 +1,4 @@
-## Interface: 20400
+## Interface: 30000
 ## Title: PerfectRaid
 ## Version: wowi:revision
 ## Author: Cladhaire
@@ -26,9 +26,3 @@ PerfectRaid_Frames.lua
 PerfectRaid_Range.lua
 PerfectRaid_Highlight.lua
 PerfectRaid_Config.lua
-
-libs\LibStub\LibStub.lua
-libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
-libs\AceGUI-3.0\AceGUI-3.0.xml
-libs\AceConfig-3.0\AceConfig-3.0.xml
-Config.lua
diff --git a/PerfectRaid_Buffs.lua b/PerfectRaid_Buffs.lua
index a9a98fb..b874868 100644
--- a/PerfectRaid_Buffs.lua
+++ b/PerfectRaid_Buffs.lua
@@ -346,8 +346,8 @@ function Buffs:CreateOptions(opt)

 	scrollframe.update = update

-	scrollframe:SetScript("OnVerticalScroll", function()
-		FauxScrollFrame_OnVerticalScroll(20, update)
+	scrollframe:SetScript("OnVerticalScroll", function(frame, value)
+		FauxScrollFrame_OnVerticalScroll(frame, value, 20, update)
 		self:EnableButtons()
 	end)
 	scrollframe:SetScript("OnShow", function()
@@ -622,7 +622,7 @@ function Buffs:CreateEditFrame(parent)
 	dropdown:SetScript("OnShow", function() self:DropDown_OnShow() end)

 	PRBuffs_DropdownButton:SetScript("OnClick", function() ToggleDropDownMenu(nil, nil, PRBuffs_Dropdown, "cursor") end)
-	UIDropDownMenu_SetText(L["Auto-fill Default"], dropdown)
+	UIDropDownMenu_SetText(dropdown, L["Auto-fill Default"])
 end

 function Buffs:FillEntry(entry)
diff --git a/PerfectRaid_Frames.lua b/PerfectRaid_Frames.lua
index 5777e8a..4b802b0 100644
--- a/PerfectRaid_Frames.lua
+++ b/PerfectRaid_Frames.lua
@@ -140,8 +140,8 @@ function Frames:CreateOptions(opt)

 	scrollframe.update = update

-	scrollframe:SetScript("OnVerticalScroll", function()
-		FauxScrollFrame_OnVerticalScroll(20, update)
+	scrollframe:SetScript("OnVerticalScroll", function(frame, value)
+		FauxScrollFrame_OnVerticalScroll(frame, value, 20, update)
 		self:EnableButtons()
 	end)
 	scrollframe:SetScript("OnShow", function()
@@ -488,8 +488,8 @@ function Frames:EditEntry()
 	PROptions_Frames_EditTitle:SetText(entry.title or "")
 	UIDropDownMenu_SetSelectedValue(PRFrames_GroupByDropDown, entry.groupBy)
 	UIDropDownMenu_SetSelectedValue(PRFrames_SortDropDown, entry.sortType)
-	UIDropDownMenu_SetText(entry.groupBy or "", PRFrames_GroupByDropDown)
-	UIDropDownMenu_SetText(entry.sortType or "", PRFrames_SortDropDown)
+	UIDropDownMenu_SetText(PRFrames_GroupByDropDown, entry.groupBy or "")
+	UIDropDownMenu_SetText(PRFrames_SortDropDown, entry.sortType or "")
 	local filterTbl = {strsplit(",", entry.filter or "")}
 	for k,v in pairs(filterTbl) do filterTbl[v] = true end

diff --git a/PerfectRaid_Range.lua b/PerfectRaid_Range.lua
index d2ab101..41c965a 100644
--- a/PerfectRaid_Range.lua
+++ b/PerfectRaid_Range.lua
@@ -30,48 +30,29 @@
 ---------------------------------------------------------------------------]]

 local Range = PerfectRaid:NewModule("PerfectRaid-Range")
-local frames, rangespell, rate
-local prialpha, secalpha, outalpha
-local prispell, secspell
+local frames, rate
+local inalpha, outalpha
 local L = PerfectRaidLocals

 function Range:Initialize()
 	PerfectRaid.defaults.profile.RangeCheck = true
 	PerfectRaid.defaults.profile.RangeRate = 0.2
-	PerfectRaid.defaults.profile.RangePriAlpha = 1.0
-	PerfectRaid.defaults.profile.RangeSecAlpha = 0.6
 	PerfectRaid.defaults.profile.RangeOutAlpha = 0.3
+	PerfectRaid.defaults.profile.RangeInAlpha = 1.0

-	local class = select(2, UnitClass("player"))
-	local pri = {
-		DRUID = L["Healing Touch"],
-		SHAMAN = L["Healing Wave"],
-		PRIEST = L["Lesser Heal"],
-		PALADIN = L["Holy Light"],
-	}
-
-	PerfectRaid.defaults.profile.RangePriSpell = pri[class]
 	frames = PerfectRaid.frames
 end

 function Range:Enable()
-	if not PerfectRaid.defaults.profile.RangeCheck then return end
-	local class = select(2, UnitClass("player"))
-
-	prispell = PerfectRaid.db.profile.RangePriSpell
-	secspell = PerfectRaid.db.profile.RangeSecSpell
-
-	if (prispell or secspell) and PerfectRaid.db.profile.RangeCheck then
+	if PerfectRaid.db.profile.RangeCheck then
 		if not self.frame then
 			self.frame = CreateFrame("Frame")
 		end
+
 		self.frame:SetScript("OnUpdate", self.OnUpdate)
 		rate = PerfectRaid.db.profile.RangeRate
-		prialpha = PerfectRaid.db.profile.RangePriAlpha
-		secalpha = PerfectRaid.db.profile.RangeSecAlpha
 		outalpha = PerfectRaid.db.profile.RangeOutAlpha
-		prispell = PerfectRaid.db.profile.RangePriSpell
-		secspell = PerfectRaid.db.profile.RangeSecSpell
+		inalpha = PerfectRaid.db.profile.RangeInAlpha

 		self:RegisterMessage("DONGLE_PROFILE_CHANGED")
 	end
@@ -91,11 +72,8 @@ end
 function Range:DONGLE_PROFILE_CHANGED(event, addon, svname, name)
 	if svname == "PerfectRaidDB" then
 		rate = PerfectRaid.db.profile.RangeRate
-		prialpha = PerfectRaid.db.profile.RangePriAlpha
-		secalpha = PerfectRaid.db.profile.RangeSecAlpha
 		outalpha = PerfectRaid.db.profile.RangeOutAlpha
-		prispell = PerfectRaid.db.profile.RangePriSpell
-		secspell = PerfectRaid.db.profile.RangeSecSpell
+		inalpha = PerfectRaid.db.profile.RangeInAlpha
 		if PerfectRaid.db.profile.RangeCheck then
 			self:Enable()
 		else
@@ -111,12 +89,10 @@ function Range.OnUpdate()

 	if elapsed >= rate then
 		for unit,tbl in pairs(frames) do
-			local prirange = IsSpellInRange(prispell, unit) == 1
+			local inRange = UnitInRange(unit) == 1

-			if prirange then
-				alpha = prialpha
-			elseif secspell and IsSpellInRange(secspell, unit) == 1 then
-				alpha = secalpha
+			if inRange then
+				alpha = inalpha
 			else
 				alpha = outalpha
 			end
@@ -150,16 +126,8 @@ function Range:CreateOptions(opt)
 	slider:SetValueStep(0.1)
 	table.insert(options.widgets, slider)

-	local slider = CreateFrame("Slider", "PRRange_PriAlpha", options, "PRSliderTemplate")
-	slider.Text:SetText(L["Primary In-Range Alpha"])
-	slider.High:SetText("1")
-	slider.Low:SetText("0")
-	slider:SetMinMaxValues(0,1)
-	slider:SetValueStep(0.05)
-	table.insert(options.widgets, slider)
-
-	local slider = CreateFrame("Slider", "PRRange_SecAlpha", options, "PRSliderTemplate")
-	slider.Text:SetText(L["Secondary In-Range Alpha"])
+	local slider = CreateFrame("Slider", "PRRange_InAlpha", options, "PRSliderTemplate")
+	slider.Text:SetText(L["In-Range Alpha"])
 	slider.High:SetText("1")
 	slider.Low:SetText("0")
 	slider:SetMinMaxValues(0,1)
@@ -174,32 +142,6 @@ function Range:CreateOptions(opt)
 	slider:SetValueStep(0.05)
 	table.insert(options.widgets, slider)

-	local widget = CreateFrame("Frame", nil, options)
-	widget:SetHeight(35)
-	widget:SetWidth(160)
-	local editbox = CreateFrame("EditBox", "PRRange_PriSpell", widget, "InputBoxTemplate")
-	local font = editbox:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
-	font:SetText(L["Primary Spell:"])
-	font:SetPoint("TOPLEFT", widget, "TOPLEFT", 0, 0)
-	editbox:SetAutoFocus(nil)
-	editbox:SetWidth(160)
-	editbox:SetHeight(20)
-	editbox:SetPoint("BOTTOMLEFT", 0, 0)
-	table.insert(options.widgets, widget)
-
-	local widget = CreateFrame("Frame", nil, options)
-	widget:SetHeight(35)
-	widget:SetWidth(160)
-	local editbox = CreateFrame("EditBox", "PRRange_SecSpell", widget, "InputBoxTemplate")
-	local font = editbox:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
-	font:SetText(L["Secondary Spell:"])
-	font:SetPoint("TOPLEFT", widget, "TOPLEFT", 0, 0)
-	editbox:SetAutoFocus(nil)
-	editbox:SetWidth(160)
-	editbox:SetHeight(20)
-	editbox:SetPoint("BOTTOMLEFT", 0, 0)
-	table.insert(options.widgets, widget)
-
 	local cancel = CreateFrame("Button", "PRRange_Cancel", options, "PRButtonTemplate")
 	cancel:SetText(L["Cancel"])
 	cancel:SetPoint("BOTTOMRIGHT", 0, 5)
@@ -227,11 +169,8 @@ function Range:OnShow()

 	PRRange_Enable:SetChecked(profile.RangeCheck)
 	PRRange_Rate:SetValue(profile.RangeRate)
-	PRRange_PriAlpha:SetValue(profile.RangePriAlpha)
-	PRRange_SecAlpha:SetValue(profile.RangeSecAlpha)
+	PRRange_InAlpha:SetValue(profile.RangeInAlpha)
 	PRRange_OutAlpha:SetValue(profile.RangeOutAlpha)
-	PRRange_PriSpell:SetText(profile.RangePriSpell or "")
-	PRRange_SecSpell:SetText(profile.RangeSecSpell or "")
 end

 function Range:SaveOptions()
@@ -239,18 +178,9 @@ function Range:SaveOptions()

 	profile.RangeCheck = PRRange_Enable:GetChecked() or false
 	profile.RangeRate = PRRange_Rate:GetValue()
-	profile.RangePriAlpha = PRRange_PriAlpha:GetValue()
-	profile.RangeSecAlpha = PRRange_SecAlpha:GetValue()
+	profile.RangeInAlpha = PRRange_InAlpha:GetValue()
 	profile.RangeOutAlpha = PRRange_OutAlpha:GetValue()

-	local prispell = PRRange_PriSpell:GetText()
-	local secspell = PRRange_SecSpell:GetText()
-	if prispell == "" then prispell = nil end
-	if secspell == "" then secspell = nil end
-
-	profile.RangePriSpell = prispell
-	profile.RangeSecSpell = secspell
-
 	if profile.RangeCheck then
 		self:Enable()
 	else