Quantcast

updates

Munglunch [05-15-15 - 21:12]
updates
Filename
SVUI_!Core/system/_docklets/misc.lua
SVUI_!Core/system/core.lua
SVUI_!Core/system/dock.lua
SVUI_!Core/system/funstuff.lua
SVUI_!Core/system/henchmen.lua
SVUI_!Core/xml/templates.xml
SVUI_Chat/Loader.lua
SVUI_Chat/SVUI_Chat.lua
SVUI_CraftOMatic/SVUI_CraftOMatic.lua
SVUI_QuestTracker/SVUI_QuestTracker.lua
SVUI_Skins/SVUI_Skins.lua
SVUI_UnitFrames/SVUI_UnitFrames.lua
SVUI_UnitFrames/bodyguard.lua
diff --git a/SVUI_!Core/system/_docklets/misc.lua b/SVUI_!Core/system/_docklets/misc.lua
index 57922cb..d1cf550 100644
--- a/SVUI_!Core/system/_docklets/misc.lua
+++ b/SVUI_!Core/system/_docklets/misc.lua
@@ -118,7 +118,7 @@ local Hearth_OnEnter = function(self)
 	GameTooltip:AddLine(" ", 1, 1, 1)
 	GameTooltip:AddDoubleLine("[Left-Click]", text1, 0, 1, 0, 1, 1, 1)
 	if(text2) then
-		GameTooltip:AddDoubleLine("[Right Click]", text2, 0, 1, 0, 1, 1, 1)
+		GameTooltip:AddDoubleLine("[Right-Click]", text2, 0, 1, 0, 1, 1, 1)
 	end
 end

@@ -165,9 +165,9 @@ end
 local PowerButton_OnEnter = function(self)
 	GameTooltip:AddLine(OTHER .. " " .. OPTIONS_MENU, 1, 1, 0)
 	GameTooltip:AddLine(" ", 1, 1, 1)
-	GameTooltip:AddDoubleLine("[Click]", LOGOUT, 0, 1, 0, 1, 1, 1)
-	GameTooltip:AddDoubleLine("[SHIFT + Left Click]", RELOADUI, 0, 1, 0, 1, 1, 1)
-	GameTooltip:AddDoubleLine("[SHIFT + Right Click]", EXIT_GAME, 0, 1, 0, 1, 1, 1)
+	GameTooltip:AddDoubleLine("[Left-Click]", LOGOUT, 0, 1, 0, 1, 1, 1)
+	GameTooltip:AddDoubleLine("[SHIFT + Left-Click]", RELOADUI, 0, 1, 0, 1, 1, 1)
+	GameTooltip:AddDoubleLine("[SHIFT + Right-Click]", EXIT_GAME, 0, 1, 0, 1, 1, 1)
 end

 local function LoadMiscTools()
diff --git a/SVUI_!Core/system/core.lua b/SVUI_!Core/system/core.lua
index 1e5265f..ec144ca 100644
--- a/SVUI_!Core/system/core.lua
+++ b/SVUI_!Core/system/core.lua
@@ -361,6 +361,7 @@ SV.defaults           = {
     ["FunStuff"] = {
         ["drunk"] = true,
         ["comix"] = '1',
+        ["comixLastState"] = '1',
         ["gamemenu"] = '1',
         ["afk"] = '1',
     },
diff --git a/SVUI_!Core/system/dock.lua b/SVUI_!Core/system/dock.lua
index 71dc724..0326114 100644
--- a/SVUI_!Core/system/dock.lua
+++ b/SVUI_!Core/system/dock.lua
@@ -337,19 +337,19 @@ _G.ToggleSuperDockLeft = function(self, button)
 		end
 		MOD.BottomLeft.Bar:Update()
 		MOD:UpdateDockBackdrops()
-		SV.Events:Trigger("DOCK_LEFT_EXPANDED");
+		SV.Events:Trigger("DOCK_EXPANDED", "BottomLeft");
 	else
 		if MOD.private.LeftFaded then
 			MOD.private.LeftFaded = nil;
 			MOD.BottomLeft:FadeIn(0.2, MOD.BottomLeft:GetAlpha(), 1)
 			MOD.BottomLeft.Bar:FadeIn(0.2, MOD.BottomLeft.Bar:GetAlpha(), 1)
-			SV.Events:Trigger("DOCK_LEFT_FADE_IN");
+			SV.Events:Trigger("DOCK_FADE_IN", "BottomLeft");
 			PlaySoundFile([[sound\doodad\be_scryingorb_explode.ogg]])
 		else
 			MOD.private.LeftFaded = true;
 			MOD.BottomLeft:FadeOut(0.2, MOD.BottomLeft:GetAlpha(), 0)
 			MOD.BottomLeft.Bar:FadeOut(0.2, MOD.BottomLeft.Bar:GetAlpha(), 0)
-			SV.Events:Trigger("DOCK_LEFT_FADE_OUT");
+			SV.Events:Trigger("DOCK_FADE_OUT", "BottomLeft");
 			PlaySoundFile([[sound\doodad\be_scryingorb_explode.ogg]])
 		end
 	end
@@ -376,19 +376,19 @@ _G.ToggleSuperDockRight = function(self, button)
 		end
 		MOD.BottomRight.Bar:Update()
 		MOD:UpdateDockBackdrops()
-		SV.Events:Trigger("DOCK_RIGHT_EXPANDED");
+		SV.Events:Trigger("DOCK_EXPANDED", "BottomRight");
 	else
 		if MOD.private.RightFaded then
 			MOD.private.RightFaded = nil;
 			MOD.BottomRight:FadeIn(0.2, MOD.BottomRight:GetAlpha(), 1)
 			MOD.BottomRight.Bar:FadeIn(0.2, MOD.BottomRight.Bar:GetAlpha(), 1)
-			SV.Events:Trigger("DOCK_RIGHT_FADE_IN");
+			SV.Events:Trigger("DOCK_FADE_IN", "BottomRight");
 			PlaySoundFile([[sound\doodad\be_scryingorb_explode.ogg]])
 		else
 			MOD.private.RightFaded = true;
 			MOD.BottomRight:FadeOut(0.2, MOD.BottomRight:GetAlpha(), 0)
 			MOD.BottomRight.Bar:FadeOut(0.2, MOD.BottomRight.Bar:GetAlpha(), 0)
-			SV.Events:Trigger("DOCK_RIGHT_FADE_OUT");
+			SV.Events:Trigger("DOCK_FADE_OUT", "BottomRight");
 			PlaySoundFile([[sound\doodad\be_scryingorb_explode.ogg]])
 		end
 	end
@@ -401,10 +401,10 @@ _G.ToggleSuperDocks = function()
 		MOD.private.RightFaded = nil;
 		MOD.BottomLeft:FadeIn(0.2, MOD.BottomLeft:GetAlpha(), 1)
 		MOD.BottomLeft.Bar:FadeIn(0.2, MOD.BottomLeft.Bar:GetAlpha(), 1)
-		SV.Events:Trigger("DOCK_LEFT_FADE_IN");
+		SV.Events:Trigger("DOCK_FADE_IN", "BottomLeft");
 		MOD.BottomRight:FadeIn(0.2, MOD.BottomRight:GetAlpha(), 1)
 		MOD.BottomRight.Bar:FadeIn(0.2, MOD.BottomRight.Bar:GetAlpha(), 1)
-		SV.Events:Trigger("DOCK_RIGHT_FADE_IN");
+		SV.Events:Trigger("DOCK_FADE_IN", "BottomRight");
 		PlaySoundFile([[sound\doodad\be_scryingorb_explode.ogg]])
 	else
 		MOD.private.AllFaded = true;
@@ -412,10 +412,10 @@ _G.ToggleSuperDocks = function()
 		MOD.private.RightFaded = true;
 		MOD.BottomLeft:FadeOut(0.2, MOD.BottomLeft:GetAlpha(), 0)
 		MOD.BottomLeft.Bar:FadeOut(0.2, MOD.BottomLeft.Bar:GetAlpha(), 0)
-		SV.Events:Trigger("DOCK_LEFT_FADE_OUT");
+		SV.Events:Trigger("DOCK_FADE_OUT", "BottomLeft");
 		MOD.BottomRight:FadeOut(0.2, MOD.BottomRight:GetAlpha(), 0)
 		MOD.BottomRight.Bar:FadeOut(0.2, MOD.BottomRight.Bar:GetAlpha(), 0)
-		SV.Events:Trigger("DOCK_RIGHT_FADE_OUT");
+		SV.Events:Trigger("DOCK_FADE_OUT", "BottomRight");
 		PlaySoundFile([[sound\doodad\be_scryingorb_explode.ogg]])
 	end
 end
@@ -424,12 +424,12 @@ function MOD:EnterFade()
 	if MOD.private.LeftFaded then
 		self.BottomLeft:FadeIn(0.2, self.BottomLeft:GetAlpha(), 1)
 		self.BottomLeft.Bar:FadeIn(0.2, self.BottomLeft.Bar:GetAlpha(), 1)
-		SV.Events:Trigger("DOCK_LEFT_FADE_IN");
+		SV.Events:Trigger("DOCK_FADE_IN", "BottomLeft");
 	end
 	if MOD.private.RightFaded then
 		self.BottomRight:FadeIn(0.2, self.BottomRight:GetAlpha(), 1)
 		self.BottomRight.Bar:FadeIn(0.2, self.BottomRight.Bar:GetAlpha(), 1)
-		SV.Events:Trigger("DOCK_RIGHT_FADE_IN");
+		SV.Events:Trigger("DOCK_FADE_IN", "BottomRight");
 	end
 end

@@ -437,12 +437,12 @@ function MOD:ExitFade()
 	if MOD.private.LeftFaded then
 		self.BottomLeft:FadeOut(2, self.BottomLeft:GetAlpha(), 0)
 		self.BottomLeft.Bar:FadeOut(2, self.BottomLeft.Bar:GetAlpha(), 0)
-		SV.Events:Trigger("DOCK_LEFT_FADE_OUT");
+		SV.Events:Trigger("DOCK_FADE_OUT", "BottomLeft");
 	end
 	if MOD.private.RightFaded then
 		self.BottomRight:FadeOut(2, self.BottomRight:GetAlpha(), 0)
 		self.BottomRight.Bar:FadeOut(2, self.BottomRight.Bar:GetAlpha(), 0)
-		SV.Events:Trigger("DOCK_RIGHT_FADE_OUT");
+		SV.Events:Trigger("DOCK_FADE_OUT", "BottomRight");
 	end
 end
 --[[
@@ -538,7 +538,11 @@ local function ShowDockletWindow(button, location)
 		end
 	end
 	window:FadeIn()
-	SV.Events:Trigger("DOCKLET_SHOWN", location, button.LinkKey);
+	if(window.PostShowCallback) then
+		window:PostShowCallback()
+	else
+		SV.Events:Trigger("DOCKLET_SHOWN", location, button.LinkKey);
+	end
 	return true;
 end

@@ -551,7 +555,11 @@ local function HideDockletWindow(button, location)
 		window:Hide()
 	end
 	window:FadeOut(0.1, 1, 0, true)
-	SV.Events:Trigger("DOCKLET_HIDDEN", location, button.LinkKey);
+	if(window.PostHideCallback) then
+		window:PostHideCallback()
+	else
+		SV.Events:Trigger("DOCKLET_HIDDEN", location, button.LinkKey);
+	end
 	return true;
 end

@@ -716,14 +724,16 @@ local DockBar_UpdateLayout = function(self)
 	local count = #self.Data.Order;
 	local offset = 1;
 	local safeIndex = 1;
+
 	if(count > 0) then
 		for i = 1, count do
 			local nextName = self.Data.Order[i];
 			local nextButton = self.Data.Buttons[nextName];
 			if(nextButton) then
-				offset = (safeIndex - 1) * (size + 6) + 6
+				offset = (safeIndex - 1) * (size + 6) + 6;
+				local widthMultiplier = nextButton.widthMultiplier or 1;
 				nextButton:ClearAllPoints();
-				nextButton:SetSize(size, size);
+				nextButton:SetSize(size * widthMultiplier, size);
 				nextButton:SetPoint(anchor, self.ToolBar, anchor, (offset * mod), 0);
 				if(not nextButton:IsShown()) then
 					nextButton:Show();
@@ -761,6 +771,7 @@ local DockBar_AddButton = function(self, button, forced)

 	MOD.private.Locations[name] = currentLocation;
 	button.Parent = self;
+	button.isFloating = false;
 	button:SetParent(self.ToolBar);

 	if(button.FrameLink) then
@@ -803,14 +814,14 @@ local DockBar_RemoveButton = function(self, button, isMoving)

 	if(not self.Data.Buttons[name]) then return end

-	button:Hide()
 	button.OrderIndex = 0;
+
+	button:Hide()
+
 	if(button.FrameLink) then
 		local frameName = button.FrameLink:GetName()
 		MOD.private.Locations[frameName] = nil;
-		if(not isMoving) then
-			button.FrameLink:FadeOut(0.2, 1, 0, true)
-		end
+		button.FrameLink:FadeOut(0.2, 1, 0, true);
 		self.Data.Windows[frameName] = nil;
 	end

@@ -833,6 +844,17 @@ end
 DOCKBUTTON FUNCTIONS
 ##########################################################
 ]]--
+local DockButton_SetFloating = function(self)
+	self:SetDocked(false)
+	self.isFloating = true
+	if(not self.FrameLink) then return end
+	self:Show();
+	self.FrameLink:Show();
+	self.FrameLink:FadeIn()
+	self.FrameLink:ClearAllPoints();
+	self.FrameLink:SetPoint("BOTTOMLEFT", self, "TOPLEFT", -3, 6);
+end
+
 local DockButton_OnDragStart = function(self)
 	if(IsShiftKeyDown() and (not InCombatLockdown())) then
 		self:SetMovable(true);
@@ -846,13 +868,20 @@ local DockButton_OnDragStop = function(self)
 	self:SetMovable(false);
 	if(DRAGGING_TARGET) then
 		self:MoveTo(DRAGGING_TARGET);
-	else
+	elseif(not self.isFloating) then
 		self:MoveTo(MOD.private.Locations[self:GetName()]);
 	end
 	DRAGGING_TARGET = nil;
 	ToggleBarHighlights(false)
 end

+local DockButton_DefaultTip = function(self, ...)
+	local tipText = self:GetAttribute("tipText")
+	if(tipText) then
+		GameTooltip:AddDoubleLine("[Left-Click]", tipText, 0, 1, 0, 1, 1, 1)
+	end
+end
+
 local DockButton_OnEnter = function(self, ...)
 	MOD:EnterFade()
 	self:SetPanelColor("highlight")
@@ -860,14 +889,11 @@ local DockButton_OnEnter = function(self, ...)
 	local tipAnchor = self:GetAttribute("tipAnchor")
 	GameTooltip:SetOwner(self, tipAnchor, 0, 4)
 	GameTooltip:ClearLines()
-	if(self.CustomTooltip) then
-		self:CustomTooltip()
-	else
-		local tipText = self:GetAttribute("tipText")
-		GameTooltip:AddDoubleLine("[Left-Click]", tipText, 0, 1, 0, 1, 1, 1)
-		GameTooltip:AddDoubleLine("[Right-Click]", "Hide", 0, 1, 0, 1, 1, 1)
-		GameTooltip:AddDoubleLine("[Shift+Click+Drag]", "Move To Another Dock", 0, 1, 0, 1, 1, 1)
+	if(self.GeneralTip) then
+		self:GeneralTip()
 	end
+	GameTooltip:AddDoubleLine("[Right-Click]", "Hide", 0, 1, 0, 1, 1, 1)
+	GameTooltip:AddDoubleLine("[SHIFT + Drag]", "Move To Another Dock", 0, 1, 0, 1, 1, 1)
 	if(self:GetAttribute("hasDropDown") and self.GetMenuList) then
 		GameTooltip:AddLine(" ")
 		GameTooltip:AddDoubleLine("[Alt+Click]", "Docking Options", 0, 0.5, 1, 0.5, 1, 0.5)
@@ -1022,13 +1048,16 @@ local DockBar_CreateButton = function(self, displayName, globalName, texture, cl
 	button.MoveTo				= DockButton_MoveTo
 	button.GetMenuList 	= DockButton_GetMenuList
 	button.SetDocked 		= DockButton_SetDocked
+	button.SetFloating 	= DockButton_SetFloating

 	if(clickFunction and type(clickFunction) == "function") then
 		button.PostClickFunction = clickFunction
 	end

 	if(tipFunction and type(tipFunction) == "function") then
-		button.CustomTooltip = tipFunction
+		button.GeneralTip = tipFunction
+	else
+		button.GeneralTip = DockButton_DefaultTip
 	end

 	if(frameLink) then
@@ -1051,6 +1080,16 @@ function MOD:SetDockButton(location, displayName, globalName, texture, clickFunc
 	local parent = self[location]
 	return DockBar_CreateButton(parent.Bar, displayName, globalName, texture, clickFunction, tipFunction, primaryTemplate)
 end
+
+function MOD:SetDockCallbacks(frame, onhide, onshow)
+	if(not frame) then return end
+	if(onhide and (type(onhide) == 'function')) then
+		frame.PostHideCallback = onhide;
+	end
+	if(onshow and (type(onshow) == 'function')) then
+		frame.PostShowCallback = onshow;
+	end
+end
 --[[
 ##########################################################
 DOCKS
@@ -1146,7 +1185,7 @@ local Docklet_Relocate = function(self, location)
 	end
 end

-function MOD:NewDocklet(location, globalName, readableName, texture, onclick)
+function MOD:NewDocklet(location, globalName, readableName, texture, onclick, onenter)
 	if(DOCK_REGISTRY[globalName]) then return end;

 	if(self.private.Locations[globalName]) then
@@ -1158,12 +1197,14 @@ function MOD:NewDocklet(location, globalName, readableName, texture, onclick)
 	local newParent = self[location];
 	if(not newParent) then return end
 	newParent.backdrop:Show()
-	local frame = _G[globalName] or CreateFrame("Frame", globalName, UIParent, "SVUI_DockletWindowTemplate");
+	local frame = _G[globalName] or CreateFrame("Frame", globalName, UIParent);
 	frame:SetParent(newParent.Window);
 	frame:SetSize(newParent.Window:GetSize());
 	frame:SetAllPoints(newParent.Window);
 	frame:SetFrameStrata("BACKGROUND");
-	frame.Parent = newParent
+
+	frame.Parent = newParent;
+	frame.Bar = newParent.Bar;
 	frame.Disable = Docklet_Disable;
 	frame.Enable = Docklet_Enable;
 	frame.Relocate = Docklet_Relocate;
@@ -1172,7 +1213,7 @@ function MOD:NewDocklet(location, globalName, readableName, texture, onclick)
 	newParent.Bar.Data.Windows[globalName] = frame;

 	local buttonName = ("%sButton"):format(globalName)
-	frame.Button = newParent.Bar:Create(readableName, buttonName, texture, onclick, false, false, frame);
+	frame.Button = newParent.Bar:Create(readableName, buttonName, texture, onclick, onenter, false, frame);
 	DOCK_REGISTRY[globalName] = frame;
 	frame:SetAlpha(0)
 	DOCK_CHECK = true
@@ -1191,7 +1232,7 @@ function MOD:NewAdvancedDocklet(location, globalName)
 	local newParent = self[location];
 	if(not newParent) then return end
 	newParent.backdrop:Show()
-	local frame = CreateFrame("Frame", globalName, UIParent, "SVUI_DockletWindowTemplate");
+	local frame = CreateFrame("Frame", globalName, UIParent);
 	frame:SetParent(newParent.Window);
 	frame:SetSize(newParent.Window:GetSize());
 	frame:SetAllPoints(newParent.Window);
diff --git a/SVUI_!Core/system/funstuff.lua b/SVUI_!Core/system/funstuff.lua
index 3ea808b..ae2f932 100644
--- a/SVUI_!Core/system/funstuff.lua
+++ b/SVUI_!Core/system/funstuff.lua
@@ -151,7 +151,6 @@ COMIX
 ##########################################################
 ]]--
 SV.Comix = _G["SVUI_ComixFrame"];
-local animReady = true;
 local COMIX_DATA = {
 	{
 		{0,0.25,0,0.25},
@@ -191,59 +190,35 @@ local COMIX_DATA = {
 	}
 };

-local function ComixReadyState(state)
-	if(state == nil) then return animReady end
-	animReady = state
-end
-
-local Comix_OnUpdate = function() ComixReadyState(true) end
-local Toasty_OnUpdate = function(self) ComixReadyState(true); self.parent:SetAlpha(0) end
-
-function SV.Comix:LaunchPremiumPopup()
-	ComixReadyState(false)
-
-	local rng = random(1, 16);
-	local coords = COMIX_DATA[1][rng];
-	local offsets = COMIX_DATA[2][rng]
-
-	self.Premium.tex:SetTexCoord(coords[1],coords[2],coords[3],coords[4])
-	self.Premium.bg.tex:SetTexCoord(coords[1],coords[2],coords[3],coords[4])
-	self.Premium.anim[1]:SetOffset(offsets[1],offsets[2])
-	self.Premium.anim[2]:SetOffset(offsets[3],offsets[4])
-	self.Premium.anim[3]:SetOffset(0,0)
-	self.Premium.bg.anim[1]:SetOffset(offsets[5],offsets[6])
-	self.Premium.bg.anim[2]:SetOffset(offsets[7],offsets[8])
-	self.Premium.bg.anim[3]:SetOffset(0,0)
-	self.Premium.anim:Play()
-	self.Premium.bg.anim:Play()
-end
-
-function SV:ToastyKombat()
-	ComixToastyPanelBG.anim[2]:SetOffset(256, -256)
-	ComixToastyPanelBG.anim[2]:SetOffset(0, 0)
-	ComixToastyPanelBG.anim:Play()
-	PlaySoundFile([[Interface\AddOns\SVUI_!Core\assets\sounds\toasty.mp3]])
-end
-
-_G.SlashCmdList["KOMBAT"] = function(msg)
-	SV:ToastyKombat()
-end
-_G.SLASH_KOMBAT1 = "/kombat"
+SV.Comix.Ready = true;

 function SV.Comix:LaunchPopup()
-	ComixReadyState(false)
+	self.Ready = false

-	local coords, step1_x, step1_y, step2_x, step2_y, size;
+	local coords, step1_x, step1_y, step2_x, step2_y, size, offsets;
 	local rng = random(0, 32);

-	if(rng == 0) then
-		if(SV.db.FunStuff.comix == '1') then
+	if((rng > 30) and (SV.db.FunStuff.comix == '1')) then
+		if(rng == 31) then
+			coords = COMIX_DATA[1][pKey];
+			offsets = COMIX_DATA[2][pKey]
+			self.Premium.tex:SetTexCoord(coords[1],coords[2],coords[3],coords[4])
+			self.Premium.bg.tex:SetTexCoord(coords[1],coords[2],coords[3],coords[4])
+			self.Premium.anim[1]:SetOffset(offsets[1],offsets[2])
+			self.Premium.anim[2]:SetOffset(offsets[3],offsets[4])
+			self.Premium.anim[3]:SetOffset(0,0)
+			self.Premium.bg.anim[1]:SetOffset(offsets[5],offsets[6])
+			self.Premium.bg.anim[2]:SetOffset(offsets[7],offsets[8])
+			self.Premium.bg.anim[3]:SetOffset(0,0)
+			self.Premium.anim:Play()
+			self.Premium.bg.anim:Play()
+		elseif(rng == 32) then
 			ComixToastyPanelBG.anim[2]:SetOffset(256, -256)
 			ComixToastyPanelBG.anim[2]:SetOffset(0, 0)
 			ComixToastyPanelBG.anim:Play()
 			PlaySoundFile([[Interface\AddOns\SVUI_!Core\assets\sounds\toasty.mp3]])
 		end
-	elseif(rng > 16) then
+	elseif(rng < 8) then
 		local key = rng - 16;
 		coords = COMIX_DATA[1][key];
 		step1_x = random(-150, 150);
@@ -256,7 +231,7 @@ function SV.Comix:LaunchPopup()
 		self.Deluxe.anim[2]:SetOffset(step2_x, step2_y);
 		self.Deluxe.anim[3]:SetOffset(0,0);
 		self.Deluxe.anim:Play();
-	else
+	elseif(rng < 16) then
 		coords = COMIX_DATA[1][rng];
 		step1_x = random(-100, 100);
 		step1_y = random(-50, 1);
@@ -269,13 +244,30 @@ function SV.Comix:LaunchPopup()
 	end
 end

+function SV:ToastyKombat()
+	ComixToastyPanelBG.anim[2]:SetOffset(256, -256)
+	ComixToastyPanelBG.anim[2]:SetOffset(0, 0)
+	ComixToastyPanelBG.anim:Play()
+	PlaySoundFile([[Interface\AddOns\SVUI_!Core\assets\sounds\toasty.mp3]])
+end
+
+_G.SlashCmdList["KOMBAT"] = function(msg)
+	SV:ToastyKombat()
+end
+_G.SLASH_KOMBAT1 = "/kombat"
+
 local Comix_OnEvent = function(self, event, ...)
+	if(not self.Ready) then return end
 	local _, subEvent, _, guid = ...;
-	if((subEvent == "PARTY_KILL" and guid == UnitGUID('player')) and ComixReadyState()) then
+	if((subEvent == "PARTY_KILL") and (guid == UnitGUID('player'))) then
 		self:LaunchPopup()
 	end
 end

+local Comix_OnUpdate = function() SV.Comix.Ready = true; end
+
+local Toasty_OnUpdate = function(self) SV.Comix.Ready = true; self.parent:SetAlpha(0) end
+
 function SV.Comix:Toggle()
 	if(SV.db.FunStuff.comix == 'NONE') then
 		self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
@@ -543,8 +535,7 @@ local function InitializeFunStuff()
 	toasty:SetAlpha(0)
 	toasty.anim[4]:SetScript("OnFinished", Toasty_OnUpdate)

-	ComixReadyState(true)
-
+	comix.Ready = true;
 	comix:Toggle()

 	--[[ DRUNK MODE ]]--
diff --git a/SVUI_!Core/system/henchmen.lua b/SVUI_!Core/system/henchmen.lua
index 0de447d..7a88d8a 100644
--- a/SVUI_!Core/system/henchmen.lua
+++ b/SVUI_!Core/system/henchmen.lua
@@ -69,11 +69,11 @@ local HENCHMEN_DATA = {
 		{-40,"Show Me All Options!","Config Screen","Click here to access the entire SVUI configuration."}
 	},
 	{
-		{0,"Accept Quests","Your minions will automatically accept quests for you", "autoquestaccept"},
-		{20,"Complete Quests","Your minions will automatically complete quests for you", "autoquestcomplete"},
-		{40,"Select Rewards","Your minions will automatically select quest rewards for you", "autoquestreward"},
-		{-40,"Greed Roll","Your minions will automatically roll greed (or disenchant if available) on green quality items for you", "autoRoll"},
-		{-20,"Watch Factions","Your minions will automatically change your tracked reputation to the last faction you were awarded points for", "autorepchange"}
+		{-40,"Accept Quests","Your minions will automatically accept quests for you", "autoquestaccept"},
+		{-40,"Complete Quests","Your minions will automatically complete quests for you", "autoquestcomplete"},
+		{0,"Select Rewards","Your minions will automatically select quest rewards for you", "autoquestreward"},
+		{40,"Greed Roll","Your minions will automatically roll greed (or disenchant if available) on green quality items for you", "autoRoll"},
+		{40,"Watch Factions","Your minions will automatically change your tracked reputation to the last faction you were awarded points for", "autorepchange"}
 	}
 }

@@ -181,12 +181,12 @@ CORE FUNCTIONS
 local function CreateMinionOptions(i)
 	local lastIndex = i - 1;
 	local options = HENCHMEN_DATA[2][i]
-	local offsetX = options[1] * -1
+	local offsetX = options[1]
 	local option = CreateFrame("Frame", "MinionOptionButton"..i, HenchmenFrame)
 	option:SetSize(148,50)

 	if i==1 then
-		option:SetPoint("TOPRIGHT",HenchmenFrame,"TOPLEFT",-32,-32)
+		option:SetPoint("TOP",_G["MinionOptionButton0"],"BOTTOM",offsetX,-32)
 	else
 		option:SetPoint("TOP",_G["MinionOptionButton"..lastIndex],"BOTTOM",offsetX,-32)
 	end
@@ -346,36 +346,89 @@ local function CreateHenchmenFrame()
 	HenchmenFrameBG:Hide()
 	HenchmenFrameBG:SetScript("OnMouseUp", SV.ToggleHenchman)

-	local option = CreateFrame("Frame", "HenchmenOptionButton0", HenchmenFrame)
-	option:SetSize(148,50)
-	option:SetPoint("TOPLEFT",HenchmenFrame,"TOPRIGHT",32,0)
-	SV.Animate:Slide(option,500,-500)
-	option:SetFrameStrata("DIALOG")
-	option:SetFrameLevel(24)
-	option:EnableMouse(true)
-	option.bg = option:CreateTexture(nil,"BORDER")
-	option.bg:SetPoint("TOPLEFT",option,"TOPLEFT",-4,4)
-	option.bg:SetPoint("BOTTOMRIGHT",option,"BOTTOMRIGHT",4,-24)
-	option.bg:SetTexture(OPTION_RIGHT)
-	option.bg:SetVertexColor(1,1,1,0.6)
-	option.txt = option:CreateFontString(nil,"DIALOG")
-	option.txt:InsetPoints(option)
-	option.txt:SetFont(SV.media.font.narrator,12,"NONE")
-	option.txt:SetJustifyH("CENTER")
-	option.txt:SetJustifyV("MIDDLE")
-	option.txt:SetText("Random Backdrops!")
-	option.txt:SetTextColor(0,0,0)
-	option.txthigh = option:CreateFontString(nil,"HIGHLIGHT")
-	option.txthigh:InsetPoints(option)
-	option.txthigh:SetFont(SV.media.font.narrator,12,"OUTLINE")
-	option.txthigh:SetJustifyH("CENTER")
-	option.txthigh:SetJustifyV("MIDDLE")
-	option.txthigh:SetText("Random Backdrops!")
-	option.txthigh:SetTextColor(0,1,1)
-	option.ttText = "Set a random texture for all unit frame backdrops!"
-	option:SetScript("OnEnter", Tooltip_Show)
-	option:SetScript("OnLeave", Tooltip_Hide)
-	option:SetScript("OnMouseUp", function() SV.Setup:RandomBackdrops() end)
+	local h_option = CreateFrame("Frame", "HenchmenOptionButton0", HenchmenFrame)
+	h_option:SetSize(148,50)
+	h_option:SetPoint("TOPLEFT",HenchmenFrame,"TOPRIGHT",32,0)
+	SV.Animate:Slide(h_option,500,-500)
+	h_option:SetFrameStrata("DIALOG")
+	h_option:SetFrameLevel(24)
+	h_option:EnableMouse(true)
+	h_option.bg = h_option:CreateTexture(nil,"BORDER")
+	h_option.bg:SetPoint("TOPLEFT",h_option,"TOPLEFT",-4,4)
+	h_option.bg:SetPoint("BOTTOMRIGHT",h_option,"BOTTOMRIGHT",4,-24)
+	h_option.bg:SetTexture(OPTION_RIGHT)
+	h_option.bg:SetVertexColor(1,1,1,0.6)
+	h_option.txt = h_option:CreateFontString(nil,"DIALOG")
+	h_option.txt:InsetPoints(h_option)
+	h_option.txt:SetFont(SV.media.font.narrator,12,"NONE")
+	h_option.txt:SetJustifyH("CENTER")
+	h_option.txt:SetJustifyV("MIDDLE")
+	h_option.txt:SetText("Random Backdrops!")
+	h_option.txt:SetTextColor(0,0,0)
+	h_option.txthigh = h_option:CreateFontString(nil,"HIGHLIGHT")
+	h_option.txthigh:InsetPoints(h_option)
+	h_option.txthigh:SetFont(SV.media.font.narrator,12,"OUTLINE")
+	h_option.txthigh:SetJustifyH("CENTER")
+	h_option.txthigh:SetJustifyV("MIDDLE")
+	h_option.txthigh:SetText("Random Backdrops!")
+	h_option.txthigh:SetTextColor(0,1,1)
+	h_option.ttText = "Set a random texture for all unit frame backdrops!"
+	h_option:SetScript("OnEnter", Tooltip_Show)
+	h_option:SetScript("OnLeave", Tooltip_Hide)
+	h_option:SetScript("OnMouseUp", function() SV.Setup:RandomBackdrops() end)
+
+	local m_option = CreateFrame("Frame", "MinionOptionButton0", HenchmenFrame)
+	m_option:SetSize(148,50)
+	m_option:SetPoint("TOPRIGHT",HenchmenFrame,"TOPLEFT",-32,0)
+	SV.Animate:Slide(m_option,-500,-500)
+	m_option:SetFrameStrata("DIALOG")
+	m_option:SetFrameLevel(24)
+	m_option:EnableMouse(true)
+	m_option.bg = m_option:CreateTexture(nil,"BORDER")
+	m_option.bg:SetPoint("TOPLEFT",m_option,"TOPLEFT",-4,4)
+	m_option.bg:SetPoint("BOTTOMRIGHT",m_option,"BOTTOMRIGHT",4,-24)
+	m_option.bg:SetTexture(OPTION_LEFT)
+	m_option.bg:SetVertexColor(1,1,1,0.6)
+	m_option.txt = m_option:CreateFontString(nil,"DIALOG")
+	m_option.txt:InsetPoints(m_option)
+	m_option.txt:SetFont(SV.media.font.narrator,12,"NONE")
+	m_option.txt:SetJustifyH("CENTER")
+	m_option.txt:SetJustifyV("MIDDLE")
+	m_option.txt:SetText("Comic Popups")
+	m_option.txt:SetTextColor(0,0,0)
+	m_option.txthigh = m_option:CreateFontString(nil,"HIGHLIGHT")
+	m_option.txthigh:InsetPoints(m_option)
+	m_option.txthigh:SetFont(SV.media.font.narrator,12,"OUTLINE")
+	m_option.txthigh:SetJustifyH("CENTER")
+	m_option.txthigh:SetJustifyV("MIDDLE")
+	m_option.txthigh:SetText("Comic Popups")
+	m_option.txthigh:SetTextColor(0,1,1)
+	m_option.ttText = "Toggle the use of comic style popups in combat.";
+	m_option.indicator = m_option:CreateTexture(nil,"OVERLAY")
+	m_option.indicator:SetSize(100,32)
+	m_option.indicator:SetPoint("RIGHT", m_option , "LEFT", -5, 0)
+	m_option.indicator:SetTexture(SWITCH)
+	m_option:SetScript("OnEnter", Tooltip_Show)
+	m_option:SetScript("OnLeave", Tooltip_Hide)
+	m_option:SetScript("OnMouseUp", Minion_OnMouseUp)
+	m_option.setting = function(toggle)
+		local baseToggle = SV.db.FunStuff.comix;
+		local savedToggle = SV.db.FunStuff.comixLastState;
+		if(toggle == nil) then
+			if(baseToggle == 'NONE') then
+				return false
+			else
+				return baseToggle
+			end
+		elseif(toggle == true) then
+			if(baseToggle == 'NONE') then
+				SV.db.FunStuff.comix = savedToggle;
+			end
+		else
+			SV.db.FunStuff.comix = 'NONE';
+		end
+	end
+	Minion_OnMouseUp(m_option)

 	for i=1, 5 do
 		CreateHenchmenOptions(i)
diff --git a/SVUI_!Core/xml/templates.xml b/SVUI_!Core/xml/templates.xml
index b3c5951..bf7f267 100644
--- a/SVUI_!Core/xml/templates.xml
+++ b/SVUI_!Core/xml/templates.xml
@@ -156,12 +156,6 @@
         </Scripts>
     </Button>

-    <Frame name="SVUI_DockletWindowTemplate" virtual="true">
-        <Attributes>
-            <Attribute name="isLoaded" type="boolean" value="false" />
-        </Attributes>
-    </Frame>
-
     <Frame name="SVUI_MovingPanelTemplate" virtual="true" movable="true" clampedToScreen="true" toplevel="true">
         <Layers>
             <Layer level="BACKGROUND">
diff --git a/SVUI_Chat/Loader.lua b/SVUI_Chat/Loader.lua
index 59e1924..a675482 100644
--- a/SVUI_Chat/Loader.lua
+++ b/SVUI_Chat/Loader.lua
@@ -45,6 +45,7 @@ SV.defaults[Schema] = {
 	["sticky"] = true,
 	["smileys"] = true,
 	["shortChannels"] = true,
+	["hideRealms"] = false,
 	["secretWordTone"] = "None",
 	["psst"] = "Whisper Alert",
 	["noWipe"] = false,
diff --git a/SVUI_Chat/SVUI_Chat.lua b/SVUI_Chat/SVUI_Chat.lua
index d7cea10..ab0e76b 100644
--- a/SVUI_Chat/SVUI_Chat.lua
+++ b/SVUI_Chat/SVUI_Chat.lua
@@ -91,8 +91,6 @@ local NewHook = hooksecurefunc;
 ]]--
 local PLAYER_NAME = UnitName("player");
 local PLAYER_FILTER = PLAYER_NAME:upper();
-local CHAT_WIDTH = 350;
-local CHAT_HEIGHT = 180;
 local CHAT_THROTTLE = 45;
 local CHAT_ALLOW_URL = true;
 local CHAT_HOVER_URL = true;
@@ -107,6 +105,7 @@ local THROTTLE_CACHE = {};
 local COPY_LINES = {};
 local ACTIVE_HYPER_LINK;
 local TABS_DIRTY = false;
+local HIDE_REALM = false;
 --[[
 ##########################################################
 INIT SETTINGS
@@ -156,6 +155,19 @@ local BNPLAYER_PATTERN = "|HBNplayer:(.-)|h%[(|Kb(%d+).-)%](.*)|h"
 LOCAL FUNCTIONS
 ##########################################################
 ]]--
+local function case_insensitive(source)
+  local p = source:gsub("(%%?)(.)", function(percent, letter)
+    if percent ~= "" or not letter:match("%a") then
+      return percent .. letter
+    else
+      return format("[%s%s]", letter:lower(), letter:upper())
+    end
+  end)
+  return p
+end
+
+local PLAYERNAME_MATCH = case_insensitive(PLAYER_NAME);
+
 local AddModifiedMessage;
 local ScrollIndicator = CreateFrame("Frame", nil)
 local HighLight_OnUpdate = function(self)
@@ -317,15 +329,15 @@ do
 					message = message:gsub(CHANNEL_PATTERN, CHANNEL_LINK:format(channelData, channelID, shortName))
 				end
 				local playerData, playerName = message:match(PLAYER_PATTERN)
-				if(playerData) then
+				if(channelID) then
+					message = message:gsub("(|Hchannel:.-|h): ", "%1", 1)
+				elseif(playerData and HIDE_REALM) then
 					if playerName:match("|cff") then
 						playerName = playerName:gsub("%-[^|]+", "")
 					else
 						playerName = playerName:match("[^%-]+")
 					end
 					message = message:gsub(PLAYER_PATTERN, PLAYER_LINK:format(playerData, playerName))
-				elseif(channelID) then
-					message = message:gsub("(|Hchannel:.-|h): ", "%1", 1)
 				end

 				local bnData, bnName, bnID, bnExtra = message:match(BNPLAYER_PATTERN)
@@ -376,11 +388,11 @@ do

 		--print(message)
 		local test, flags = message:gsub("(%s?)({.-})(%s?)", "");
-	    if(flags and (flags > 1)) then
-	    	if(flags > 2) then
-				return true;
-		    end
+    if(flags and (flags > 1)) then
+    	if(flags > 2) then
+			return true;
 	    end
+    end

 		if(CHAT_THROTTLE ~= 0) then
 			local sentFrom = author:upper()
@@ -403,6 +415,11 @@ do
 				end
 			end
 		end
+
+		if(message:find(PLAYERNAME_MATCH) and (not InCombatLockdown())) then
+			PlaySoundFile([[sound\doodad\be_scryingorb_explode.ogg]], "Master")
+		end
+
 		return SVUI_ParseMessage(self, event, message, author, ...)
 	end

@@ -478,64 +495,6 @@ function MOD:GetLines(...)
 	return index - 1
 end

-local function AnchorInsertHighlight()
-	local lastTab = TabsList[1];
-	for chatID,frame in pairs(TabsList) do
-		if(frame and frame.isDocked) then
-			lastTab = frame
-		end
-	end
-	MOD.Dock.Highlight:ClearAllPoints();
-	if(not lastTab) then
-		MOD.Dock.Highlight:SetPoint("LEFT", MOD.Dock.Bar, "LEFT", 2, 0);
-	else
-		MOD.Dock.Highlight:SetPoint("LEFT", lastTab, "RIGHT", 6, 0);
-	end
-end
-
-local function DockResetChat(location)
-	if(not location or (location ~= MOD.Dock.Parent.Bar.Data.Location)) then return end
-	local activeChatFrame = FCFDock_GetSelectedWindow(GENERAL_CHAT_DOCK)
-	MOD:FadeLines(activeChatFrame)
-	activeChatFrame:ForceHide(true)
-	activeChatFrame:FadeOut(2, activeChatFrame:GetAlpha(), 0, true)
-	for chatID,frame in pairs(TabsList) do
-		frame.link.IsOpen = false
-		frame.link:SetPanelColor("default")
-		frame.link.icon:SetGradient(unpack(SV.media.gradient.icon))
-	end
-end
-
-local function DockSetChatDefault(location)
-	if(not location or (location ~= MOD.Dock.Parent.Bar.Data.Location)) then return end
-	local activeChatFrame = FCFDock_GetSelectedWindow(GENERAL_CHAT_DOCK)
-	MOD.Dock.Parent.backdrop:Show();
-	MOD:ShowLines(activeChatFrame)
-	activeChatFrame:ForceHide(false)
-	activeChatFrame:FadeIn(0.2, activeChatFrame:GetAlpha(), 1)
-	local chatName = activeChatFrame:GetName()
-	local tabName = chatName.."Tab";
-	local tab = _G[tabName];
-	if(tab) then
-		tab.IsOpen = true
-	end
-end
-
-local function DockFadeInChat()
-	local activeChatFrame = FCFDock_GetSelectedWindow(GENERAL_CHAT_DOCK)
-	MOD.Dock.Parent.backdrop:Show();
-	MOD:ShowLines(activeChatFrame)
-	activeChatFrame:ForceHide(false)
-	activeChatFrame:FadeIn(0.2, activeChatFrame:GetAlpha(), 1)
-end
-
-local function DockFadeOutChat()
-	local activeChatFrame = FCFDock_GetSelectedWindow(GENERAL_CHAT_DOCK)
-	MOD:FadeLines(activeChatFrame)
-	activeChatFrame:ForceHide(true)
-	activeChatFrame:FadeOut(2, activeChatFrame:GetAlpha(), 0, true)
-end
-
 do
 	local TabSafety = {};
 	local refreshLocked = false;
@@ -565,38 +524,21 @@ do
 		end
 	end

-	local Tab_OnEnter = function(self)
-		SV.Dock:EnterFade()
+	local DockTab_OnEnter = function(self)
 		local chatID = self:GetID();
 		local chatFrame = _G[("ChatFrame%d"):format(chatID)];
 		local tabText = self.text:GetText() or "Chat "..chatID;
-		GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT");
-		GameTooltip:ClearLines();
-		GameTooltip:AddLine(tabText,1,1,1);
-	    if ( chatFrame.isTemporary and chatFrame.chatType == "BN_CONVERSATION" ) then
-	        BNConversation_DisplayConversationTooltip(tonumber(chatFrame.chatTarget));
-	    else
-	        GameTooltip_AddNewbieTip(self, CHAT_OPTIONS_LABEL, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_CHATOPTIONS, 1);
-	    end
-		if not self.IsOpen then
-			self:SetPanelColor("highlight")
-		end
-		GameTooltip:Show()
-	end
-
-	local Tab_OnLeave = function(self)
-		SV.Dock:ExitFade()
-		if not self.IsOpen then
-			self:SetPanelColor("default")
-		end
-		GameTooltip:Hide()
+		GameTooltip:AddLine(tabText, 1, 1, 0);
+		GameTooltip:AddLine(" ", 1, 1, 1);
+    if ( chatFrame.isTemporary and chatFrame.chatType == "BN_CONVERSATION" ) then
+        BNConversation_DisplayConversationTooltip(tonumber(chatFrame.chatTarget));
+    else
+        GameTooltip_AddNewbieTip(self, CHAT_OPTIONS_LABEL, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_CHATOPTIONS, 1);
+    end
 	end

-	local Tab_OnClick = function(self,button)
+	local DockTab_OnClick = function(self,button)
 		local chatFrame = _G[("ChatFrame%d"):format(self:GetID())];
-		if((not self.IsOpen) or (not chatFrame:IsShown())) then
-			MOD.Dock.Parent.Bar:SetDefault(MOD.Dock.Bar, true)
-		end
 		FCF_Tab_OnClick(self,button);
 		if(chatFrame:AtBottom() and ScrollIndicator:IsShown()) then
 			SV.Animate:StopFlash(ScrollIndicator)
@@ -607,25 +549,13 @@ do
 		end
 		for chatID,frame in pairs(TabsList) do
 			frame.link.IsOpen = false
-			frame.link:SetPanelColor("default")
 			frame.link.icon:SetGradient(unpack(SV.media.gradient.icon))
 		end
 		if(chatFrame.isDocked) then
         self.IsOpen = true
-        self.icon:SetGradient(unpack(SV.media.gradient.green))
     end
 	end

-	local Tab_OnDragStart = function(self)
-		MOD.Dock.Highlight:Show()
-		MOD.Dock.Highlight:SetScript("OnUpdate", HighLight_OnUpdate)
-	end
-
-	local Tab_OnDragStop = function(self)
-		MOD.Dock.Highlight:Hide()
-		MOD.Dock.Highlight:SetScript("OnUpdate", nil)
-	end
-
 	local EditBox_OnKeyUp = function(self, button)
 		if(not button) then return end
 		if(doskey) then
@@ -642,22 +572,22 @@ do

 	local EditBox_OnEditFocusGained = function(self)
 		self:Show()
-		if not MOD.Dock.Parent:IsShown()then
-			MOD.Dock.editboxforced = true;
-			MOD.Dock.Parent.Bar.Button:GetScript("OnEnter")(MOD.Dock.Parent.Bar.Button)
+		if not self.DockLink:IsShown()then
+			self.DockLink.editboxforced = true;
+			self.DockLink.Bar.Button:GetScript("OnEnter")(self.DockLink.Bar.Button)
 		end
-		MOD.Dock.Parent.Alert:Activate(self)
+		self.DockLink.Alert:Activate(self)
 	end

 	local EditBox_OnEditFocusLost = function(self)
-		if MOD.Dock.editboxforced then
-			MOD.Dock.editboxforced = nil;
-			if MOD.Dock.Parent:IsShown()then
-				MOD.Dock.Parent.Bar.Button:GetScript("OnLeave")(MOD.Dock.Parent.Bar.Button)
+		if self.DockLink.editboxforced then
+			self.DockLink.editboxforced = nil;
+			if self.DockLink:IsShown()then
+				self.DockLink.Bar.Button:GetScript("OnLeave")(self.DockLink.Bar.Button)
 			end
 		end
 		self:Hide()
-		MOD.Dock.Parent.Alert:Deactivate()
+		self.DockLink.Alert:Deactivate()
 		doskey = false
 	end

@@ -708,128 +638,82 @@ do
 		end
 	end

-	local function _repositionDockedTabs(_, isForced)
-		if((not MOD.Dock) or (not TABS_DIRTY)) then return end;
-		local lastTab = TabsList[1];
-		if(lastTab) then
-			lastTab:ClearAllPoints()
-			lastTab:SetPoint("LEFT", MOD.Dock.Bar, "LEFT", 2, 0);
-		end
-		local offset = 1;
-		for chatID,frame in pairs(TabsList) do
-			if(frame and chatID ~= 1 and (frame.isDocked or isForced)) then
-				frame:ClearAllPoints()
-				if(not lastTab) then
-					frame:SetPoint("LEFT", MOD.Dock.Bar, "LEFT", 2, 0);
-				else
-					frame:SetPoint("LEFT", lastTab, "RIGHT", 6, 0);
-				end
-				lastTab = frame
-			end
-		end
-		local newWidth = ((MOD.Dock.Bar:GetHeight() * 1.75) + 6) * offset;
-		MOD.Dock.Bar:SetWidth(newWidth);
-		AnchorInsertHighlight();
-		TABS_DIRTY = false;
-	end
-
-	local function _removeTab(frame,chat)
-		if(not frame) then return end
-		local name = frame:GetName();
-		--if(not TabSafety[name]) then return end
-		TabSafety[name] = false;
-		if(frame.chatID) then
-			local chatID = frame.chatID;
-			if(TabsList[chatID]) then
-				TabsList[chatID] = nil;
-			end
-		end
-		frame:SetParent(chat)
-		frame:ClearAllPoints()
-		frame:SetPoint("TOPLEFT", chat, "BOTTOMLEFT", -3, -6)
-		TABS_DIRTY = true
-		_repositionDockedTabs()
-	end
-
-	local function _addTab(frame,chatID)
-		local name = frame:GetName();
-		if(TabSafety[name]) then return end
-		TabSafety[name] = true;
-		TabsList[chatID] = frame
-	    frame.chatID = chatID;
-	    frame:SetParent(MOD.Dock.Bar)
-	    TABS_DIRTY = true
-	    _repositionDockedTabs()
-	end
-
-	local function _hook_FCFDock_UpdateTabs(...)
-		TABS_DIRTY = true
-	  _repositionDockedTabs()
-	end
-
-	NewHook("FCFDock_UpdateTabs", _hook_FCFDock_UpdateTabs)
-
-	local function _customTab(tab, chatID, enabled)
-		if(tab.IsStyled) then return end
+	local function _customTab(tab, holder)
+		if(tab.Holder) then return end
+		local chatID = tab.chatID;
 		local tabName = tab:GetName();
-		local tabSize = MOD.Dock.Bar:GetHeight();

-		local holder = CreateFrame("Frame", ("SVUI_ChatTab%s"):format(chatID), MOD.Dock.Bar)
-		holder:SetWidth(tabSize * 1.75)
-		holder:SetHeight(tabSize)
-		tab.chatID = chatID;
+		holder.widthMultiplier = 1.75;
+		holder:SetWidth(holder:GetWidth() * 1.75)
+
 		tab:SetParent(holder)
 		tab:ClearAllPoints()
 		tab:SetAllPoints(holder)
-		SV.Dock:SetButtonTheme(tab, tabSize)
-		tab.icon = tab:CreateTexture(nil,"BACKGROUND",nil,3)
-		tab.icon:InsetPoints(tab, 6, 3)
-		tab.icon:SetTexture(MOD.media.dockIcon)
+
 		if(tab.conversationIcon) then
 			tab:SetPanelColor("VERTICAL", 0.1, 0.53, 0.65, 0.6, 0.2, 1)
-			tab.icon:SetGradient("VERTICAL", 0.1, 0.53, 0.65, 0.3, 0.7, 1)
+			holder.Icon:SetGradient("VERTICAL", 0.1, 0.53, 0.65, 0.3, 0.7, 1)
 		else
 			tab:SetPanelColor("default")
-			tab.icon:SetGradient(unpack(SV.media.gradient.icon))
+			holder.Icon:SetGradient(unpack(SV.media.gradient.icon))
 		end
 		if(chatID == 1) then
 			tab.IsOpen = true
-	        tab.icon:SetGradient(unpack(SV.media.gradient.green))
+			holder.Icon:SetGradient(unpack(SV.media.gradient.green))
 		end
-		tab.icon:SetAlpha(0.5)
+		holder.Icon:SetAlpha(0.5);
+		tab.icon = holder.Icon;
 		tab:SetAlpha(1);

 		tab.SetAlpha = SV.fubar
 		tab.SetHeight = SV.fubar
+		tab.SetWidth = SV.fubar
 		tab.SetSize = SV.fubar
 		tab.SetParent = SV.fubar
 		tab.ClearAllPoints = SV.fubar
 		tab.SetAllPoints = SV.fubar
 		tab.SetPoint = SV.fubar

-		tab:SetScript("OnEnter", Tab_OnEnter);
-		tab:SetScript("OnLeave", Tab_OnLeave);
-		tab:SetScript("OnClick", Tab_OnClick);
-		tab:HookScript("OnDragStart", Tab_OnDragStart);
-		tab:HookScript("OnDragStop", Tab_OnDragStop);
 		tab.Holder = holder
 		tab.Holder.link = tab
-		tab.IsStyled = true;
 	end

-	local function _modifyChat(chat)
+	local ChatDock_HideCallback = function(self)
+		local chat = self.Owner;
+		MOD:FadeLines(chat)
+		chat:ForceHide(true)
+		chat:FadeOut(2, chat:GetAlpha(), 0, true)
+	end
+
+	local ChatDock_ShowCallback = function(self)
+		local chat = self.Owner;
+		MOD:ShowLines(chat)
+		chat:ForceHide(false)
+		chat:FadeIn(0.2, chat:GetAlpha(), 1)
+	end
+
+	local function ConfigChatFrame(chat)
 		if(not chat) then return; end
-		local chatName = chat:GetName()
+		local chatName = chat:GetName();
 		local chatID = chat:GetID();
 		local tabName = chatName.."Tab";
-		local tabText = _G[chatName.."TabText"]
-		SV:SetFrameVisibilityLocks(chat)
-		if(not chat.Panel) then
-			chat:SetStyle("Frame", "Transparent", true, 1, 3, 6)
-			chat.Panel:Hide()
-			SV:FontManager(chat, "chatdialog", "LEFT")
-			SV:FontManager(tabText, "chattab")
-		end
+		local tabText = _G[chatName.."TabText"];
+		local tab = _G[tabName];
+		local editBoxName = chatName.."EditBox";
+		local editBox = _G[editBoxName];
+		local tabEnabled = (chat.inUse or chat.isDocked or chat.isTemporary);
+		-------------------------------------------
+		SV:SetFrameVisibilityLocks(chat);
+		-------------------------------------------
+		chat:SetStyle("Frame", "Transparent", true, 1, 3, 6);
+		chat.Panel:Hide();
+		chat.Dock = SV.Dock:NewDocklet("BottomLeft", format("SVUI_ChatFrameDock%d", chatID), chatName, MOD.media.dockIcon, DockTab_OnClick, DockTab_OnEnter);
+		chat.Dock.Owner = chat;
+		SV.Dock:SetDockCallbacks(chat.Dock, ChatDock_HideCallback, ChatDock_ShowCallback);
+		-------------------------------------------
+		SV:FontManager(chat, "chatdialog", "LEFT")
+		SV:FontManager(tabText, "chattab")
+
 		if(SV.media.shared.font.chatdialog.outline ~= 'NONE' ) then
 			chat:SetShadowColor(0, 0, 0, 0)
 			chat:SetShadowOffset(0, 0)
@@ -837,183 +721,154 @@ do
 			chat:SetShadowColor(0, 0, 0, 1)
 			chat:SetShadowOffset(1, -1)
 		end
-		if(not chat.InitConfig) then
-			local tab = _G[tabName]
-			local editBoxName = chatName.."EditBox";
-			local editBox = _G[editBoxName]
-			-------------------------------------------
-			chat:SetFrameLevel(4)
-			chat:SetClampRectInsets(0, 0, 0, 0)
-			chat:SetClampedToScreen(false)
-			chat:RemoveTextures(true)
-			chat:SetBackdropColor(0,0,0,0)
-			_G[chatName.."ButtonFrame"]:Die()
-			-------------------------------------------
-			_G[tabName .."Left"]:SetTexture("")
-			_G[tabName .."Middle"]:SetTexture("")
-			_G[tabName .."Right"]:SetTexture("")
-			_G[tabName .."SelectedLeft"]:SetTexture("")
-			_G[tabName .."SelectedMiddle"]:SetTexture("")
-			_G[tabName .."SelectedRight"]:SetTexture("")
-			_G[tabName .."HighlightLeft"]:SetTexture("")
-			_G[tabName .."HighlightMiddle"]:SetTexture("")
-			_G[tabName .."HighlightRight"]:SetTexture("")
-
-			tab.text = _G[chatName.."TabText"]
-			tab.text:SetShadowColor(0, 0, 0)
-			tab.text:SetShadowOffset(2, -2)
-			tab.text:InsetPoints(tab)
-			tab.text:SetJustifyH("CENTER")
-			tab.text:SetJustifyV("MIDDLE")
-			NewHook(tab.text, "SetTextColor", _hook_TabTextColor)
-			if tab.conversationIcon then
-				tab.conversationIcon:SetAlpha(0)
-				tab.conversationIcon:ClearAllPoints()
-				tab.conversationIcon:SetPoint("TOPLEFT", tab, "TOPLEFT", 0, 0)
-			end
-			if(TAB_SKINS and not tab.IsStyled) then
-				local arg3 = (chat.inUse or chat.isDocked or chat.isTemporary)
-				_customTab(tab, chatID, arg3)
-			else
-				tab:SetHeight(TAB_HEIGHT)
-				tab:SetWidth(TAB_WIDTH)
-				tab.SetWidth = SV.fubar;
-			end
-			-------------------------------------------
-			local ebPoint1, ebPoint2, ebPoint3 = select(6, editBox:GetRegions())
-			ebPoint1:Die()
-			ebPoint2:Die()
-			ebPoint3:Die()
-			_G[editBoxName.."FocusLeft"]:Die()
-			_G[editBoxName.."FocusMid"]:Die()
-			_G[editBoxName.."FocusRight"]:Die()
-			editBox:SetStyle("Frame", "Lite", true, 2, -2, -3)
-			editBox:SetAltArrowKeyMode(false)
-			editBox:SetAllPoints(MOD.Dock.Parent.Alert)
-			editBox:HookScript("OnEditFocusGained", EditBox_OnEditFocusGained)
-			editBox:HookScript("OnEditFocusLost", EditBox_OnEditFocusLost)
-			editBox:HookScript("OnTextChanged", EditBox_OnTextChanged)
-			editBox:HookScript("OnKeyUp", EditBox_OnKeyUp)
-			-------------------------------------------
-			chat:SetTimeVisible(100)
-			chat:SetFading(CHAT_FADING)
-			--chat:HookScript("OnHyperlinkClick", SVUI_OnHyperlinkShow)
-
-			local alertSize = MOD.Dock.Bar:GetHeight();
-			local alertOffset = alertSize * 0.25
-			local alert = CreateFrame("Frame", nil, tab)
-			alert:SetSize(alertSize, alertSize)
-			alert:SetFrameStrata("DIALOG")
-			alert:SetPoint("TOPRIGHT", tab, "TOPRIGHT", alertOffset, alertOffset)
-			local alticon = alert:CreateTexture(nil, "OVERLAY")
-			alticon:SetAllPoints(alert)
-			alticon:SetTexture(MOD.media.whisperIcon)
-			alert:Hide()
-			chat.WhisperAlert = alert
-
-			--copy chat button
-			chat.button = CreateFrame('Frame', format("SVUI_CopyChatButton%d", chatID), chat)
-			chat.button:SetAlpha(0.35)
-			chat.button:SetSize(38, 18)
-			chat.button:SetPoint('TOPRIGHT', chat, 'TOPRIGHT', 0, 0)
-			chat.button:SetStyle("Frame", "Lite")
-
-			chat.button.Title = chat.button:CreateFontString()
-			chat.button.Title:SetFontObject(SVUI_Font_ChatTab)
-			chat.button.Title:SetText("copy")
-			chat.button.Title:InsetPoints(chat.button)
-			chat.button.Title:SetTextColor(1,0.8,0)
-
-			chat.button:SetScript("OnMouseUp", function(self, btn)
-				if btn == "RightButton" and chatID == 1 then
-					ToggleFrame(ChatMenu)
-				else
-					MOD:CopyChat(chat)
-				end
-			end)
-
-			chat.button:SetScript("OnEnter", function(self) self:FadeIn() end)
-			chat.button:SetScript("OnLeave", function(self) self:FadeOut() end)
-			chat.button:FadeOut()

-			chat.InitConfig = true
+		chat:SetFrameLevel(4)
+		chat:SetClampRectInsets(0, 0, 0, 0)
+		chat:SetClampedToScreen(false)
+		chat:RemoveTextures(true)
+		chat:SetBackdropColor(0,0,0,0)
+
+		_G[chatName.."ButtonFrame"]:Die()
+		-------------------------------------------
+		_G[tabName .."Left"]:SetTexture("")
+		_G[tabName .."Middle"]:SetTexture("")
+		_G[tabName .."Right"]:SetTexture("")
+		_G[tabName .."SelectedLeft"]:SetTexture("")
+		_G[tabName .."SelectedMiddle"]:SetTexture("")
+		_G[tabName .."SelectedRight"]:SetTexture("")
+		_G[tabName .."HighlightLeft"]:SetTexture("")
+		_G[tabName .."HighlightMiddle"]:SetTexture("")
+		_G[tabName .."HighlightRight"]:SetTexture("")
+
+		tab.text = _G[chatName.."TabText"]
+		tab.text:SetShadowColor(0, 0, 0)
+		tab.text:SetShadowOffset(2, -2)
+		tab.text:InsetPoints(tab)
+		tab.text:SetJustifyH("CENTER")
+		tab.text:SetJustifyV("MIDDLE")
+		NewHook(tab.text, "SetTextColor", _hook_TabTextColor)
+		if tab.conversationIcon then
+			tab.conversationIcon:SetAlpha(0)
+			tab.conversationIcon:ClearAllPoints()
+			tab.conversationIcon:SetPoint("TOPLEFT", tab, "TOPLEFT", 0, 0)
 		end
-	end

-	local function _modifyTab(tab, floating)
-		if(not floating) then
-			_G[tab:GetName().."Text"]:Show()
-			if tab.owner and tab.owner.button and GetMouseFocus() ~= tab.owner.button then
-				tab.owner.button:SetAlpha(1)
-			end
-			if tab.conversationIcon then
-				tab.conversationIcon:Show()
-			end
-		elseif GetMouseFocus() ~= tab then
-			_G[tab:GetName().."Text"]:Hide()
-			if tab.owner and tab.owner.button and GetMouseFocus() ~= tab.owner.button then
-				tab.owner.button:SetAlpha(1)
-			end
-			if tab.conversationIcon then
-				tab.conversationIcon:Hide()
+		tab.chatID = chatID;
+
+		_customTab(tab, chat.Dock.Button)
+		-------------------------------------------
+		local ebPoint1, ebPoint2, ebPoint3 = select(6, editBox:GetRegions())
+		ebPoint1:Die()
+		ebPoint2:Die()
+		ebPoint3:Die()
+		_G[editBoxName.."FocusLeft"]:Die()
+		_G[editBoxName.."FocusMid"]:Die()
+		_G[editBoxName.."FocusRight"]:Die()
+		editBox:SetStyle("Frame", "Lite", true, 2, -2, -3)
+		editBox:SetAltArrowKeyMode(false)
+		editBox:SetAllPoints(chat.Dock.Parent.Alert)
+		editBox:HookScript("OnEditFocusGained", EditBox_OnEditFocusGained)
+		editBox:HookScript("OnEditFocusLost", EditBox_OnEditFocusLost)
+		editBox:HookScript("OnTextChanged", EditBox_OnTextChanged)
+		editBox:HookScript("OnKeyUp", EditBox_OnKeyUp)
+
+		editBox.DockLink = chat.Dock.Parent;
+		-------------------------------------------
+		chat:SetTimeVisible(100)
+		chat:SetFading(CHAT_FADING)
+		--chat:HookScript("OnHyperlinkClick", SVUI_OnHyperlinkShow)
+
+		local alertSize = chat.Dock.Bar:GetHeight();
+		local alertOffset = alertSize * 0.25
+		local alert = CreateFrame("Frame", nil, tab)
+		alert:SetSize(alertSize, alertSize)
+		alert:SetFrameStrata("DIALOG")
+		alert:SetPoint("TOPRIGHT", tab, "TOPRIGHT", alertOffset, alertOffset)
+		local alticon = alert:CreateTexture(nil, "OVERLAY")
+		alticon:SetAllPoints(alert)
+		alticon:SetTexture(MOD.media.whisperIcon)
+		alert:Hide()
+		chat.WhisperAlert = alert
+
+		--copy chat button
+		tab.CopyButton = CreateFrame('Frame', format("SVUI_CopyChatButton%d", chatID), chat)
+		tab.CopyButton:SetAlpha(0.35)
+		tab.CopyButton:SetSize(38, 18)
+		tab.CopyButton:SetPoint('TOPRIGHT', chat, 'TOPRIGHT', 0, 0)
+		tab.CopyButton:SetStyle("Frame", "Lite")
+
+		tab.CopyButton.Title = tab.CopyButton:CreateFontString()
+		tab.CopyButton.Title:SetFontObject(SVUI_Font_ChatTab)
+		tab.CopyButton.Title:SetText("copy")
+		tab.CopyButton.Title:InsetPoints(tab.CopyButton)
+		tab.CopyButton.Title:SetTextColor(1,0.8,0)
+
+		tab.CopyButton:SetScript("OnMouseUp", function(self, btn)
+			if btn == "RightButton" and chatID == 1 then
+				ToggleFrame(ChatMenu)
+			else
+				MOD:CopyChat(chat)
 			end
-		end
+		end)
+
+		tab.CopyButton:SetScript("OnEnter", function(self) self:FadeIn() end)
+		tab.CopyButton:SetScript("OnLeave", function(self) self:FadeOut() end)
+		tab.CopyButton:FadeOut()
 	end

 	function MOD:RefreshChatFrames(forced)
 		if ((not forced) and (refreshLocked and (IsMouseButtonDown("LeftButton") or InCombatLockdown()))) then return; end

-		CHAT_WIDTH, CHAT_HEIGHT = MOD.Dock:GetSize();
-
 		for i,name in pairs(CHAT_FRAMES) do
 			local chat = _G[name]
 			local id = chat:GetID()
 			local tab = _G[name.."Tab"]
 			local tabText = _G[name.."TabText"]
-			_modifyChat(chat, tabText)
-			tab.owner = chat;
-			chat:SetBackdropColor(0,0,0,0);
-			if not chat.isDocked and chat:IsShown() then
+
+			if(not chat.Dock) then
+				ConfigChatFrame(chat, tabText)
+			end
+
+			local CHAT_WIDTH, CHAT_HEIGHT = chat.Dock:GetSize();
+
+			if((not chat.isDocked) and chat:IsShown()) then
 				--print("setting size "..id .. " = " ..CHAT_WIDTH)
 				chat:SetSize(CHAT_WIDTH, CHAT_HEIGHT)
 				chat.Panel:Show()
-				tab.owner = chat;
-				if(not TAB_SKINS) then
-					tab.isDocked = chat.isDocked;
-					tab:SetParent(chat)
-					_modifyTab(tab, true)
-				else
-					tab.isDocked = false;
-					if(tab.Holder) then
-						tab.Holder.isDocked = false;
-						_removeTab(tab.Holder, chat)
-					end
-				end
+
 				if chat:IsMovable() then
 					chat:SetUserPlaced(true)
 				end
+
+				tab.isDocked = false;
+				tab.Holder.isFloating = true;
+				tabText:Show()
+				if tab.CopyButton and GetMouseFocus() ~= tab.CopyButton then
+					tab.CopyButton:SetAlpha(1)
+				end
+				if tab.conversationIcon then
+					tab.conversationIcon:Show()
+				end
 			else
-				--print("Setting: " .. name)
+				chat:SetBackdropColor(0,0,0,0);
 				chat:ClearAllPoints();
-				chat:SetPoint("CENTER", MOD.Dock, "CENTER", 0, 0);
+				chat:SetPoint("CENTER", chat.Dock, "CENTER", 0, 0);
 				chat:SetSize(CHAT_WIDTH - 4, CHAT_HEIGHT - 4);
 				chat.Panel:Hide();

 				FCF_SavePositionAndDimensions(chat)
-				tab.owner = chat;
-				if(not TAB_SKINS) then
-					tab.isDocked = chat.isDocked;
-					tab:SetParent(MOD.Dock.Bar)
-					_modifyTab(tab, false)
-				else
-					tab.isDocked = true;
-					local arg3 = (chat.inUse or chat.isDocked or chat.isTemporary)
-					if(tab.Holder and arg3) then
-						tab.Holder.isDocked = true;
-						_addTab(tab.Holder, id)
-					end
+
+				tab.isDocked = true;
+				tab.Holder.isFloating = false;
+				tabText:Hide()
+				if tab.CopyButton and GetMouseFocus() ~= tab.CopyButton then
+					tab.CopyButton:SetAlpha(1)
+				end
+				if tab.conversationIcon then
+					tab.conversationIcon:Hide()
 				end
 			end
+
 			if((not chat.TempAddMessage) and (chat:GetID() ~= 2)) then
 				chat.TempAddMessage = chat.AddMessage;
 				chat.AddMessage = AddModifiedMessage
@@ -1163,26 +1018,6 @@ end
 HOOKS
 ##########################################################
 ]]--
-local function _hook_SetTabPosition(chatFrame)
-	local chatTab = _G[chatFrame:GetName().."Tab"];
-	local frame = chatTab.Holder
-	if(frame and (not chatFrame.isLocked)) then
-		frame.isDocked = false;
-		frame:ClearAllPoints();
-		frame:SetPoint("TOPLEFT", chatFrame, "BOTTOMLEFT", -3, -6);
-		TABS_DIRTY = true;
-		AnchorInsertHighlight();
-	end
-end
-
-local function _hook_TabStopDragging(chatFrame)
-	if(MOD.Dock.Highlight:IsMouseOver(50, -2, 0, 50)) then
-		TABS_DIRTY = true;
-		FCF_DockFrame(chatFrame, chatFrame:GetID(), true);
-		FCFDock_UpdateTabs(GENERAL_CHAT_DOCK, true);
-	end
-end
-
 do
 	local _linkTokens = {
 		['item'] = true,
@@ -1238,13 +1073,12 @@ do
 	end

 	local _hook_GDMFrameSetPoint = function(self)
-		self:SetAllPoints(MOD.Dock.Bar)
+		self:SetAllPoints(SV.Dock.BottomLeft.Bar)
 		--print("_hook_GDMScrollSetPoint")
 	end

 	local _hook_GDMScrollSetPoint = function(self, point, anchor, attachTo, x, y)
 		if(anchor == GeneralDockManagerOverflowButton and x == 0 and y == 0) then
-			--print("_hook_GDMScrollSetPoint " .. point .. " " .. attachTo)
 			self:SetPoint(point, anchor, attachTo, -2, -6)
 		end
 	end
@@ -1287,14 +1121,12 @@ do
 	end

 	local _hook_TabOnEnter = function(self)
-		--_G[self:GetName().."Text"]:Show()
 		if self.conversationIcon then
 			self.conversationIcon:Show()
 		end
 	end

 	local _hook_TabOnLeave = function(self)
-		--_G[self:GetName().."Text"]:Hide()
 		if self.conversationIcon then
 			self.conversationIcon:Hide()
 		end
@@ -1333,12 +1165,14 @@ do
 		NewHook('FCF_UnDockFrame', MOD.RefreshChatFrames)
 		NewHook('FCF_DockFrame', MOD.RefreshChatFrames)
 		NewHook('FCF_OpenTemporaryWindow', MOD.RefreshChatFrames)
-		NewHook("FCF_SetTabPosition", _hook_SetTabPosition)
-		NewHook("FCF_StopDragging", _hook_TabStopDragging)
 		NewHook('ChatEdit_OnEnterPressed', _hook_ChatEditOnEnterKey)
 		NewHook('FCF_SetChatWindowFontSize', _hook_ChatFontUpdate)
 		NewHook(GeneralDockManager, 'SetPoint', _hook_GDMFrameSetPoint)
 		NewHook(GeneralDockManagerScrollFrame, 'SetPoint', _hook_GDMScrollSetPoint)
+
+		--NewHook("FCF_SetTabPosition", _hook_SetTabPosition)
+		--NewHook("FCF_StopDragging", _hook_TabStopDragging)
+
 		for _, name in pairs(CHAT_FRAMES) do
 			local chat = _G[name]
 			local tab = _G[name .. "Tab"]
@@ -1374,11 +1208,8 @@ function MOD:CopyChat(frame)
 end

 function MOD:UpdateLocals()
-	local width,height = MOD.Dock.Parent.Window:GetSize()
 	PLAYER_NAME = UnitName("player");
 	PLAYER_FILTER = PLAYER_NAME:upper();
-	CHAT_WIDTH = (width or 350) - 10;
-	CHAT_HEIGHT = (height or 180) - 15;
 	CHAT_THROTTLE = SV.db.Chat.throttleInterval;
 	CHAT_ALLOW_URL = SV.db.Chat.url;
 	CHAT_HOVER_URL = SV.db.Chat.hyperlinkHover;
@@ -1390,6 +1221,7 @@ function MOD:UpdateLocals()
 	CHAT_FADING = SV.db.Chat.fade;
 	WHISPER_SOUND = LSM:Fetch("sound", SV.db.Chat.psst);
 	TIME_STAMP_MASK = SV.db.Chat.timeStampFormat;
+	HIDE_REALM = SV.db.Chat.hideRealms;
 	if(CHAT_THROTTLE and CHAT_THROTTLE == 0) then
 		wipe(THROTTLE_CACHE)
 	end
@@ -1399,8 +1231,36 @@ local function ProxyExpand()
 	MOD:RefreshChatFrames(true);
 end

-local function ExpandChatDock()
-	SV.Timers:ExecuteTimer(ProxyExpand, 0.2)
+local function ExpandChatDock(location)
+	if(not location) then return end
+	local needsUpdate = false;
+	for _, name in pairs(CHAT_FRAMES) do
+		local chat = _G[name];
+		if(chat and (location == name.Dock.Parent.Bar.Data.Location)) then
+			needsUpdate = true;
+		end
+	end
+	if(needsUpdate) then SV.Timers:ExecuteTimer(ProxyExpand, 0.2); end
+end
+
+local function DockFadeInChat(location)
+	if(not location) then return end
+	for _, name in pairs(CHAT_FRAMES) do
+		local chat = _G[name];
+		if(chat and (location == name.Dock.Parent.Bar.Data.Location)) then
+			needsUpdate = true;
+		end
+	end
+end
+
+local function DockFadeOutChat(location)
+	if(not location) then return end
+	for _, name in pairs(CHAT_FRAMES) do
+		local chat = _G[name];
+		if(chat and (location == name.Dock.Parent.Bar.Data.Location)) then
+			needsUpdate = true;
+		end
+	end
 end

 function MOD:ReLoad()
@@ -1411,25 +1271,11 @@ function MOD:Load()
 	self.private.history = self.private.history or {};
 	self.ChatHistory = self.private.history;

-	self.Dock = SV.Dock:NewAdvancedDocklet("BottomLeft", "SVUI_ChatFrameDock")
-	self.Dock.Bar.ShowAdvancedDock = DockFadeInChat;
-
-	local hlSize = self.Dock.Bar:GetHeight()
-	local insertHL = CreateFrame("Frame", nil, self.Dock.Bar)
-	insertHL:SetPoint("LEFT", self.Dock.Bar, "LEFT", 0, 0)
-	insertHL:SetSize(hlSize, hlSize)
-	local insTex = insertHL:CreateTexture(nil, "OVERLAY")
-	insTex:SetAllPoints()
-	insTex:SetTexture(SV.media.statusbar.default);
-	insTex:SetGradientAlpha("HORIZONTAL",0,1,1,0.8,0,0.3,0.3,0)
-	insertHL.texture = insTex
-	insertHL:Hide()
-
-	self.Dock.Highlight = insertHL
+	local baseDock = SV.Dock.BottomLeft;

-	ScrollIndicator:SetParent(self.Dock)
+	ScrollIndicator:SetParent(baseDock)
 	ScrollIndicator:SetSize(20,20)
-	ScrollIndicator:SetPoint("BOTTOMRIGHT", self.Dock, "BOTTOMRIGHT", 6, 0)
+	ScrollIndicator:SetPoint("BOTTOMRIGHT", baseDock, "BOTTOMRIGHT", 6, 0)
 	ScrollIndicator:SetFrameStrata("HIGH")
 	ScrollIndicator:EnableMouse(true)
 	ScrollIndicator.icon = ScrollIndicator:CreateTexture(nil, "BACKGROUND")
@@ -1455,9 +1301,9 @@ function MOD:Load()
 	SetParseHandlers()

 	_G.GeneralDockManagerOverflowButton:ClearAllPoints()
-	_G.GeneralDockManagerOverflowButton:SetPoint('BOTTOMRIGHT', self.Dock.Bar, 'BOTTOMRIGHT', -2, 2)
+	_G.GeneralDockManagerOverflowButton:SetPoint('BOTTOMLEFT', baseDock.Bar, 'BOTTOMRIGHT', 2, 0)
 	_G.GeneralDockManagerOverflowButtonList:SetStyle("!_Frame", 'Transparent')
-	_G.GeneralDockManager:SetAllPoints(self.Dock.Bar)
+	_G.GeneralDockManager:SetAllPoints(baseDock.Bar)

 	SetAllChatHooks()

@@ -1472,10 +1318,10 @@ function MOD:Load()
 	_G.InterfaceOptionsSocialPanelChatStyleButton:Hide()
 	_G.InterfaceOptionsSocialPanelChatStyle:SetAlpha(0)

-	local frame = CreateFrame("Frame", "SVUI_CopyChatFrame", self.Dock)
-	frame:SetPoint('BOTTOMLEFT', self.Dock, 'TOPLEFT', 0, 0)
-	frame:SetPoint('BOTTOMRIGHT', self.Dock, 'TOPRIGHT', 0, 0)
-	frame:SetHeight(self.Dock:GetHeight())
+	local frame = CreateFrame("Frame", "SVUI_CopyChatFrame", baseDock)
+	frame:SetPoint('BOTTOMLEFT', baseDock, 'TOPLEFT', 0, 0)
+	frame:SetPoint('BOTTOMRIGHT', baseDock, 'TOPRIGHT', 0, 0)
+	frame:SetHeight(baseDock:GetHeight())
 	frame:Hide()
 	frame:EnableMouse(true)
 	frame:SetFrameStrata("DIALOG")
@@ -1528,12 +1374,7 @@ function MOD:Load()

 	self:LoadChatBubbles()

-	SV.Events:On("DOCK_LEFT_FADE_IN", DockFadeInChat, true);
-	SV.Events:On("DOCK_LEFT_FADE_OUT", DockFadeOutChat, true);
-	SV.Events:On("DOCK_LEFT_EXPANDED", ExpandChatDock, true);
-	SV.Events:On("DOCKLET_RESET", DockResetChat, true);
-	SV.Events:On("DOCKLET_SHOWN", DockResetChat, true);
-	SV.Events:On("DOCKLET_LIST_INCREASED", DockResetChat, true);
-	SV.Events:On("DOCKLET_LIST_DECREASED", DockSetChatDefault, true);
-	SV.Events:On("DOCKLET_LIST_EMPTY", DockSetChatDefault, true);
+	SV.Events:On("DOCK_FADE_IN", DockFadeInChat, true);
+	SV.Events:On("DOCK_FADE_OUT", DockFadeOutChat, true);
+	SV.Events:On("DOCK_EXPANDED", ExpandChatDock, true);
 end
diff --git a/SVUI_CraftOMatic/SVUI_CraftOMatic.lua b/SVUI_CraftOMatic/SVUI_CraftOMatic.lua
index 96bee02..bbdf3c3 100644
--- a/SVUI_CraftOMatic/SVUI_CraftOMatic.lua
+++ b/SVUI_CraftOMatic/SVUI_CraftOMatic.lua
@@ -684,12 +684,12 @@ function PLUGIN:Load()
 	log:SetInsertMode('TOP')

 	local bottomleftline = log:CreateTexture(nil,"OVERLAY")
-    bottomleftline:SetTexture(0,0,0,0.5)
-    bottomleftline:SetPoint("TOPLEFT")
-    bottomleftline:SetPoint("BOTTOMLEFT")
-    bottomleftline:SetWidth(1)
+  bottomleftline:SetTexture(0,0,0,0.5)
+  bottomleftline:SetPoint("TOPLEFT")
+  bottomleftline:SetPoint("BOTTOMLEFT")
+  bottomleftline:SetWidth(1)

-    self.ModeAlert = ModeAlert
+  self.ModeAlert = ModeAlert
 	self.TitleWindow = title
 	self.LogWindow = log
 	--self.Docklet:Hide()
diff --git a/SVUI_QuestTracker/SVUI_QuestTracker.lua b/SVUI_QuestTracker/SVUI_QuestTracker.lua
index 9069b19..6790590 100644
--- a/SVUI_QuestTracker/SVUI_QuestTracker.lua
+++ b/SVUI_QuestTracker/SVUI_QuestTracker.lua
@@ -413,7 +413,8 @@ function MOD:UpdateDimensions()
 	MOD.Docklet.ScrollFrame.ScrollChild:SetHeight(totalHeight);
 end

-local function ExpandQuestTracker()
+local function ExpandQuestTracker(location)
+	if(not location or (location ~= MOD.Docklet.Parent.Bar.Data.Location)) then return end
 	SV.Timers:ExecuteTimer(MOD.UpdateDimensions, 0.2)
 end

@@ -502,5 +503,5 @@ function MOD:Load()

 	self.Headers["Popups"]:Refresh()

-	SV.Events:On("DOCK_RIGHT_EXPANDED", ExpandQuestTracker, true);
+	SV.Events:On("DOCK_EXPANDED", ExpandQuestTracker, true);
 end
diff --git a/SVUI_Skins/SVUI_Skins.lua b/SVUI_Skins/SVUI_Skins.lua
index 771a7cc..fb16dcc 100644
--- a/SVUI_Skins/SVUI_Skins.lua
+++ b/SVUI_Skins/SVUI_Skins.lua
@@ -263,11 +263,13 @@ local HideSubDocklet = function(self)
 	end
 end

-local function DockExpandDocklet()
+local function DockExpandDocklet(location)
+	if(not location or (location ~= MOD.Docklet.Parent.Bar.Data.Location)) then return end
 	MOD.Docklet:UpdateEmbeds()
 end

-local function DockFadeInDocklet()
+local function DockFadeInDocklet(location)
+	if(not location or (location ~= MOD.Docklet.Parent.Bar.Data.Location)) then return end
 	local active = MOD.Docklet.Button.ActiveDocklet
 	if(active) then
 		MOD.Docklet.Dock1:Show()
@@ -275,7 +277,8 @@ local function DockFadeInDocklet()
 	end
 end

-local function DockFadeOutDocklet()
+local function DockFadeOutDocklet(location)
+	if(not location or (location ~= MOD.Docklet.Parent.Bar.Data.Location)) then return end
 	local active = MOD.Docklet.Button.ActiveDocklet
 	if(active) then
 		MOD.Docklet.Dock1:Hide()
@@ -356,7 +359,7 @@ function MOD:Load()

 	SV:AddSlashCommand("skinned", "List all addons skinned by SVUI", ListSkinnedAddons);

-	SV.Events:On("DOCK_RIGHT_FADE_IN", DockFadeInDocklet, true);
-	SV.Events:On("DOCK_RIGHT_FADE_OUT", DockFadeOutDocklet, true);
-	SV.Events:On("DOCK_RIGHT_EXPANDED", DockExpandDocklet, true);
+	SV.Events:On("DOCK_FADE_IN", DockFadeInDocklet, true);
+	SV.Events:On("DOCK_FADE_OUT", DockFadeOutDocklet, true);
+	SV.Events:On("DOCK_EXPANDED", DockExpandDocklet, true);
 end
diff --git a/SVUI_UnitFrames/SVUI_UnitFrames.lua b/SVUI_UnitFrames/SVUI_UnitFrames.lua
index 45841b8..7d2d0c5 100644
--- a/SVUI_UnitFrames/SVUI_UnitFrames.lua
+++ b/SVUI_UnitFrames/SVUI_UnitFrames.lua
@@ -280,6 +280,10 @@ function MOD:RefreshUnitFrames()
 	if SV.db.UnitFrames.disableBlizzard then
 		oUF_SVUI:DisableBlizzard('party')
 	end
+
+	if(self.BodyGuard) then
+		self.BodyGuard:UpdateSettings()
+	end
 	collectgarbage("collect")
 end

diff --git a/SVUI_UnitFrames/bodyguard.lua b/SVUI_UnitFrames/bodyguard.lua
index e561348..63c2202 100644
--- a/SVUI_UnitFrames/bodyguard.lua
+++ b/SVUI_UnitFrames/bodyguard.lua
@@ -440,3 +440,4 @@ function MOD:InitializeBodyGuard()
 end

 BodyGuard:RefreshData()
+MOD.BodyGuard = BodyGuard;