Mercurial > wow > inventory
comparison Modules/Queue.lua @ 207:5d6b3d116b80
Queueing without a profession open should no longer spam your chat window with ?No tradeskill window detected.? messages.
| author | Zerotorescue |
|---|---|
| date | Sat, 05 Feb 2011 20:01:57 +0100 |
| parents | 15f22a466596 |
| children | 1ed7ce9b1c5d |
comparison
equal
deleted
inserted
replaced
| 206:5d13830e8b0d | 207:5d6b3d116b80 |
|---|---|
| 417 | 417 |
| 418 function mod:QueueAll() | 418 function mod:QueueAll() |
| 419 -- Prepare a table with all possible tradeskill craftables | 419 -- Prepare a table with all possible tradeskill craftables |
| 420 local craftables = self:GetTradeskillCraftables(); | 420 local craftables = self:GetTradeskillCraftables(); |
| 421 | 421 |
| 422 if not craftables then | |
| 423 addon:Print("No tradeskill window detected. Please open a profession before trying to queue.", addon.Colors.Red); | |
| 424 return; | |
| 425 end | |
| 426 | |
| 422 -- Forget old queue | 427 -- Forget old queue |
| 423 twipe(queue); | 428 twipe(queue); |
| 424 twipe(skipped); | 429 twipe(skipped); |
| 425 | 430 |
| 426 local playerName = UnitName("player"); | 431 local playerName = UnitName("player"); |
| 442 if not craftables then | 447 if not craftables then |
| 443 craftables = self:GetTradeskillCraftables(); -- nil when no tradeskill window is open | 448 craftables = self:GetTradeskillCraftables(); -- nil when no tradeskill window is open |
| 444 end | 449 end |
| 445 | 450 |
| 446 if not craftables then | 451 if not craftables then |
| 447 addon:Print("No tradeskill window detected.", addon.Colors.Red); | 452 addon:Print("No tradeskill window detected. Please open a profession before trying to queue.", addon.Colors.Red); |
| 448 return; | 453 return; |
| 449 elseif not addon.db.profile.groups[groupName] then | 454 elseif not addon.db.profile.groups[groupName] then |
| 450 addon:Print(sformat("Tried to queue items from a group named \"%s\", but no such group exists.", groupName), addon.Colors.Red); | 455 addon:Print(sformat("Tried to queue items from a group named \"%s\", but no such group exists.", groupName), addon.Colors.Red); |
| 451 return; | 456 return; |
| 452 elseif not addon.db.profile.groups[groupName].items then | 457 elseif not addon.db.profile.groups[groupName].items then |
