Mercurial > wow > reagentmaker
comparison EnchantOnScroll.lua @ 124:f17fc88e971e
Remove trailing spaces
| author | contrebasse |
|---|---|
| date | Sun, 11 Aug 2013 23:24:11 +0200 |
| parents | 0fd1fd1ba2d9 |
| children | 0a420daa0b3c |
comparison
equal
deleted
inserted
replaced
| 123:f7c7a1a9cac9 | 124:f17fc88e971e |
|---|---|
| 27 -- serviceType is localised, but nil if an item is created | 27 -- serviceType is localised, but nil if an item is created |
| 28 if not serviceType then | 28 if not serviceType then |
| 29 btn:Hide() | 29 btn:Hide() |
| 30 return | 30 return |
| 31 end | 31 end |
| 32 | 32 |
| 33 -- Check that there's scrolls in the bags | 33 -- Check that there's scrolls in the bags |
| 34 local itemCount = GetItemCount(SCROLL_ID) | 34 local itemCount = GetItemCount(SCROLL_ID) |
| 35 if not itemCount or itemCount==0 then | 35 if not itemCount or itemCount==0 then |
| 36 btn:Disable() | 36 btn:Disable() |
| 37 btn:Show() | 37 btn:Show() |
| 38 btn:SetText(A.L["Enchant a scroll (0)"]) | 38 btn:SetText(A.L["Enchant a scroll (0)"]) |
| 39 return | 39 return |
| 40 end | 40 end |
| 41 btn:SetText(A.L["Enchant a scroll (%d)"]:format(itemCount)) | 41 btn:SetText(A.L["Enchant a scroll (%d)"]:format(itemCount)) |
| 42 | 42 |
| 43 if numAvailable==0 then | 43 if numAvailable==0 then |
| 44 btn:Disable() | 44 btn:Disable() |
| 45 btn:Show() | 45 btn:Show() |
| 46 return | 46 return |
| 47 end | 47 end |
| 58 btn = CreateFrame("Button", nil, TradeSkillFrame, "UIPanelButtonTemplate") | 58 btn = CreateFrame("Button", nil, TradeSkillFrame, "UIPanelButtonTemplate") |
| 59 btn:SetSize(168,22) | 59 btn:SetSize(168,22) |
| 60 btn:SetPoint("TOPRIGHT",TradeSkillCreateButton,"TOPLEFT",0,0) | 60 btn:SetPoint("TOPRIGHT",TradeSkillCreateButton,"TOPLEFT",0,0) |
| 61 btn:SetText(A.L["Enchant on a scroll"]) | 61 btn:SetText(A.L["Enchant on a scroll"]) |
| 62 btn:Show() | 62 btn:Show() |
| 63 | 63 |
| 64 btn:SetScript("OnClick",function() | 64 btn:SetScript("OnClick",function() |
| 65 -- from http://wowprogramming.com/utils/xmlbrowser/live/AddOns/Blizzard_TradeSkillUI/Blizzard_TradeSkillUI.xml | 65 -- from http://wowprogramming.com/utils/xmlbrowser/live/AddOns/Blizzard_TradeSkillUI/Blizzard_TradeSkillUI.xml |
| 66 DoTradeSkill(TradeSkillFrame.selectedSkill,1) | 66 DoTradeSkill(TradeSkillFrame.selectedSkill,1) |
| 67 | 67 |
| 68 -- From GnomeWorks/ScrollMaking.lua | 68 -- From GnomeWorks/ScrollMaking.lua |
| 69 UseItemByName(SCROLL_ID) | 69 UseItemByName(SCROLL_ID) |
| 70 end) | 70 end) |
| 71 end | 71 end |
