comparison 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
comparison
equal deleted inserted replaced
51:bc43986f7fb0 52:993b57631e81
132 debugvars = {}, 132 debugvars = {},
133 blacklist = {}, 133 blacklist = {},
134 } 134 }
135 135
136 function RecipeProfit:OnInitialize() 136 function RecipeProfit:OnInitialize()
137 profile = RECIPEPROFIT_profile or defaults 137 RECIPEPROFIT_profile = RECIPEPROFIT_profile or {};
138 138
139 for k, v in pairs(defaults) do 139 for k, v in pairs(defaults) do
140 profile[k] = profile[k] or v; 140 RECIPEPROFIT_profile[k] = RECIPEPROFIT_profile[k] or v;
141 end 141 end
142
143 profile = RECIPEPROFIT_profile;
142 144
143 self:RegisterChatCommand("recipeprofit", "ShowOptions") 145 self:RegisterChatCommand("recipeprofit", "ShowOptions")
144 self:RegisterChatCommand("rp", "ShowOptions") 146 self:RegisterChatCommand("rp", "ShowOptions")
145 self:RegisterChatCommand("profit", "ShowOptions") 147 self:RegisterChatCommand("profit", "ShowOptions")
146 148
311 local nodeID = GatherMate.nodeIDs["RecipeProfit"][get_note_title(note, "")] 313 local nodeID = GatherMate.nodeIDs["RecipeProfit"][get_note_title(note, "")]
312 GatherMate:InjectNode(zoneID, coords, "RecipeProfit", nodeID) 314 GatherMate:InjectNode(zoneID, coords, "RecipeProfit", nodeID)
313 end 315 end
314 316
315 function get_faction_db() 317 function get_faction_db()
316 local factionAlliance = db.profile.faction == "Alliance" or 318 local factionAlliance = UnitFactionGroup("player") == "Alliance";
317 db.profile.faction == "default" and UnitFactionGroup("player") == "Alliance";
318 319
319 if(factionAlliance) then 320 if(factionAlliance) then
320 return true, "" 321 return true, ""
321 else 322 else
322 return false, "" 323 return false, ""