Quantcast
--[[
##############################################################################
_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__      #
  __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____     #
   ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____    #
    ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____   #
     _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____  #
      __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ #
       _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_#
        ___\///////////___________\///___________\/////////_____\///////////_#
##############################################################################
S U P E R - V I L L A I N - U I   By: Munglunch                              #
##############################################################################
##########################################################
LOCALIZED LUA FUNCTIONS
##########################################################
]]--
--[[ GLOBALS ]]--
local _G = _G;
local unpack    = _G.unpack;
local select    = _G.select;
local pairs     = _G.pairs;
--[[
##########################################################
LOCALIZED GLOBALS
##########################################################
]]--
local SVUI_CLASS_COLORS = _G.SVUI_CLASS_COLORS
local RAID_CLASS_COLORS = _G.RAID_CLASS_COLORS
--[[
##########################################################
GET ADDON DATA
##########################################################
]]--
local SV, L = unpack(select(2, ...));
local scc = SVUI_CLASS_COLORS[SV.class];
local rcc = RAID_CLASS_COLORS[SV.class];
local r2 = .1 + (rcc.r * .1)
local g2 = .1 + (rcc.g * .1)
local b2 = .1 + (rcc.b * .1)
--[[
##########################################################
LAYOUT PRESETS
##########################################################
]]--
local presets = {
	["auras"] = {
		["link"] = "SVUnit",
		["default"] = {
			["player"] = {
				["buffs"] = {
					enable = false,
					attachTo = "DEBUFFS",
					anchorPoint = 'TOPLEFT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'RIGHT',
				},
				["debuffs"] = {
					enable = false,
					attachTo = "FRAME",
					anchorPoint = 'TOPLEFT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'RIGHT',
				},
				["aurabar"] = {
					enable = false
				}
			},
			["target"] = {
				["smartAuraDisplay"] = "DISABLED",
				["buffs"] = {
					enable = true,
					attachTo = "FRAME",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["debuffs"] = {
					enable = true,
					attachTo = "BUFFS",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["aurabar"] = {
					enable = false
				}
			},
			["focus"] = {
				["smartAuraDisplay"] = "DISABLED",
				["buffs"] = {
					enable = false,
					attachTo = "FRAME",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["debuffs"] = {
					enable = true,
					attachTo = "FRAME",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["aurabar"] = {
					enable = false
				}
			}
		},
		["icons"] = {
			["player"] = {
				["buffs"] = {
					enable = true,
					attachTo = "FRAME",
					anchorPoint = 'TOPLEFT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'RIGHT',
				},
				["debuffs"] = {
					enable = true,
					attachTo = "BUFFS",
					anchorPoint = 'TOPLEFT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'RIGHT',
				},
				["aurabar"] = {
					enable = false
				}
			},
			["target"] = {
				["smartAuraDisplay"] = "DISABLED",
				["buffs"] = {
					enable = true,
					attachTo = "FRAME",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["debuffs"] = {
					enable = true,
					attachTo = "BUFFS",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["aurabar"] = {
					enable = false
				}
			},
			["focus"] = {
				["smartAuraDisplay"] = "DISABLED",
				["buffs"] = {
					enable = false,
					attachTo = "FRAME",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["debuffs"] = {
					enable = true,
					attachTo = "FRAME",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["aurabar"] = {
					enable = false
				}
			}
		},
		["bars"] = {
			["player"] = {
				["buffs"] = {
					enable = false,
					attachTo = "FRAME"
				},
				["debuffs"] = {
					enable = false,
					attachTo = "FRAME"
				},
				["aurabar"] = {
					enable = true,
					attachTo = "FRAME"
				}
			},
			["target"] = {
				["smartAuraDisplay"] = "SHOW_DEBUFFS_ON_FRIENDLIES",
				["buffs"] = {
					enable = false,
					attachTo = "FRAME"
				},
				["debuffs"] = {
					enable = false,
					attachTo = "FRAME"
				},
				["aurabar"] = {
					enable = true,
					attachTo = "FRAME"
				}
			},
			["focus"] = {
				["smartAuraDisplay"] = "SHOW_DEBUFFS_ON_FRIENDLIES",
				["buffs"] = {
					enable = false,
					attachTo = "FRAME"
				},
				["debuffs"] = {
					enable = false,
					attachTo = "FRAME"
				},
				["aurabar"] = {
					enable = true,
					attachTo = "FRAME"
				}
			}
		},
		["theworks"] = {
			["player"] = {
				["buffs"] = {
					enable = true,
					attachTo = "FRAME",
					anchorPoint = 'TOPLEFT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'RIGHT',
				},
				["debuffs"] = {
					enable = true,
					attachTo = "BUFFS",
					anchorPoint = 'TOPLEFT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'RIGHT',
				},
				["aurabar"] = {
					enable = true,
					attachTo = "DEBUFFS"
				}
			},
			["target"] = {
				["smartAuraDisplay"] = "SHOW_DEBUFFS_ON_FRIENDLIES",
				["buffs"] = {
					enable = true,
					attachTo = "FRAME",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["debuffs"] = {
					enable = true,
					attachTo = "BUFFS",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["aurabar"] = {
					enable = true,
					attachTo = "DEBUFFS"
				}
			},
			["focus"] = {
				["smartAuraDisplay"] = "SHOW_DEBUFFS_ON_FRIENDLIES",
				["buffs"] = {
					enable = true,
					attachTo = "FRAME",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["debuffs"] = {
					enable = true,
					attachTo = "BUFFS",
					anchorPoint = 'TOPRIGHT',
					verticalGrowth = 'UP',
					horizontalGrowth = 'LEFT',
				},
				["aurabar"] = {
					enable = true,
					attachTo = "DEBUFFS"
				}
			}
		},
	}
};