Quantcast

5.0.3

Steven Jackson [10-14-14 - 23:56]
5.0.3
Filename
Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
Interface/AddOns/SVUI_CraftOMatic/Loader.lua
Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua
diff --git a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
index eba8b48..fc3bd43 100644
--- a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
+++ b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
@@ -314,14 +314,11 @@ local function LiveProfileChange()

         if(LastKey ~= SOURCE_KEY) then
             --construct core dataset
-            local db           = setmetatable({}, meta_database)
-            db.data            = PROFILE_SV.STORED[SOURCE_KEY]
-            db.defaults        = CoreObject.configs
-            CoreObject.db      = db
-
-            local cache        = setmetatable({}, meta_cache)
-            cache.data         = CACHE_SV.STORED[SOURCE_KEY]
-            CoreObject.cache   = cache
+            local db           = rawget(CoreObject.db, "data")
+            db                 = PROFILE_SV.STORED[SOURCE_KEY]
+
+            local cache        = rawget(CoreObject.cache, "data")
+            cache              = CACHE_SV.STORED[SOURCE_KEY]

             if(CoreObject.ReLoad) then
                 CoreObject:ReLoad()
diff --git a/Interface/AddOns/SVUI_CraftOMatic/Loader.lua b/Interface/AddOns/SVUI_CraftOMatic/Loader.lua
index b7bdd81..06b83d3 100644
--- a/Interface/AddOns/SVUI_CraftOMatic/Loader.lua
+++ b/Interface/AddOns/SVUI_CraftOMatic/Loader.lua
@@ -82,8 +82,8 @@ SV.Options.args.plugins.args.pluginOptions.args[Schema].args["fishing"] = {
 			order = 1,
 			name = L['AutoEquip'],
 			desc = L['Enable/Disable automatically equipping fishing gear.'],
-			get = function(key)return SV.db[Schema].fishing[key[#key]]end,
-			set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key], "fishing")end
+			get = function(key)return SV.db[Schema].fishing[key[#key]] end,
+			set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key], "fishing") end
 		}
 	}
 }
diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua
index fbe594d..8225d2c 100644
--- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua
+++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua
@@ -187,6 +187,25 @@ CORE FUNCTIONS
 ##########################################################
 ]]--
 function PLUGIN:CraftingReset()
+	if((not SV.db[Schema].farming) or (not SV.db[Schema].fishing) (not SV.db[Schema].cooking)) then
+		SV.db[Schema] = {
+			["enable"] = true,
+			["fontSize"] = 12,
+			["farming"] = {
+				["buttonsize"] = 35,
+				["buttonspacing"] = 3,
+				["onlyactive"] = false,
+				["droptools"] = true,
+				["toolbardirection"] = "HORIZONTAL",
+			},
+			["fishing"] = {
+				["autoequip"] = true,
+			},
+			["cooking"] = {
+				["autoequip"] = true,
+			},
+		}
+	end
 	self.TitleWindow:Clear();
 	self.LogWindow:Clear();
 	self.TitleWindow:AddMessage("Crafting Modes", 1, 1, 0);