Quantcast

Fixed increment/decrement buttons in queue.

pschifferer [01-20-10 - 05:40]
Fixed increment/decrement buttons in queue.
Added (temporarily) some debugging output to troubleshoot queue updates when processing enchant-based skills (i.e., socketing, etc.)
Filename
CauldronMain.lua
CauldronQueue.lua
diff --git a/CauldronMain.lua b/CauldronMain.lua
index 73b6ce8..a3d1be1 100644
--- a/CauldronMain.lua
+++ b/CauldronMain.lua
@@ -597,7 +597,7 @@ end

 function Cauldron:OnSpellcastSucceed(event, unit, spell, rank)

--- self:info("spell succeed - unit: "..tostring(unit).."; spell: "..tostring(spell).."; rank: "..tostring(rank));
+ self:info("spell succeed - unit: "..tostring(unit).."; spell: "..tostring(spell).."; rank: "..tostring(rank));

 	-- ignore if the unit was not the player
 	if unit ~= "player" then
@@ -608,6 +608,7 @@ function Cauldron:OnSpellcastSucceed(event, unit, spell, rank)

 	-- adjust queue, but only if window is open
 	if CauldronFrame:IsShown() then
+	self:info("makingItemSpell: "..tostring(self.makingItemSpell));
 		if self.makingItemSpell == spell then
 			self.processing = false;

@@ -864,12 +865,13 @@ function Cauldron:ProcessItem(skillInfo, queueInfo, amount)
 		-- record the item we're making
 		self:debug("skillInfo.itemLink: "..tostring(skillInfo.itemLink));
 		self.makingItem = Cauldron:GetNameFromLink(queueInfo.link);
-		self:debug("makingItem: "..tostring(self.makingItem));
+		self:info("makingItem: "..tostring(self.makingItem));
 --		self.makingItemId = Cauldron:GetIdFromLink(skillInfo.itemLink);
 --		self:debug("makingItemId: "..tostring(self.makingItemId));
 		self.itemCurrentCount = GetItemCount(skillInfo.itemLink);

 		self.makingItemSpell = queueInfo.spell or Cauldron:GetNameFromLink(queueInfo.link);
+		self:info("makingItemSpell: "..tostring(self.makingItemSpell));
 		self.makingItemCount = amount;
 		self.queueInfo = queueInfo;

diff --git a/CauldronQueue.lua b/CauldronQueue.lua
index e0f66c5..bd156a9 100644
--- a/CauldronQueue.lua
+++ b/CauldronQueue.lua
@@ -345,7 +345,8 @@ function CauldronQueue:AdjustItemCount(queue, name, delta)
 		return;
 	end

-	local item; -- = queue.main[name];
+	local item = queue.main[name];
+	--[[
 	for qName, qInfo in pairs(queue.main) do
 		local qItem = Cauldron:GetNameFromLink(qInfo.link);
 		if name == qItem then
@@ -353,6 +354,7 @@ function CauldronQueue:AdjustItemCount(queue, name, delta)
 			break;
 		end
 	end
+	--]]

 	-- check for a mapped item, like "perfect" gem cuts, etc.
 	--[[ TODO