# HG changeset patch # User "Aaron Bregger " # Date 1294357162 21600 # Node ID 993b57631e81eee36d2186a04aff46039971b7c9 # Parent bc43986f7fb0e84aac3c9ad6f607db284ea6d6f0 fixed some saved variable issues as well diff -r bc43986f7fb0 -r 993b57631e81 core.lua --- a/core.lua Thu Jan 06 17:04:05 2011 -0600 +++ b/core.lua Thu Jan 06 17:39:22 2011 -0600 @@ -134,12 +134,14 @@ } function RecipeProfit:OnInitialize() - profile = RECIPEPROFIT_profile or defaults + RECIPEPROFIT_profile = RECIPEPROFIT_profile or {}; for k, v in pairs(defaults) do - profile[k] = profile[k] or v; + RECIPEPROFIT_profile[k] = RECIPEPROFIT_profile[k] or v; end + profile = RECIPEPROFIT_profile; + self:RegisterChatCommand("recipeprofit", "ShowOptions") self:RegisterChatCommand("rp", "ShowOptions") self:RegisterChatCommand("profit", "ShowOptions") @@ -313,8 +315,7 @@ end function get_faction_db() - local factionAlliance = db.profile.faction == "Alliance" or - db.profile.faction == "default" and UnitFactionGroup("player") == "Alliance"; + local factionAlliance = UnitFactionGroup("player") == "Alliance"; if(factionAlliance) then return true, ""