Mercurial > wow > inventory
comparison Modules/Queue.lua @ 98:252292b703ce
All print(...) function calls are now handled by addon:Print(text, color).
The cursor will be cleared of any items/spells before moving as well as when aborting.
author | Zerotorescue |
---|---|
date | Sun, 09 Jan 2011 17:49:33 +0100 |
parents | 31493364b163 |
children | 67bd5057ecb7 |
comparison
equal
deleted
inserted
replaced
97:ae268e5c7825 | 98:252292b703ce |
---|---|
35 end | 35 end |
36 end | 36 end |
37 | 37 |
38 function mod:QueueGroup(groupName) | 38 function mod:QueueGroup(groupName) |
39 if not addon.db.profile.groups[groupName] then | 39 if not addon.db.profile.groups[groupName] then |
40 print(("Tried to queue items from a group named \"%s\", but no such group exists."):format(groupName)); | 40 addon:Print(("Tried to queue items from a group named \"%s\", but no such group exists."):format(groupName), addon.Colors.Red); |
41 return; | 41 return; |
42 end | 42 end |
43 | 43 |
44 local temp = {}; | 44 local temp = {}; |
45 | 45 |
56 if addon.db.profile.groups[groupName].items then | 56 if addon.db.profile.groups[groupName].items then |
57 for itemId, _ in pairs(addon.db.profile.groups[groupName].items) do | 57 for itemId, _ in pairs(addon.db.profile.groups[groupName].items) do |
58 if not temp[itemId] then | 58 if not temp[itemId] then |
59 local itemLink = select(2, GetItemInfo(itemId)); | 59 local itemLink = select(2, GetItemInfo(itemId)); |
60 | 60 |
61 print("Couldn't queue " .. (itemLink or itemId or "???") .. " (not part of this profession)"); | 61 addon:Print(("Couldn't queue %s (not part of this profession)"):format((itemLink or itemId or "???")), addon.Colors.Orange); |
62 end | 62 end |
63 end | 63 end |
64 end | 64 end |
65 end | 65 end |
66 | 66 |
114 if priceThreshold == 0 or value == -1 or value >= priceThreshold then | 114 if priceThreshold == 0 or value == -1 or value >= priceThreshold then |
115 -- If no price threshold is set or the auction value is equal to or larger than the price threshold, then proceed | 115 -- If no price threshold is set or the auction value is equal to or larger than the price threshold, then proceed |
116 | 116 |
117 self:Queue(i, amount, groupName); | 117 self:Queue(i, amount, groupName); |
118 | 118 |
119 print("Queued " .. amount .. " of " .. itemLink); | 119 addon:Print(("Queued %d of %s"):format(amount, itemLink)); |
120 end | 120 end |
121 end | 121 end |
122 else | 122 else |
123 print("No usable itemcount addon found."); | 123 addon:Print("No usable itemcount addon found."); |
124 end | 124 end |
125 end | 125 end |
126 end | 126 end |
127 end | 127 end |
128 | 128 |