comparison Modules/Queue.lua @ 110:67bd5057ecb7

Implemented vendor restocking with the mover. Comitting so I can always review this working version, but I?ll be disabling all part of it as it is not going to work properly without seriously compromising the code structure. Debug messages are now appended with ?Inventorium? (my MailOpener addon was making stuff difficult). Now properly removing the refill window from the displayed static popup windows list so new popups won?t be aligned at odd locations. Changed ?CreateMoverFrame? to not contain any scenario-specific info. All settings can be set with SetFrameSettings. Items that belong to speciality bags are now put there. Other items now ignore spaciality bags. Implemented test code for mailbox refill support. It has been disabled due to some issues but may be introduced later. The guild withdrawal limit is now taken into consideration. Queue is now reset before scanning again.
author Zerotorescue
date Fri, 14 Jan 2011 23:25:05 +0100
parents 252292b703ce
children 8460855e3d90
comparison
equal deleted inserted replaced
109:3bbad0429d87 110:67bd5057ecb7
91 -- Current stock will be -1 when no itemcount addon was found 91 -- Current stock will be -1 when no itemcount addon was found
92 92
93 -- Retrieve group settings 93 -- Retrieve group settings
94 local restockTarget = addon:GetOptionByKey(groupName, "restockTarget"); 94 local restockTarget = addon:GetOptionByKey(groupName, "restockTarget");
95 local bonusQueue = addon:GetOptionByKey(groupName, "bonusQueue"); 95 local bonusQueue = addon:GetOptionByKey(groupName, "bonusQueue");
96 local minCraftingQueue = floor( addon:GetOptionByKey(groupName, "minCraftingQueue") * restockTarget ); 96 local minCraftingQueue = floor( addon:GetOptionByKey(groupName, "minCraftingQueue") * restockTarget ); -- If the minCraftingQueue is 5% and restockTarget is 60, this will result in 3
97 97
98 -- Calculate the amount to be queued 98 -- Calculate the amount to be queued
99 local amount = ( restockTarget - currentStock ); 99 local amount = ( restockTarget - currentStock );
100 100
101 if currentStock == 0 and bonusQueue > 0 then 101 if currentStock == 0 and bonusQueue > 0 then