Mercurial > wow > recipeprofit
diff core.lua @ 52:993b57631e81 v2.05
fixed some saved variable issues as well
| author | "Aaron Bregger <killermonkey99@gmail.com>" |
|---|---|
| date | Thu, 06 Jan 2011 17:39:22 -0600 |
| parents | bc43986f7fb0 |
| children | 962cafb5915d |
line wrap: on
line diff
--- 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, ""
