Quantcast

new stuff

Munglunch [07-29-14 - 21:56]
new stuff
Filename
Interface/AddOns/SVUI/packages/bag/SVBag.lua
Interface/AddOns/SVUI_LogOMatic/License.txt
Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua
Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc
Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua
diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua
index 145b0c1..da48a2e 100644
--- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua
+++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua
@@ -265,7 +265,7 @@ function MOD:RefreshSlot(bag, slotID)
 			slot:SetBackdropBorderColor(D, E, F)
 		else
 			slot:SetBackdropBorderColor(0, 0, 0)
-		end
+		end
 	else
 		slot:SetBackdropBorderColor(0, 0, 0)
 	end
@@ -290,6 +290,14 @@ function MOD:RefreshBagSlots(bag)
 	end
 end

+function MOD:RefreshBagsSlots()
+	for _, bag in ipairs(self.BagIDs)do
+		if self.Bags[bag] then
+			self.Bags[bag]:RefreshBagSlots(bag)
+		end
+	end
+end
+
 function MOD:RefreshCD()
 	for _, bag in ipairs(self.BagIDs)do
 		for i = 1, GetContainerNumSlots(bag)do
@@ -304,15 +312,7 @@ function MOD:RefreshCD()
 			end
 		end
 	end
-end
-
-function MOD:RefreshBagsSlots()
-	for _, bag in ipairs(self.BagIDs)do
-		if self.Bags[bag] then
-			self.Bags[bag]:RefreshBagSlots(bag)
-		end
-	end
-end
+end

 function MOD:UseSlotFading(this)
 	for _, id in ipairs(this.BagIDs)do
@@ -885,243 +885,288 @@ do
 		end
 	end

-	function MOD:MakeBags(bagName, isBank)
+	function MOD:MakeBags()
+		local bagName = "SVUI_ContainerFrame"
 		local uisCount = #UISpecialFrames + 1;
 		local bagsCount = #self.BagFrames + 1;
-		local frame = NewFrame('Button', bagName, SuperVillain.UIParent)
+		local frame = NewFrame("Button", bagName, SuperVillain.UIParent)
 		frame:SetPanelTemplate("Container")
-		frame:SetFrameStrata('HIGH')
-		frame.RefreshSlot=MOD.RefreshSlot;
-		frame.RefreshBagsSlots=MOD.RefreshBagsSlots;
-		frame.RefreshBagSlots=MOD.RefreshBagSlots;
-		frame.RefreshCD=MOD.RefreshCD;
-		frame:RegisterEvent('ITEM_LOCK_CHANGED')
-		frame:RegisterEvent('ITEM_UNLOCKED')
-		frame:RegisterEvent('BAG_UPDATE_COOLDOWN')
-		frame:RegisterEvent('BAG_UPDATE')
+		frame:SetFrameStrata("HIGH")
+		frame.RefreshSlot = MOD.RefreshSlot;
+		frame.RefreshBagsSlots = MOD.RefreshBagsSlots;
+		frame.RefreshBagSlots = MOD.RefreshBagSlots;
+		frame.RefreshCD = MOD.RefreshCD;
+		frame:RegisterEvent("ITEM_LOCK_CHANGED")
+		frame:RegisterEvent("ITEM_UNLOCKED")
+		frame:RegisterEvent("BAG_UPDATE_COOLDOWN")
+		frame:RegisterEvent("BAG_UPDATE")
 		frame:RegisterEvent("EQUIPMENT_SETS_CHANGED")
-		frame:RegisterEvent('PLAYERBANKSLOTS_CHANGED')
+		frame:RegisterEvent("PLAYERBANKSLOTS_CHANGED")
 		frame:SetMovable(true)
-		frame:RegisterForDrag("LeftButton","RightButton")
+		frame:RegisterForDrag("LeftButton", "RightButton")
 		frame:RegisterForClicks("AnyUp")
 		frame:SetScript("OnDragStart", Container_OnDragStart)
 		frame:SetScript("OnDragStop", Container_OnDragStop)
 		frame:SetScript("OnClick", Container_OnClick)
 		frame:SetScript("OnEnter", Container_OnEnter)
-		frame:SetScript('OnLeave', Token_OnLeave)
-		frame:SetScript('OnEvent', Container_OnEvent)
-		frame.isBank = isBank;
+		frame:SetScript("OnLeave", Token_OnLeave)
+		frame:SetScript("OnEvent", Container_OnEvent)
+		frame.isBank = false;
 		frame:Hide()
-		frame.bottomOffset=isBank and 8 or 32;
-		frame.topOffset=isBank and 60 or 65;
-		frame.BagIDs=isBank and {-1,5,6,7,8,9,10,11} or {0,1,2,3,4}
-		frame.Bags={}
-		frame.closeButton=NewFrame('Button',bagName..'CloseButton',frame,'UIPanelCloseButton')
-		frame.closeButton:Point('TOPRIGHT',-4,-4)
-		frame.holderFrame=NewFrame('Frame',nil,frame)
-		frame.holderFrame:Point('TOP',frame,'TOP',0,-frame.topOffset)
-		frame.holderFrame:Point('BOTTOM',frame,'BOTTOM',0,frame.bottomOffset)
-		frame.ContainerHolder=NewFrame('Button',bagName..'ContainerHolder',frame)
-		frame.ContainerHolder:Point('BOTTOMLEFT',frame,'TOPLEFT',0,1)
-		frame.ContainerHolder:SetFixedPanelTemplate('Transparent')
+		frame.bottomOffset = 32;
+		frame.topOffset = 65;
+		frame.BagIDs = {0, 1, 2, 3, 4}
+		frame.Bags = {}
+		frame.closeButton = NewFrame("Button", bagName.."CloseButton", frame, "UIPanelCloseButton")
+		frame.closeButton:Point("TOPRIGHT", -4, -4)
+		frame.holderFrame = NewFrame("Frame", nil, frame)
+		frame.holderFrame:Point("TOP", frame, "TOP", 0, -frame.topOffset)
+		frame.holderFrame:Point("BOTTOM", frame, "BOTTOM", 0, frame.bottomOffset)
+		frame.ContainerHolder = NewFrame("Button", bagName.."ContainerHolder", frame)
+		frame.ContainerHolder:Point("BOTTOMLEFT", frame, "TOPLEFT", 0, 1)
+		frame.ContainerHolder:SetFixedPanelTemplate("Transparent")
 		frame.ContainerHolder:Hide()

-		if isBank then
-			frame.sortButton=NewFrame('Button',nil,frame)
-			frame.sortButton:Point('TOPRIGHT',frame,'TOP',0,-10)
-			frame.sortButton:Size(25,25)
-			frame.sortButton:SetNormalTexture(ICON_SORT)
-			StyleBagToolButton(frame.sortButton)
-			frame.sortButton.ttText=L['Sort Bags']
-			frame.sortButton:SetScript("OnEnter", Tooltip_Show)
-			frame.sortButton:SetScript("OnLeave", Tooltip_Hide)
-			local Sort_OnClick = MOD:RunSortingProcess(MOD.Sort,'bank')
-			frame.sortButton:SetScript('OnClick', Sort_OnClick)
-
-			frame.stackButton=NewFrame('Button',nil,frame)
-			frame.stackButton:Point('LEFT',frame.sortButton,'RIGHT',10,0)
-			frame.stackButton:Size(25,25)
-			frame.stackButton:SetNormalTexture(ICON_STACK)
-			StyleBagToolButton(frame.stackButton)
-			frame.stackButton.ttText=L['Stack Items']
-			frame.stackButton:SetScript("OnEnter", Tooltip_Show)
-			frame.stackButton:SetScript("OnLeave", Tooltip_Hide)
-			local Stack_OnClick = MOD:RunSortingProcess(MOD.Stack,'bank')
-			frame.stackButton:SetScript('OnClick', Stack_OnClick)
-
-			frame.transferButton=NewFrame('Button',nil,frame)
-			frame.transferButton:Point('LEFT',frame.stackButton,'RIGHT',10,0)
-			frame.transferButton:Size(25,25)
-			frame.transferButton:SetNormalTexture(ICON_TRANSFER)
-			StyleBagToolButton(frame.transferButton)
-			frame.transferButton.ttText=L['Stack Bank to Bags']
-			frame.transferButton:SetScript("OnEnter", Tooltip_Show)
-			frame.transferButton:SetScript("OnLeave", Tooltip_Hide)
-			local Transfer_OnClick = MOD:RunSortingProcess(MOD.Transfer,'bank bags')
-			frame.transferButton:SetScript('OnClick', Transfer_OnClick)
-
-			frame.bagsButton=NewFrame('Button',nil,frame)
-			frame.bagsButton:Point('RIGHT',frame.sortButton,'LEFT',-10,0)
-			frame.bagsButton:Size(25,25)
-			frame.bagsButton:SetNormalTexture(ICON_BAGS)
-			StyleBagToolButton(frame.bagsButton)
-			frame.bagsButton.ttText=L['Toggle Bags']
-			frame.bagsButton:SetScript("OnEnter", Tooltip_Show)
-			frame.bagsButton:SetScript("OnLeave", Tooltip_Hide)
-			local BagBtn_OnClick = function()
-				local numSlots,_ = GetNumBankSlots()
-				if numSlots >= 1 then
-					ToggleFrame(frame.ContainerHolder)
-				else
-					SuperVillain:StaticPopup_Show("NO_BANK_BAGS")
-				end
-			end
-			frame.bagsButton:SetScript('OnClick', BagBtn_OnClick)
-
-			frame.purchaseBagButton=NewFrame('Button',nil,frame)
-			frame.purchaseBagButton:Size(25,25)
-			frame.purchaseBagButton:Point('RIGHT',frame.bagsButton,'LEFT',-10,0)
-			frame.purchaseBagButton:SetFrameLevel(frame.purchaseBagButton:GetFrameLevel()+2)
-			frame.purchaseBagButton:SetNormalTexture(ICON_PURCHASE)
-			StyleBagToolButton(frame.purchaseBagButton)
-			frame.purchaseBagButton.ttText=L['Purchase']
-			frame.purchaseBagButton:SetScript("OnEnter", Tooltip_Show)
-			frame.purchaseBagButton:SetScript("OnLeave", Tooltip_Hide)
-			local PurchaseBtn_OnClick = function()
-				local _,full = GetNumBankSlots()
-				if not full then
-					SuperVillain:StaticPopup_Show("BUY_BANK_SLOT")
-				else
-					SuperVillain:StaticPopup_Show("CANNOT_BUY_BANK_SLOT")
-				end
-			end
-			frame.purchaseBagButton:SetScript("OnClick", PurchaseBtn_OnClick)
-			frame:SetScript('OnHide',CloseBankFrame)
-			UISpecialFrames[uisCount] = "SVUI_BankContainerFrame";
-		else
-			frame.goldText = frame:CreateFontString(nil,'OVERLAY')
-			frame.goldText:SetFontTemplate(SuperVillain.Media.font.numbers)
-			frame.goldText:Point('BOTTOMRIGHT',frame.holderFrame,'TOPRIGHT',-2,4)
-			frame.goldText:SetJustifyH("RIGHT")
-
-			frame.editBox = NewFrame('EditBox', bagName..'EditBox', frame)
-			frame.editBox:SetFrameLevel(frame.editBox:GetFrameLevel()+2)
-			frame.editBox:SetEditboxTemplate()
-			frame.editBox:Height(15)
-			frame.editBox:Hide()
-			frame.editBox:Point('BOTTOMLEFT',frame.holderFrame,'TOPLEFT',2,4)
-			frame.editBox:Point('RIGHT',frame.goldText,'LEFT',-5,0)
-			frame.editBox:SetAutoFocus(true)
-			frame.editBox:SetScript("OnEscapePressed", Search_OnKeyPressed)
-			frame.editBox:SetScript("OnEnterPressed", Search_OnKeyPressed)
-			frame.editBox:SetScript("OnEditFocusLost", frame.editBox.Hide)
-			frame.editBox:SetScript("OnEditFocusGained", frame.editBox.HighlightText)
-			frame.editBox:SetScript("OnTextChanged", Search_OnInput)
-			frame.editBox:SetScript('OnChar', Search_OnInput)
-			frame.editBox.SearchReset = Search_OnKeyPressed
-			frame.editBox:SetText(SEARCH)
-			frame.editBox:SetFontTemplate(SuperVillain.Media.font.roboto)
-
-			local searchButton = NewFrame("Button", nil, frame)
-			searchButton:RegisterForClicks("LeftButtonUp", "RightButtonUp")
-			searchButton:SetSize(60, 18)
-			searchButton:SetPoint("BOTTOMLEFT", frame.editBox, "BOTTOMLEFT", -2, 0)
-			searchButton:SetButtonTemplate()
-			searchButton:SetScript("OnClick", Search_OnClick)
-
-			local searchText = searchButton:CreateFontString(nil,"OVERLAY")
-			searchText:SetFont(SuperVillain.Media.font.roboto, 12, "NONE")
-			searchText:SetAllPoints(searchButton)
-			searchText:SetJustifyH("CENTER")
-			searchText:SetText("|cff9999ff"..SEARCH.."|r")
-			searchButton:SetFontString(searchText)
-
-			frame.detail = searchButton
-
-			frame.sortButton=NewFrame('Button',nil,frame)
-			frame.sortButton:Point('TOP',frame,'TOP',0,-10)
-			frame.sortButton:Size(25,25)
-			frame.sortButton:SetNormalTexture(ICON_SORT)
-			StyleBagToolButton(frame.sortButton)
-			frame.sortButton.ttText=L['Sort Bags']
-			frame.sortButton:SetScript("OnEnter", Tooltip_Show)
-			frame.sortButton:SetScript("OnLeave", Tooltip_Hide)
-			local Sort_OnClick = MOD:RunSortingProcess(MOD.Sort,'bags')
-			frame.sortButton:SetScript('OnClick', Sort_OnClick)
-
-			frame.stackButton=NewFrame('Button',nil,frame)
-			frame.stackButton:Point('LEFT',frame.sortButton,'RIGHT',10,0)
-			frame.stackButton:Size(25,25)
-			frame.stackButton:SetNormalTexture(ICON_STACK)
-			StyleBagToolButton(frame.stackButton)
-			frame.stackButton.ttText=L['Stack Items']
-			frame.stackButton:SetScript("OnEnter", Tooltip_Show)
-			frame.stackButton:SetScript("OnLeave", Tooltip_Hide)
-			local Stack_OnClick = MOD:RunSortingProcess(MOD.Stack,'bags')
-			frame.stackButton:SetScript('OnClick', Stack_OnClick)
-
-			frame.vendorButton=NewFrame('Button',nil,frame)
-			frame.vendorButton:Point('RIGHT',frame.sortButton,'LEFT',-10,0)
-			frame.vendorButton:Size(25,25)
-			frame.vendorButton:SetNormalTexture(ICON_VENDOR)
-			StyleBagToolButton(frame.vendorButton)
-			frame.vendorButton.ttText=L['Vendor Grays']
-			frame.vendorButton.ttText2=L['Hold Shift:']
-			frame.vendorButton.ttText2desc=L['Delete Grays']
-			frame.vendorButton:SetScript("OnEnter", Tooltip_Show)
-			frame.vendorButton:SetScript("OnLeave", Tooltip_Hide)
-			frame.vendorButton:SetScript('OnClick', Vendor_OnClick)
-
-			frame.bagsButton=NewFrame('Button',nil,frame)
-			frame.bagsButton:Point('RIGHT',frame.vendorButton,'LEFT',-10,0)
-			frame.bagsButton:Size(25,25)
-			frame.bagsButton:SetNormalTexture(ICON_BAGS)
-			StyleBagToolButton(frame.bagsButton)
-			frame.bagsButton.ttText=L['Toggle Bags']
-			frame.bagsButton:SetScript("OnEnter", Tooltip_Show)
-			frame.bagsButton:SetScript("OnLeave", Tooltip_Hide)
-			local BagBtn_OnClick = function()
+		frame.goldText = frame:CreateFontString(nil, "OVERLAY")
+		frame.goldText:SetFontTemplate(SuperVillain.Media.font.numbers)
+		frame.goldText:Point("BOTTOMRIGHT", frame.holderFrame, "TOPRIGHT", -2, 4)
+		frame.goldText:SetJustifyH("RIGHT")
+		frame.editBox = NewFrame("EditBox", bagName.."EditBox", frame)
+		frame.editBox:SetFrameLevel(frame.editBox:GetFrameLevel()+2)
+		frame.editBox:SetEditboxTemplate()
+		frame.editBox:Height(15)
+		frame.editBox:Hide()
+		frame.editBox:Point("BOTTOMLEFT", frame.holderFrame, "TOPLEFT", 2, 4)
+		frame.editBox:Point("RIGHT", frame.goldText, "LEFT", -5, 0)
+		frame.editBox:SetAutoFocus(true)
+		frame.editBox:SetScript("OnEscapePressed", Search_OnKeyPressed)
+		frame.editBox:SetScript("OnEnterPressed", Search_OnKeyPressed)
+		frame.editBox:SetScript("OnEditFocusLost", frame.editBox.Hide)
+		frame.editBox:SetScript("OnEditFocusGained", frame.editBox.HighlightText)
+		frame.editBox:SetScript("OnTextChanged", Search_OnInput)
+		frame.editBox:SetScript("OnChar", Search_OnInput)
+		frame.editBox.SearchReset = Search_OnKeyPressed
+		frame.editBox:SetText(SEARCH)
+		frame.editBox:SetFontTemplate(SuperVillain.Media.font.roboto)
+
+		local searchButton = NewFrame("Button", nil, frame)
+		searchButton:RegisterForClicks("LeftButtonUp", "RightButtonUp")
+		searchButton:SetSize(60, 18)
+		searchButton:SetPoint("BOTTOMLEFT", frame.editBox, "BOTTOMLEFT", -2, 0)
+		searchButton:SetButtonTemplate()
+		searchButton:SetScript("OnClick", Search_OnClick)
+		local searchText = searchButton:CreateFontString(nil, "OVERLAY")
+		searchText:SetFont(SuperVillain.Media.font.roboto, 12, "NONE")
+		searchText:SetAllPoints(searchButton)
+		searchText:SetJustifyH("CENTER")
+		searchText:SetText("|cff9999ff"..SEARCH.."|r")
+		searchButton:SetFontString(searchText)
+		frame.detail = searchButton
+
+		frame.sortButton = NewFrame("Button", nil, frame)
+		frame.sortButton:Point("TOP", frame, "TOP", 0, -10)
+		frame.sortButton:Size(25, 25)
+		frame.sortButton:SetNormalTexture(ICON_SORT)
+		StyleBagToolButton(frame.sortButton)
+		frame.sortButton.ttText = L["Sort Bags"]
+		frame.sortButton:SetScript("OnEnter", Tooltip_Show)
+		frame.sortButton:SetScript("OnLeave", Tooltip_Hide)
+		local Sort_OnClick = MOD:RunSortingProcess(MOD.Sort, "bags")
+		frame.sortButton:SetScript("OnClick", Sort_OnClick)
+
+		frame.stackButton = NewFrame("Button", nil, frame)
+		frame.stackButton:Point("LEFT", frame.sortButton, "RIGHT", 10, 0)
+		frame.stackButton:Size(25, 25)
+		frame.stackButton:SetNormalTexture(ICON_STACK)
+		StyleBagToolButton(frame.stackButton)
+		frame.stackButton.ttText = L["Stack Items"]
+		frame.stackButton:SetScript("OnEnter", Tooltip_Show)
+		frame.stackButton:SetScript("OnLeave", Tooltip_Hide)
+		local Stack_OnClick = MOD:RunSortingProcess(MOD.Stack, "bags")
+		frame.stackButton:SetScript("OnClick", Stack_OnClick)
+
+		frame.vendorButton = NewFrame("Button", nil, frame)
+		frame.vendorButton:Point("RIGHT", frame.sortButton, "LEFT", -10, 0)
+		frame.vendorButton:Size(25, 25)
+		frame.vendorButton:SetNormalTexture(ICON_VENDOR)
+		StyleBagToolButton(frame.vendorButton)
+		frame.vendorButton.ttText = L["Vendor Grays"]
+		frame.vendorButton.ttText2 = L["Hold Shift:"]
+		frame.vendorButton.ttText2desc = L["Delete Grays"]
+		frame.vendorButton:SetScript("OnEnter", Tooltip_Show)
+		frame.vendorButton:SetScript("OnLeave", Tooltip_Hide)
+		frame.vendorButton:SetScript("OnClick", Vendor_OnClick)
+
+		frame.bagsButton = NewFrame("Button", nil, frame)
+		frame.bagsButton:Point("RIGHT", frame.vendorButton, "LEFT", -10, 0)
+		frame.bagsButton:Size(25, 25)
+		frame.bagsButton:SetNormalTexture(ICON_BAGS)
+		StyleBagToolButton(frame.bagsButton)
+		frame.bagsButton.ttText = L["Toggle Bags"]
+		frame.bagsButton:SetScript("OnEnter", Tooltip_Show)
+		frame.bagsButton:SetScript("OnLeave", Tooltip_Hide)
+		local BagBtn_OnClick = function()
+			ToggleFrame(frame.ContainerHolder)
+		end
+		frame.bagsButton:SetScript("OnClick", BagBtn_OnClick)
+
+		frame.transferButton = NewFrame("Button", nil, frame)
+		frame.transferButton:Point("LEFT", frame.stackButton, "RIGHT", 10, 0)
+		frame.transferButton:Size(25, 25)
+		frame.transferButton:SetNormalTexture(ICON_TRANSFER)
+		StyleBagToolButton(frame.transferButton)
+		frame.transferButton.ttText = L["Stack Bags to Bank"]
+		frame.transferButton:SetScript("OnEnter", Tooltip_Show)
+		frame.transferButton:SetScript("OnLeave", Tooltip_Hide)
+		local Transfer_OnClick = MOD:RunSortingProcess(MOD.Transfer, "bags bank")
+		frame.transferButton:SetScript("OnClick", Transfer_OnClick)
+
+		frame.currencyButton = NewFrame("Frame", nil, frame)
+		frame.currencyButton:Point("BOTTOMLEFT", frame, "BOTTOMLEFT", 4, 0)
+		frame.currencyButton:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -4, 0)
+		frame.currencyButton:Height(32)
+		for h = 1, MAX_WATCHED_TOKENS do
+			frame.currencyButton[h] = NewFrame("Button", nil, frame.currencyButton)
+			frame.currencyButton[h]:Size(22)
+			frame.currencyButton[h]:SetFixedPanelTemplate("Default")
+			frame.currencyButton[h]:SetID(h)
+			frame.currencyButton[h].icon = frame.currencyButton[h]:CreateTexture(nil, "OVERLAY")
+			frame.currencyButton[h].icon:FillInner()
+			frame.currencyButton[h].icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+			frame.currencyButton[h].text = frame.currencyButton[h]:CreateFontString(nil, "OVERLAY")
+			frame.currencyButton[h].text:Point("LEFT", frame.currencyButton[h], "RIGHT", 2, 0)
+			frame.currencyButton[h].text:SetFontTemplate(SuperVillain.Media.font.numbers, 18, "NONE")
+			frame.currencyButton[h]:SetScript("OnEnter", Token_OnEnter)
+			frame.currencyButton[h]:SetScript("OnLeave", Token_OnLeave)
+			frame.currencyButton[h]:SetScript("OnClick", Token_OnClick)
+			frame.currencyButton[h]:Hide()
+		end
+
+		frame:SetScript("OnHide", CloseAllBags)
+		UISpecialFrames[uisCount] = bagName;
+
+		self.BagFrames[bagsCount] = frame
+		self.BagFrame = frame
+	end
+
+	function MOD:MakeBank()
+		local bagName = "SVUI_BankContainerFrame"
+		local uisCount = #UISpecialFrames + 1;
+		local bagsCount = #self.BagFrames + 1;
+		local frame = NewFrame("Button", bagName, SuperVillain.UIParent)
+		frame:SetPanelTemplate("Container")
+		frame:SetFrameStrata("HIGH")
+		frame.RefreshSlot = MOD.RefreshSlot;
+		frame.RefreshBagsSlots = MOD.RefreshBagsSlots;
+		frame.RefreshBagSlots = MOD.RefreshBagSlots;
+		frame.RefreshCD = MOD.RefreshCD;
+		frame:RegisterEvent("ITEM_LOCK_CHANGED")
+		frame:RegisterEvent("ITEM_UNLOCKED")
+		frame:RegisterEvent("BAG_UPDATE_COOLDOWN")
+		frame:RegisterEvent("BAG_UPDATE")
+		frame:RegisterEvent("EQUIPMENT_SETS_CHANGED")
+		frame:RegisterEvent("PLAYERBANKSLOTS_CHANGED")
+		frame:SetMovable(true)
+		frame:RegisterForDrag("LeftButton", "RightButton")
+		frame:RegisterForClicks("AnyUp")
+		frame:SetScript("OnDragStart", Container_OnDragStart)
+		frame:SetScript("OnDragStop", Container_OnDragStop)
+		frame:SetScript("OnClick", Container_OnClick)
+		frame:SetScript("OnEnter", Container_OnEnter)
+		frame:SetScript("OnLeave", Token_OnLeave)
+		frame:SetScript("OnEvent", Container_OnEvent)
+		frame.isBank = true;
+		frame:Hide()
+		frame.bottomOffset = 8;
+		frame.topOffset = 60;
+		frame.BagIDs = {-1, 5, 6, 7, 8, 9, 10, 11}
+		frame.Bags = {}
+		frame.closeButton = NewFrame("Button", bagName.."CloseButton", frame, "UIPanelCloseButton")
+		frame.closeButton:Point("TOPRIGHT", -4, -4)
+		frame.holderFrame = NewFrame("Frame", nil, frame)
+		frame.holderFrame:Point("TOP", frame, "TOP", 0, -frame.topOffset)
+		frame.holderFrame:Point("BOTTOM", frame, "BOTTOM", 0, frame.bottomOffset)
+		frame.ContainerHolder = NewFrame("Button", bagName.."ContainerHolder", frame)
+		frame.ContainerHolder:Point("BOTTOMLEFT", frame, "TOPLEFT", 0, 1)
+		frame.ContainerHolder:SetFixedPanelTemplate("Transparent")
+		frame.ContainerHolder:Hide()
+
+		frame.sortButton = NewFrame("Button", nil, frame)
+		frame.sortButton:Point("TOPRIGHT", frame, "TOP", 0, -10)
+		frame.sortButton:Size(25, 25)
+		frame.sortButton:SetNormalTexture(ICON_SORT)
+		StyleBagToolButton(frame.sortButton)
+		frame.sortButton.ttText = L["Sort Bags"]
+		frame.sortButton:SetScript("OnEnter", Tooltip_Show)
+		frame.sortButton:SetScript("OnLeave", Tooltip_Hide)
+		local Sort_OnClick = MOD:RunSortingProcess(MOD.Sort, "bank")
+		frame.sortButton:SetScript("OnClick", Sort_OnClick)
+
+		frame.stackButton = NewFrame("Button", nil, frame)
+		frame.stackButton:Point("LEFT", frame.sortButton, "RIGHT", 10, 0)
+		frame.stackButton:Size(25, 25)
+		frame.stackButton:SetNormalTexture(ICON_STACK)
+		StyleBagToolButton(frame.stackButton)
+		frame.stackButton.ttText = L["Stack Items"]
+		frame.stackButton:SetScript("OnEnter", Tooltip_Show)
+		frame.stackButton:SetScript("OnLeave", Tooltip_Hide)
+		local Stack_OnClick = MOD:RunSortingProcess(MOD.Stack, "bank")
+		frame.stackButton:SetScript("OnClick", Stack_OnClick)
+
+		frame.transferButton = NewFrame("Button", nil, frame)
+		frame.transferButton:Point("LEFT", frame.stackButton, "RIGHT", 10, 0)
+		frame.transferButton:Size(25, 25)
+		frame.transferButton:SetNormalTexture(ICON_TRANSFER)
+		StyleBagToolButton(frame.transferButton)
+		frame.transferButton.ttText = L["Stack Bank to Bags"]
+		frame.transferButton:SetScript("OnEnter", Tooltip_Show)
+		frame.transferButton:SetScript("OnLeave", Tooltip_Hide)
+		local Transfer_OnClick = MOD:RunSortingProcess(MOD.Transfer, "bank bags")
+		frame.transferButton:SetScript("OnClick", Transfer_OnClick)
+
+		frame.bagsButton = NewFrame("Button", nil, frame)
+		frame.bagsButton:Point("RIGHT", frame.sortButton, "LEFT", -10, 0)
+		frame.bagsButton:Size(25, 25)
+		frame.bagsButton:SetNormalTexture(ICON_BAGS)
+		StyleBagToolButton(frame.bagsButton)
+		frame.bagsButton.ttText = L["Toggle Bags"]
+		frame.bagsButton:SetScript("OnEnter", Tooltip_Show)
+		frame.bagsButton:SetScript("OnLeave", Tooltip_Hide)
+		local BagBtn_OnClick = function()
+			local numSlots, _ = GetNumBankSlots()
+			if numSlots  >= 1 then
 				ToggleFrame(frame.ContainerHolder)
-			end
-			frame.bagsButton:SetScript('OnClick', BagBtn_OnClick)
-
-			frame.transferButton=NewFrame('Button',nil,frame)
-			frame.transferButton:Point('LEFT',frame.stackButton,'RIGHT',10,0)
-			frame.transferButton:Size(25,25)
-			frame.transferButton:SetNormalTexture(ICON_TRANSFER)
-			StyleBagToolButton(frame.transferButton)
-			frame.transferButton.ttText=L['Stack Bags to Bank']
-			frame.transferButton:SetScript("OnEnter", Tooltip_Show)
-			frame.transferButton:SetScript("OnLeave", Tooltip_Hide)
-			local Transfer_OnClick = MOD:RunSortingProcess(MOD.Transfer,'bags bank')
-			frame.transferButton:SetScript('OnClick', Transfer_OnClick)
-
-			frame.currencyButton=NewFrame('Frame',nil,frame)
-			frame.currencyButton:Point('BOTTOMLEFT',frame,'BOTTOMLEFT',4,0)
-			frame.currencyButton:Point('BOTTOMRIGHT',frame,'BOTTOMRIGHT',-4,0)
-			frame.currencyButton:Height(32)
-			for h=1,MAX_WATCHED_TOKENS do
-				frame.currencyButton[h]=NewFrame('Button',nil,frame.currencyButton)
-				frame.currencyButton[h]:Size(22)
-				frame.currencyButton[h]:SetFixedPanelTemplate('Default')
-				frame.currencyButton[h]:SetID(h)
-				frame.currencyButton[h].icon=frame.currencyButton[h]:CreateTexture(nil,'OVERLAY')
-				frame.currencyButton[h].icon:FillInner()
-				frame.currencyButton[h].icon:SetTexCoord(0.1,0.9,0.1,0.9)
-				frame.currencyButton[h].text = frame.currencyButton[h]:CreateFontString(nil,'OVERLAY')
-				frame.currencyButton[h].text:Point('LEFT',frame.currencyButton[h],'RIGHT',2,0)
-				frame.currencyButton[h].text:SetFontTemplate(SuperVillain.Media.font.numbers,18,"NONE")
-				frame.currencyButton[h]:SetScript('OnEnter', Token_OnEnter)
-				frame.currencyButton[h]:SetScript('OnLeave', Token_OnLeave)
-				frame.currencyButton[h]:SetScript('OnClick', Token_OnClick)
-				frame.currencyButton[h]:Hide()
+			else
+				SuperVillain:StaticPopup_Show("NO_BANK_BAGS")
 			end
-			frame:SetScript('OnHide',CloseAllBags)
-			UISpecialFrames[uisCount] = "SVUI_ContainerFrame";
-		end
+		end
+		frame.bagsButton:SetScript("OnClick", BagBtn_OnClick)
+
+		frame.purchaseBagButton = NewFrame("Button", nil, frame)
+		frame.purchaseBagButton:Size(25, 25)
+		frame.purchaseBagButton:Point("RIGHT", frame.bagsButton, "LEFT", -10, 0)
+		frame.purchaseBagButton:SetFrameLevel(frame.purchaseBagButton:GetFrameLevel()+2)
+		frame.purchaseBagButton:SetNormalTexture(ICON_PURCHASE)
+		StyleBagToolButton(frame.purchaseBagButton)
+		frame.purchaseBagButton.ttText = L["Purchase"]
+		frame.purchaseBagButton:SetScript("OnEnter", Tooltip_Show)
+		frame.purchaseBagButton:SetScript("OnLeave", Tooltip_Hide)
+		local PurchaseBtn_OnClick = function()
+			local _, full = GetNumBankSlots()
+			if not full then
+				SuperVillain:StaticPopup_Show("BUY_BANK_SLOT")
+			else
+				SuperVillain:StaticPopup_Show("CANNOT_BUY_BANK_SLOT")
+			end
+		end
+		frame.purchaseBagButton:SetScript("OnClick", PurchaseBtn_OnClick)
+
+		frame:SetScript("OnHide", CloseBankFrame)
+		UISpecialFrames[uisCount] = "SVUI_BankContainerFrame";
+
 		self.BagFrames[bagsCount] = frame
-		return frame
-	end
+		self.BankFrame = frame
+	end
 end

 function MOD:RefreshTokens()
@@ -1214,9 +1259,9 @@ do
 		end
 	end

-	local function OpenBank()
+	function MOD:BANKFRAME_OPENED()
 		if not MOD.BankFrame then
-			MOD.BankFrame = MOD:MakeBags('SVUI_BankContainerFrame',true)
+			MOD:MakeBank()
 			MOD:ModifyBags()
 		end
 		MOD:Layout(true)
@@ -1227,7 +1272,7 @@ do
 		MOD.RefreshTokens()
 	end

-	local function CloseBank()
+	function MOD:BANKFRAME_CLOSED()
 		if not MOD.BankFrame then return end
 		MOD.BankFrame:Hide()
 	end
@@ -1239,8 +1284,8 @@ do
 		NewHook("ToggleAllBags", ToggleBackpack)
 		NewHook("ToggleBackpack", ToggleBackpack)
 		NewHook("BackpackTokenFrame_Update", MOD.RefreshTokens)
-		MOD:RegisterEvent("BANKFRAME_OPENED", OpenBank)
-		MOD:RegisterEvent("BANKFRAME_CLOSED", CloseBank)
+		MOD:RegisterEvent("BANKFRAME_OPENED")
+		MOD:RegisterEvent("BANKFRAME_CLOSED")
 	end
 end

@@ -1269,7 +1314,7 @@ function MOD:Load()
 	self:ModifyBagBar()
 	SuperVillain.bags = self;
 	self.BagFrames = {}
-	self.BagFrame = self:MakeBags("SVUI_ContainerFrame")
+	self:MakeBags()
 	SetBagHooks()
 	self:ModifyBags()
 	self:Layout(false)
diff --git a/Interface/AddOns/SVUI_LogOMatic/License.txt b/Interface/AddOns/SVUI_LogOMatic/License.txt
new file mode 100644
index 0000000..8bd6bba
--- /dev/null
+++ b/Interface/AddOns/SVUI_LogOMatic/License.txt
@@ -0,0 +1,33 @@
+###############################################################################
+#_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
+# ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__      #
+#  __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____     #
+#   ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____    #
+#    ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____   #
+#     _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____  #
+#      __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ #
+#       _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_#
+#        ___\///////////___________\///___________\/////////_____\///////////_#
+###############################################################################
+# S U P E R - V I L L A I N - U I   By: Munglunch                             #
+###############################################################################
+
+SVUI_LogOMatic SVUI License Copyright 2014 http://wowinterface.com
+
+The contents of this addon, excluding third-party resources, are
+copyrighted to their authors with all rights reserved.
+
+Authors of this addon hereby grant you the following rights:
+
+1. 	You may NOT make any modification inside this addon. If you want
+	to create your own edited version, please create it from outside.
+
+2. 	Do not modify the name of this addon, including the addon folders.
+
+3. 	This copyright notice shall be included in all copies or substantial
+	portions of the Software.
+
+All rights not explicitly addressed in this license are reserved by
+the copyright holders.
+
+You can write Munglunch at Wowinterface.com for reporting abuse / bugs.
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua
new file mode 100644
index 0000000..0060dcf
--- /dev/null
+++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua
@@ -0,0 +1,383 @@
+--[[
+##############################################################################
+_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
+ ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__      #
+  __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____     #
+   ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____    #
+    ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____   #
+     _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____  #
+      __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ #
+       _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_#
+        ___\///////////___________\///___________\/////////_____\///////////_#
+##############################################################################
+S U P E R - V I L L A I N - U I   By: Munglunch                              #
+##############################################################################
+##########################################################
+LOCALIZED LUA FUNCTIONS
+##########################################################
+]]--
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack 	= _G.unpack;
+local select 	= _G.select;
+local pairs 	= _G.pairs;
+local type 		= _G.type;
+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 floor = math.floor;
+--[[ TABLE METHODS ]]--
+local twipe,tcopy = table.wipe, table.copy;
+--[[
+##########################################################
+GET ADDON DATA
+##########################################################
+]]--
+local SVUIAddOnName, LOG = ...;
+local SuperVillain, L = unpack(SVUI);
+local NewHook = hooksecurefunc;
+local SVUILogEventHandler = CreateFrame("Frame", nil)
+local version = GetAddOnMetadata(..., "Version");
+
+LOG = SuperVillain:Prototype(SVUIAddOnName, version)
+
+_G["LogVillain"] = LOG;
+local CHAT = SuperVillain.SVChat;
+--[[
+##########################################################
+LOCAL VARIABLES
+##########################################################
+]]--
+local nameKey = UnitName("player");
+local realmKey = GetRealmName();
+local NewHook = hooksecurefunc;
+local LoggingEvents = {
+	"CHAT_MSG_CHANNEL",
+	"CHAT_MSG_EMOTE",
+	"CHAT_MSG_GUILD_ACHIEVEMENT",
+	"CHAT_MSG_RAID_WARNING",
+	"CHAT_MSG_SAY",
+	"CHAT_MSG_YELL",
+	"CHAT_MSG_WHISPER_INFORM",
+	"CHAT_MSG_WHISPER",
+	"CHAT_MSG_GUILD",
+	"CHAT_MSG_OFFICER",
+	"CHAT_MSG_PARTY",
+	"CHAT_MSG_PARTY_LEADER",
+	"CHAT_MSG_RAID",
+	"CHAT_MSG_RAID_LEADER",
+	"CHAT_MSG_INSTANCE_CHAT",
+	"CHAT_MSG_INSTANCE_CHAT_LEADER",
+	"CHAT_MSG_BN_CONVERSATION",
+	"CHAT_MSG_BN_WHISPER",
+	"CHAT_MSG_BN_WHISPER_INFORM"
+};
+--[[
+##########################################################
+CORE DATA
+##########################################################
+]]--
+LOG.stash = {};
+LOG.myStash = {};
+LOG.BagItemCache = {};
+LOG.HasAltInventory = false;
+LOG.OptionsCache = {};
+--[[
+##########################################################
+LOCAL FUNCTIONS
+##########################################################
+]]--
+local RefreshLoggedSlot = function(self, bag, slotID, save)
+	if self.Bags[bag] and self.Bags[bag].numSlots ~= GetContainerNumSlots(bag) or not self.Bags[bag] or not self.Bags[bag][slotID] then return end
+	local slot, _ = self.Bags[bag][slotID], nil;
+	local bagType = self.Bags[bag].bagFamily;
+	local texture, count, locked = GetContainerItemInfo(bag, slotID)
+	local itemLink = GetContainerItemLink(bag, slotID);
+	local key;
+	slot:Show()
+	slot.questIcon:Hide()
+	slot.name, slot.rarity = nil, nil;
+	local start, duration, enable = GetContainerItemCooldown(bag, slotID)
+	CooldownFrame_SetTimer(slot.cooldown, start, duration, enable)
+	if duration > 0 and enable == 0 then
+		SetItemButtonTextureVertexColor(slot, 0.4, 0.4, 0.4)
+	else
+		SetItemButtonTextureVertexColor(slot, 1, 1, 1)
+	end
+	if bagType then
+		local r, g, b = bagType[1], bagType[2], bagType[3];
+		slot:SetBackdropColor(r, g, b, 0.5)
+		slot:SetBackdropBorderColor(r, g, b, 1)
+	elseif itemLink then
+		local class, subclass, maxStack;
+		key, _, slot.rarity, _, _, class, subclass, maxStack = GetItemInfo(itemLink)
+		slot.name = key
+		local z, A, C = GetContainerItemQuestInfo(bag, slotID)
+		if A and not isActive then
+			slot:SetBackdropBorderColor(1.0, 0.3, 0.3)
+			slot.questIcon:Show()
+		elseif A or z then
+			slot:SetBackdropBorderColor(1.0, 0.3, 0.3)
+		elseif slot.rarity and slot.rarity>1 then
+			local D, E, F = GetItemQualityColor(slot.rarity)
+			slot:SetBackdropBorderColor(D, E, F)
+		else
+			slot:SetBackdropBorderColor(0, 0, 0)
+		end
+		if (key and save) then
+			local id = GetContainerItemID(bag,slotID)
+			LOG.myStash[bag][key] = GetItemCount(id,true);
+		end
+	else
+		slot:SetBackdropBorderColor(0, 0, 0)
+	end
+	if C_NewItems.IsNewItem(bag, slotID)then
+		ActionButton_ShowOverlayGlow(slot)
+	else
+		ActionButton_HideOverlayGlow(slot)
+	end
+	SetItemButtonTexture(slot, texture)
+	SetItemButtonCount(slot, count)
+	SetItemButtonDesaturated(slot, locked, 0.5, 0.5, 0.5)
+end
+
+local RefreshLoggedBagSlots = function(self, bag, save)
+	if(not bag) then return end
+	for i = 1, GetContainerNumSlots(bag)do
+		local container = self
+		if not self.RefreshSlot then
+			self:RefreshSlot(bag, i, save)
+		else
+			container = self:GetParent()
+		end
+		RefreshLoggedSlot(container, bag, i, save)
+	end
+end
+
+local RefreshLoggedBagsSlots = function(self)
+	for _,bag in ipairs(self.BagIDs)do
+		local container = self.Bags[bag]
+		if container then
+			if LOG.myStash[bag] then
+				twipe(LOG.myStash[bag])
+			else
+				LOG.myStash[bag] = {};
+			end
+			RefreshLoggedBagSlots(container, bag, true)
+		end
+	end
+	for bag,items in pairs(LOG.myStash) do
+		for id,amt in pairs(items) do
+			LOG.BagItemCache[id] = LOG.BagItemCache[id] or {}
+			LOG.BagItemCache[id][nameKey] = amt
+		end
+	end
+end
+
+local GameTooltip_OnTooltipSetItem = function(self,tooltip)
+	if not tooltip.itemCleared then
+		local key,itemID = tooltip:GetItem()
+		local left = "";
+		local right = "";
+		if LOG.BagItemCache[key] then
+			tooltip:AddLine(" ")
+			tooltip:AddDoubleLine("|cFFCA3C3C[Character]|r","|cFFCA3C3C[Bags/Bank]|r")
+			for alt,amt in pairs(LOG.BagItemCache[key]) do
+				local result = ("|cFF00FFFF%d|r"):format(amt)
+				tooltip:AddDoubleLine(alt,result)
+			end
+			tooltip:AddLine(" ")
+		end
+		if itemID ~= nil and SuperVillain.db.SVTip.spellID then
+			left = "|cFFCA3C3CID: |r"
+			right = ("|cFFCA3C3C%s|r %s"):format(ID,itemID):match(":(%w+)")
+		end
+		if left ~= "" or right ~= "" then
+			tooltip:AddLine(" ")
+			tooltip:AddDoubleLine(left,right)
+		end
+		tooltip.itemCleared = true
+	end
+end
+--[[
+##########################################################
+CORE FUNCTIONS
+##########################################################
+]]--
+function LOG:BuildCachedInventory()
+	for alt,_ in pairs(LOG.stash) do
+		for bag,items in pairs(LOG.stash[alt]) do
+			for id,amt in pairs(items) do
+				LOG.BagItemCache[id] = LOG.BagItemCache[id] or {}
+				LOG.BagItemCache[id][alt] = amt
+			end
+		end
+	end
+end
+
+function CHAT:LoadSavedChatLog()
+	local temp, data = {}
+	for id, _ in pairs(SVLOG_Cache["chat"]) do
+		tinsert(temp, tonumber(id))
+	end
+	tsort(temp, function(a, b)
+		return a < b
+	end)
+	for i = 1, #temp do
+		data = SVLOG_Cache["chat"][tostring(temp[i])]
+		if type(data) == "table" and data[20] ~= nil then
+			CHAT.timeOverride = temp[i]
+			ChatFrame_MessageEventHandler(DEFAULT_CHAT_FRAME, data[20], unpack(data))
+		end
+	end
+end
+
+function CHAT:LogCurrentChat(event, ...)
+	if CHAT.db.throttleInterval ~= 0 and (event == 'CHAT_MESSAGE_SAY' or event == 'CHAT_MESSAGE_YELL' or event == 'CHAT_MSG_CHANNEL') then
+		local msg, sender = ...
+		local message = sender:upper()..msg;
+		if sender ~= "" then
+			if CHAT.MessageCache["list"][message] == nil then
+				CHAT.MessageCache["list"][message] = true
+				CHAT.MessageCache["count"][message] = 1
+				CHAT.MessageCache["time"][message] = time()
+			else
+				CHAT.MessageCache["count"][message] = CHAT.MessageCache["count"][message] + 1
+			end
+		end
+		if sender ~= UnitName("player") and CHAT.MessageCache["list"][message] then
+			if difftime(time(), CHAT.MessageCache["time"][message]) <= CHAT.db.throttleInterval then
+				return;
+			end
+		end
+	end
+	local temp = {}
+	for i = 1, select('#', ...) do
+		temp[i] = select(i, ...) or false
+	end
+	if #temp > 0 then
+	  temp[20] = event
+	  local randomTime = select(2, ("."):split(GetTime() or "0."..random(1, 999), 2)) or 0;
+	  local timeForMessage = time().."."..randomTime;
+	  SVLOG_Cache["chat"][timeForMessage] = temp
+		local c, k = 0
+		for id, data in pairs(SVLOG_Cache["chat"]) do
+			c = c + 1
+			if (not k) or k > id then
+				k = id
+			end
+		end
+		if c > 128 then
+			SVLOG_Cache["chat"][k] = nil
+		end
+	end
+end
+
+function CHAT:PLAYER_ENTERING_WORLD()
+	local temp, data = {}
+	for id, _ in pairs(SVLOG_Cache["chat"]) do
+		tinsert(temp, tonumber(id))
+	end
+	tsort(temp, function(a, b)
+		return a < b
+	end)
+	for i = 1, #temp do
+		data = SVLOG_Cache["chat"][tostring(temp[i])]
+		if type(data) == "table" and data[20] ~= nil then
+			ChatFrame_MessageEventHandler(DEFAULT_CHAT_FRAME, data[20], unpack(data))
+		end
+	end
+	CHAT:UnregisterEvent("PLAYER_ENTERING_WORLD")
+end
+
+function LOG:AppendBankFunctions()
+	local BAGS = SuperVillain.SVBag;
+	if(BAGS.BankFrame) then
+		BAGS.BankFrame.RefreshBagsSlots = RefreshLoggedBagsSlots
+	end
+end
+--[[
+##########################################################
+CORE FUNCTIONS
+##########################################################
+]]--
+local function SetConfigOptions()
+	SuperVillain.Options.args.SVLogs = {
+		type = "group",
+		name = L["Logging"],
+		childGroups = "tree",
+		args = {
+			common = {
+				order = 100,
+				type = "group",
+				name = "Logging",
+				guiInline = true,
+				args = {}
+			}
+		}
+	};
+	for key, options in pairs(LOG.OptionsCache) do
+		SuperVillain.Options.args.SVLogs.args.common.args[key] = options;
+	end
+end
+
+local function ResetAllLogs()
+	if SVLOG_Data[realmKey]["bags"][nameKey] then SVLOG_Data[realmKey]["bags"][nameKey] = {} end
+	if SVLOG_Data[realmKey]["gold"][nameKey] then SVLOG_Data[realmKey]["gold"][nameKey] = 0 end
+	if SVLOG_Cache then SVLOG_Cache = {} end
+end
+--[[
+##########################################################
+BUILD FUNCTION
+##########################################################
+]]--
+local function LoadLogOMatic()
+	if not SVLOG_Cache then SVLOG_Cache = {} end
+
+	SVLOG_Data = SVLOG_Data or {}
+	SVLOG_Data[realmKey] = SVLOG_Data[realmKey] or {}
+	SVLOG_Data[realmKey]["bags"] = SVLOG_Data[realmKey]["bags"] or {};
+	SVLOG_Data[realmKey]["bags"][nameKey] = SVLOG_Data[realmKey]["bags"][nameKey] or {};
+
+	LOG.stash = SVLOG_Data[realmKey]["bags"];
+	LOG.myStash = SVLOG_Data[realmKey]["bags"][nameKey];
+
+	SVLOG_Data[realmKey]["quests"] = SVLOG_Data[realmKey]["quests"] or {};
+	SVLOG_Data[realmKey]["quests"][nameKey] = SVLOG_Data[realmKey]["quests"][nameKey] or {};
+
+	LOG.chronicle = SVLOG_Data[realmKey]["quests"][nameKey];
+
+	NewHook(SuperVillain, "ResetProfile", ResetAllLogs);
+
+	local uselog = SuperVillain.db.SVChat.saveChats;
+	if not SVLOG_Cache["chat"] then SVLOG_Cache["chat"] = {} end
+	LOG:BuildCachedInventory();
+
+	--[[ OVERRIDE DEFAULT FUNCTIONS ]]--
+	if SuperVillain.db.SVBag.enable then
+		local BAGS = SuperVillain.SVBag;
+		if BAGS.BagFrame then
+			BAGS.BagFrame.RefreshBagsSlots = RefreshLoggedBagsSlots;
+			NewHook(BAGS, "MakeBank", LOG.AppendBankFunctions);
+		end
+	end
+	if SuperVillain.db.SVTip.enable then
+		local TIP = SuperVillain.SVTip;
+		TIP["GameTooltip_OnTooltipSetItem"] = function(...) GameTooltip_OnTooltipSetItem(...) end
+	end
+
+	--[[ APPLY HOOKS ]]--
+	if SuperVillain.db.SVChat.enable and SuperVillain.db.SVChat.saveChats then
+		for _,event in pairs(LoggingEvents) do
+			CHAT:RegisterEvent(event, "LogCurrentChat")
+		end
+		CHAT:RegisterEvent("PLAYER_ENTERING_WORLD")
+	end
+end
+
+SuperVillain.Registry:NewScript(LoadLogOMatic)
+SuperVillain.Registry:NewPlugin(SVUIAddOnName, SetConfigOptions)
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc
new file mode 100644
index 0000000..69029fe
--- /dev/null
+++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc
@@ -0,0 +1,10 @@
+## Interface: 50400
+## Author: Munglunch
+## Version: 1.0
+## Title: |cffFF9900SVUI |r|cffFFEF00Log O Matic|r
+## Notes: Supervillain UI [|cff9911FFData Logging|r].
+## SavedVariables: SVLOG_Data
+## SavedVariablesPerCharacter: SVLOG_Cache
+## RequiredDeps: SVUI
+
+SVUI_LogOMatic.lua
diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua
index 3b00f54..2530d2d 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua
@@ -40,7 +40,7 @@ GET ADDON DATA
 local SVUIAddOnName, StyleVillain = ...;
 local SuperVillain, L = unpack(SVUI);
 local NewHook = hooksecurefunc;
-local SVUIAddonEventHandler = CreateFrame("Frame", "SVUIAddonEventHandler")
+local SVUIAddonEventHandler = CreateFrame("Frame", nil)
 local version = GetAddOnMetadata(..., "Version");

 StyleVillain = SuperVillain:Prototype(SVUIAddOnName, version)