diff --git a/Cauldron/Cauldron.toc b/Cauldron/Cauldron.toc
index 65f670f..2e67c8d 100755
--- a/Cauldron/Cauldron.toc
+++ b/Cauldron/Cauldron.toc
@@ -12,6 +12,10 @@
## X-Category: Tradeskill
## X-eMail: dm AT critical DASH failure DOT org
## X-Curse-Packaged-Version: r220
+## X-Curse-Packaged-Version: r27
+## X-Curse-Project-Name: Cauldron
+## X-Curse-Project-ID: cauldron
+## X-Curse-Repository-ID: wow/cauldron/mainline
embeds.xml
diff --git a/Cauldron/CauldronMain.lua b/Cauldron/CauldronMain.lua
index 3260313..8cbbfe8 100644
--- a/Cauldron/CauldronMain.lua
+++ b/Cauldron/CauldronMain.lua
@@ -97,9 +97,8 @@ function Cauldron:OnEnable()
self:debug("OnEnable enter");
self:InitPlayer();
-
self:RegisterEvent("TRADE_SKILL_SHOW", "OnTradeShow");
- self:RegisterEvent("TRADE_SKILL_UPDATE", "OnSkillUpdate");
+ self:RegisterEvent("TRADE_SKILL_UPDATE", "OnTradeUpdate");
self:RegisterEvent("TRADE_SKILL_CLOSE", "OnTradeClose");
self:RegisterEvent("SKILL_LINES_CHANGED", "OnSkillUpdate");
self:RegisterEvent("ADDON_LOADED", "OnAddonLoaded");
@@ -118,6 +117,8 @@ function Cauldron:OnEnable()
-- self:RegisterEvent("PLAYER_REGEN_ENABLED");
-- self:RegisterEvent("AUCTION_HOUSE_CLOSED");
-- self:RegisterEvent("AUCTION_HOUSE_SHOW");
+ self:RegisterEvent("CRAFT_SHOW", "OnCraftShow");
+ self:RegisterEvent("CRAFT_CLOSE", "OnCraftClose");
-- self:RegisterEvent("PLAYER_LOGOUT");
self:RegisterEvent("UI_ERROR_MESSAGE", "OnError");
self:HookTooltips();
@@ -579,8 +580,7 @@ end
["amount"] = <amount>, -- amount of this skill that must be executed
["priority"] = <priority>, -- priority of the skill, for ordering in the queue
["icon"] = "<icon>", -- the icon path of the skill, for display
- ["skillIndex"] = <skill index>, -- the index of the skill, for API call usage
- ["reagentIndex"] = <reagent index>, -- the index of the reagent, for API call usage
+ ["index"] = <skill index>, -- the index of the skill, for API call usage
},
},
["main"] = {
@@ -590,7 +590,7 @@ end
["amount"] = <amount>,
["priority"] = <priority>,
["icon"] = "<icon>",
- ["skillIndex"] = <skill index>,
+ ["index"] = <skill index>,
},
},
["reagents"] = {
@@ -598,9 +598,9 @@ end
["tradeskill"] = "<tradeskill>",
["name"] = "<reagent>",
["amount"] = <amount>,
+ ["index"] = <reagent index>, -- the index of the reagent, for API call usage
["icon"] = "<icon>",
["skillIndex"] = <skill index>,
- ["reagentIndex"] = <reagent index>, -- the index of the reagent, for API call usage
},
},
},
diff --git a/Cauldron/CauldronMain.xml b/Cauldron/CauldronMain.xml
index 3351691..8daf935 100644
--- a/Cauldron/CauldronMain.xml
+++ b/Cauldron/CauldronMain.xml
@@ -30,7 +30,7 @@
<Scripts>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT");
- GameTooltip:SetTradeSkillItem(self.skillIndex, self.reagentIndex);
+ GameTooltip:SetTradeSkillItem(self.skillIndex, self:GetID());
CursorUpdate(self);
</OnEnter>
<OnLeave>
@@ -41,7 +41,7 @@
CursorOnUpdate(self);
</OnUpdate>
<OnClick>
- HandleModifiedItemClick(GetTradeSkillReagentItemLink(self.skillIndex, self.reagentIndex));
+ -- HandleModifiedItemClick(GetTradeSkillReagentItemLink(TradeSkillFrame.selectedSkill, self:GetID()));
</OnClick>
</Scripts>
</Button>
@@ -341,7 +341,7 @@
-- self.hasItem = 1;
</OnLoad>
<OnClick>
- HandleModifiedItemClick(GetTradeSkillItemLink(self.skillIndex, self.reagentIndex));
+ -- HandleModifiedItemClick(GetTradeSkillItemLink(TradeSkillFrame.selectedSkill));
</OnClick>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
diff --git a/Cauldron/CauldronMainUI.lua b/Cauldron/CauldronMainUI.lua
index ce83b46..3836efa 100644
--- a/Cauldron/CauldronMainUI.lua
+++ b/Cauldron/CauldronMainUI.lua
@@ -186,7 +186,6 @@ function Cauldron:UpdateSkillList()
skillFrame:SetID(i);
skillFrame.skillIndex = skillInfo.index;
- skillFrame.reagentIndex = nil;
-- set selection
if self.db.realm.userdata[self.vars.playername].skills[skillName].window.selected == skillInfo.index then
@@ -303,8 +302,7 @@ function Cauldron:UpdateSkillList()
local reagentInfo = skillInfo.reagents[j];
self:debug("UpdateSkillList: reagentInfo="..tostring(reagentInfo));
- reagentFrame.skillIndex = skillInfo.reagents[j].skillIndex;
- reagentFrame.reagentIndex = skillInfo.reagents[j].index;
+ reagentFrame.skillIndex = skillInfo.index;
if j > reagentCount then
self:debug("UpdateSkillList: hide the reagent frame");
@@ -560,8 +558,9 @@ function Cauldron:UpdateQueue()
-- set the icon
frame = _G["CauldronQueueItem"..i.."Icon"];
frame:SetNormalTexture(queueInfo.icon);
- frame.skillIndex = queueInfo.skillIndex;
- frame.reagentIndex = nil;
+ if skillInfo then
+ frame.skillIndex = skillInfo.index;
+ end
-- set the amount
frame = _G["CauldronQueueItem"..i.."IconCount"];
@@ -694,8 +693,9 @@ function Cauldron:UpdateQueue()
-- set the icon
frame = _G["CauldronQueueIntItem"..i.."Icon"];
frame:SetNormalTexture(queueInfo.icon);
- frame.skillIndex = queueInfo.skillIndex;
- frame.reagentIndex = queueInfo.reagentIndex;
+ if skillInfo then
+ frame.skillIndex = skillInfo.index;
+ end
-- set the amount
frame = _G["CauldronQueueIntItem"..i.."IconCount"];
@@ -812,8 +812,10 @@ function Cauldron:UpdateQueue()
-- set the icon
frame = _G["CauldronQueueReagentItem"..i.."Icon"];
frame:SetNormalTexture(queueInfo.icon);
- frame.skillIndex = queueInfo.skillIndex;
- frame.reagentIndex = queueInfo.reagentIndex;
+ if skillInfo then
+ frame.skillIndex = queueInfo.skillIndex;
+ frame.reagentIndex = queueInfo.index;
+ end
-- local playerReagentCount = 0; -- TODO
-- if playerReagentCount < queueInfo.amount then
-- frame:SetVertexColor(0.5, 0.5, 0.5, 1.0);
diff --git a/Cauldron/CauldronQueue.lua b/Cauldron/CauldronQueue.lua
index ee2573a..ec01e06 100644
--- a/Cauldron/CauldronQueue.lua
+++ b/Cauldron/CauldronQueue.lua
@@ -36,14 +36,13 @@ function CauldronQueue:NewQueue()
return queue;
end
-function CauldronQueue:NewItem(name, icon, tradeskill, index, amount, priority, reagentIndex)
+function CauldronQueue:NewItem(name, icon, tradeskill, index, amount, priority)
local queueItem = {
["name"] = name or "",
["icon"] = icon or "",
["tradeskill"] = tradeskill or "",
- ["skillIndex"] = index,
- ["reagentIndex"] = reagentIndex,
+ ["index"] = index,
["amount"] = amount or 1,
["priority"] = priority or 0,
};
@@ -51,7 +50,7 @@ function CauldronQueue:NewItem(name, icon, tradeskill, index, amount, priority,
return queueItem;
end
-function CauldronQueue:NewReagent(name, icon, amount, tradeskill, reagentIndex, skillIndex)
+function CauldronQueue:NewReagent(name, icon, amount, tradeskill, index, skillIndex)
local reagent = {
["name"] = name or "",
@@ -59,7 +58,7 @@ function CauldronQueue:NewReagent(name, icon, amount, tradeskill, reagentIndex,
["amount"] = amount or 1,
["tradeskill"] = tradeskill,
["skillIndex"] = skillIndex,
- ["reagentIndex"] = reagentIndex,
+ ["index"] = index,
};
return reagent;
@@ -271,7 +270,7 @@ function CauldronQueue:AddIntermediate(queue, reagent, amount)
local skillInfo = Cauldron:GetSkillInfoForItem(reagent.name);
-- it's not there, so create a new instance
- queue.intermediate[reagent.name] = CauldronQueue:NewItem(reagent.name, reagent.icon, skillInfo.tradeskill, skillInfo.index, amount, reagent.index);
+ queue.intermediate[reagent.name] = CauldronQueue:NewItem(reagent.name, reagent.icon, skillInfo.tradeskill, skillInfo.index, amount);
end
end
diff --git a/Cauldron/CauldronShoppingList.xml b/Cauldron/CauldronShoppingList.xml
index 08d1aac..e17dc5f 100644
--- a/Cauldron/CauldronShoppingList.xml
+++ b/Cauldron/CauldronShoppingList.xml
@@ -41,7 +41,9 @@
<Button name="$parentCloseButton" inherits="UIPanelCloseButton">
<Anchors>
<Anchor point="RIGHT">
- <Offset x="0" y="0"/>
+ <Offset>
+ <AbsDimension x="0" y="0"/>
+ </Offset>
</Anchor>
</Anchors>
<Scripts>
@@ -73,6 +75,7 @@
frameStrata="LOW" parent="UIParent"
movable="true" resizable="true" enableMouse="true" hidden="true">
<Size x="250" y="300" />
+
<ResizeBounds>
<minResize>
<AbsDimension x="75" y="75"/>
@@ -83,7 +86,9 @@
</ResizeBounds>
<Anchors>
<Anchor point="TOPRIGHT" relativeTo="UIParent" relativePoint="TOPRIGHT">
- <Offset x="-50" y="-200" />
+ <Offset>
+ <AbsDimension x="-50" y="-200" />
+ </Offset>
</Anchor>
</Anchors>
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background"
@@ -102,7 +107,9 @@
<FontString name="$parentTitleText" inherits="GameFontNormal" text="Shopping List">
<Anchors>
<Anchor point="TOP" relativeTo="CauldronShoppingListFrame" relativePoint="TOP">
- <Offset x="0" y="-4"/>
+ <Offset>
+ <AbsDimension x="0" y="-4"/>
+ </Offset>
</Anchor>
</Anchors>
</FontString>
@@ -114,7 +121,9 @@
<Button name="$parentCloseButton" inherits="UIPanelCloseButton">
<Anchors>
<Anchor point="TOPRIGHT">
- <Offset x="0" y="0"/>
+ <Offset>
+ <AbsDimension x="0" y="0"/>
+ </Offset>
</Anchor>
</Anchors>
<Scripts>
@@ -130,10 +139,14 @@
<Size x="240" y="280" />
<Anchors>
<Anchor point="TOPLEFT">
- <Offset x="5" y="-20" />
+ <Offset>
+ <AbsDimension x="5" y="-20" />
+ </Offset>
</Anchor>
<Anchor point="BOTTOMRIGHT">
- <Offset x="-5" y="5" />
+ <Offset>
+ <AbsDimension x="-5" y="5" />
+ </Offset>
</Anchor>
</Anchors>
<ScrollChild>
@@ -197,12 +210,14 @@
<OnMouseDown>
if button == "LeftButton" then
self:StartMoving();
+ self.isResizing = true;
end
</OnMouseDown>
<OnMouseUp>
if button == "LeftButton" then
self:StopMovingOrSizing();
self.isResizing = false;
+ Cauldron:UpdateShoppingList();
-- TradeskillInfoUI:Frame_Update()
-- CauldronShopping:SaveShoppingListFramePosition();
end