Quantcast

working towards DK/R fixes, starting new nameplates code

Failcoder [07-26-16 - 20:30]
working towards DK/R fixes, starting new nameplates code
Filename
SVUI_!Core/setup/installer.lua
SVUI_!Core/system/api.lua
SVUI_!Core/system/letsride.lua
SVUI_Maps/SVUI_Maps.lua
SVUI_Maps/assets/MINIMAP-OBJECTICONS.blp
SVUI_NamePlates/SVUI_NamePlates.lua
SVUI_Skins/components/blizzard/talents.lua
SVUI_UnitFrames/class_resources/deathknight.lua
SVUI_UnitFrames/libs/Plugins/oUF_Necromancy/oUF_Necromancy.lua
diff --git a/SVUI_!Core/setup/installer.lua b/SVUI_!Core/setup/installer.lua
index 2067db9..25ae5a8 100644
--- a/SVUI_!Core/setup/installer.lua
+++ b/SVUI_!Core/setup/installer.lua
@@ -91,14 +91,12 @@ local function SetInstallButton(button)
 end

 local function forceCVars()
-	SetCVar("alternateResourceText",1)
 	SetCVar("statusTextDisplay","BOTH")
 	SetCVar("ShowClassColorInNameplate",1)
 	SetCVar("screenshotQuality",10)
 	SetCVar("chatMouseScroll",1)
 	SetCVar("chatStyle","classic")
 	SetCVar("WholeChatWindowClickable",0)
-	SetCVar("ConversationMode","inline")
 	SetCVar("showTutorials",0)
 	SetCVar("UberTooltips",1)
 	SetCVar("threatWarning",3)
diff --git a/SVUI_!Core/system/api.lua b/SVUI_!Core/system/api.lua
index d61656d..fd687f9 100644
--- a/SVUI_!Core/system/api.lua
+++ b/SVUI_!Core/system/api.lua
@@ -1857,11 +1857,11 @@ MOD.Concepts["ScrollBar"] = function(self, adjustable, frame, scale, yOffset)
             frame.BG:SetPoint("BOTTOMRIGHT", downButton, "BOTTOMRIGHT", -1, 1)
             frame.BG:SetTexture(SV.media.background.transparent)

-            local fg = CreateFrame("Frame", nil, frame)
-            fg:SetPoint("TOPLEFT", frame, "TOPLEFT", 18, -2)
-            fg:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -10, 6)
-            fg:SetBackdrop(SV.media.backdrop.outline)
-            frame.Brdr = fg
+            -- local fg = CreateFrame("Frame", nil, frame)
+            -- fg:SetPoint("TOPLEFT", frame, "TOPLEFT", 18, -2)
+            -- fg:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -10, 6)
+            -- fg:SetBackdrop(SV.media.backdrop.outline)
+            -- frame.Brdr = fg
         end
         if(frame.SetThumbTexture) then
             frame:SetThumbTexture(SV.media.button.knob)
diff --git a/SVUI_!Core/system/letsride.lua b/SVUI_!Core/system/letsride.lua
index cdb899b..ba023a3 100644
--- a/SVUI_!Core/system/letsride.lua
+++ b/SVUI_!Core/system/letsride.lua
@@ -75,7 +75,7 @@ end

 local function MountUp(index)
 	local _, _, _, _, _, _, _, _, _, _, _, id = MountInfo(index);
-	return C_MountJournal.SummonByID(id)
+	if id then C_MountJournal.SummonByID(id) end
 end

 local UnMount = C_MountJournal.Dismiss
diff --git a/SVUI_Maps/SVUI_Maps.lua b/SVUI_Maps/SVUI_Maps.lua
index 0c8c3e6..f8c5ef3 100644
--- a/SVUI_Maps/SVUI_Maps.lua
+++ b/SVUI_Maps/SVUI_Maps.lua
@@ -784,10 +784,10 @@ end

 local _hook_BlipTextures = function(self, texture)
 	if(SV.db.Maps.customIcons and (texture ~= MOD.media.customBlips)) then
-		--self:SetBlipTexture(MOD.media.customBlips)
+		self:SetBlipTexture(MOD.media.customBlips)
 	else
 		if((not SV.db.Maps.customIcons) and texture ~= MOD.media.defaultBlips) then
-			--self:SetBlipTexture(MOD.media.defaultBlips)
+			self:SetBlipTexture(MOD.media.defaultBlips)
 		end
 	end
 end
@@ -814,7 +814,7 @@ function MOD:Load()
 	Minimap:SetParent(self.Holder)
 	Minimap:SetFrameStrata("LOW")
 	Minimap:SetFrameLevel(Minimap:GetFrameLevel() + 2)
-
+
 	self.Holder:SetFrameLevel(Minimap:GetFrameLevel() - 2)
 	self.Holder:SetFrameStrata("LOW")
 	self.Holder:SetPoint("TOPRIGHT", SV.Screen, "TOPRIGHT", -15, -20)
@@ -886,8 +886,8 @@ function MOD:Load()
 	self.InfoTop:SetPoint("TOPLEFT", self.Holder, "TOPLEFT", 4, -4)
 	--self.InfoTop:SetSize(100, 22)
 	self.InfoTop:SetStyle("Frame")
-  	self.InfoTop:SetPanelColor("yellow")
-  	self.InfoTop:SetBackdropColor(1, 1, 0, 1)
+  self.InfoTop:SetPanelColor("yellow")
+  self.InfoTop:SetBackdropColor(1, 1, 0, 1)
 	self.InfoTop:SetFrameLevel(Minimap:GetFrameLevel() + 2)

 	self.InfoTop.Text:SetShadowColor(0, 0, 0, 0.3)
diff --git a/SVUI_Maps/assets/MINIMAP-OBJECTICONS.blp b/SVUI_Maps/assets/MINIMAP-OBJECTICONS.blp
index 4d976ee..99d20dd 100644
Binary files a/SVUI_Maps/assets/MINIMAP-OBJECTICONS.blp and b/SVUI_Maps/assets/MINIMAP-OBJECTICONS.blp differ
diff --git a/SVUI_NamePlates/SVUI_NamePlates.lua b/SVUI_NamePlates/SVUI_NamePlates.lua
index 8ff67da..999c3d1 100644
--- a/SVUI_NamePlates/SVUI_NamePlates.lua
+++ b/SVUI_NamePlates/SVUI_NamePlates.lua
@@ -65,7 +65,7 @@ LOCAL VARS
 local numChildren = -1;
 local PlateRegistry, VisiblePlates = {}, {};
 local WorldFrameUpdateHook, UpdatePlateElements, PlateForge;
-local BLIZZ_PLATE, SVUI_PLATE, PLATE_REF, PLATE_ARGS, PLATE_AURAS, PLATE_AURAICONS, PLATE_GRIP, PLATE_REALNAME;
+local BLIZZ_PLATE, SVUI_PLATE, PLATE_REF, PLATE_ARGS, PLATE_AURAS, PLATE_AURAICONS, PLATE_REALNAME;
 local CURRENT_TARGET_NAME;
 local TARGET_CHECKS = 0;
 local PLATE_TOP = MOD.media.topArt;
@@ -367,15 +367,13 @@ local function ProxyThisPlate(plate, updateName)
 	if(not plate or not plate.frame) then return false; end
 	BLIZZ_PLATE = plate
 	SVUI_PLATE = plate.frame
-	PLATE_REF = plate.ref
 	PLATE_AURAS = plate.frame.auras
 	PLATE_AURAICONS = plate.frame.auraicons
 	PLATE_ARGS = plate.setting
-	PLATE_GRIP = plate.holder
 	if updateName then
-		plate.ref.nametext = gsub(plate.name:GetText(), '%s%(%*%)','');
+		plate.nametext = gsub(plate.name:GetText(), '%s%(%*%)','');
 	end
-	PLATE_REALNAME = plate.ref.nametext
+	PLATE_REALNAME = plate.nametext
 	return true
 end
 --[[
@@ -392,9 +390,8 @@ local function ParseByGUID(guid)
 end

 local function CheckRaidIcon(plate)
-	if(plate and plate.ref) then
+	if(plate and plate.frame) then
 		SVUI_PLATE = plate.frame
-		PLATE_REF = plate.ref
 	end
 	if PLATE_REF.raidicon:IsShown() then
 		local ULx,ULy,LLx,LLy,URx,URy,LRx,LRy = PLATE_REF.raidicon:GetTexCoord()
@@ -641,8 +638,8 @@ function MOD:UpdateAuras(plate)
 			local pn = plate.name:GetText()
 			local name = pn:gsub("%s%(%*%)", "")
 			guid = AuraByName[name]
-		elseif plate.ref.raidicon:IsShown() then
-			guid = AuraByRaidIcon[plate.ref.raidicontype]
+		elseif plate.raidicon:IsShown() then
+			guid = AuraByRaidIcon[plate.raidicontype]
 		end
 		if guid then
 			plate.guid = guid
@@ -697,23 +694,23 @@ PLATE COLORING
 ]]--
 do
 	local function GetPlateThreatReaction(plate)
-		if plate.ref.threat:IsShown() then
-			local r, g, b = plate.ref.threat:GetVertexColor()
-			local lastThreat = plate.ref.reaction or 1
+		if plate.aggroHighlight:IsShown() then
+			local r, g, b = plate.aggroHighlight:GetVertexColor()
+			local lastThreat = plate.reaction or 1
 			if g + b < 1 then
-				plate.ref.reaction = 4
+				plate.reaction = 4
 				return 4
 			else
 				if lastThreat > 2 then
-					plate.ref.reaction = 2
+					plate.reaction = 2
 					return 2
 				elseif lastThreat < 3 then
-					plate.ref.reaction = 3
+					plate.reaction = 3
 					return 3
 				end
 			end
 		end
-		plate.ref.reaction = 1
+		plate.reaction = 1
 		return 1
 	end

@@ -726,7 +723,7 @@ do
 			end
 		end

-		local oldR,oldG,oldB = plate.health:GetStatusBarColor()
+		local oldR,oldG,oldB = plate.healthBar:GetStatusBarColor()
 		local r = floor(oldR * 100 + .5) * 0.01;
 		local g = floor(oldG * 100 + .5) * 0.01;
 		local b = floor(oldB * 100 + .5) * 0.01;
@@ -769,7 +766,7 @@ do
 		if(latestColor) then
 			r,g,b = unpack(latestColor)
 		else
-			r,g,b = plate.health:GetStatusBarColor()
+			r,g,b = plate.healthBar:GetStatusBarColor()
 		end

 		frame.health:SetStatusBarColor(r,g,b)
@@ -784,50 +781,14 @@ do
 		if(not plate.setting.scaled and not plate.setting.tiny and frame.health:GetWidth() ~= (HBWidth * scale)) then
 			frame.health:SetSize(HBWidth * scale, HBHeight * scale)
 			local scaledIconSize = CBHeight + (HBHeight * scale) + 5;
-			plate.cast.icon:SetSize(scaledIconSize, scaledIconSize)
+			plate.castBar.Icon:SetSize(scaledIconSize, scaledIconSize)
 		end
 	end

 	function UpdatePlateElements(plate, frame)
 		ColorizeAndScale(plate, frame)
-		local region = select(4, plate:GetRegions())
-		if(region and region:GetObjectType() == 'FontString') then
-			plate.ref.level = region
-		end
 		frame.health.elitetop:Hide()
 		frame.health.elitebottom:Hide()
-
-		if(plate.ref.level:IsShown()) then
-			local level = plate.ref.level:GetObjectType() == 'FontString' and tonumber(plate.ref.level:GetText()) or "";
-			local elite, boss, mylevel = plate.ref.eliteicon:IsShown(), plate.ref.skullicon:IsShown(), UnitLevel("player")
-			if(boss) then
-				frame.health.elitetop:Show()
-				frame.health.elitebottom:Show()
-				frame.level:SetText("??")
-				frame.level:SetTextColor(0.8, 0.05, 0)
-			elseif(elite) then
-				frame.health.elitetop:Show()
-				frame.health.elitebottom:Show()
-				frame.level:SetText(level.."+")
-				frame.level:SetTextColor(plate.ref.level:GetTextColor())
-			else
-				frame.level:SetText(level)
-				frame.level:SetTextColor(plate.ref.level:GetTextColor())
-			end
-		elseif(plate.ref.skullicon:IsShown()) then
-			frame.health.elitetop:Show()
-			frame.health.elitebottom:Show()
-			frame.level:SetText("??")
-			frame.level:SetTextColor(0.8, 0.05, 0)
-		end
-
-		if plate.setting.tiny then
-			frame.level:SetText("")
-			frame.level:Hide()
-		elseif(not frame.level:IsShown()) then
-			frame.level:Show()
-		end
-
 		if(frame.name.SetText) then
 			frame.name:SetText(plate.name:GetText())
 		end
@@ -859,7 +820,7 @@ do
 	end

 	local function UpdatePlateUnit()
-		local plateName = PLATE_REF.nametext
+		local plateName = BLIZZ_PLATE.nametext

 		if BLIZZ_PLATE:GetAlpha() == 1 and CURRENT_TARGET_NAME and (CURRENT_TARGET_NAME == plateName) then
 			BLIZZ_PLATE.guid = UnitGUID("target")
@@ -890,7 +851,7 @@ do
 				end
 				PLATE_ARGS.allowed = nil
 			end
-		elseif PLATE_REF.highlight:IsShown() and UnitExists("mouseover") and (UnitName("mouseover") == plateName) then
+		elseif UnitExists("mouseover") and (UnitName("mouseover") == plateName) then
 			if(PLATE_ARGS.unit ~= "mouseover" or PLATE_ARGS.allowed) then
 				SVUI_PLATE:SetFrameLevel(1)
 				SVUI_PLATE.highlight:Show()
@@ -907,45 +868,22 @@ do
 			SVUI_PLATE.highlight:Hide()
 			PLATE_ARGS.unit = nil
 		end
-		CheckRaidIcon()
+		--CheckRaidIcon()
 		UpdatePlateElements(BLIZZ_PLATE,SVUI_PLATE)
 	end

-	function WorldFrameUpdateHook(self, elapsed)
-		NPGrip:Hide()
-		for plate, _ in pairs(VisiblePlates) do
-			local frame = plate.frame
-			if(plate:IsShown()) then
-				local x,y = plate:GetCenter()
-				frame:SetPoint("CENTER", self, "BOTTOMLEFT", floor(x), floor(y))
-				SetPlateAlpha(plate, frame)
-			else
-				frame:Hide()
-			end
+	function MOD:NAME_PLATE_CREATED(event, ...)
+		local frame = ...;
+		if(not PlateRegistry[frame]) then
+			PlateForge(frame)
 		end
-		NPGrip:Show()
-
-		if(self.elapsed and self.elapsed > 0.2) then
+	end

-			for plate, _ in pairs(VisiblePlates) do
-				local frame = plate.frame
-				if(plate:IsShown() and frame:IsShown() and ProxyThisPlate(plate)) then
-					UpdatePlateUnit()
-				end
-			end
-			self.elapsed = 0
-		else
-			self.elapsed = (self.elapsed or 0) + elapsed
-		end
-		local curChildren = self:GetNumChildren()
-		if(numChildren ~= curChildren) then
-			for i = 1, curChildren do
-				local frame = select(i, self:GetChildren())
-				if(not PlateRegistry[frame] and IsNamePlate(frame)) then
-					PlateForge(frame)
-				end
-			end
-			numChildren = curChildren
+	function MOD:NAME_PLATE_UNIT_ADDED(event, ...)
+		local namePlateUnitToken = ...;
+		local frame = C_NamePlate.GetNamePlateForUnit(namePlateUnitToken);
+		if(not PlateRegistry[frame]) then
+			PlateForge(frame)
 		end
 	end
 end
@@ -1016,7 +954,7 @@ do
 		local isChannel = value < castBar:GetValue()
 		castBar:SetMinMaxValues(min, max)
 		castBar:SetValue(value)
-		castBar.text:SetFormattedText("%.1f ", value)
+		castBar.Text:SetFormattedText("%.1f ", value)
 		local color
 		if(self.shield and self.shield:IsShown()) then
 			color = CBNoInterrupt
@@ -1035,21 +973,19 @@ do

 		if RestrictedPlates[PLATE_REALNAME] then
 			SVUI_PLATE:Hide()
-			PLATE_GRIP:Hide()
 			return
 		elseif(not SVUI_PLATE:IsShown()) then
-			PLATE_GRIP:Show()
 			SVUI_PLATE:Show()
 		end

 		VisiblePlates[BLIZZ_PLATE] = true

-		PLATE_ARGS.tiny = (BLIZZ_PLATE.health:GetEffectiveScale() < 1)
+		PLATE_ARGS.tiny = (BLIZZ_PLATE.healthBar:GetEffectiveScale() < 1)
 		SVUI_PLATE:SetSize(BLIZZ_PLATE:GetSize())

 		SVUI_PLATE.name:ClearAllPoints()
 		if(PLATE_ARGS.tiny) then
-			SVUI_PLATE.health:SetSize(BLIZZ_PLATE.health:GetWidth() * (BLIZZ_PLATE.health:GetEffectiveScale() * 1.25), HBHeight)
+			SVUI_PLATE.health:SetSize(BLIZZ_PLATE.healthBar:GetWidth() * (BLIZZ_PLATE.healthBar:GetEffectiveScale() * 1.25), HBHeight)
 			SVUI_PLATE.name:SetPoint("BOTTOM", SVUI_PLATE.health, "TOP", 0, 3)
 		else
 			SVUI_PLATE.name:SetPoint("BOTTOMLEFT", SVUI_PLATE.health, "TOPLEFT", 0, 3)
@@ -1058,10 +994,10 @@ do

 		UpdatePlateElements(BLIZZ_PLATE, SVUI_PLATE)

-		HealthBarValueChanged(BLIZZ_PLATE.health, BLIZZ_PLATE.health:GetValue())
+		HealthBarValueChanged(BLIZZ_PLATE.healthBar, BLIZZ_PLATE.healthBar:GetValue())

 		if(not PLATE_ARGS.tiny) then
-			CheckRaidIcon()
+			--CheckRaidIcon()
 			MOD:UpdateAuras(BLIZZ_PLATE)
 		else
 			PLATE_ARGS.allowed = true
@@ -1077,14 +1013,10 @@ do
 		if(not ProxyThisPlate(plate)) then return; end

 		SVUI_PLATE:Hide()
-		PLATE_GRIP:Hide()
 		VisiblePlates[plate] = nil
-
-		PLATE_REF.reaction = nil
 		PLATE_ARGS.classToken = nil
 		plate.guid = nil
 		PLATE_ARGS.unit = nil
-		PLATE_REF.raidicontype = nil
 		PLATE_ARGS.scaled = nil
 		PLATE_ARGS.tiny = nil
 		PLATE_ARGS.allowed = nil
@@ -1098,7 +1030,7 @@ do
 		SVUI_PLATE.health.icon:Hide()
 		if SVUI_PLATE.health then
 			SVUI_PLATE.health:SetSize(HBWidth, HBHeight)
-			plate.cast.icon:SetSize(ICON_SIZE, ICON_SIZE)
+			plate.castBar.Icon:SetSize(ICON_SIZE, ICON_SIZE)
 		end
 		if PLATE_AURAS then
 			for index = 1, #PLATE_AURAICONS do
@@ -1115,115 +1047,58 @@ do
 	end

 	local function UpdateThisPlate(plate)
+		--print("NamePlate UpdateThisPlate Start")
 		if(not ProxyThisPlate(plate, true)) then return; end
 		SVUI_PLATE.name:SetFontObject(SVUI_Font_NamePlate)
 		SVUI_PLATE.name:SetTextColor(1, 1, 1)
-		SVUI_PLATE.level:SetFontObject(SVUI_Font_NamePlate_Number)
-		if not PLATE_ARGS.scaled and not PLATE_ARGS.tiny then
-			SVUI_PLATE.health:SetSize(HBWidth, HBHeight)
-		end
-		SVUI_PLATE.health:SetStatusBarTexture(NPBarTex)
-		SVUI_PLATE.health.text:SetFontObject(SVUI_Font_NamePlate_Number)
-		SVUI_PLATE.cast:SetSize(HBWidth, CBHeight)
-		SVUI_PLATE.cast:SetStatusBarTexture(NPBarTex)
-		SVUI_PLATE.cast.text:SetFont(SV.media.font.default, 8, "OUTLINE")
-		plate.cast.text:SetFont(SV.media.font.default, 8, "OUTLINE")
-		plate.cast.icon:SetSize(ICON_SIZE, ICON_SIZE)
-		PLATE_REF.raidicon:ClearAllPoints()
-		SV:SetReversePoint(PLATE_REF.raidicon, RIAnchor, SVUI_PLATE.health, RIXoffset, RIYoffset)
-		PLATE_REF.raidicon:SetSize(RISize, RISize)
-		SVUI_PLATE.health.icon:ClearAllPoints()
-		SV:SetReversePoint(SVUI_PLATE.health.icon, RIAnchor, SVUI_PLATE.health, RIXoffset, RIYoffset)
-		SVUI_PLATE.health.icon:SetSize(RISize, RISize)
-		for index = 1, #PLATE_AURAICONS do
-			if PLATE_AURAICONS and PLATE_AURAICONS[index] then
-				PLATE_AURAICONS[index].TimeLeft:SetFontObject(SVUI_Font_NamePlate_Aura)
-				PLATE_AURAICONS[index].Stacks:SetFontObject(SVUI_Font_NamePlate_Aura)
-				PLATE_AURAICONS[index].Icon:SetTexCoord(.07, 0.93, .23, 0.77)
-			end
-		end
-
-		if(MOD.UseCombo and not SVUI_PLATE.combo:IsShown()) then
-			SVUI_PLATE.combo:Show()
-		elseif(SVUI_PLATE.combo:IsShown()) then
-			SVUI_PLATE.combo:Hide()
-		end
-
-		ShowThisPlate(plate)
-		HealthBarSizeChanged(SVUI_PLATE.health, SVUI_PLATE.health:GetSize())
+		-- SVUI_PLATE.level:SetFontObject(SVUI_Font_NamePlate_Number)
+		-- if not PLATE_ARGS.scaled and not PLATE_ARGS.tiny then
+		-- 	SVUI_PLATE.health:SetSize(HBWidth, HBHeight)
+		-- end
+		-- SVUI_PLATE.health:SetStatusBarTexture(NPBarTex)
+		-- SVUI_PLATE.health.text:SetFontObject(SVUI_Font_NamePlate_Number)
+		-- SVUI_PLATE.cast:SetSize(HBWidth, CBHeight)
+		-- SVUI_PLATE.cast:SetStatusBarTexture(NPBarTex)
+		-- SVUI_PLATE.cast.text:SetFont(SV.media.font.default, 8, "OUTLINE")
+		-- SVUI_PLATE.health.icon:ClearAllPoints()
+		-- SV:SetReversePoint(SVUI_PLATE.health.icon, RIAnchor, SVUI_PLATE.health, RIXoffset, RIYoffset)
+		-- SVUI_PLATE.health.icon:SetSize(RISize, RISize)
+		-- for index = 1, #PLATE_AURAICONS do
+		-- 	if PLATE_AURAICONS and PLATE_AURAICONS[index] then
+		-- 		PLATE_AURAICONS[index].TimeLeft:SetFontObject(SVUI_Font_NamePlate_Aura)
+		-- 		PLATE_AURAICONS[index].Stacks:SetFontObject(SVUI_Font_NamePlate_Aura)
+		-- 		PLATE_AURAICONS[index].Icon:SetTexCoord(.07, 0.93, .23, 0.77)
+		-- 	end
+		-- end
+		--
+		-- if(MOD.UseCombo and not SVUI_PLATE.combo:IsShown()) then
+		-- 	SVUI_PLATE.combo:Show()
+		-- elseif(SVUI_PLATE.combo:IsShown()) then
+		-- 	SVUI_PLATE.combo:Hide()
+		-- end
+		--
+		-- ShowThisPlate(plate)
+		-- HealthBarSizeChanged(SVUI_PLATE.health, SVUI_PLATE.health:GetSize())
 	end

-	function PlateForge(plate)
-		PlateRegistry[plate] = true;
-
+	function PlateForge(source)
+		local plate = source.UnitFrame;
+		if(not plate) then return end;
+		--print("NamePlate Creation Start")
 		local ref, skin = {}, {};
-		local barRegions, fontRegions = plate:GetChildren()
-		local health, absorb, cast = barRegions:GetChildren()
-		if(not cast) then
-			cast = absorb;
-		end
-
-		ref.threat,
-		ref.border,
-		ref.highlight,
-		ref.level,
-		ref.skullicon,
-		ref.raidicon,
-		ref.eliteicon = barRegions:GetRegions()
-		-- print(ref.raidicon:GetTexture())
-		-- print(ref.eliteicon:GetTexture())
-		-- if(not MOD.DebugPlateCaptured) then
-		-- 	SV.ScriptError:ShowDebug(MOD.Schema, ref)
-		-- 	MOD.DebugPlateCaptured = true
-		-- end
-
-		ref.nametext = "";

-		cast.border,
-		cast.shield,
-		cast.icon,
-		cast.text,
-		cast.shadow = select(2, cast:GetRegions())
-
-		health:SetStatusBarTexture(SV.NoTexture)
-		cast:SetStatusBarTexture(SV.NoTexture)
-
-		plate.health = health
-		plate.cast = cast
-		plate.name = fontRegions:GetRegions()
-
-		health:Hide()
-		fontRegions:Hide()
-
-		ref.threat:SetTexture("")
-		ref.border:Hide()
-		ref.highlight:SetTexture("")
-		ref.level:SetWidth( 000.1 )
-		ref.level:Hide()
-		ref.skullicon:SetTexture("")
-		ref.raidicon:SetAlpha( 0 )
-		ref.eliteicon:SetTexture("")
-		ref.eliteicon:SetAlpha( 0 )
-		--ref.eliteicon.SetTexture = SV.fubar
+		plate.healthBar:SetStatusBarTexture(SV.NoTexture)
+		plate.castBar:SetStatusBarTexture(SV.NoTexture)

+		plate.healthBar:Hide()
+		plate.castBar:Hide()
+		plate.name:ClearAllPoints()
 		plate.name:Hide()

-		cast.border:SetTexture("")
-		if(cast.shield) then
-			cast.shield:SetTexture("")
-		end
-		cast.icon:SetTexCoord( 0, 0, 0, 0 )
-		cast.icon:SetWidth(.001)
-		cast.shadow:SetTexture("")
-		--cast.shadow:Hide()
-		--cast.text:Hide()
-
-		local frameName = "SVUI_PlateHolder"..numChildren
-		local holder = CreateFrame("Frame", frameName, NPGrip)
-		local frame = CreateFrame("Frame", nil, holder)
+		local frame = CreateFrame("Frame", nil, plate)

 		--[[ HEALTH BAR ]]--
-
+		--print("NamePlate Creating Health")
 		frame.health = CreateFrame("StatusBar", nil, frame)
 		frame.health:SetPoint('BOTTOM', frame, 'BOTTOM', 0, 5)
 		frame.health:SetFrameStrata("BACKGROUND")
@@ -1232,7 +1107,7 @@ do
 		frame.health:SetScript("OnSizeChanged", HealthBarSizeChanged)
 		frame.health.elitetop = frame.health.Panel.Top
 		frame.health.elitebottom = frame.health.Panel.Bottom
-		frame.health.sync = plate;
+		frame.health.sync = plate.healthBar;

 		--CreatePlateBorder(frame.health)

@@ -1240,23 +1115,25 @@ do
 		frame.health.text:SetPoint("CENTER", frame.health, HBTextAnchor, HBXoffset, HBYoffset)
 		frame.health.text:SetJustifyH("CENTER")

+		--print("NamePlate Creating LevelText")
 		frame.level = frame.health:CreateFontString(nil, 'OVERLAY')
 		frame.level:SetPoint("BOTTOMRIGHT", frame.health, "TOPRIGHT", 3, 3)
 		frame.level:SetJustifyH("RIGHT")

 		frame.name = frame.health:CreateFontString(nil, 'OVERLAY')
 		frame.name:SetJustifyH("LEFT")
-
+--print("NamePlate Creating Icons")
 		frame.eliteicon = frame:CreateTexture(nil, "OVERLAY")
 		frame.skullicon = frame:CreateTexture(nil, "OVERLAY")

 		frame.raidicon = frame:CreateTexture(nil, "ARTWORK")
 		frame.raidicon:SetSize(NPIcons,NPIcons)
 		frame.raidicon:SetPoint("RIGHT", frame.health, "LEFT", -3, 0)
-		frame.raidicon:SetTexture("Interface\\TargetingFrame\\UI-RaidTargetingIcons")
+		--frame.raidicon:SetTexture("Interface\\TargetingFrame\\UI-RaidTargetingIcons")
+		frame.raidicon:SetTexture("")

 		frame.health.icon = frame:CreateTexture(nil, 'ARTWORK')
-		frame.health.icon:SetSize(ref.raidicon:GetSize())
+		frame.health.icon:SetSize(14,14)
 		frame.health.icon:SetPoint("BOTTOMRIGHT", frame.health, "TOPLEFT", -3, 3)

 		frame.health.icon:SetTexture(MOD.media.roles)
@@ -1267,7 +1144,7 @@ do
 		frame.highlight:SetAllPoints(frame.health)
 		frame.highlight:SetColorTexture(1, 1, 1, 0.3)
 		frame.highlight:Hide()
-
+--print("NamePlate Creating Alert")
 		local alert = CreateFrame("Frame", nil, frame)
 		alert:SetFrameLevel(0)
 		alert:WrapPoints(frame.health,2,2)
@@ -1281,10 +1158,10 @@ do
 		alert:Hide()
 		frame.health.alert = alert

-		health.sync = frame.health
+		plate.healthBar.sync = frame.health

 		--[[ CAST BAR ]]--
-
+--print("NamePlate Creating CastBar")
 		frame.cast = CreateFrame("StatusBar", nil, frame)
 		frame.cast:SetPoint('TOPLEFT', frame.health, 'BOTTOMLEFT', 0, -8)
 		frame.cast:SetPoint('TOPRIGHT', frame.health, 'BOTTOMRIGHT', 0, -8)
@@ -1296,25 +1173,24 @@ do
 		frame.cast.text:SetPoint("RIGHT", frame.cast, "LEFT", -4, CBYoffset)
 		frame.cast.text:SetJustifyH("LEFT")

-		cast.text:SetParent(frame.cast)
-		cast.text:ClearAllPoints()
-		cast.text:SetPoint("LEFT", frame.cast, "LEFT", CBXoffset, CBYoffset)
-		cast.text:SetJustifyH("LEFT")
-
-		cast.icon:SetParent(frame.cast)
-		cast.icon:SetTexCoord(.07, .93, .07, .93)
-		cast.icon:SetDrawLayer("OVERLAY")
-		cast.icon:ClearAllPoints()
-		cast.icon:SetPoint("TOPLEFT", frame.health, "TOPRIGHT", 5, 0)
-
-		local bgFrame = CreateFrame("Frame", nil, frame.cast)
-		bgFrame:WrapPoints(cast.icon)
-		bgFrame:SetFrameLevel(bgFrame:GetFrameLevel() - 1)
-
-		bgFrame:SetStyle("Frame", "Bar", true, 2, 0, 0)
-
-		cast.sync = frame.cast
-
+		-- plate.castBar.Text:SetParent(frame.cast)
+		-- plate.castBar.Text:ClearAllPoints()
+		-- plate.castBar.Text:SetPoint("LEFT", frame.cast, "LEFT", CBXoffset, CBYoffset)
+		-- plate.castBar.Text:SetJustifyH("LEFT")
+		--
+		-- plate.castBar.Icon:SetParent(frame.cast)
+		-- plate.castBar.Icon:SetTexCoord(.07, .93, .07, .93)
+		-- plate.castBar.Icon:SetDrawLayer("OVERLAY")
+		-- plate.castBar.Icon:ClearAllPoints()
+		-- plate.castBar.Icon:SetPoint("TOPLEFT", frame.health, "TOPRIGHT", 5, 0)
+
+		-- local bgFrame = CreateFrame("Frame", nil, frame.cast)
+		-- bgFrame:WrapPoints(plate.castBar.Icon)
+		-- bgFrame:SetFrameLevel(bgFrame:GetFrameLevel() - 1)
+		-- bgFrame:SetStyle("Frame", "Bar", true, 2, 0, 0)
+
+		plate.castBar.sync = frame.cast
+--print("NamePlate Creating Combo")
 		frame.combo = CreateFrame("Frame", nil, frame.health)
 		frame.combo:SetPoint("CENTER", frame.health, "BOTTOM")
 		frame.combo:SetSize(68, 1)
@@ -1334,7 +1210,7 @@ do
 				frame.combo[i]:Hide()
 			end
 		end
-
+--print("NamePlate Creating Auras")
 		frame.auras = CreateFrame("Frame", nil, frame)
 		frame.auras:SetHeight(32); frame.auras:Show()
 		frame.auras:SetPoint('BOTTOMRIGHT', frame.health, 'TOPRIGHT', 0, 10)
@@ -1343,32 +1219,26 @@ do
 		frame.auras:SetFrameLevel(0)
 		frame.auraicons = {}

-		plate.holder = holder;
 		plate.frame = frame;
-		plate.ref = ref;
 		plate.setting = {};
-
+--print("NamePlate UpdateThisPlate")
 		UpdateThisPlate(plate)
-
+--print("NamePlate Setting Hooks")
 		plate:HookScript("OnShow", ShowThisPlate)
 		plate:HookScript("OnHide", HideThisPlate)
 		plate:HookScript("OnSizeChanged", function(self, width, height)
 			self.frame:SetSize(width, height)
 		end)

-		health:HookScript("OnValueChanged", HealthBarValueChanged)
+		plate.healthBar:HookScript("OnValueChanged", HealthBarValueChanged)

-		cast:HookScript("OnShow", function(self) self.sync:Show() end)
-		cast:HookScript("OnHide", function(self) self.sync:Hide() end)
-		cast:HookScript("OnValueChanged", CastBarValueChanged)
+		plate.castBar:HookScript("OnShow", function(self) self.sync:Show() end)
+		plate.castBar:HookScript("OnHide", function(self) self.sync:Hide() end)
+		plate.castBar:HookScript("OnValueChanged", CastBarValueChanged)

 		VisiblePlates[plate] = true
-
-		if not cast:IsShown() then
-			frame.cast:Hide()
-		elseif not frame.cast:IsShown() then
-			frame.cast:Show()
-		end
+		PlateRegistry[source] = true;
+		--print("NamePlate Added")
 	end

 	function MOD:UpdateAllPlates()
@@ -1390,7 +1260,7 @@ do
 		if not sourceName then return; end
 		local SearchFor = split("-", sourceName)
 		for plate, _ in pairs(VisiblePlates) do
-			if plate and plate:IsShown() and plate.ref.nametext == SearchFor and RAID_CLASS_COLORS[plate.setting.classToken] then
+			if plate and plate:IsShown() and plate.nametext == SearchFor and RAID_CLASS_COLORS[plate.setting.classToken] then
 				return plate
 			end
 		end
@@ -1398,8 +1268,8 @@ do

 	local function ParseByIconName(raidIcon)
 		for plate, _ in pairs(VisiblePlates) do
-			CheckRaidIcon(plate)
-			if plate and plate:IsShown() and plate.ref.raidicon:IsShown() and (plate.ref.raidicontype and plate.ref.raidicontype == raidIcon) then
+			--CheckRaidIcon(plate)
+			if plate and plate:IsShown() and plate.raidicon:IsShown() and (plate.raidicontype and plate.raidicontype == raidIcon) then
 				return plate
 			end
 		end
@@ -1409,7 +1279,7 @@ do
 		local plate
 		if guid then plate = ParseByGUID(guid) end
 		if (not plate) and name then plate = ParseByName(name) end
-		if (not plate) and raidIcon then plate = ParseByIconName(raidIcon) end
+		--if (not plate) and raidIcon then plate = ParseByIconName(raidIcon) end
 		if(plate and callbackFunc and MOD[callbackFunc]) then
 			MOD[callbackFunc](MOD, plate, ...)
 		end
@@ -1677,7 +1547,9 @@ function MOD:Load()
 	self:RegisterEvent("UNIT_AURA")
 	self:RegisterEvent("PLAYER_TARGET_CHANGED")
 	self:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
-	WorldFrame:HookScript('OnUpdate', WorldFrameUpdateHook)
+	self:RegisterEvent("NAME_PLATE_CREATED")
+	self:RegisterEvent("NAME_PLATE_UNIT_ADDED")
+	--WorldFrame:HookScript('OnUpdate', WorldFrameUpdateHook)
 	self:CombatToggle(true)
 	SV.Events:On("PLAYER_ROLE_CHANGED", PlayerRoleUpdate, true)
 end
diff --git a/SVUI_Skins/components/blizzard/talents.lua b/SVUI_Skins/components/blizzard/talents.lua
index 1de01ed..ea1a70b 100644
--- a/SVUI_Skins/components/blizzard/talents.lua
+++ b/SVUI_Skins/components/blizzard/talents.lua
@@ -15,8 +15,8 @@ local SV = _G['SVUI'];
 local L = SV.L;
 local MOD = SV.Skins;
 local Schema = MOD.Schema;
---[[
-##########################################################
+--[[
+##########################################################
 HELPERS
 ##########################################################
 ]]--
@@ -59,7 +59,7 @@ local function ChangeTabHelper(this)
 end

 local function StyleGlyphHolder(holder, offset)
-    if((not holder) or holder.styled) then return end
+    if((not holder) or holder.styled) then return end
     offset = offset or 1;

     holder:RemoveTextures()
@@ -75,79 +75,77 @@ local function StyleGlyphHolder(holder, offset)
     hover:SetGradient(unpack(SV.media.gradient.yellow))
     holder.hover = hover

-    if holder.SetDisabledTexture then
+    if holder.SetDisabledTexture then
         local disabled = holder:CreateTexture(nil, "BORDER")
         disabled:WrapPoints(holder, offset, offset)
         disabled:SetTexture(SV.media.button.round)
         disabled:SetGradient(unpack(SV.media.gradient.default))
         holder:SetDisabledTexture(disabled)
-    end
+    end

     local cd = holder:GetName() and _G[holder:GetName().."Cooldown"]
-    if cd then
+    if cd then
         cd:ClearAllPoints()
         cd:InsetPoints(holder)
     end

     holder.styled = true
-end
---[[
-##########################################################
+end
+--[[
+##########################################################
 TALENTFRAME MODR
 ##########################################################
 ]]--
 local function TalentFrameStyle()
+	--print("TalentFrameStyle")
 	if SV.db.Skins.blizzard.enable ~= true or SV.db.Skins.blizzard.talent ~= true then return end

 	SV.API:Set("Window", PlayerTalentFrame)
-
 	PlayerTalentFrameInset:RemoveTextures()
 	PlayerTalentFrameTalents:RemoveTextures()
-	PlayerTalentFrameTalentsClearInfoFrame:RemoveTextures()
+	PlayerTalentFrameSpecialization:RemoveTextures()
+	PlayerTalentFrameSpecializationTutorialButton:Die()
+	PlayerTalentFrameTalentsTutorialButton:Die()

 	PlayerTalentFrame.Panel:SetPoint("BOTTOMRIGHT", PlayerTalentFrame, "BOTTOMRIGHT", 0, -5)
-	-- PlayerTalentFrameSpecializationTutorialButton:Die()
-	-- PlayerTalentFrameTalentsTutorialButton:Die()
-	-- PlayerTalentFramePetSpecializationTutorialButton:Die()
-	-- SV.API:Set("CloseButton", PlayerTalentFrameCloseButton)
-	-- PlayerTalentFrameActivateButton:SetStyle("Button")
-
-	-- for _,name in pairs(SpecButtonList)do
-	-- 	local button = _G[name];
-	-- 	if(button) then
-	-- 		button:RemoveTextures()
-	-- 		button:SetStyle("Button")
-	-- 		local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = button:GetPoint()
-	-- 		button:SetPoint(initialAnchor, anchorParent, relativeAnchor, xPosition, -28)
-	-- 	end
-	-- end

 	PlayerTalentFrameTalents:SetStyle("!_Frame", "Inset")
+	PlayerTalentFrameSpecialization:SetStyle("!_Frame", "Inset")
+	SV.API:Set("CloseButton", PlayerTalentFrameCloseButton)
+	SV.API:Set("ScrollBar", PlayerTalentFrameSpecializationSpellScrollFrameScrollBar, 5)
+
+	for i = 1, 4 do
+		SV.API:Set("Tab", _G["PlayerTalentFrameTab"..i])
+	end
+
+	for _,name in pairs(SpecButtonList)do
+		local button = _G[name];
+		if(button) then
+			button:RemoveTextures()
+			button:SetStyle("Button")
+			local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = button:GetPoint()
+			button:SetPoint(initialAnchor, anchorParent, relativeAnchor, xPosition, -28)
+		end
+	end
+
+-- PlayerTalentFrameSpecializationSpellScrollFrameScrollBar
 	-- PlayerTalentFrameTalentsClearInfoFrame.icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS))
 	-- PlayerTalentFrameTalentsClearInfoFrame:SetWidth(PlayerTalentFrameTalentsClearInfoFrame:GetWidth()-2)
 	-- PlayerTalentFrameTalentsClearInfoFrame:SetHeight(PlayerTalentFrameTalentsClearInfoFrame:GetHeight()-2)
 	-- PlayerTalentFrameTalentsClearInfoFrame.icon:SetSize(PlayerTalentFrameTalentsClearInfoFrame:GetSize())
 	-- PlayerTalentFrameTalentsClearInfoFrame:SetPoint('TOPLEFT', PlayerTalentFrameTalents, 'BOTTOMLEFT', 8, -8)

-	-- for i = 1, 4 do
-	-- 	SV.API:Set("Tab", _G["PlayerTalentFrameTab"..i])
-	-- 	if i == 1 then
-	-- 		local d, e, k, g = _G["PlayerTalentFrameTab"..i]:GetPoint()
-	-- 		_G["PlayerTalentFrameTab"..i]:SetPoint(d, e, k, g, -4)
-	-- 	end
-	-- end
-
 	-- hooksecurefunc("PlayerTalentFrame_UpdateTabs", function()
-	-- 	for i = 1, 4 do
+	-- 	for i = 1, 4 do
 	-- 		local d, e, k, g = _G["PlayerTalentFrameTab"..i]:GetPoint()
 	-- 		_G["PlayerTalentFrameTab"..i]:SetPoint(d, e, k, g, -4)
-	-- 	end
+	-- 	end
 	-- end)

 	-- PlayerTalentFrameSpecializationSpellScrollFrameScrollChild.Seperator:SetColorTexture(1, 1, 1)
 	-- PlayerTalentFrameSpecializationSpellScrollFrameScrollChild.Seperator:SetAlpha(0.2)

-	-- for i = 1, 2 do
+	-- for i = 1, 2 do
 	-- 	local v = _G["PlayerSpecTab"..i]
 	-- 	_G["PlayerSpecTab"..i.."Background"]:Die()
 	-- 	ChangeTabHelper(v)
@@ -172,7 +170,7 @@ local function TalentFrameStyle()
 			rowFrame.TopLine:SetPoint("TOP", 0, 4)
 			rowFrame.BottomLine:SetPoint("BOTTOM", 0, -4)

-			for z = 1, 3 do
+			for z = 1, 3 do
 				local talentItem = _G[("%sTalent%d"):format(gName, z)]
 				if(talentItem) then
 					SV.API:Set("ItemButton", talentItem)
@@ -192,13 +190,10 @@ local function TalentFrameStyle()
 						talentItem:SetBackdropBorderColor(0, 1, 0)
 					else
 			 			talentItem:SetBackdropBorderColor(0, 0, 0)
-					end
-					if talentItem.learnSelection:IsShown() then
-			 			talentItem:SetBackdropBorderColor(1, 1, 0)
-					end
+					end
 				end
-			end
-		end
+			end
+		end
 	end)

 	-- for b = 1, 5 do
@@ -232,7 +227,7 @@ local function TalentFrameStyle()
 	-- 	end

 	-- 	local indexOffset = 1;
-	-- 	for i = 1, #cache, 2 do
+	-- 	for i = 1, #cache, 2 do
 	-- 		local button = scrollChild["abilityButton" .. indexOffset]
 	-- 		if(button) then
 	-- 			local _, icon = GetSpellTexture(cache[i])
@@ -244,12 +239,12 @@ local function TalentFrameStyle()
 	-- 				button:SetStyle("!_Frame", "Inset")
 	-- 				button.icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS))
 	-- 				button.icon:InsetPoints()
-	-- 			end
+	-- 			end
 	-- 		end
-	-- 		indexOffset = indexOffset + 1
+	-- 		indexOffset = indexOffset + 1
 	-- 	end

-	-- 	for i = 1, GetNumSpecializations(nil, self.isPet)do
+	-- 	for i = 1, GetNumSpecializations(nil, self.isPet)do
 	-- 		local specButton = self["specButton"..i]
 	-- 		if(specButton) then
 	-- 			specButton.SelectedTexture:InsetPoints(specButton.Panel)
@@ -259,10 +254,10 @@ local function TalentFrameStyle()
 	-- 				 specButton.SelectedTexture:Hide()
 	-- 			end
 	-- 		end
-	-- 	end
+	-- 	end
 	-- end)

-	-- for b = 1, GetNumSpecializations(false, nil)do
+	-- for b = 1, GetNumSpecializations(false, nil)do
 	-- 	local button = PlayerTalentFrameSpecialization["specButton"..b]
 	-- 	if(button) then
 	-- 		local _, _, _, icon = GetSpecializationInfo(b, false, nil)
@@ -281,7 +276,7 @@ local function TalentFrameStyle()
 	-- }

 	-- for _, gName in pairs(btnList)do
-	-- 	for b = 1, 4 do
+	-- 	for b = 1, 4 do
 	-- 		local button = _G[gName..b]
 	-- 		if(button) then
 	-- 			if(_G[gName..b.."Glow"]) then _G[gName..b.."Glow"]:Die() end
@@ -294,23 +289,23 @@ local function TalentFrameStyle()
 	-- 			button:SetStyle("!_Frame", "Button")
 	-- 			button:GetHighlightTexture():InsetPoints(button.Panel)
 	-- 		end
-	-- 	end
+	-- 	end
 	-- end

 	-- if SV.class == "HUNTER" then
 	-- 	for b = 1, 6 do
 	-- 		 select(b, PlayerTalentFramePetSpecialization:GetRegions()):Hide()
-	-- 	end
-	-- 	for b = 1, PlayerTalentFramePetSpecialization:GetNumChildren()do
+	-- 	end
+	-- 	for b = 1, PlayerTalentFramePetSpecialization:GetNumChildren()do
 	-- 		local O = select(b, PlayerTalentFramePetSpecialization:GetChildren())
 	-- 		if O and not O:GetName() then
 	-- 			 O:DisableDrawLayer("OVERLAY")
-	-- 		end
-	-- 	end
+	-- 		end
+	-- 	end
 	-- 	for b = 1, 5 do
 	-- 		 select(b, PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild:GetRegions()):Hide()
-	-- 	end
-	-- 	for b = 1, GetNumSpecializations(false, true)do
+	-- 	end
+	-- 	for b = 1, GetNumSpecializations(false, true)do
 	-- 		local A = PlayerTalentFramePetSpecialization["specButton"..b]
 	-- 		local p, p, p, icon = GetSpecializationInfo(b, false, true)
 	-- 		A.ring:Hide()
@@ -320,7 +315,7 @@ local function TalentFrameStyle()
 	-- 		A.specIcon:SetPoint("LEFT", A, "LEFT", 15, 0)
 	-- 		A.SelectedTexture = A:CreateTexture(nil, 'ARTWORK')
 	-- 		A.SelectedTexture:SetColorTexture(1, 1, 0, 0.1)
-	-- 	end
+	-- 	end
 	-- 	PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild.Seperator:SetColorTexture(1, 1, 1)
 	-- 	PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild.Seperator:SetAlpha(0.2)
 	-- end
@@ -328,16 +323,16 @@ local function TalentFrameStyle()
 	-- PlayerTalentFrameSpecialization:DisableDrawLayer('ARTWORK')
 	-- PlayerTalentFrameSpecialization:DisableDrawLayer('BORDER')

-	-- for b = 1, PlayerTalentFrameSpecialization:GetNumChildren()do
+	-- for b = 1, PlayerTalentFrameSpecialization:GetNumChildren()do
 	-- 	local O = select(b, PlayerTalentFrameSpecialization:GetChildren())
 	-- 	if O and not O:GetName() then
 	-- 		 O:DisableDrawLayer("OVERLAY")
-	-- 	end
-	-- end
+	-- 	end
+	-- end

-end
---[[
-##########################################################
+end
+--[[
+##########################################################
 MOD LOADING
 ##########################################################
 ]]--
@@ -354,7 +349,7 @@ local function GlyphStyle()
 	if(GlyphFrameHeader2) then GlyphFrameHeader2:RemoveTextures() end
 	if(GlyphFrameScrollFrame) then GlyphFrameScrollFrame:SetStyle("Frame", "Inset", false, 3, 2, 2) end
 	if(GlyphFrameSearchBox) then GlyphFrameSearchBox:SetStyle("Editbox") end
-
+
 	if(GlyphFrameClearInfoFrame and GlyphFrameClearInfoFrame.icon) then
 		GlyphFrameClearInfoFrame:RemoveTextures()

@@ -368,7 +363,7 @@ local function GlyphStyle()
 	SV.API:Set("DropDown", GlyphFrameFilterDropDown, 212)
 	SV.API:Set("ScrollBar", GlyphFrameScrollFrameScrollBar, 5)

-	for i = 1, 10 do
+	for i = 1, 10 do
 		local button = _G["GlyphFrameScrollFrameButton"..i]
 		if(button) then
 			SV.API:Set("ItemButton", button)
@@ -377,18 +372,18 @@ local function GlyphStyle()
 				icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
 			end
 		end
-	end
+	end

-	for i = 1, 6 do
+	for i = 1, 6 do
 		local glyphHolder = _G["GlyphFrameGlyph"..i]
-		if glyphHolder then
+		if glyphHolder then
 			if(i % 2 == 0) then
 				StyleGlyphHolder(glyphHolder, 4)
 			else
 				StyleGlyphHolder(glyphHolder, 1)
 			end
-		end
-	end
-end
+		end
+	end
+end

-MOD:SaveBlizzardStyle("Blizzard_GlyphUI", GlyphStyle)
\ No newline at end of file
+MOD:SaveBlizzardStyle("Blizzard_GlyphUI", GlyphStyle)
diff --git a/SVUI_UnitFrames/class_resources/deathknight.lua b/SVUI_UnitFrames/class_resources/deathknight.lua
index 053d2e6..1347d84 100644
--- a/SVUI_UnitFrames/class_resources/deathknight.lua
+++ b/SVUI_UnitFrames/class_resources/deathknight.lua
@@ -84,7 +84,7 @@ local OnMove = function()
 end

 local RuneChange = function(self, runeType)
-	if(runeType and runeType == 4) then
+	if(runeType and runeType == 7) then
 		self.FX:SetEffect("rune_death")
 	else
 		self.FX:SetEffect(specEffects[self.effectIndex])
@@ -97,7 +97,7 @@ local ClassicRuneChange = function(self, runeType)
 	self:SetStatusBarColor(colors[1], colors[2], colors[3])
 	self.bg:SetTexture(graphic)
 	self:SetStatusBarTexture(graphic)
-	if(runeType and runeType == 4) then
+	if(runeType and runeType == 7) then
 		self.FX:SetEffect("rune_death")
 	else
 		self.FX:SetEffect(specEffects[self.effectIndex])
@@ -131,12 +131,12 @@ local Reposition = function(self)
 			bar[i]:SetHeight(size)
 			bar[i]:SetWidth(size)
 			bar[i].bar:GetStatusBarTexture():SetHorizTile(false)
-			if i == 1 then
+			if i == 1 then
 				bar[i]:SetPoint("TOPLEFT", bar, "TOPLEFT", 0, 0)
 			elseif i == 2 then
-				bar[i]:SetPoint("LEFT", bar[1], "RIGHT", -6, 0)
-			else
-				bar[i]:SetPoint("LEFT", bar[i - 1], "RIGHT", -2, 0)
+				bar[i]:SetPoint("LEFT", bar[1], "RIGHT", -6, 0)
+			else
+				bar[i]:SetPoint("LEFT", bar[i - 1], "RIGHT", -2, 0)
 			end
 			bar[i].bar:ClearAllPoints()
 			bar[i].bar:SetAllPoints(bar[i].holder)
diff --git a/SVUI_UnitFrames/libs/Plugins/oUF_Necromancy/oUF_Necromancy.lua b/SVUI_UnitFrames/libs/Plugins/oUF_Necromancy/oUF_Necromancy.lua
index bb7f688..43ad2a1 100644
--- a/SVUI_UnitFrames/libs/Plugins/oUF_Necromancy/oUF_Necromancy.lua
+++ b/SVUI_UnitFrames/libs/Plugins/oUF_Necromancy/oUF_Necromancy.lua
@@ -7,8 +7,11 @@ local floor = math.floor

 local runeColors = {
 	{0.75, 0, 0},   -- blood
-	{0.1, 0.75, 0},  -- unholy
+	{0.75, 0, 0},   -- blood
+	{0, 0.75, 1},   -- frost
 	{0, 0.75, 1},   -- frost
+	{0.1, 0.75, 0},  -- unholy
+	{0.1, 0.75, 0},  -- unholy
 	{0.75, 0, 1}, -- death
 }

@@ -25,22 +28,21 @@ local OnUpdate = function(self, elapsed)
 end

 local spellName = GetSpellInfo(54637)
-local UpdateType = function(self, event, rid, alt)
+local UpdateType = function(self, event, rid)
 	local isUsable = IsUsableSpell(spellName)
-	local rune = self.Necromancy[runemap[rid]]
-	local runeType = GetRuneType(rid) or alt
-	if isUsable and runeType == 1 then runeType = 4; end
-	if not runeType then return; end
-	local colors = runeColors[runeType]
-	local r, g, b = colors[1], colors[2], colors[3]
-	rune.bar:SetStatusBarColor(r, g, b)
-	if(rune.bar.Change) then
-		rune.bar:Change(runeType)
+	local rune = self.Necromancy[rid]
+	local colors = runeColors[rid]
+	if (rune and colors) then
+		local r, g, b = colors[1], colors[2], colors[3]
+		rune.bar:SetStatusBarColor(r, g, b)
+		if(rune.bar.Change) then
+			rune.bar:Change(rid)
+		end
 	end
 end

 local UpdateRune = function(self, event, rid)
-	local rune = self.Necromancy[runemap[rid]]
+	local rune = self.Necromancy[rid]
 	if(rune) then
 		local start, duration, runeReady = GetRuneCooldown(rid)
 		start = start or 0;
@@ -85,11 +87,11 @@ local Enable = function(self, unit)
 		self:RegisterEvent("RUNE_POWER_UPDATE", UpdateRune, true)
 		self:RegisterEvent("RUNE_TYPE_UPDATE", UpdateType, true)	--I have no idea why this won't fire on initial login.
 		self:RegisterEvent("PLAYER_ENTERING_WORLD", UpdateAllRuneTypes)
-
-		if not runes.UpdateAllRuneTypes then runes.UpdateAllRuneTypes = UpdateAllRuneTypes end
-
+
+		if not runes.UpdateAllRuneTypes then runes.UpdateAllRuneTypes = UpdateAllRuneTypes end
+
 		for i=1, 6 do
-			UpdateType(self, nil, i, floor((runemap[i]+1)/2))
+			UpdateType(self, nil, i)
 		end

 		RuneFrame.Show = RuneFrame.Hide
@@ -102,7 +104,7 @@ end
 local Disable = function(self)
 	RuneFrame.Show = nil
 	RuneFrame:Show()
-
+

 	local runes = self.Necromancy
 	if(runes) then
@@ -111,7 +113,7 @@ local Disable = function(self)
 		self:UnregisterEvent("RUNE_POWER_UPDATE", UpdateRune)
 		self:UnregisterEvent("RUNE_TYPE_UPDATE", UpdateType)
 		self:UnregisterEvent("PLAYER_ENTERING_WORLD", UpdateAllRuneTypes)
-	end
+	end
 end

 oUF:AddElement("Necromancy", Update, Enable, Disable)