Quantcast

Patch and more improvements

Munglunch [05-06-15 - 19:55]
Patch and more improvements
Filename
SVUI_!Core/assets/textures/Affected/AFFECTED1.blp
SVUI_!Core/assets/textures/Affected/AFFECTED2.blp
SVUI_!Core/assets/textures/Affected/AFFECTED3.blp
SVUI_!Core/assets/textures/Affected/AFFECTED4.blp
SVUI_!Core/assets/textures/Affected/AFFECTED5.blp
SVUI_!Core/system/core.lua
SVUI_!Core/system/layout.lua
SVUI_!Core/system/media.lua
SVUI_!Options/SVUI_!Options.lua
SVUI_FightOMatic/SVUI_FightOMatic.lua
SVUI_QuestTracker/Loader.lua
SVUI_QuestTracker/SVUI_QuestTracker.lua
SVUI_QuestTracker/components/quests.lua
SVUI_Skins/components/blizzard/garrison.lua
SVUI_UnitFrames/Loader.lua
SVUI_UnitFrames/SVUI_UnitFrames.lua
SVUI_UnitFrames/elements/auras.lua
SVUI_UnitFrames/elements/misc.lua
SVUI_UnitFrames/frames.lua
diff --git a/SVUI_!Core/assets/textures/Affected/AFFECTED1.blp b/SVUI_!Core/assets/textures/Affected/AFFECTED1.blp
new file mode 100644
index 0000000..7ed332b
Binary files /dev/null and b/SVUI_!Core/assets/textures/Affected/AFFECTED1.blp differ
diff --git a/SVUI_!Core/assets/textures/Affected/AFFECTED2.blp b/SVUI_!Core/assets/textures/Affected/AFFECTED2.blp
new file mode 100644
index 0000000..c1e0e27
Binary files /dev/null and b/SVUI_!Core/assets/textures/Affected/AFFECTED2.blp differ
diff --git a/SVUI_!Core/assets/textures/Affected/AFFECTED3.blp b/SVUI_!Core/assets/textures/Affected/AFFECTED3.blp
new file mode 100644
index 0000000..5827696
Binary files /dev/null and b/SVUI_!Core/assets/textures/Affected/AFFECTED3.blp differ
diff --git a/SVUI_!Core/assets/textures/Affected/AFFECTED4.blp b/SVUI_!Core/assets/textures/Affected/AFFECTED4.blp
new file mode 100644
index 0000000..8563d3f
Binary files /dev/null and b/SVUI_!Core/assets/textures/Affected/AFFECTED4.blp differ
diff --git a/SVUI_!Core/assets/textures/Affected/AFFECTED5.blp b/SVUI_!Core/assets/textures/Affected/AFFECTED5.blp
new file mode 100644
index 0000000..bd92196
Binary files /dev/null and b/SVUI_!Core/assets/textures/Affected/AFFECTED5.blp differ
diff --git a/SVUI_!Core/system/core.lua b/SVUI_!Core/system/core.lua
index 11f4f23..084f860 100644
--- a/SVUI_!Core/system/core.lua
+++ b/SVUI_!Core/system/core.lua
@@ -209,7 +209,6 @@ SV.GUID               = UnitGUID('player');
 SV.Allegiance         = UnitFactionGroup("player");
 SV.ClassRole          = "";
 SV.SpecificClassRole  = "NONE";
-SV.ConfigurationMode  = false;

 SV.Screen = CreateFrame("Frame", "SVUIParent", UIParent);
 SV.Screen:SetFrameLevel(UIParent:GetFrameLevel());
@@ -667,98 +666,6 @@ function SV:RefreshEverything(bypass)
     end
 end

-function SV:GenerateFontOptionGroup(groupName, groupCount, groupOverview, groupList)
-    self.Options.args.Fonts.args.fontGroup.args[groupName] = {
-        order = groupCount,
-        type = "group",
-        name = groupName,
-        args = {
-            overview = {
-                order = 1,
-                name = groupOverview,
-                type = "description",
-                width = "full",
-            },
-            spacer0 = {
-                order = 2,
-                name = "",
-                type = "description",
-                width = "full",
-            },
-        },
-    };
-
-    local orderCount = 3;
-    for template, info in pairs(groupList) do
-        self.Options.args.Fonts.args.fontGroup.args[groupName].args[template] = {
-            order = orderCount + info.order,
-            type = "group",
-            guiInline = true,
-            name = info.name,
-            get = function(key)
-                return self.media.shared.font[template][key[#key]]
-            end,
-            set = function(key,value)
-                self.media.shared.font[template][key[#key]] = value;
-                if(groupCount == 1) then
-                    self:StaticPopup_Show("RL_CLIENT")
-                else
-                    self.Events:Trigger("FONT_GROUP_UPDATED", template);
-                end
-            end,
-            args = {
-                description = {
-                    order = 1,
-                    name = info.desc,
-                    type = "description",
-                    width = "full",
-                },
-                spacer1 = {
-                    order = 2,
-                    name = "",
-                    type = "description",
-                    width = "full",
-                },
-                spacer2 = {
-                    order = 3,
-                    name = "",
-                    type = "description",
-                    width = "full",
-                },
-                file = {
-                    type = "select",
-                    dialogControl = 'LSM30_Font',
-                    order = 4,
-                    name = self.L["Font File"],
-                    desc = self.L["Set the font file to use with this font-type."],
-                    values = _G.AceGUIWidgetLSMlists.font,
-                },
-                outline = {
-                    order = 5,
-                    name = self.L["Font Outline"],
-                    desc = self.L["Set the outlining to use with this font-type."],
-                    type = "select",
-                    values = {
-                        ["NONE"] = self.L["None"],
-                        ["OUTLINE"] = "OUTLINE",
-                        ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
-                        ["THICKOUTLINE"] = "THICKOUTLINE"
-                    },
-                },
-                size = {
-                    order = 6,
-                    name = self.L["Font Size"],
-                    desc = self.L["Set the font size to use with this font-type."],
-                    type = "range",
-                    min = 6,
-                    max = 64,
-                    step = 1,
-                },
-            }
-        }
-    end
-end
-
 --[[ EVENT HANDLERS ]]--

 function SV:PLAYER_ENTERING_WORLD()
diff --git a/SVUI_!Core/system/layout.lua b/SVUI_!Core/system/layout.lua
index ed1377e..11ca31e 100644
--- a/SVUI_!Core/system/layout.lua
+++ b/SVUI_!Core/system/layout.lua
@@ -811,32 +811,22 @@ function Layout:Update()
 	end
 end

-function Layout:Toggle(isConfigMode)
+function Layout:Toggle()
 	if(InCombatLockdown()) then return end
 	local enabled = false;
-	if((isConfigMode ~= nil) and (isConfigMode ~= "")) then
-		SV.ConfigurationMode = isConfigMode
+	local aceConfig = LibStub("AceConfigDialog-1.0")
+	if(aceConfig and SV.OptionsLoaded) then
+		SV.OptionsStandby = nil
+		aceConfig:Close(SV.NameID)
+		GameTooltip:Hide()
 	end
-
-	if(not SV.ConfigurationMode) then
-		if(SV.OptionsLoaded) then
-			LibStub("AceConfigDialog-1.0"):Close(SV.NameID)
-			GameTooltip:Hide()
-			SV.ConfigurationMode = true
-		else
-			SV.ConfigurationMode = false
-		end
-	else
-		SV.ConfigurationMode = false
-	end
-
+	SVUI_LayoutPrecision:Hide()
 	if(self:IsShown()) then
 		self:Hide()
 	else
 		self:Show()
 		enabled = true
 	end
-
 	for frameName, _ in pairs(self.Frames)do
 		if(_G[frameName]) then
 			local movable = _G[frameName]
@@ -929,7 +919,7 @@ SCRIPT AND EVENT HANDLERS
 local XML_Layout_OnEvent = function(self)
 	if self:IsShown() then
 		self:Hide()
-		Layout:Toggle(true)
+		Layout:Toggle()
 	end
 end

@@ -944,7 +934,7 @@ end

 local XML_LayoutLockButton_OnClick = function(self)
 	Graph:Toggle()
-	Layout:Toggle(true)
+	Layout:Toggle()
 	if(SV.OptionsLoaded) then
 		LibStub("AceConfigDialog-1.0"):Open(SV.NameID)
 	end
@@ -1410,8 +1400,8 @@ function SV:ReAnchor(name, ...)
 	SaveAnchor(frame.Grip.name)
 end

-function SV:MoveAnchors(arg)
-	Layout:Toggle(arg)
+function SV:MoveAnchors()
+	Layout:Toggle()
 end

 function SV:UpdateAnchors()
diff --git a/SVUI_!Core/system/media.lua b/SVUI_!Core/system/media.lua
index 87ec816..8021944 100644
--- a/SVUI_!Core/system/media.lua
+++ b/SVUI_!Core/system/media.lua
@@ -830,6 +830,98 @@ end

 SV.Events:On("ALL_FONTS_UPDATED", UpdateAllFontTemplates, true);
 SV.Events:On("FONT_GROUP_UPDATED", UpdateFontGroup, true);
+
+function SV:GenerateFontOptionGroup(groupName, groupCount, groupOverview, groupList)
+    self.Options.args.Fonts.args.fontGroup.args[groupName] = {
+        order = groupCount,
+        type = "group",
+        name = groupName,
+        args = {
+            overview = {
+                order = 1,
+                name = groupOverview,
+                type = "description",
+                width = "full",
+            },
+            spacer0 = {
+                order = 2,
+                name = "",
+                type = "description",
+                width = "full",
+            },
+        },
+    };
+
+    local orderCount = 3;
+    for template, info in pairs(groupList) do
+        self.Options.args.Fonts.args.fontGroup.args[groupName].args[template] = {
+            order = orderCount + info.order,
+            type = "group",
+            guiInline = true,
+            name = info.name,
+            get = function(key)
+                return self.media.shared.font[template][key[#key]]
+            end,
+            set = function(key,value)
+                self.media.shared.font[template][key[#key]] = value;
+                if(groupCount == 1) then
+                    self:StaticPopup_Show("RL_CLIENT")
+                else
+                    self.Events:Trigger("FONT_GROUP_UPDATED", template);
+                end
+            end,
+            args = {
+                description = {
+                    order = 1,
+                    name = info.desc,
+                    type = "description",
+                    width = "full",
+                },
+                spacer1 = {
+                    order = 2,
+                    name = "",
+                    type = "description",
+                    width = "full",
+                },
+                spacer2 = {
+                    order = 3,
+                    name = "",
+                    type = "description",
+                    width = "full",
+                },
+                file = {
+                    type = "select",
+                    dialogControl = 'LSM30_Font',
+                    order = 4,
+                    name = self.L["Font File"],
+                    desc = self.L["Set the font file to use with this font-type."],
+                    values = _G.AceGUIWidgetLSMlists.font,
+                },
+                outline = {
+                    order = 5,
+                    name = self.L["Font Outline"],
+                    desc = self.L["Set the outlining to use with this font-type."],
+                    type = "select",
+                    values = {
+                        ["NONE"] = self.L["None"],
+                        ["OUTLINE"] = "OUTLINE",
+                        ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
+                        ["THICKOUTLINE"] = "THICKOUTLINE"
+                    },
+                },
+                size = {
+                    order = 6,
+                    name = self.L["Font Size"],
+                    desc = self.L["Set the font size to use with this font-type."],
+                    type = "range",
+                    min = 6,
+                    max = 64,
+                    step = 1,
+                },
+            }
+        }
+    end
+end
 --[[
 ##########################################################
 MEDIA CORE
diff --git a/SVUI_!Options/SVUI_!Options.lua b/SVUI_!Options/SVUI_!Options.lua
index 3a8ed16..8934dd3 100644
--- a/SVUI_!Options/SVUI_!Options.lua
+++ b/SVUI_!Options/SVUI_!Options.lua
@@ -1307,11 +1307,11 @@ SV.Options.args.Fonts = {
 	}
 }
 SV.Options.args.Dock = {
-  	type = "group",
-  	order = 5,
-  	name = SV.Dock.TitleID,
-  	args = {
-	  	intro = {
+	type = "group",
+	order = 5,
+	name = SV.Dock.TitleID,
+	args = {
+  	intro = {
 			order = 1,
 			type = "description",
 			name = "Configure the various frame docks around the screen"
diff --git a/SVUI_FightOMatic/SVUI_FightOMatic.lua b/SVUI_FightOMatic/SVUI_FightOMatic.lua
index 379c8da..98b3da3 100644
--- a/SVUI_FightOMatic/SVUI_FightOMatic.lua
+++ b/SVUI_FightOMatic/SVUI_FightOMatic.lua
@@ -589,10 +589,11 @@ function PLUGIN:UpdateZoneStatus()
 end

 local function ParseIncomingLog(timestamp, event, eGuid, eName, pGuid)
-	local cached = PLUGIN.public[eGuid]
+	local cached;
 	local kos, needsUpdate = false, false

-	if(cached) then
+	if(PLUGIN.public[eGuid]) then
+		cached = PLUGIN.public[eGuid]
 		kos = true
 	else
 		cached = EnemyCache[eGuid]
diff --git a/SVUI_QuestTracker/Loader.lua b/SVUI_QuestTracker/Loader.lua
index b46d172..3fec7c3 100644
--- a/SVUI_QuestTracker/Loader.lua
+++ b/SVUI_QuestTracker/Loader.lua
@@ -24,7 +24,10 @@ MOD.media.completeIcon = [[Interface\AddOns\SVUI_QuestTracker\assets\QUEST-COMPL
 MOD.media.incompleteIcon = [[Interface\AddOns\SVUI_QuestTracker\assets\QUEST-INCOMPLETE-ICON]];

 SV.defaults[Schema] = {
+	["rowHeight"] = 0,
 	["itemBarDirection"] = 'VERTICAL',
+	["itemButtonSize"] = 28,
+	["itemButtonsPerRow"] = 5,
 };

 SV:AssignMedia("font", "questdialog", "SVUI Default Font", 12, "OUTLINE");
@@ -60,17 +63,65 @@ function MOD:LoadOptions()
 		type = "group",
 		name = Schema,
 		get = function(a)return SV.db[Schema][a[#a]] end,
-		set = function(a,b)MOD:ChangeDBVar(b,a[#a]); SV:StaticPopup_Show("RL_CLIENT") end,
+		set = function(a,b)
+			MOD:ChangeDBVar(b,a[#a]);
+			--MOD:UpdateLocals();
+		end,
 		args = {
-			itemBarDirection = {
+			generalGroup = {
 				order = 1,
-				type = 'select',
-				name = L["Item Bar Direction"],
-				values = {
-					['VERTICAL'] = L['Vertical'],
-					['HORIZONTAL'] = L['Horizontal']
-				},
+				type = "group",
+				name = "General",
+				guiInline = true,
+				args = {
+					rowHeight = {
+						order = 1,
+						type = 'range',
+						name = L["Row Height"],
+						desc = L["Setting this to 0 (zero) will force an automatic size"],
+						min = 0,
+						max = 50,
+						step = 1,
+						width = "full",
+					},
+				}
 			},
+			itemsGroup = {
+				order = 2,
+				type = "group",
+				name = "Quest Items",
+				guiInline = true,
+				args = {
+					itemBarDirection = {
+						order = 1,
+						type = 'select',
+						name = L["Bar Direction"],
+						values = {
+							['VERTICAL'] = L['Vertical'],
+							['HORIZONTAL'] = L['Horizontal']
+						},
+					},
+					itemButtonSize = {
+						order = 2,
+						type = 'range',
+						name = L["Button Size"],
+						min = 10,
+						max = 100,
+						step = 1,
+						width = "full",
+					},
+					itemButtonsPerRow = {
+						order = 3,
+						type = 'range',
+						name = L["Buttons Per Row"],
+						desc = L["This will only take effect if you have moved the item bar away from the dock."],
+						min = 1,
+						max = 20,
+						step = 1,
+						width = "full",
+					},
+				}
+			}
 		}
 	}
 end
diff --git a/SVUI_QuestTracker/SVUI_QuestTracker.lua b/SVUI_QuestTracker/SVUI_QuestTracker.lua
index 140f1a2..9069b19 100644
--- a/SVUI_QuestTracker/SVUI_QuestTracker.lua
+++ b/SVUI_QuestTracker/SVUI_QuestTracker.lua
@@ -419,7 +419,9 @@ end

 function MOD:UpdateLocals()
 	ROW_WIDTH = self.Docklet.ScrollFrame:GetWidth();
-	ROW_HEIGHT = SV.media.shared.font.questdialog.size / 0.55;
+	local baseWidth = SV.db.QuestTracker.rowHeight;
+	local calculated = SV.media.shared.font.questdialog.size / 0.55;
+	ROW_HEIGHT = (baseWidth == 0) and calculated or baseWidth;
 	INNER_HEIGHT = ROW_HEIGHT - 4;
 	LARGE_ROW_HEIGHT = ROW_HEIGHT * 2;
 	LARGE_INNER_HEIGHT = LARGE_ROW_HEIGHT - 4;
diff --git a/SVUI_QuestTracker/components/quests.lua b/SVUI_QuestTracker/components/quests.lua
index b6c04a0..9a0674b 100644
--- a/SVUI_QuestTracker/components/quests.lua
+++ b/SVUI_QuestTracker/components/quests.lua
@@ -48,6 +48,8 @@ local MOD = SV.QuestTracker;
 LOCALS
 ##########################################################
 ]]--
+local ITEM_BUTTON_SIZE = 28;
+local ITEMS_PER_ROW = 5;
 local ROW_WIDTH = 300;
 local ROW_HEIGHT = 20;
 local QUEST_ROW_HEIGHT = ROW_HEIGHT + 2;
@@ -119,16 +121,10 @@ do
             GameTooltip:SetOwner(self, 'ANCHOR_LEFT')
             GameTooltip:SetHyperlink(self.itemLink)
         end
-        if(self.___overflow) then
-            self:FadeIn()
-        end
     end

     local Button_OnLeave = function(self)
     	GameTooltip_Hide()
-        if(self.___overflow) then
-            self:FadeOut()
-        end
     end

     local Button_OnEvent = function(self, event)
@@ -237,57 +233,57 @@ do

     CreateQuestItemButton = function(index)
     	local buttonName = "SVUI_QuestButton" .. index
-        local itembutton = CreateFrame('Button', buttonName, UIParent, 'SecureActionButtonTemplate, SecureHandlerStateTemplate, SecureHandlerAttributeTemplate');
-        itembutton:SetAlpha(0);
-        itembutton:SetStyle("Icon");
-        itembutton:SetSize(28, 28);
-        itembutton:SetID(index);
-        itembutton.___overflow = false;
-        itembutton.SetUsage = Button_SetItem;
-        itembutton.ClearUsage = Button_ClearItem;
-        itembutton.Update = Button_UpdateItem;
-        itembutton.UpdateCooldown = Button_UpdateCooldown;
-
-        local Icon = itembutton:CreateTexture('$parentIcon', 'BACKGROUND')
-        Icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS))
-        Icon:SetAllPoints()
-        itembutton.Icon = Icon
-
-        local Cooldown = CreateFrame('Cooldown', '$parentCooldown', itembutton, 'CooldownFrameTemplate')
-        Cooldown:ClearAllPoints()
-        Cooldown:SetPoint('TOPRIGHT', -2, -3)
-        Cooldown:SetPoint('BOTTOMLEFT', 2, 1)
-        Cooldown:Hide()
-        itembutton.Cooldown = Cooldown
-
-        --RegisterStateDriver(itembutton, 'visible', '[petbattle] hide; show')
-        itembutton:SetAttribute('type', 'item');
-        itembutton:SetAttribute('_onattributechanged', [[
-            if(name == 'item') then
-                if(value and not self:IsShown()) then
-                    self:Show()
-                    self:SetAlpha(1)
-                elseif(not value) then
-                	self:SetAlpha(0)
-                    self:Hide()
-                end
-            end
-        ]]);
-
-        itembutton:SetScript('OnEnter', Button_OnEnter);
-        itembutton:SetScript('OnLeave', Button_OnLeave);
-
-        itembutton:RegisterEvent('UPDATE_EXTRA_ACTIONBAR');
-		itembutton:RegisterEvent('BAG_UPDATE_COOLDOWN');
-		itembutton:RegisterEvent('BAG_UPDATE_DELAYED');
-		itembutton:RegisterEvent('WORLD_MAP_UPDATE');
-		itembutton:RegisterEvent('QUEST_LOG_UPDATE');
-		itembutton:RegisterEvent('QUEST_POI_UPDATE');
-        itembutton:SetScript('OnEvent', Button_OnEvent);
-
-        SV:ManageVisibility(itembutton)
-
-        return itembutton
+      local itembutton = CreateFrame('Button', buttonName, UIParent, 'SecureActionButtonTemplate, SecureHandlerStateTemplate, SecureHandlerAttributeTemplate');
+      itembutton:SetAlpha(0);
+      itembutton:SetStyle("!_ActionSlot");
+      itembutton:SetSize(ITEM_BUTTON_SIZE, ITEM_BUTTON_SIZE);
+      itembutton:SetID(index);
+      itembutton.___overflow = false;
+      itembutton.SetUsage = Button_SetItem;
+      itembutton.ClearUsage = Button_ClearItem;
+      itembutton.Update = Button_UpdateItem;
+      itembutton.UpdateCooldown = Button_UpdateCooldown;
+
+      local Icon = itembutton:CreateTexture('$parentIcon', 'BACKGROUND')
+      Icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS))
+      Icon:SetAllPoints()
+      itembutton.Icon = Icon
+
+      local Cooldown = CreateFrame('Cooldown', '$parentCooldown', itembutton, 'CooldownFrameTemplate')
+      Cooldown:ClearAllPoints()
+      Cooldown:SetPoint('TOPRIGHT', -2, -3)
+      Cooldown:SetPoint('BOTTOMLEFT', 2, 1)
+      Cooldown:Hide()
+      itembutton.Cooldown = Cooldown
+
+      --RegisterStateDriver(itembutton, 'visible', '[petbattle] hide; show')
+      itembutton:SetAttribute('type', 'item');
+      itembutton:SetAttribute('_onattributechanged', [[
+          if(name == 'item') then
+              if(value and not self:IsShown()) then
+                  self:Show()
+                  self:SetAlpha(1)
+              elseif(not value) then
+              	self:SetAlpha(0)
+                  self:Hide()
+              end
+          end
+      ]]);
+
+      itembutton:SetScript('OnEnter', Button_OnEnter);
+      itembutton:SetScript('OnLeave', Button_OnLeave);
+
+      itembutton:RegisterEvent('UPDATE_EXTRA_ACTIONBAR');
+			itembutton:RegisterEvent('BAG_UPDATE_COOLDOWN');
+			itembutton:RegisterEvent('BAG_UPDATE_DELAYED');
+			itembutton:RegisterEvent('WORLD_MAP_UPDATE');
+			itembutton:RegisterEvent('QUEST_LOG_UPDATE');
+			itembutton:RegisterEvent('QUEST_POI_UPDATE');
+      itembutton:SetScript('OnEvent', Button_OnEvent);
+
+      SV:ManageVisibility(itembutton)
+
+      return itembutton
     end

     function ItemBar:SetQuestItem(itemLink, texture, completed)
@@ -359,25 +355,40 @@ function ItemBar:Update()
 	local isHorizontal = (SV.db.QuestTracker.itemBarDirection == 'HORIZONTAL');
 	local anchor1 = isHorizontal and "LEFT" or "TOP";
 	local anchor2 = isHorizontal and "RIGHT" or "BOTTOM";
+	local switch1 = isHorizontal and "BOTTOM" or "RIGHT";
+	local switch2 = isHorizontal and "TOP" or "LEFT";
 	local xOff = isHorizontal and 2 or 0;
 	local yOff = isHorizontal and 0 or -2;
+	local xChange = isHorizontal and 0 or -2;
+	local yChange = isHorizontal and 2 or 0;

-	local itemScale = firstButton:GetHeight() + 2
-	local dockWidth,dockHeight = MOD.Docklet:GetSize()
-	local maxLength = isHorizontal and (dockWidth / itemScale) or (dockHeight / itemScale);
+	local itemScale = ITEM_BUTTON_SIZE + 2;
+	if(self.Grip and (not self.Grip:HasMoved())) then
+		local dockWidth,dockHeight = MOD.Docklet:GetSize()
+		ITEMS_PER_ROW = isHorizontal and (dockWidth / itemScale) or (dockHeight / itemScale);
+	end

 	firstButton:ClearAllPoints();

 	if(dockletLocation:find('Left')) then
 		anchor1 = isHorizontal and "RIGHT" or "TOP";
 		anchor2 = isHorizontal and "LEFT" or "BOTTOM";
+		switch1 = isHorizontal and "BOTTOM" or "LEFT";
+		switch2 = isHorizontal and "TOP" or "RIGHT";
 		xOff = isHorizontal and -2 or 0;
+		xChange = isHorizontal and 0 or 2;
 	end

-	if(dockletLocation:find('Top') and (not isHorizontal)) then
-		anchor1 = "BOTTOM";
-		anchor2 = "TOP";
-		yOff = 2;
+	if(dockletLocation:find('Top')) then
+		if(not isHorizontal) then
+			anchor1 = "BOTTOM";
+			anchor2 = "TOP";
+			yOff = 2;
+		else
+			switch1 = "TOP";
+			switch2 = "BOTTOM";
+			yChange = -2;
+		end
 	end

 	if(isHorizontal) then
@@ -397,21 +408,21 @@ function ItemBar:Update()
 		itemLink = button.itemLink;

 		button:ClearAllPoints();
+		button:SetSize(ITEM_BUTTON_SIZE, ITEM_BUTTON_SIZE);
 		if(button:IsShown()) then
 			totalShown = totalShown + 1;
-			if(totalShown > maxLength) then
-				if(totalShown == (maxLength + 1)) then
-					button:SetPoint(anchor1, firstButton, anchor2, xOff, yOff)
+			if(totalShown == (ITEMS_PER_ROW + 1)) then
+				totalShown = 1;
+				local lastRowButton = self.Buttons[i - ITEMS_PER_ROW];
+				if(lastRowButton) then
+					button:SetPoint(switch1, lastRowButton, switch2, xChange, yChange)
 				else
-					button:SetPoint(anchor1, lastButton, anchor2, xOff, yOff)
+					button:SetPoint(switch1, firstButton, switch2, xChange, yChange)
 				end
-				button.___overflow = true;
-				button:FadeOut();
 			else
 				button:SetPoint(anchor2, lastButton, anchor1, xOff, -yOff)
-				button.___overflow = false;
-				button:FadeIn();
 			end
+			button:FadeIn();
 			lastButton = button

 			if(itemLink) then
@@ -1125,11 +1136,6 @@ function MOD:UpdateObjectives(event, ...)
 	end
 end

-local function UpdateQuestLocals(...)
-	ROW_WIDTH, ROW_HEIGHT, INNER_HEIGHT, LARGE_ROW_HEIGHT, LARGE_INNER_HEIGHT = ...;
-	QUEST_ROW_HEIGHT = ROW_HEIGHT + 2;
-end
-
 local function ReAnchorItemBar()
 	local dockletLocation = MOD.Docklet.Parent.Bar.Data.Location;
 	local isHorizontal = (SV.db.QuestTracker.itemBarDirection == 'HORIZONTAL');
@@ -1168,6 +1174,15 @@ local function ReAnchorItemBar()
 	end
 end

+local function UpdateQuestLocals(...)
+	ROW_WIDTH, ROW_HEIGHT, INNER_HEIGHT, LARGE_ROW_HEIGHT, LARGE_INNER_HEIGHT = ...;
+	QUEST_ROW_HEIGHT = ROW_HEIGHT + 2;
+	ITEM_BUTTON_SIZE = SV.db.QuestTracker.itemButtonSize;
+	ITEMS_PER_ROW = SV.db.QuestTracker.itemButtonsPerRow;
+	ReAnchorItemBar();
+
+end
+
 local function PostMoveCallback(buttonName)
 	if(not buttonName or (buttonName ~= MOD.Docklet.Button:GetName())) then return end
 	if(ItemBar.Grip and (not ItemBar.Grip:HasMoved())) then
diff --git a/SVUI_Skins/components/blizzard/garrison.lua b/SVUI_Skins/components/blizzard/garrison.lua
index 9afcbc8..92ece3c 100644
--- a/SVUI_Skins/components/blizzard/garrison.lua
+++ b/SVUI_Skins/components/blizzard/garrison.lua
@@ -287,6 +287,39 @@ local function StyleListButtons(parent)
     end
 end

+local function StyleMissionComplete(parentFrame)
+	local mComplete = parentFrame.MissionComplete;
+	local mStage = mComplete.Stage;
+	local mFollowers = mStage.FollowersFrame;
+
+	mComplete:RemoveTextures()
+	mComplete:SetStyle("Frame", 'Paper', false, 4, 0, 0)
+	mComplete:SetPanelColor("special")
+	mStage:RemoveTextures()
+	mStage.MissionInfo:RemoveTextures()
+
+	if(mFollowers.Follower1 and mFollowers.Follower1.PortraitFrame) then
+		StyleFollowerPortrait(mFollowers.Follower1.PortraitFrame)
+	end
+	if(mFollowers.Follower2 and mFollowers.Follower2.PortraitFrame) then
+		StyleFollowerPortrait(mFollowers.Follower2.PortraitFrame)
+	end
+	if(mFollowers.Follower3 and mFollowers.Follower3.PortraitFrame) then
+		StyleFollowerPortrait(mFollowers.Follower3.PortraitFrame)
+	end
+
+	AddFadeBanner(mStage)
+	mComplete.NextMissionButton:RemoveTextures(true)
+	mComplete.NextMissionButton:SetStyle("Button")
+
+	local completedBG = CreateFrame("Frame", nil, parentFrame.MissionCompleteBackground)
+	completedBG:SetAllPoints(parentFrame.Panel)
+	local completedBGTex = completedBG:CreateTexture(nil, "BACKGROUND")
+	completedBGTex:SetAllPoints(completedBG)
+	completedBGTex:SetTexture(0,0,0,0.8)
+	parentFrame.MissionCompleteBackground:DisableDrawLayer("BACKGROUND")
+end
+
 local _hook_GarrisonMissionFrame_CheckRewardButtons = function(rewards)
 	StyleRewardButtons(rewards);
 end
@@ -421,13 +454,6 @@ local function LoadGarrisonStyle()
 	GarrisonMissionFrameMissions.CompleteDialog.BorderFrame.ViewButton:RemoveTextures(true)
 	GarrisonMissionFrameMissions.CompleteDialog.BorderFrame.ViewButton:SetStyle("Button")

-	local completedBG = CreateFrame("Frame", nil, GarrisonMissionFrame.MissionCompleteBackground)
-	completedBG:SetAllPoints(GarrisonMissionFrame.Panel)
-	local completedBGTex = completedBG:CreateTexture(nil, "BACKGROUND")
-	completedBGTex:SetAllPoints(completedBG)
-	completedBGTex:SetTexture(0,0,0,0.8)
-	GarrisonMissionFrame.MissionCompleteBackground:DisableDrawLayer("BACKGROUND")
-
 	GarrisonMissionFrameMissions.MaterialFrame:RemoveTextures()
 	GarrisonMissionFrameMissions.MaterialFrame:SetStyle("Frame", "Inset", true, 1, -3, -3)

@@ -463,29 +489,7 @@ local function LoadGarrisonStyle()
 	GarrisonMissionFrameFollowers.MaterialFrame:RemoveTextures()
 	GarrisonMissionFrameFollowers.MaterialFrame:SetStyle("Frame", "Inset", true, 1, -5, -7)

-	local mComplete = GarrisonMissionFrame.MissionComplete;
-	local mStage = mComplete.Stage;
-	local mFollowers = mStage.FollowersFrame;
-
-	mComplete:RemoveTextures()
-	mComplete:SetStyle("Frame", 'Paper', false, 4, 0, 0)
-	mComplete:SetPanelColor("special")
-	mStage:RemoveTextures()
-	mStage.MissionInfo:RemoveTextures()
-
-	if(mFollowers.Follower1 and mFollowers.Follower1.PortraitFrame) then
-		StyleFollowerPortrait(mFollowers.Follower1.PortraitFrame)
-	end
-	if(mFollowers.Follower2 and mFollowers.Follower2.PortraitFrame) then
-		StyleFollowerPortrait(mFollowers.Follower2.PortraitFrame)
-	end
-	if(mFollowers.Follower3 and mFollowers.Follower3.PortraitFrame) then
-		StyleFollowerPortrait(mFollowers.Follower3.PortraitFrame)
-	end
-
-	AddFadeBanner(mStage)
-	mComplete.NextMissionButton:RemoveTextures(true)
-	mComplete.NextMissionButton:SetStyle("Button")
+	StyleMissionComplete(GarrisonMissionFrame)

 	local a1, p, a2, x, y = GarrisonMissionFrameMissionsTab1:GetPoint()
 	GarrisonMissionFrameMissionsTab1:SetPoint(a1, p, a2, x, (y + 8))
@@ -591,6 +595,24 @@ local function LoadGarrisonStyle()
 	hooksecurefunc("GarrisonRecruitSelectFrame_UpdateRecruits", _hook_GarrisonRecruitSelectFrame_UpdateRecruits)
 	--[[
 	##############################################################################
+	SHIPYARD FRAME
+	##############################################################################
+	--]]
+	SV.API:Set("Window", GarrisonShipyardFrame, true)
+
+	GarrisonShipyardFrame.FollowerList:RemoveTextures()
+	GarrisonShipyardFrame.FollowerList:SetStyle("Frame", 'Inset', false, 4, 0, 0)
+	GarrisonShipyardFrame.MissionTab:RemoveTextures()
+	GarrisonShipyardFrame.MissionTab.MissionPage:RemoveTextures()
+	GarrisonShipyardFrame.MissionTab.MissionPage:SetStyle("Frame", 'Paper', false, 4, 0, 0)
+	GarrisonShipyardFrame.MissionTab.MissionPage:SetPanelColor("special")
+	GarrisonShipyardFrame.FollowerTab:RemoveTextures()
+	SV.API:Set("Skin", GarrisonShipyardFrame.FollowerTab, 12, 0, -2, 30)
+	StyleMissionComplete(GarrisonShipyardFrame)
+	SV.API:Set("Tab",GarrisonShipyardFrameTab1)
+	SV.API:Set("Tab",GarrisonShipyardFrameTab2)
+	--[[
+	##############################################################################
 	FOLLOWER HOOKS
 	##############################################################################
 	--]]
diff --git a/SVUI_UnitFrames/Loader.lua b/SVUI_UnitFrames/Loader.lua
index 56cf7d0..8348457 100644
--- a/SVUI_UnitFrames/Loader.lua
+++ b/SVUI_UnitFrames/Loader.lua
@@ -69,7 +69,6 @@ MOD.media.lml = [[Interface\AddOns\SVUI_UnitFrames\assets\UNIT-LML]];
 MOD.media.roles = [[Interface\AddOns\SVUI_UnitFrames\assets\UNIT-ROLES]];
 MOD.media.buddy = [[Interface\AddOns\SVUI_UnitFrames\assets\UNIT-FRIENDSHIP]];
 MOD.media.playerstate = [[Interface\AddOns\SVUI_UnitFrames\assets\UNIT-PLAYER-STATE]];
-MOD.media.afflicted = [[Interface\AddOns\SVUI_UnitFrames\assets\UNIT-AFFLICTED]];

 SV:AssignMedia("font", "unitprimary", "SVUI Number Font", 11, "OUTLINE");
 SV:AssignMedia("font", "unitsecondary", "SVUI Number Font", 11, "OUTLINE");
diff --git a/SVUI_UnitFrames/SVUI_UnitFrames.lua b/SVUI_UnitFrames/SVUI_UnitFrames.lua
index d4c4593..5373521 100644
--- a/SVUI_UnitFrames/SVUI_UnitFrames.lua
+++ b/SVUI_UnitFrames/SVUI_UnitFrames.lua
@@ -1330,12 +1330,12 @@ end

 function MOD:CanClassDispel()
 	if RefMagicSpec then
-        if(GetTalentInfo(RefMagicSpec)) then
-            self.Dispellable["Magic"] = true
-        elseif(self.Dispellable["Magic"]) then
-            self.Dispellable["Magic"] = nil
-        end
+    if(GetTalentInfo(RefMagicSpec)) then
+      self.Dispellable["Magic"] = true
+    elseif(self.Dispellable["Magic"]) then
+      self.Dispellable["Magic"] = nil
     end
+  end
 end

 function MOD:SPELLS_CHANGED()
diff --git a/SVUI_UnitFrames/elements/auras.lua b/SVUI_UnitFrames/elements/auras.lua
index 26672a2..81b015f 100644
--- a/SVUI_UnitFrames/elements/auras.lua
+++ b/SVUI_UnitFrames/elements/auras.lua
@@ -113,38 +113,38 @@ local CreateAuraIcon = function(icons, index)
 	aura:SetHeight(baseSize)

 	aura:SetBackdrop({
-    	bgFile = [[Interface\BUTTONS\WHITE8X8]],
+    bgFile = [[Interface\BUTTONS\WHITE8X8]],
 		tile = false,
 		tileSize = 0,
 		edgeFile = [[Interface\BUTTONS\WHITE8X8]],
-        edgeSize = 1,
-        insets = {
-            left = 0,
-            right = 0,
-            top = 0,
-            bottom = 0
-        }
-    })
-    aura:SetBackdropColor(0, 0, 0, 0)
-    aura:SetBackdropBorderColor(0, 0, 0)
-
-    local bg = CreateFrame("Frame", nil, aura)
-    bg:SetFrameStrata("BACKGROUND")
-    bg:SetFrameLevel(0)
-    bg:WrapPoints(aura, 2, 2)
-    bg:SetBackdrop(SV.media.backdrop.aura)
-    bg:SetBackdropColor(0, 0, 0, 0)
-    bg:SetBackdropBorderColor(0, 0, 0, 0)
-    aura.bg = bg;
-
-    --hooksecurefunc(aura, "SetBackdropBorderColor", _hook_AuraBGBorderColor)
-
-    local fontgroup = "SVUI_Font_UnitAura";
-    if(baseSize < 18) then
-    	fontgroup = "SVUI_Font_UnitAura_Small";
-    end
-    --print(baseSize)
-    --print(fontgroup)
+      edgeSize = 1,
+      insets = {
+          left = 0,
+          right = 0,
+          top = 0,
+          bottom = 0
+      }
+  });
+  aura:SetBackdropColor(0, 0, 0, 0)
+  aura:SetBackdropBorderColor(0, 0, 0)
+
+  local bg = CreateFrame("Frame", nil, aura)
+  bg:SetFrameStrata("BACKGROUND")
+  bg:SetFrameLevel(0)
+  bg:WrapPoints(aura, 2, 2)
+  bg:SetBackdrop(SV.media.backdrop.aura)
+  bg:SetBackdropColor(0, 0, 0, 0)
+  bg:SetBackdropBorderColor(0, 0, 0, 0)
+  aura.bg = bg;
+
+  --hooksecurefunc(aura, "SetBackdropBorderColor", _hook_AuraBGBorderColor)
+
+  local fontgroup = "SVUI_Font_UnitAura";
+  if(baseSize < 18) then
+  	fontgroup = "SVUI_Font_UnitAura_Small";
+  end
+  --print(baseSize)
+  --print(fontgroup)

 	local cd = CreateFrame("Cooldown", nil, aura, "CooldownFrameTemplate");
 	cd:InsetPoints(aura, 1, 1);
@@ -154,7 +154,7 @@ local CreateAuraIcon = function(icons, index)
 	cd:SetHideCountdownNumbers(true);

 	local fg = CreateFrame("Frame", nil, aura)
-    fg:WrapPoints(aura, 2, 2)
+  fg:WrapPoints(aura, 2, 2)

 	local text = fg:CreateFontString(nil, 'OVERLAY');
 	text:SetFontObject(_G[fontgroup]);
@@ -168,7 +168,7 @@ local CreateAuraIcon = function(icons, index)
 	local icon = aura:CreateTexture(nil, "BACKGROUND");
 	icon:SetAllPoints(aura);
 	icon:InsetPoints(aura, 1, 1);
-    icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS));
+  icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS));

 	local overlay = aura:CreateTexture(nil, "OVERLAY");
 	overlay:InsetPoints(aura, 1, 1);
diff --git a/SVUI_UnitFrames/elements/misc.lua b/SVUI_UnitFrames/elements/misc.lua
index 4a387cc..8aab045 100644
--- a/SVUI_UnitFrames/elements/misc.lua
+++ b/SVUI_UnitFrames/elements/misc.lua
@@ -52,6 +52,8 @@ assert(oUF_SVUI, "SVUI UnitFrames: unable to locate oUF.")
 LOCAL VARIABLES
 ##########################################################
 ]]--
+local AFFLICTED_SKIN = [[Interface\AddOns\SVUI_!Core\assets\textures\Affected\AFFECTED1]];
+
 local ROLE_ICON_DATA = {
 	["TANK"] = {0,0.5,0,0.5, 0.5,0.75,0.51,0.75},
 	["HEALER"] = {0,0.5,0.5,1, 0.5,0.75,0.76,1},
@@ -105,7 +107,7 @@ function MOD:CreateAfflicted(frame)
 	afflicted:SetPoint("BOTTOMRIGHT", frame.Health, "BOTTOMRIGHT", 0, 0)
 	afflicted.Texture = afflicted:CreateTexture(nil, "OVERLAY", nil, 7)
 	afflicted.Texture:SetAllPoints(afflicted)
-	afflicted.Texture:SetTexture(MOD.media.afflicted)
+	afflicted.Texture:SetTexture(AFFLICTED_SKIN)
 	afflicted.Texture:SetVertexColor(0, 0, 0, 0)
 	afflicted.Texture:SetBlendMode("ADD")
 	afflicted.ClassFilter = true
diff --git a/SVUI_UnitFrames/frames.lua b/SVUI_UnitFrames/frames.lua
index 66c7ac0..227ef9d 100644
--- a/SVUI_UnitFrames/frames.lua
+++ b/SVUI_UnitFrames/frames.lua
@@ -655,7 +655,7 @@ BOSS
 local UpdateBossFrame = function(self)
     local db = SV.db.UnitFrames["boss"]
     local INDEX = self:GetID() or 1;
-    local holder = self.Grip
+    local holder = _G['SVUI_Boss1_MOVE']
     local UNIT_WIDTH = db.width;
     local UNIT_HEIGHT = db.height;

@@ -665,15 +665,7 @@ local UpdateBossFrame = function(self)
     self:SetSize(UNIT_WIDTH, UNIT_HEIGHT)
     self:ClearAllPoints()

-    if(tonumber(INDEX) == 1) then
-        holder:SetWidth(UNIT_WIDTH)
-        holder:SetHeight(UNIT_HEIGHT + (UNIT_HEIGHT + 12 + db.castbar.height) * 4)
-        if db.showBy == "UP"then
-            self:SetPoint("BOTTOMRIGHT", holder, "BOTTOMRIGHT")
-        else
-            self:SetPoint("TOPRIGHT", holder, "TOPRIGHT")
-        end
-    else
+    if(holder and (tonumber(INDEX) == 1)) then
         local yOffset = (UNIT_HEIGHT + 12 + db.castbar.height) * (INDEX - 1)
         if db.showBy == "UP"then
             self:SetPoint("BOTTOMRIGHT", holder, "BOTTOMRIGHT", 0, yOffset)
@@ -715,15 +707,15 @@ CONSTRUCTORS["boss"] = function(self, unit)
     self.Range = { insideAlpha = 1, outsideAlpha = 1 }
     self:SetAttribute("type2", "focus")

-    if(not self.Grip) then
+    if(not lastBossFrame) then
         self:SetPoint("RIGHT", SV.Screen, "RIGHT", -105, 0)
-        --SV:NewAnchor(self, L["Boss Frames"], nil, nil, "SVUI_Boss")
-        SV:NewAnchor(self, L["Boss Frames"])
-        SV:SetAnchorResizing(self, unitLayoutPostSizeFunc, 10, 500)
     else
         self:SetPoint("TOPRIGHT", lastBossFrame, "BOTTOMRIGHT", 0, -20)
     end

+    SV:NewAnchor(self, L["Boss Frames"])
+    SV:SetAnchorResizing(self, unitLayoutPostSizeFunc, 10, 500)
+
     self.MediaUpdate = MOD.RefreshUnitMedia
     self.Update = UpdateBossFrame
     lastBossFrame = self
@@ -737,7 +729,7 @@ ARENA
 local UpdateArenaFrame = function(self)
     local db = SV.db.UnitFrames["arena"]
     local INDEX = self:GetID() or 1;
-    local holder = self.Grip
+    local holder = _G['SVUI_Arena1_MOVE'];
     local UNIT_WIDTH = db.width;
     local UNIT_HEIGHT = db.height

@@ -749,15 +741,7 @@ local UpdateArenaFrame = function(self)

     self:ClearAllPoints()

-    if(tonumber(INDEX) == 1) then
-        holder:SetWidth(UNIT_WIDTH)
-        holder:SetHeight(UNIT_HEIGHT + (UNIT_HEIGHT + 12 + db.castbar.height) * 4)
-        if(db.showBy == "UP") then
-            self:SetPoint("BOTTOMRIGHT", holder, "BOTTOMRIGHT")
-        else
-            self:SetPoint("TOPRIGHT", holder, "TOPRIGHT")
-        end
-    else
+    if(holder and (tonumber(INDEX) > 1)) then
         local yOffset = (UNIT_HEIGHT + 12 + db.castbar.height) * (INDEX - 1)
         if(db.showBy == "UP") then
             self:SetPoint("BOTTOMRIGHT", holder, "BOTTOMRIGHT", 0, yOffset)
@@ -888,15 +872,15 @@ CONSTRUCTORS["arena"] = function(self, unit)
         prep:Hide()
     end

-    if(not self.Grip) then
+    if(not lastArenaFrame) then
         self:SetPoint("RIGHT", SV.Screen, "RIGHT", -105, 0)
-        --SV:NewAnchor(self, L["Arena Frames"], nil, nil, "SVUI_Arena")
-        SV:NewAnchor(self, L["Arena Frames"])
-        SV:SetAnchorResizing(self, unitLayoutPostSizeFunc, 10, 500)
     else
         self:SetPoint("TOPRIGHT", lastArenaFrame, "BOTTOMRIGHT", 0, -20)
     end

+    SV:NewAnchor(self, L["Arena Frames"])
+    SV:SetAnchorResizing(self, unitLayoutPostSizeFunc, 10, 500)
+
     self.MediaUpdate = MOD.RefreshUnitMedia
     self.Update = UpdateArenaFrame
     lastArenaFrame = self