Mercurial > wow > reagentmaker
comparison ReagentMaker.lua @ 18:c37c2a46723c
Remove debug printing
| author | contrebasse |
|---|---|
| date | Fri, 08 Apr 2011 19:24:22 +0200 |
| parents | 5336b3a19d4f |
| children | f7b23db7bcc6 |
comparison
equal
deleted
inserted
replaced
| 17:5336b3a19d4f | 18:c37c2a46723c |
|---|---|
| 1 local addonName, A = ... | 1 local addonName, A = ... |
| 2 | 2 |
| 3 -- @todo clean the A table | 3 -- @todo clean the A table |
| 4 -- @todo check local copy of globals functions | 4 -- @todo check local copy of globals functions |
| 5 -- @todo add support for sub-recipes (like ink plus milling) | |
| 6 -- @todo show a tooltip | |
| 7 -- @todo show number of craftable items | 5 -- @todo show number of craftable items |
| 8 -- @todo show owned items | 6 -- @todo show owned items |
| 9 -- @todo add support for dez ? | 7 -- @todo add support for dez ? |
| 10 -- @todo add support for cross tradeskill, like mining + forge/ingé | 8 -- @todo add support for cross tradeskill, like mining + forge/ingé |
| 11 -- @todo icon on reagent's button | |
| 12 | 9 |
| 13 --------------------------------------------------- | 10 --------------------------------------------------- |
| 14 -- Variables | 11 -- Variables |
| 15 --------------------------------------------------- | 12 --------------------------------------------------- |
| 16 -- Used by findglobals | 13 -- Used by findglobals |
| 31 local t_throttle = SCAN_DELAY | 28 local t_throttle = SCAN_DELAY |
| 32 local function throttleScan(self, t_elapsed) | 29 local function throttleScan(self, t_elapsed) |
| 33 t_throttle = t_throttle - t_elapsed | 30 t_throttle = t_throttle - t_elapsed |
| 34 if t_throttle<0 then | 31 if t_throttle<0 then |
| 35 self:SetScript("OnUpdate", nil) | 32 self:SetScript("OnUpdate", nil) |
| 36 print("go") | 33 |
| 37 | |
| 38 -- Close the external window if the tradeskill changed | 34 -- Close the external window if the tradeskill changed |
| 39 if A.currentTradeSkill ~= GetTradeSkillLine() then | 35 if A.currentTradeSkill ~= GetTradeSkillLine() then |
| 40 A.MenuFrame:Hide() | 36 A.MenuFrame:Hide() |
| 41 end | 37 end |
| 42 | |
| 43 if IsTradeSkillGuild() or IsTradeSkillLinked() then | 38 if IsTradeSkillGuild() or IsTradeSkillLinked() then |
| 44 A.MenuFrame:Hide() | 39 A.MenuFrame:Hide() |
| 45 return | 40 return |
| 46 end | 41 end |
| 47 | 42 |
| 48 -- Scan availabe recipes | 43 -- Scan availabe recipes |
| 49 A:ScanSimpleRecipes() | 44 A:ScanSimpleRecipes() |
| 50 end | 45 end |
| 51 end | 46 end |
| 52 A.EventsFrame:SetScript("OnEvent", function(self, event) | 47 A.EventsFrame:SetScript("OnEvent", function(self, event) |
| 53 print(self,event) | |
| 54 if event == "TRADE_SKILL_UPDATE" then | 48 if event == "TRADE_SKILL_UPDATE" then |
| 55 t_throttle = SCAN_DELAY | 49 t_throttle = SCAN_DELAY |
| 56 self:SetScript("OnUpdate", throttleScan) | 50 self:SetScript("OnUpdate", throttleScan) |
| 57 | |
| 58 --[[ | |
| 59 -- Close the external window if the tradeskill changed | |
| 60 if A.currentTradeSkill ~= GetTradeSkillLine() then | |
| 61 A.MenuFrame:Hide() | |
| 62 end | |
| 63 | |
| 64 if IsTradeSkillGuild() or IsTradeSkillLinked() then | |
| 65 A.MenuFrame:Hide() | |
| 66 return | |
| 67 end | |
| 68 | |
| 69 -- Scan availabe recipes | |
| 70 A:ScanSimpleRecipes() | |
| 71 --]] | |
| 72 | 51 |
| 73 elseif event == "TRADE_SKILL_SHOW" then | 52 elseif event == "TRADE_SKILL_SHOW" then |
| 74 A:Initialize() | 53 A:Initialize() |
| 75 A.EventsFrame:UnregisterEvent("TRADE_SKILL_SHOW") | 54 A.EventsFrame:UnregisterEvent("TRADE_SKILL_SHOW") |
| 76 end -- if | 55 end -- if |
