Quantcast

aura filters fixed and new NPC models added

Steven Jackson [07-14-15 - 00:13]
aura filters fixed and new NPC models added
Filename
SVUI_!Core/system/api.lua
SVUI_!Core/system/core.lua
SVUI_!Core/system/funstuff.lua
SVUI_!Core/xml/widgets.xml
SVUI_!Options/SVUI_!Options.lua
SVUI_ActionBars/SVUI_ActionBars.lua
SVUI_Auras/components/procs.lua
SVUI_QuestTracker/components/button.lua
SVUI_Skins/components/blizzard/garrison.lua
SVUI_Skins/components/blizzard/misc.lua
SVUI_Skins/components/blizzard/quest.lua
SVUI_UnitFrames/elements/auras.lua
SVUI_UnitFrames/libs/Plugins/oUF_AdvancedAuras/oUF_AdvancedAuras.lua
SVUI_UnitFrames/libs/Plugins/oUF_AuraWatch/oUF_AuraWatch.lua
SVUI_UnitFrames/libs/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua
SVUI_UnitFrames/libs/oUF/elements/aura.lua
diff --git a/SVUI_!Core/system/api.lua b/SVUI_!Core/system/api.lua
index fdbddad..dce94ca 100644
--- a/SVUI_!Core/system/api.lua
+++ b/SVUI_!Core/system/api.lua
@@ -661,6 +661,8 @@ local function SetCD(button, noSwipe)
             cooldown:InsetPoints()
             cooldown:SetDrawEdge(false)
             cooldown:SetDrawBling(false)
+            cooldown:SetHideCountdownNumbers(true)
+            cooldown.SetHideCountdownNumbers = SV.fubar
             if(not noSwipe) then
                 cooldown:SetSwipeColor(0, 0, 0, 1)
             end
@@ -692,6 +694,8 @@ function MOD:CD(frame, noSwipe)
         cooldown:InsetPoints(frame, 1, 1)
         cooldown:SetDrawEdge(false)
         cooldown:SetDrawBling(false)
+        cooldown:SetHideCountdownNumbers(true)
+        cooldown.SetHideCountdownNumbers = SV.fubar
         if(not noSwipe) then
             cooldown:SetSwipeColor(0, 0, 0, 1)
         end
@@ -1484,6 +1488,9 @@ MOD.Concepts["Window"] = function(self, adjustable, frame, altStyle, fullStrip,
       RemoveTextures(frame.Inset, fullStrip)
       self.Methods["Frame"](self, frame.Inset, adjustable, "Inset", false, 3, 1, 1)
     end
+    if(frame.portrait) then
+        frame.portrait:Hide()
+    end
 end

 MOD.Concepts["Button"] = function(self, adjustable, frame)
diff --git a/SVUI_!Core/system/core.lua b/SVUI_!Core/system/core.lua
index 9dc9e81..6d87abb 100644
--- a/SVUI_!Core/system/core.lua
+++ b/SVUI_!Core/system/core.lua
@@ -366,6 +366,7 @@ SV.defaults           = {
     },
     ["FunStuff"] = {
         ["drunk"] = true,
+        ["NPC"] = true,
         ["comix"] = '1',
         ["comixLastState"] = '1',
         ["gamemenu"] = '1',
diff --git a/SVUI_!Core/system/funstuff.lua b/SVUI_!Core/system/funstuff.lua
index e59ab34..423fc2b 100644
--- a/SVUI_!Core/system/funstuff.lua
+++ b/SVUI_!Core/system/funstuff.lua
@@ -56,6 +56,114 @@ local SVUILib = Librarian("Registry");
 local L = SV.L;
 --[[
 ##########################################################
+NPC
+##########################################################
+]]--
+SV.NPC = _G["SVUI_NPCFrame"];
+
+local talkAnims = {60,64,65};
+
+local function NPCTalking()
+	local timer = 0;
+	local sequence = random(1, #talkAnims);
+	SV.NPC.ModelLeft:SetAnimation(talkAnims[sequence],0)
+	SV.NPC.ModelLeft:SetScript("OnUpdate",function(self,e)
+		if(timer < 2000) then
+			timer = (timer + (e*1000))
+		else
+			timer = 0;
+			self:SetAnimation(0)
+			self:SetScript("OnUpdate", nil)
+		end
+	end)
+end
+
+local function PlayerTalking()
+	local timer = 0;
+	local sequence = random(1, #talkAnims);
+	SV.NPC.ModelRight:SetAnimation(talkAnims[sequence],0)
+	SV.NPC.ModelRight:SetScript("OnUpdate",function(self,e)
+		if(timer < 2000) then
+			timer = (timer + (e*1000))
+		else
+			timer = 0;
+			self:SetAnimation(0)
+			self:SetScript("OnUpdate", nil)
+		end
+	end)
+end
+
+function SV.NPC:NPCTalksFirst()
+	if(InCombatLockdown() or (not SV.db.FunStuff.NPC) or (not UnitExists("target"))) then return end
+	local timer = 0;
+	local sequence = random(1, #talkAnims);
+	self.ModelLeft:SetAnimation(talkAnims[sequence],0)
+	self.ModelLeft:SetScript("OnUpdate",function(self,e)
+		if(timer < 2000) then
+			timer = (timer + (e*1000))
+		else
+			timer = 0;
+			self:SetAnimation(0)
+			self:SetScript("OnUpdate", nil)
+			PlayerTalking()
+		end
+	end)
+end
+
+function SV.NPC:PlayerTalksFirst()
+	if(InCombatLockdown() or (not SV.db.FunStuff.NPC) or (not UnitExists("target"))) then return end
+	local timer = 0;
+	local sequence = random(1, #talkAnims);
+	self.ModelRight:SetAnimation(talkAnims[sequence],0)
+	self.ModelRight:SetScript("OnUpdate",function(self,e)
+		if(timer < 2000) then
+			timer = (timer + (e*1000))
+		else
+			timer = 0;
+			self:SetAnimation(0)
+			self:SetScript("OnUpdate", nil)
+			NPCTalking()
+		end
+	end)
+end
+
+function SV.NPC:Toggle(parentFrame)
+	if(InCombatLockdown() or (not SV.db.FunStuff.NPC) or (not UnitExists("target"))) then return end
+	local timer = 0;
+	if(parentFrame) then
+		self:SetParent(parentFrame)
+		self:ClearAllPoints();
+		self:SetAllPoints(parentFrame)
+		self:Show();
+		self:SetAlpha(1);
+		if(parentFrame:GetLeft() < 150) then
+			local a1,p,a2,x,y = parentFrame:GetPoint()
+			parentFrame:ClearAllPoints();
+			parentFrame:SetPoint(a1,p,a2,x + 150,y)
+		end
+
+		self.ModelLeft:ClearModel()
+		self.ModelLeft:SetUnit('target')
+		self.ModelLeft:SetCamDistanceScale(1)
+		self.ModelLeft:SetPortraitZoom(0.95)
+		self.ModelLeft:SetPosition(0,0,0)
+
+		self.ModelRight:ClearModel()
+		self.ModelRight:SetUnit('player')
+		self.ModelRight:SetCamDistanceScale(1)
+		self.ModelRight:SetPortraitZoom(0.95)
+		self.ModelRight:SetPosition(0.2,0,0)
+		self.ModelRight:SetRotation(-1)
+
+		SV.NPC:NPCTalksFirst()
+	else
+		self.ModelRight:SetScript("OnUpdate", nil)
+		self:SetAlpha(0);
+		self:Hide();
+	end
+end
+--[[
+##########################################################
 AFK
 ##########################################################
 ]]--
@@ -592,6 +700,10 @@ local function InitializeFunStuff()
 	end

 	gamemenu:SetScript("OnShow", GameMenu_Activate)
+
+	local npc = SV.NPC;
+	npc.ModelLeft:SetStyle("Frame", "Model", false, 5, 3, 3)
+	npc.ModelRight:SetStyle("Frame", "Model", false, 3, 3, 3)
 end

 SV.Events:On("CORE_INITIALIZED", InitializeFunStuff);
diff --git a/SVUI_!Core/xml/widgets.xml b/SVUI_!Core/xml/widgets.xml
index 9fd2c4e..a5b4042 100644
--- a/SVUI_!Core/xml/widgets.xml
+++ b/SVUI_!Core/xml/widgets.xml
@@ -845,4 +845,22 @@
             </OnDragStop>
         </Scripts>
     </Frame>
+
+    <Frame name="SVUI_NPCFrame" hidden="true">
+        <Size x="384" y="512"/>
+        <Frames>
+            <PlayerModel name="$parentModelLeft" parentKey="ModelLeft" frameStrata="HIGH">
+                <Size x="150" y="256"/>
+                <Anchors>
+                    <Anchor point="RIGHT" relativeTo="$parent" relativePoint="LEFT" x="-6" y="0" />
+                </Anchors>
+            </PlayerModel>
+            <PlayerModel name="$parentModelRight" parentKey="ModelRight" frameStrata="HIGH">
+                <Size x="150" y="256"/>
+                <Anchors>
+                    <Anchor point="LEFT" relativeTo="$parent" relativePoint="RIGHT" x="6" y="0" />
+                </Anchors>
+            </PlayerModel>
+        </Frames>
+    </Frame>
 </Ui>
diff --git a/SVUI_!Options/SVUI_!Options.lua b/SVUI_!Options/SVUI_!Options.lua
index e2703bd..1e8bc57 100644
--- a/SVUI_!Options/SVUI_!Options.lua
+++ b/SVUI_!Options/SVUI_!Options.lua
@@ -932,8 +932,16 @@ SV.Options.args.Core.args.Extras = {
 					get = function(j)return SV.db.FunStuff.drunk end,
 					set = function(j,value) SV.db.FunStuff.drunk = value; SV.Drunk:Toggle() end,
 				},
-				comix = {
+				NPC = {
 					order = 2,
+					type = 'toggle',
+					width = "full",
+					name = L["Gossip/Quest/Merchant Models"],
+					get = function(j)return SV.db.FunStuff.NPC end,
+					set = function(j,value) SV.db.FunStuff.NPC = value; end,
+				},
+				comix = {
+					order = 3,
 					type = 'select',
 					name = L["Comic Popups"],
 					desc = '"All Popups" will include non-comic styles (ie.. TOASTY!)',
@@ -946,7 +954,7 @@ SV.Options.args.Core.args.Extras = {
 					}
 				},
 				afk = {
-					order = 3,
+					order = 4,
 					type = 'select',
 					name = L["AFK Screen"],
 					get = function(j)return SV.db.FunStuff.afk end,
@@ -958,7 +966,7 @@ SV.Options.args.Core.args.Extras = {
 					}
 				},
 				gamemenu = {
-					order = 4,
+					order = 5,
 					type = 'select',
 					name = L["Game Menu"],
 					get = function(j)return SV.db.FunStuff.gamemenu end,
diff --git a/SVUI_ActionBars/SVUI_ActionBars.lua b/SVUI_ActionBars/SVUI_ActionBars.lua
index 7031189..a5c8f5f 100644
--- a/SVUI_ActionBars/SVUI_ActionBars.lua
+++ b/SVUI_ActionBars/SVUI_ActionBars.lua
@@ -104,8 +104,8 @@ end
 local Bar_OnEnter = function(self)
 	if(self._fade) then
 		for i=1, self.maxButtons do
-			self.buttons[i].cd:SetSwipeColor(0, 0, 0, 1)
-			self.buttons[i].cd:SetDrawBling(true)
+			self.buttons[i].cooldown:SetSwipeColor(0, 0, 0, 1)
+			self.buttons[i].cooldown:SetDrawBling(true)
 		end
 		self:FadeIn(0.2, self:GetAlpha(), self._alpha)
 	end
@@ -114,8 +114,8 @@ end
 local Bar_OnLeave = function(self)
 	if(self._fade) then
 		for i=1, self.maxButtons do
-			self.buttons[i].cd:SetSwipeColor(0, 0, 0, 0)
-			self.buttons[i].cd:SetDrawBling(false)
+			self.buttons[i].cooldown:SetSwipeColor(0, 0, 0, 0)
+			self.buttons[i].cooldown:SetDrawBling(false)
 		end
 		self:FadeOut(1, self:GetAlpha(), 0)
 	end
@@ -187,8 +187,8 @@ local function SaveActionButton(button, noStyle)
 	cooldown.SizeOverride = SV.db.ActionBars.cooldownSize
 	-- cooldown:SetSwipeColor(0, 0, 0, 0)
 	-- cooldown:SetDrawBling(false)
-	if(not button.cd) then
-		button.cd = cooldown;
+	if(not button.cooldown) then
+		button.cooldown = cooldown;
 	end
 	MOD:FixKeybindText(button)
 	MOD.ButtonCache[button] = true
@@ -665,9 +665,9 @@ do
 				else
 					button:Hide()
 				end
-				if button.cd then
-					button.cd:SetSwipeColor(0, 0, 0, 0)
-					button.cd:SetDrawBling(false)
+				if button.cooldown then
+					button.cooldown:SetSwipeColor(0, 0, 0, 0)
+					button.cooldown:SetDrawBling(false)
 				end
 			else
 				if hideByScale then
@@ -676,9 +676,9 @@ do
 				else
 					button:Show()
 				end
-				if button.cd then
-					button.cd:SetSwipeColor(0, 0, 0, 1)
-					button.cd:SetDrawBling(true)
+				if button.cooldown then
+					button.cooldown:SetSwipeColor(0, 0, 0, 1)
+					button.cooldown:SetDrawBling(true)
 				end
 			end
 			local hasMasque = false;
@@ -1030,15 +1030,15 @@ do

 				icon:SetTexture(texture)

-				if(button.cd) then
+				if(button.cooldown) then
 					if texture then
-						button.cd:SetAlpha(1)
-						button.cd:SetSwipeColor(0, 0, 0, 1)
-						button.cd:SetDrawBling(true)
+						button.cooldown:SetAlpha(1)
+						button.cooldown:SetSwipeColor(0, 0, 0, 1)
+						button.cooldown:SetDrawBling(true)
 					else
-						button.cd:SetAlpha(0)
-						button.cd:SetSwipeColor(0, 0, 0, 0)
-						button.cd:SetDrawBling(false)
+						button.cooldown:SetAlpha(0)
+						button.cooldown:SetSwipeColor(0, 0, 0, 0)
+						button.cooldown:SetDrawBling(false)
 					end
 				end

@@ -1212,10 +1212,10 @@ do
 			if actionIcon then
 				icon:Show()
 				if GetPetActionSlotUsable(i) then SetDesaturation(icon, nil) else SetDesaturation(icon, 1) end
-				if(button.cd) then
-					button.cd:SetAlpha(1)
-					button.cd:SetSwipeColor(0, 0, 0, 1)
-					button.cd:SetDrawBling(true)
+				if(button.cooldown) then
+					button.cooldown:SetAlpha(1)
+					button.cooldown:SetSwipeColor(0, 0, 0, 1)
+					button.cooldown:SetDrawBling(true)
 				end

 				if((not PetHasActionBar()) and (not restrictedAction)) then
@@ -1225,10 +1225,10 @@ do
 				end
 			else
 				icon:Hide()
-				if(button.cd) then
-					button.cd:SetAlpha(0)
-					button.cd:SetSwipeColor(0, 0, 0, 0)
-					button.cd:SetDrawBling(false)
+				if(button.cooldown) then
+					button.cooldown:SetAlpha(0)
+					button.cooldown:SetSwipeColor(0, 0, 0, 0)
+					button.cooldown:SetDrawBling(false)
 				end
 			end

diff --git a/SVUI_Auras/components/procs.lua b/SVUI_Auras/components/procs.lua
index fdce373..ce70d41 100644
--- a/SVUI_Auras/components/procs.lua
+++ b/SVUI_Auras/components/procs.lua
@@ -93,7 +93,7 @@ local function CreateProcIcon()
 	proc.time:SetPoint("TOP", proc, "BOTTOM", 1 + SV.db.Auras.timeOffsetH, 0 + SV.db.Auras.timeOffsetV)
 	proc.time:SetFontObject(SVUI_Font_Aura)
 	proc.HideAfterCooldown = true
-	proc.cd = SV.API:CD(proc);
+	proc.cooldown = SV.API:CD(proc);

 	proc.highlight = proc:CreateTexture(nil, "HIGHLIGHT")
 	proc.highlight:SetTexture(SV.media.statusbar.default)
@@ -147,7 +147,7 @@ local PROC_UNIT_AURA = function(self, event, unit)
 					aura:Show()
 					aura.anim[2]:SetDuration(duration)
       		aura.anim:Play()
-      		aura.cd:SetCooldown(timeleft, duration)
+      		aura.cooldown:SetCooldown(timeleft, duration)
       	end
       	aura.LastTimer = expiration

diff --git a/SVUI_QuestTracker/components/button.lua b/SVUI_QuestTracker/components/button.lua
new file mode 100644
index 0000000..7376f4a
--- /dev/null
+++ b/SVUI_QuestTracker/components/button.lua
@@ -0,0 +1,146 @@
+--[[
+##############################################################################
+S V U I   By: Munglunch
+##############################################################################
+
+QUEST TRACKER BUTTON:
+
+Originally "ExtraQuestButton" by p3lim,
+modified/minimally re-written for SVUI by Munglunch
+
+##########################################################
+LOCALIZED LUA FUNCTIONS
+##########################################################
+]]--
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack    = _G.unpack;
+local select    = _G.select;
+local pairs     = _G.pairs;
+local ipairs    = _G.ipairs;
+local type      = _G.type;
+local error     = _G.error;
+local pcall     = _G.pcall;
+local tostring  = _G.tostring;
+local tonumber  = _G.tonumber;
+local tinsert 	= _G.tinsert;
+local string 	= _G.string;
+local math 		= _G.math;
+local table 	= _G.table;
+--[[ STRING METHODS ]]--
+local format = string.format;
+--[[ MATH METHODS ]]--
+local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round;
+--[[ TABLE METHODS ]]--
+local tremove, twipe = table.remove, table.wipe;
+
+local C_Timer 				= _G.C_Timer;
+local GetNumQuestWatches  	= _G.GetNumQuestWatches;
+local GetQuestWatchInfo  	= _G.GetQuestWatchInfo;
+local QuestHasPOIInfo  	= _G.QuestHasPOIInfo;
+local GetQuestLogSpecialItemInfo  	= _G.GetQuestLogSpecialItemInfo;
+local GetCurrentMapAreaID  	= _G.GetCurrentMapAreaID;
+local GetDistanceSqToQuest  	= _G.GetDistanceSqToQuest;
+--[[
+##########################################################
+GET ADDON DATA
+##########################################################
+]]--
+local SV = _G['SVUI']
+local L = SV.L
+local LSM = _G.LibStub("LibSharedMedia-3.0")
+local MOD = SV.QuestTracker;
+--[[
+##########################################################
+LOCALS
+##########################################################
+]]--
+local QuestInZone = {
+	[14108] = 541,
+	[13998] = 11,
+	[25798] = 61,
+	[25799] = 61,
+	[25112] = 161,
+	[25111] = 161,
+	[24735] = 201,
+};
+--[[
+##########################################################
+BUTTON INTERNALS
+##########################################################
+]]--
+local ticker;
+local UpdateButton = function(self)
+	local numItems = 0
+	local shortestDistance = 62500
+	local closestQuestLink, closestQuestTexture
+	local activeQuestLink, activeQuestTexture
+
+	for index = 1, GetNumQuestWatches() do
+		local questID, _, questIndex, _, _, isComplete = GetQuestWatchInfo(index)
+		if(questID and QuestHasPOIInfo(questID)) then
+			local link, texture, _, showCompleted = GetQuestLogSpecialItemInfo(questIndex)
+			if(link) then
+				local areaID = QuestInZone[questID]
+				if questIndex == MOD.CurrentQuest then
+					activeQuestLink = link
+					activeQuestTexture = texture
+				end
+				if(areaID and areaID == GetCurrentMapAreaID()) then
+					closestQuestLink = link
+					closestQuestTexture = texture
+				elseif(not isComplete or (isComplete and showCompleted)) then
+					local distanceSq, onContinent = GetDistanceSqToQuest(questIndex)
+					if(onContinent and distanceSq < shortestDistance) then
+						shortestDistance = distanceSq
+						closestQuestLink = link
+						closestQuestTexture = texture
+					end
+				end
+
+				numItems = numItems + 1
+			end
+		end
+	end
+
+	if(closestQuestLink) then
+		self:SetUsage(closestQuestLink, closestQuestTexture);
+	elseif(activeQuestLink) then
+		self:SetUsage(activeQuestLink, activeQuestTexture);
+	end
+
+	if(numItems > 0 and not ticker) then
+		ticker = C_Timer.NewTicker(30, function()
+			self:Update()
+		end)
+	elseif(numItems == 0 and ticker) then
+		ticker:Cancel()
+		ticker = nil
+	end
+end
+--[[
+##########################################################
+PACKAGE CALL
+##########################################################
+]]--
+function MOD:InitializeQuestItem()
+	SVUI_QuestItemBar:SetParent(SV.Screen)
+	SVUI_QuestItemBar:SetPoint("BOTTOM", SV.Screen, "BOTTOM", 0, 250)
+	SVUI_QuestItemBar:SetSize(40,40)
+
+	SV:NewAnchor(SVUI_QuestItemBar, L["Quest Item Button"])
+
+	local questitem = SV:CreateSecureButton("item", "SVUI_QuestItemBar", "SVUI_QuestAutoItemButton", UpdateButton);
+	questitem.ArtFile = MOD.media.buttonArt;
+	questitem.blacklist[113191] = true
+	questitem.blacklist[110799] = true
+	questitem.blacklist[109164] = true
+	questitem:RegisterEvent('UPDATE_EXTRA_ACTIONBAR')
+	questitem:RegisterEvent('BAG_UPDATE_COOLDOWN')
+	questitem:RegisterEvent('BAG_UPDATE_DELAYED')
+	questitem:RegisterEvent('WORLD_MAP_UPDATE')
+	questitem:RegisterEvent('QUEST_LOG_UPDATE')
+	questitem:RegisterEvent('QUEST_POI_UPDATE')
+
+	self.QuestItem = questitem
+end
\ No newline at end of file
diff --git a/SVUI_Skins/components/blizzard/garrison.lua b/SVUI_Skins/components/blizzard/garrison.lua
index 69c132a..9fa45d1 100644
--- a/SVUI_Skins/components/blizzard/garrison.lua
+++ b/SVUI_Skins/components/blizzard/garrison.lua
@@ -561,6 +561,8 @@ local function LoadGarrisonStyle()
 	end

 	hooksecurefunc("GarrisonCapacitiveDisplayFrame_Update", _hook_GarrisonCapacitiveDisplayFrame_Update)
+	GarrisonCapacitiveDisplayFrame:HookScript('OnShow', function() SV.NPC:Toggle(GarrisonCapacitiveDisplayFrame) end)
+	GarrisonCapacitiveDisplayFrame.StartWorkOrderButton:HookScript('OnClick', function() SV.NPC:PlayerTalksFirst() end)
 	--[[
 	##############################################################################
 	RECRUITER FRAME
diff --git a/SVUI_Skins/components/blizzard/misc.lua b/SVUI_Skins/components/blizzard/misc.lua
index 83cebba..86ed582 100644
--- a/SVUI_Skins/components/blizzard/misc.lua
+++ b/SVUI_Skins/components/blizzard/misc.lua
@@ -253,6 +253,9 @@ local function MiscStyles()
 		NPCFriendshipStatusBar.icon:SetSize(32,32)
 		NPCFriendshipStatusBar.icon:ClearAllPoints()
 		NPCFriendshipStatusBar.icon:SetPoint("RIGHT", NPCFriendshipStatusBar, "LEFT", 0, -2)
+
+		GossipFrame:SetScript('OnShow', function() SV.NPC:Toggle(GossipFrame) end)
+		hooksecurefunc("GossipTitleButton_OnClick", function() SV.NPC:PlayerTalksFirst() end)
 	end

 	if (SV.db.Skins.blizzard.greeting) then
@@ -548,6 +551,8 @@ local function MiscStyles()
 		SV.API:Set("CloseButton", MerchantFrameCloseButton, MerchantFrame.Panel)
 		SV.API:Set("!_PageButton", MerchantNextPageButton)
 		SV.API:Set("!_PageButton", MerchantPrevPageButton)
+
+		MerchantFrame:HookScript('OnShow', function() SV.NPC:Toggle(MerchantFrame) end)
 	end

 	if(SV.db.Skins.blizzard.petition) then
diff --git a/SVUI_Skins/components/blizzard/quest.lua b/SVUI_Skins/components/blizzard/quest.lua
index d1d49fa..5e67886 100644
--- a/SVUI_Skins/components/blizzard/quest.lua
+++ b/SVUI_Skins/components/blizzard/quest.lua
@@ -226,6 +226,8 @@ local function QuestFrameStyle()

 	hooksecurefunc("QuestFrame_ShowQuestPortrait", Hook_QuestNPCModel)
 	hooksecurefunc("QuestFrame_SetTitleTextColor", Hook_QuestFrame_SetTitleTextColor)
+
+	QuestFrame:HookScript('OnShow', function() SV.NPC:Toggle(QuestFrame) end)
 end

 local function QuestChoiceFrameStyle()
diff --git a/SVUI_UnitFrames/elements/auras.lua b/SVUI_UnitFrames/elements/auras.lua
index 1276b48..c7d8319 100644
--- a/SVUI_UnitFrames/elements/auras.lua
+++ b/SVUI_UnitFrames/elements/auras.lua
@@ -187,7 +187,7 @@ local CreateAuraIcon = function(icons, index)
 	aura:SetScript("OnLeave", Aura_OnLeave);

 	aura.parent = icons;
-	aura.cd = cd;
+	aura.cooldown = cd;
 	aura.text = text;
 	aura.icon = icon;
 	aura.count = count;
diff --git a/SVUI_UnitFrames/libs/Plugins/oUF_AdvancedAuras/oUF_AdvancedAuras.lua b/SVUI_UnitFrames/libs/Plugins/oUF_AdvancedAuras/oUF_AdvancedAuras.lua
index e96b19c..f58b8b8 100644
--- a/SVUI_UnitFrames/libs/Plugins/oUF_AdvancedAuras/oUF_AdvancedAuras.lua
+++ b/SVUI_UnitFrames/libs/Plugins/oUF_AdvancedAuras/oUF_AdvancedAuras.lua
@@ -369,7 +369,7 @@ local CreateAuraIcon = function(self, index)

 	button.icon = icon
 	button.count = count
-	button.cd = cd
+	button.cooldown = cd

 	if(self.PostCreateIcon) then self:PostCreateIcon(button) end

@@ -537,7 +537,7 @@ local UpdateIconAuras = function(self, cache, unit, index, filter, visible, isFr
 			}
 			tinsert(cache, cached)

-			local cd = this.cd
+			local cd = this.cooldown
 			if(cd and not self.disableCooldown) then
 				if(noTime) then
 					cd:Hide()
diff --git a/SVUI_UnitFrames/libs/Plugins/oUF_AuraWatch/oUF_AuraWatch.lua b/SVUI_UnitFrames/libs/Plugins/oUF_AuraWatch/oUF_AuraWatch.lua
index 904d9a5..1ecf042 100644
--- a/SVUI_UnitFrames/libs/Plugins/oUF_AuraWatch/oUF_AuraWatch.lua
+++ b/SVUI_UnitFrames/libs/Plugins/oUF_AuraWatch/oUF_AuraWatch.lua
@@ -129,12 +129,12 @@ local function resetIcon(icon, frame, count, duration, remaining)
 		icon:Hide()
 	else
 		icon:Show()
-		if icon.cd then
+		if icon.cooldown then
 			if duration and duration > 0 and icon.style ~= 'NONE' then
-				icon.cd:SetCooldown(remaining - duration, duration)
-				icon.cd:Show()
+				icon.cooldown:SetCooldown(remaining - duration, duration)
+				icon.cooldown:Show()
 			else
-				icon.cd:Hide()
+				icon.cooldown:Hide()
 			end
 		end

@@ -158,7 +158,7 @@ local function expireIcon(icon, frame)
 	if icon.onlyShowPresent then
 		icon:Hide()
 	else
-		if (icon.cd) then icon.cd:Hide() end
+		if (icon.cooldown) then icon.cooldown:Hide() end
 		if (icon.count) then icon.count:SetText() end
 		icon:SetAlpha(icon.missingAlpha)
 		if icon.overlay then
@@ -232,10 +232,10 @@ local UpdateIcons = function(self)
 		if name then
 			aura.name = name

-			if not aura.cd and not (self.hideCooldown or aura.hideCooldown) then
+			if not aura.cooldown and not (self.hideCooldown or aura.hideCooldown) then
 				local cd = CreateFrame("Cooldown", nil, aura, "CooldownFrameTemplate")
 				cd:SetAllPoints(aura)
-				aura.cd = cd
+				aura.cooldown = cd
 			end

 			if not aura.icon then
@@ -359,12 +359,12 @@ local ForceUpdate = function(self)
 					aura.border:SetTexture([[Interface\BUTTONS\WHITE8X8]])
 					aura.border:SetVertexColor(0, 0, 0)
 				end
-				if not aura.cd then
-					aura.cd = CreateFrame("Cooldown", nil, aura, "CooldownFrameTemplate")
-					aura.cd:SetAllPoints(aura)
-					aura.cd:SetReverse(true)
-					aura.cd:SetHideCountdownNumbers(true)
-					aura.cd:SetFrameLevel(aura:GetFrameLevel())
+				if not aura.cooldown then
+					aura.cooldown = CreateFrame("Cooldown", nil, aura, "CooldownFrameTemplate")
+					aura.cooldown:SetAllPoints(aura)
+					aura.cooldown:SetReverse(true)
+					aura.cooldown:SetHideCountdownNumbers(true)
+					aura.cooldown:SetFrameLevel(aura:GetFrameLevel())
 				end
 				if not aura.grip then
 					aura.grip = CreateFrame("Frame", nil, aura);
@@ -388,18 +388,18 @@ local ForceUpdate = function(self)
 					end
 					aura.icon:Show()
 					aura.border:Show()
-					aura.cd:SetAlpha(1)
+					aura.cooldown:SetAlpha(1)
 				elseif(aura.style == "texturedIcon") then
 					aura.icon:SetVertexColor(1, 1, 1)
 					aura.icon:SetTexCoord(.18, .82, .18, .82)
 					aura.icon:SetTexture(aura.image)
 					aura.icon:Show()
 					aura.border:Show()
-					aura.cd:SetAlpha(1)
+					aura.cooldown:SetAlpha(1)
 				else
 					aura.border:Hide()
 					aura.icon:Hide()
-					aura.cd:SetAlpha(0)
+					aura.cooldown:SetAlpha(0)
 				end

 				if aura.displayText then
diff --git a/SVUI_UnitFrames/libs/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua b/SVUI_UnitFrames/libs/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua
index 3c5b4d2..04cc9db 100644
--- a/SVUI_UnitFrames/libs/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua
+++ b/SVUI_UnitFrames/libs/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua
@@ -242,12 +242,12 @@ local function UpdateDebuff(self, name, icon, count, debuffType, duration, endTi
 			end
 		end

-		if f.cd then
+		if f.cooldown then
 			if duration and (duration > 0) then
-				f.cd:SetCooldown(endTime - duration, duration)
-				f.cd:Show()
+				f.cooldown:SetCooldown(endTime - duration, duration)
+				f.cooldown:Show()
 			else
-				f.cd:Hide()
+				f.cooldown:Hide()
 			end
 		end

diff --git a/SVUI_UnitFrames/libs/oUF/elements/aura.lua b/SVUI_UnitFrames/libs/oUF/elements/aura.lua
index bf6aa4a..ab1d271 100644
--- a/SVUI_UnitFrames/libs/oUF/elements/aura.lua
+++ b/SVUI_UnitFrames/libs/oUF/elements/aura.lua
@@ -365,7 +365,7 @@ local CreateAuraIcon = function(self, index)

 	button.icon = icon
 	button.count = count
-	button.cd = cd
+	button.cooldown = cd

 	if(self.PostCreateIcon) then self:PostCreateIcon(button) end

@@ -535,7 +535,7 @@ local UpdateIconAuras = function(self, cache, unit, index, filter, visible, isEn
 			}
 			tinsert(cache, cached)

-			local cd = this.cd
+			local cd = this.cooldown
 			if(cd and not self.disableCooldown) then
 				if(noTime) then
 					cd:Hide()