diff --git a/CauldronMain.lua b/CauldronMain.lua
index 9c5671f..a40223a 100644
--- a/CauldronMain.lua
+++ b/CauldronMain.lua
@@ -303,8 +303,8 @@ function Cauldron:OnEnable()
-- self:RegisterEvent("PLAYER_REGEN_ENABLED", "PlayerRegenEnabled");
-- self:RegisterEvent("AUCTION_HOUSE_CLOSED");
-- self:RegisterEvent("AUCTION_HOUSE_SHOW");
- self:RegisterEvent("CRAFT_SHOW", "OnCraftShow");
- self:RegisterEvent("CRAFT_CLOSE", "OnCraftClose");
+-- self:RegisterEvent("CRAFT_SHOW", "OnCraftShow");
+-- self:RegisterEvent("CRAFT_CLOSE", "OnCraftClose");
-- self:RegisterEvent("PLAYER_LOGOUT");
self:RegisterEvent("UI_ERROR_MESSAGE", "OnError");
self:RegisterEvent("UNIT_QUEST_LOG_CHANGED", "OnQuestLogChanged");
@@ -361,14 +361,11 @@ function Cauldron:OnEvent(event, ...)
end
function Cauldron:OnTradeShow()
- self:debug("OnTradeShow enter");
TradeSkillFrame_Update(); -- seems to fix the early bailout of trade skill iterations
-- update our known skills
- self:debug("OnTradeShow: update known skills");
if not Cauldron.updatingSkills then
--- Cauldron:info("Requesting skill update on trade show");
Cauldron.updatingSkills = Cauldron:NeedsSkillUpdate();
Cauldron:UpdateSkills();
end
@@ -381,19 +378,15 @@ function Cauldron:OnTradeShow()
self:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED", "OnSpellcastInterrupt");
-- show the UI frame
- self:debug("OnTradeShow: show the UI");
-- Cauldron.needsRedraw = true;
self:Frame_Show();
- self:debug("OnTradeShow exit");
end
function Cauldron:OnTradeUpdate()
- self:debug("OnTradeUpdate enter");
-- TODO
- self:debug("OnTradeUpdate exit");
end
function Cauldron:OnTradeClose()
@@ -410,14 +403,6 @@ function Cauldron:OnTradeClose()
end
---[[
-function Cauldron:OnTradeItemChanged()
- Cauldron:info("trade item changed");
-
--- Cauldron:UpdateSkillList();
-end
---]]
-
function Cauldron:OnSkillUpdate(event)
--Cauldron:info("skill update: event="..tostring(event));
@@ -553,18 +538,6 @@ function Cauldron:OnBagUpdate(event, bagid)
end
-function Cauldron:OnCraftShow()
-
--- TODO
-
-end
-
-function Cauldron:OnCraftClose()
-
--- TODO
-
-end
-
function Cauldron:OnMerchantShow()
-- check if there's anything in the shopping list
@@ -627,24 +600,18 @@ end
function Cauldron:OnSpellcastStart(event, unit, spell, rank)
--- self:info("spell start - unit: "..tostring(unit).."; spell: "..tostring(spell).."; rank: "..tostring(rank));
-
self.processing = true;
end
function Cauldron:OnSpellcastStop(event, unit, spell, rank)
--- self:info("spell stop - unit: "..tostring(unit).."; spell: "..tostring(spell).."; rank: "..tostring(rank));
-
self.processing = false;
end
function Cauldron:OnSpellcastSucceed(event, unit, spell, rank)
- self:debug("spell succeed - unit: "..tostring(unit).."; spell: "..tostring(spell).."; rank: "..tostring(rank));
-
-- ignore if the unit was not the player
if unit ~= "player" then
return;
@@ -679,8 +646,6 @@ end
function Cauldron:OnSpellcastInterrupt(event, unit, spell, rank)
--- self:info("spell interrupt - unit: "..tostring(unit).."; spell: "..tostring(spell).."; rank: "..tostring(rank));
-
Cauldron.makingItem = nil;
Cauldron.makingItemCount = nil;
@@ -758,7 +723,7 @@ function Cauldron:QueueAllTradeSkillItem()
-- update the shopping list
Cauldron:UpdateShoppingListFromQueue();
else
- -- self:info("No amount to queue for "..skillInfo.name..".");
+ Cauldron:info("No amount to queue for "..skillInfo.name..".");
end
end
@@ -823,14 +788,11 @@ function Cauldron:ProcessQueue()
--]]
local queue = CauldronQueue:GetItems(self.db.realm.userdata[self.vars.playername].queue);
- self:debug("ProcessQueue: queue="..#queue);
local queueInfo = nil;
local skillInfo = nil;
if #queue > 0 then
- self:debug("ProcessQueue: checking first main queue item to see if it can be made now");
-
-- see if first item can be made
queueInfo = queue[1];
-- self:debug("ProcessQueue: queueInfo="..queueInfo.name);
@@ -871,23 +833,14 @@ function Cauldron:ProcessQueue()
-- find intermediate items that need to be crafted
local intQueue = CauldronQueue:GetIntermediates(self.db.realm.userdata[self.vars.playername].queue);
- self:debug("ProcessQueue: intQueue="..#intQueue);
if #intQueue > 0 then
- self:debug("ProcessQueue: processing intermediate queue items");
-
queueInfo = intQueue[1];
- self:debug("ProcessQueue: queueInfo="..queueInfo.name);
skillInfo = Cauldron:GetSkillInfo(queueInfo.tradeskill, queueInfo.name);
- self:debug("ProcessQueue: skillInfo="..tostring(skillInfo));
else
if #queue > 0 then
- self:debug("ProcessQueue: processing main queue items");
-
queueInfo = queue[1];
- self:debug("ProcessQueue: queueInfo="..queueInfo.name);
skillInfo = Cauldron:GetSkillInfo(queueInfo.tradeskill, queueInfo.name);
- self:debug("ProcessQueue: skillInfo="..tostring(skillInfo));
end
end
@@ -898,7 +851,6 @@ end
function Cauldron:SubmitItemToProcess(queueInfo, skillInfo, amount)
if queueInfo and skillInfo then
- self:debug("ProcessQueue: queueInfo="..queueInfo.name);
if queueInfo.tradeskill ~= CURRENT_TRADESKILL then
local msg = string.format(L["Crafting %1$s requires the %2$s skill."], queueInfo.name, queueInfo.tradeskill);
@@ -906,7 +858,6 @@ function Cauldron:SubmitItemToProcess(queueInfo, skillInfo, amount)
return;
end
- self:debug("ProcessQueue: process item: "..queueInfo.name);
Cauldron:ProcessItem(skillInfo, queueInfo, amount or queueInfo.amount);
else
if not queueInfo then
diff --git a/CauldronMain.xml b/CauldronMain.xml
index 5e065e0..034bb1d 100755
--- a/CauldronMain.xml
+++ b/CauldronMain.xml
@@ -384,6 +384,181 @@
</Frame>
</Frames>
</Frame>
+ <Frame name="$parentItemDetails" hidden="true">
+ <Size x="450" y="150" />
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="$parentSkillIcon" relativePoint="BOTTOMLEFT">
+ <Offset x="10" y="-2"/>
+ </Anchor>
+ </Anchors>
+ <Layers>
+ <Layer level="BACKGROUND">
+ <FontString name="$parentRequirementLabel" inherits="GameFontHighlightSmall" text="REQUIRES_LABEL">
+ <Anchors>
+ <Anchor point="TOPLEFT">
+ <Offset x="0" y="0"/>
+ </Anchor>
+ </Anchors>
+ </FontString>
+ <FontString name="$parentRequirementText" inherits="GameFontHighlightSmall" justifyV="TOP" justifyH="LEFT">
+ <Size x="380" y="0"/>
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="$parentRequirementLabel" relativePoint="TOPRIGHT" >
+ <Offset x="4" y="0"/>
+ </Anchor>
+ </Anchors>
+ </FontString>
+ <FontString name="$parentSkillCooldown" inherits="GameFontRedSmall">
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="$parentRequirementLabel" relativePoint="BOTTOMLEFT">
+ <Offset x="0" y="0"/>
+ </Anchor>
+ </Anchors>
+ </FontString>
+ <!--
+ <Texture name="$parentDetailHeaderLeft" urgency="5" file="Interface\ClassTrainerFrame\UI-ClassTrainer-DetailHeaderLeft">
+ <Size x="256" y="64"/>
+ <Anchors>
+ <Anchor point="TOPLEFT">
+ <Offset x="0" y="3"/>
+ </Anchor>
+ </Anchors>
+ </Texture>
+ <Texture urgency="5" file="Interface\ClassTrainerFrame\UI-ClassTrainer-DetailHeaderRight">
+ <Size x="64" y="64"/>
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="$parentDetailHeaderLeft" relativePoint="TOPRIGHT">
+ <Offset x="0" y="0"/>
+ </Anchor>
+ </Anchors>
+ </Texture>
+ -->
+ <FontString name="$parentDescription" inherits="GameFontHighlightSmall" justifyH="LEFT">
+ <Size x="490" y="0"/>
+ <Anchors>
+ <Anchor point="TOPLEFT">
+ <Offset x="5" y="-10"/>
+ </Anchor>
+ </Anchors>
+ </FontString>
+ <!--
+ <FontString name="$parentReagentLabel" inherits="GameFontNormalSmall" text="SPELL_REAGENTS">
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="$parentDescription" relativePoint="BOTTOMLEFT">
+ <Offset x="0" y="-10"/>
+ </Anchor>
+ </Anchors>
+ </FontString>
+ -->
+ </Layer>
+ </Layers>
+ <Frames>
+ <Button name="$parentReagent1" inherits="CauldronReagentDetailTemplate" id="1">
+ <Size x="150" y="39" />
+ <Anchors>
+ <Anchor point="TOPLEFT">
+ <Offset x="-2" y="-20"/>
+ </Anchor>
+ </Anchors>
+ <Scripts>
+ <OnLoad>
+ self:SetScale(0.75);
+ </OnLoad>
+ </Scripts>
+ </Button>
+ <Button name="$parentReagent2" inherits="CauldronReagentDetailTemplate" id="2">
+ <Size x="150" y="39" />
+ <Anchors>
+ <Anchor point="LEFT" relativeTo="$parentReagent1" relativePoint="RIGHT">
+ <Offset x="0" y="0"/>
+ </Anchor>
+ </Anchors>
+ <Scripts>
+ <OnLoad>
+ self:SetScale(0.75);
+ </OnLoad>
+ </Scripts>
+ </Button>
+ <Button name="$parentReagent3" inherits="CauldronReagentDetailTemplate" id="3">
+ <Size x="150" y="39" />
+ <Anchors>
+ <Anchor point="LEFT" relativeTo="$parentReagent2" relativePoint="RIGHT">
+ <Offset x="0" y="0"/>
+ </Anchor>
+ </Anchors>
+ <Scripts>
+ <OnLoad>
+ self:SetScale(0.75);
+ </OnLoad>
+ </Scripts>
+ </Button>
+ <Button name="$parentReagent4" inherits="TradeSkillItemTemplate" id="4">
+ <Size x="150" y="39" />
+ <Anchors>
+ <Anchor point="LEFT" relativeTo="$parentReagent3" relativePoint="RIGHT">
+ <Offset x="0" y="0"/>
+ </Anchor>
+ </Anchors>
+ <Scripts>
+ <OnLoad>
+ self:SetScale(0.75);
+ </OnLoad>
+ </Scripts>
+ </Button>
+ <Button name="$parentReagent5" inherits="CauldronReagentDetailTemplate" id="5">
+ <Size x="150" y="39" />
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="$parentReagent1" relativePoint="BOTTOMLEFT">
+ <Offset x="0" y="-2"/>
+ </Anchor>
+ </Anchors>
+ <Scripts>
+ <OnLoad>
+ self:SetScale(0.75);
+ </OnLoad>
+ </Scripts>
+ </Button>
+ <Button name="$parentReagent6" inherits="CauldronReagentDetailTemplate" id="6">
+ <Size x="150" y="39" />
+ <Anchors>
+ <Anchor point="LEFT" relativeTo="$parentReagent5" relativePoint="RIGHT">
+ <Offset x="0" y="0"/>
+ </Anchor>
+ </Anchors>
+ <Scripts>
+ <OnLoad>
+ self:SetScale(0.75);
+ </OnLoad>
+ </Scripts>
+ </Button>
+ <Button name="$parentReagent7" inherits="CauldronReagentDetailTemplate" id="7">
+ <Size x="150" y="39" />
+ <Anchors>
+ <Anchor point="LEFT" relativeTo="$parentReagent6" relativePoint="RIGHT">
+ <Offset x="0" y="0"/>
+ </Anchor>
+ </Anchors>
+ <Scripts>
+ <OnLoad>
+ self:SetScale(0.75);
+ </OnLoad>
+ </Scripts>
+ </Button>
+ <Button name="$parentReagent8" inherits="CauldronReagentDetailTemplate" id="8">
+ <Size x="150" y="39" />
+ <Anchors>
+ <Anchor point="LEFT" relativeTo="$parentReagent7" relativePoint="RIGHT">
+ <Offset x="0" y="0"/>
+ </Anchor>
+ </Anchors>
+ <Scripts>
+ <OnLoad>
+ self:SetScale(0.75);
+ </OnLoad>
+ </Scripts>
+ </Button>
+ </Frames>
+ </Frame>
<Frame name="$parentSelection" setAllPoints="true" enableMouse="true" hidden="true" frameStrata="LOW" frameLevel="1">
<Layers>
<Layer level="OVERLAY">
@@ -400,6 +575,28 @@
</OnClick>
</Scripts>
</Button>
+
+ <!-- Template: Guild crafter -->
+ <Button name="CauldronGuildCrafterButtonTemplate" hidden="false" virtual="true">
+ <Size>
+ <AbsDimension x="152" y="16"/>
+ </Size>
+ <ButtonText name="$parentText">
+ <Size x="0" y="16"/>
+ <Anchors>
+ <Anchor point="LEFT" x="4" y="0"/>
+ </Anchors>
+ </ButtonText>
+ <Scripts>
+ <OnClick>
+ ChatFrame_SendTell(self.name);
+ </OnClick>
+ </Scripts>
+ <NormalFont style="GameFontHighlightLeft"/>
+ <HighlightFont style="GameFontHighlightLeft"/>
+ <DisabledFont style="GameFontDisableLeft"/>
+ <HighlightTexture file="Interface\FriendsFrame\UI-FriendsFrame-HighlightBar-Blue" setAllPoints="true" alphaMode="ADD"/>
+ </Button>
<!-- Main UI frame -->
<Frame name="CauldronFrame" inherits="ButtonFrameTemplate"
@@ -649,15 +846,6 @@
self.texture:SetPoint("TOPLEFT", 0, 0);
</OnMouseUp>
<OnClick>
- --[[
- TradeSkillFrame.filterTbl = {hasMaterials = false, hasSkillUp = false, subClassValue = -1, slotValue = -1 };
- TradeSkillOnlyShowSkillUps(TradeSkillFrame.filterTbl.hasSkillUp);
- TradeSkillOnlyShowMakeable(TradeSkillFrame.filterTbl.hasMaterials);
- SetTradeSkillSubClassFilter(TradeSkillFrame.filterTbl.subClassValue, 1, 1);
- SetTradeSkillInvSlotFilter(TradeSkillFrame.filterTbl.slotValue, 1, 1);
- TradeSkillUpdateFilterBar();
- CloseDropDownMenus();
- --]]
Cauldron:FilterDropDown_Reset();
Cauldron:SetWindowOffset(0);
Cauldron:UpdateSkillList();
@@ -1152,6 +1340,35 @@
</Button>
<!-- View guild crafters button -->
+ <Button name="CauldronShowGuildCraftersButton" inherits="CauldronButtonTemplate" text="GUILD_TRADE_SKILL_VIEW_CRAFTERS"
+ hidden="true">
+ <Size x="140" y="22"/>
+ <Anchors>
+ <Anchor point="BOTTOMRIGHT">
+ <Offset x="-4" y="4" />
+ </Anchor>
+ </Anchors>
+ <Frames>
+ <Frame name="$parentMask" setAllPoints="true" enableMouse="true" hidden="true">
+ <Scripts>
+ <OnEnter>
+ if (self.tooltip) then
+ GameTooltip:SetOwner(self, "ANCHOR_LEFT");
+ GameTooltip:SetText(self.tooltip, nil, nil, nil, nil, 1);
+ end
+ </OnEnter>
+ <OnLeave function="GameTooltip_Hide"/>
+ </Scripts>
+ </Frame>
+ </Frames>
+ <Scripts>
+ <OnLoad>
+ </OnLoad>
+ <OnClick>
+ Cauldron:ShowGuildCrafters();
+ </OnClick>
+ </Scripts>
+ </Button>
<!-- Show queue button -->
<Button name="CauldronShowQueueButton" inherits="CauldronButtonTemplate" text="Show Queue">
@@ -1176,7 +1393,8 @@
</Frames>
<Scripts>
<OnLoad>
- -- TODO: update with localized text
+ -- update with localized text
+ self:SetText(Cauldron:LocaleString("Show Queue"));
</OnLoad>
<OnClick>
ShowUIPanel(CauldronQueueWindowFrame);
@@ -1192,6 +1410,141 @@
<OnShow function="CauldronFrame_OnShow"/>
<OnHide function="CauldronFrame_OnHide"/>
</Scripts>
-</Frame>
+ </Frame>
+ <!-- Guild crafters frame -->
+ <Frame name="CauldronGuildFrame" toplevel="true" frameStrata="DIALOG" hidden="true" parent="CauldronFrame" inherits="TranslucentFrameTemplate">
+ <Size>
+ <AbsDimension x="190" y="218"/>
+ </Size>
+ <Anchors>
+ <Anchor point="BOTTOMLEFT" relativeTo="CauldronFrame" relativePoint="BOTTOMRIGHT" x="-6" y="19"/>
+ </Anchors>
+ <Layers>
+ <Layer level="ARTWORK">
+ <FontString name="$parentTitle" inherits="GameFontNormal" text="GUILD_CRAFTERS">
+ <Anchors>
+ <Anchor point="TOPLEFT" x="18" y="-18"/>
+ </Anchors>
+ </FontString>
+ </Layer>
+ </Layers>
+ <Frames>
+ <Button name="$parentCloseButton" inherits="UIPanelCloseButton">
+ <Anchors>
+ <Anchor point="TOPRIGHT">
+ <Offset>
+ <AbsDimension x="-4" y="-4"/>
+ </Offset>
+ </Anchor>
+ </Anchors>
+ </Button>
+ <Frame name="$parentContainer">
+ <Anchors>
+ <Anchor point="TOPLEFT" x="14" y="-36"/>
+ <Anchor point="TOPRIGHT" x="-14" y="-36"/>
+ <Anchor point="BOTTOM" x="0" y="14"/>
+ </Anchors>
+ <Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
+ <EdgeSize>
+ <AbsValue val="12"/>
+ </EdgeSize>
+ <TileSize>
+ <AbsValue val="8"/>
+ </TileSize>
+ <BackgroundInsets>
+ <AbsInset left="1" right="1" top="1" bottom="1"/>
+ </BackgroundInsets>
+ </Backdrop>
+ <Frames>
+ <ScrollFrame name="CauldronGuildCraftersFrame" inherits="FauxScrollFrameTemplate">
+ <Anchors>
+ <Anchor point="TOPLEFT">
+ <Offset x="0" y="-4"/>
+ </Anchor>
+ <Anchor point="BOTTOMRIGHT">
+ <Offset x="-26" y="4"/>
+ </Anchor>
+ </Anchors>
+ <Layers>
+ <Layer level="BACKGROUND">
+ <Texture name="$parentTrack">
+ <Size x="18" y="0"/>
+ <Anchors>
+ <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="4" y="-2"/>
+ <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="4" y="2"/>
+ </Anchors>
+ <Color r="0" g="0" b="0" a="1"/>
+ </Texture>
+ </Layer>
+ </Layers>
+ <Scripts>
+ <OnVerticalScroll>
+ FauxScrollFrame_OnVerticalScroll(self, offset, TRADE_SKILL_HEIGHT, CauldronGuilCraftersFrame_Update);
+ </OnVerticalScroll>
+ </Scripts>
+ </ScrollFrame>
+ <Button name="CauldronGuildCrafter1" inherits="CauldronGuildCrafterButtonTemplate" id="1">
+ <Anchors>
+ <Anchor point="TOPLEFT" x="4" y="-4"/>
+ </Anchors>
+ </Button>
+ <Button name="CauldronGuildCrafter2" inherits="CauldronGuildCrafterButtonTemplate" id="2">
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="CauldronGuildCrafter1" relativePoint="BOTTOMLEFT" x="0" y="0"/>
+ </Anchors>
+ </Button>
+ <Button name="CauldronGuildCrafter3" inherits="CauldronGuildCrafterButtonTemplate" id="3">
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="CauldronGuildCrafter2" relativePoint="BOTTOMLEFT" x="0" y="0"/>
+ </Anchors>
+ </Button>
+ <Button name="CauldronGuildCrafter4" inherits="CauldronGuildCrafterButtonTemplate" id="4">
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="CauldronGuildCrafter3" relativePoint="BOTTOMLEFT" x="0" y="0"/>
+ </Anchors>
+ </Button>
+ <Button name="CauldronGuildCrafter5" inherits="CauldronGuildCrafterButtonTemplate" id="5">
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="CauldronGuildCrafter4" relativePoint="BOTTOMLEFT" x="0" y="0"/>
+ </Anchors>
+ </Button>
+ <Button name="CauldronGuildCrafter6" inherits="CauldronGuildCrafterButtonTemplate" id="6">
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="CauldronGuildCrafter5" relativePoint="BOTTOMLEFT" x="0" y="0"/>
+ </Anchors>
+ </Button>
+ <Button name="CauldronGuildCrafter7" inherits="CauldronGuildCrafterButtonTemplate" id="7">
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="CauldronGuildCrafter6" relativePoint="BOTTOMLEFT" x="0" y="0"/>
+ </Anchors>
+ </Button>
+ <Button name="CauldronGuildCrafter8" inherits="CauldronGuildCrafterButtonTemplate" id="8">
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="CauldronGuildCrafter7" relativePoint="BOTTOMLEFT" x="0" y="0"/>
+ </Anchors>
+ </Button>
+ <Button name="CauldronGuildCrafter9" inherits="CauldronGuildCrafterButtonTemplate" id="9">
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="CauldronGuildCrafter8" relativePoint="BOTTOMLEFT" x="0" y="0"/>
+ </Anchors>
+ </Button>
+ <Button name="CauldronGuildCrafter10" inherits="CauldronGuildCrafterButtonTemplate" id="10">
+ <Anchors>
+ <Anchor point="TOPLEFT" relativeTo="CauldronGuildCrafter9" relativePoint="BOTTOMLEFT" x="0" y="0"/>
+ </Anchors>
+ </Button>
+ </Frames>
+ <Scripts>
+ <OnLoad>
+ self:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b);
+ self:SetBackdropColor(0.0, 0.0, 0.0, 0.9);
+ </OnLoad>
+ </Scripts>
+ </Frame>
+ </Frames>
+ <Scripts>
+ <OnShow function="CauldronGuildFrame_OnShow"/>
+ </Scripts>
+ </Frame>
</Ui>
diff --git a/CauldronMainUI.lua b/CauldronMainUI.lua
index ccf6d53..e597276 100644
--- a/CauldronMainUI.lua
+++ b/CauldronMainUI.lua
@@ -15,8 +15,6 @@ local SLOT_NONE = "none";
function Cauldron:Frame_Show()
-self:debug("frame show: "..tostring(CauldronQueueWindowFrame));
-
if Cauldron.vars.enabled and not(IsShiftKeyDown() and IsControlKeyDown()) then
-- show main UI
@@ -129,9 +127,6 @@ function Cauldron:Frame_Update()
-- update filter information
self:UpdateStatus();
---[==[
- self:UpdateFilterDropDowns();
---]==]
-- display list of matching skills
if CAULDRON_TRADESKILL_NAME ~= CURRENT_TRADESKILL then
@@ -161,9 +156,6 @@ function Cauldron:UpdateSkillInfo(skillName, rank, maxRank)
end
local skillCount = Cauldron:GetSkillCount(skillName);
---[==[
- CauldronRankFrameSkillName:SetText(skillName.." ("..skillCount.." "..L["skills"]..")");
---]==]
CauldronSkillNameText:SetText(skillName);
local prof_title = "";
if IsTradeSkillGuild() then
@@ -464,9 +456,13 @@ function Cauldron:UpdateSkillList()
frame = _G["CauldronSkillItem"..i.."DiscloseButton"];
if frame then
frame.skillInfo = skillInfo;
+
local reagentsExpanded = self.db.realm.userdata[self.vars.playername].skills[skillName].window.skills[skillInfo.name].expanded;
- -- if reagentsExpanded then
+ if reagentsExpanded then
frame:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-Up");
+ else
+ frame:SetNormalTexture("Interface\\Buttons\\UI-PlusButton-Up");
+ end
-- _G["CauldronSkillItem"..i.."Reagents"]:Show();
@@ -492,22 +488,71 @@ function Cauldron:UpdateSkillList()
local reagents = skillInfo.reagents;
local reagentCount = #reagents;
+ local smallReagentsFrame = _G["CauldronSkillItem"..i.."Reagents"];
+ local reagentDetailsFrame = _G["CauldronSkillItem"..i.."ItemDetails"];
+
+ if reagentsExpanded then
+ reagentDetailsFrame:Show();
+ smallReagentsFrame:Hide();
+
+ local reqsLabelFrame = _G["CauldronSkillItem"..i.."ItemDetailsRequirementLabel"];
+ local reqsFrame = _G["CauldronSkillItem"..i.."ItemDetailsRequirementText"];
+ local spellFocus = BuildColoredListString(GetTradeSkillTools(skillInfo.index));
+ if ( spellFocus ) then
+ reqsLabelFrame:Show();
+ reqsFrame:SetText(spellFocus);
+ else
+ reqsLabelFrame:Hide();
+ reqsFrame:SetText("");
+ end
+
+ local cdFrame = _G["CauldronSkillItem"..i.."ItemDetailsSkillCooldown"];
+ local cooldown = GetTradeSkillCooldown(skillInfo.index);
+ if cooldown then
+ cdFrame:SetText(COOLDOWN_REMAINING.." "..SecondsToTime(cooldown));
+ else
+ cdFrame:SetText("");
+ end
+
+ local descFrame = _G["CauldronSkillItem"..i.."ItemDetailsDescription"];
+-- local reagentLabel = _G["CauldronSkillItem"..i.."ItemDetailsReagentLabel"];
+ local desc = GetTradeSkillDescription(skillInfo.index);
+ if desc then
+ descFrame:SetText(desc);
+-- reagentLabel:SetPoint("TOPLEFT", "CauldronSkillItem"..i.."ItemDetailsDescription", "BOTTOMLEFT", 0, -10);
+ else
+ descFrame:SetText(" ");
+-- reagentLabel:SetPoint("TOPLEFT", "CauldronSkillItem"..i.."ItemDetailsDescription", "TOPLEFT", 0, 0);
+ end
+ else
+ reagentDetailsFrame:Hide();
+ smallReagentsFrame:Show();
+ end
+
for j=1,8 do
local reagentFrame = _G["CauldronSkillItem"..i.."ReagentsItemDetail"..j];
+ local reagentDetailFrame = _G["CauldronSkillItem"..i.."ItemDetailsReagent"..j];
if reagentFrame then
if j > reagentCount then
reagentFrame:Hide();
+ reagentDetailFrame:Hide();
else
local reagentInfo = reagents[j];
reagentFrame.skillIndex = skillInfo.index;
reagentFrame.reagentIndex = reagentInfo.index;
reagentFrame.link = reagentInfo.link;
+ reagentDetailFrame.skillIndex = skillInfo.index;
+ reagentDetailFrame.reagentIndex = reagentInfo.index;
+ reagentDetailFrame.link = reagentInfo.link;
local reagentNameFrame = _G["CauldronSkillItem"..i.."ReagentsItemDetail"..j.."Name"];
+ local reagentDetailsNameFrame = _G["CauldronSkillItem"..i.."ItemDetailsReagent"..j.."Name"];
local reagentIconFrame = _G["CauldronSkillItem"..i.."ReagentsItemDetail"..j.."IconTexture"];
+ local reagentDetailsIconFrame = _G["CauldronSkillItem"..i.."ItemDetailsReagent"..j.."IconTexture"];
local reagentCountFrame = _G["CauldronSkillItem"..i.."ReagentsItemDetail"..j.."Count"];
+ local reagentDetailsCountFrame = _G["CauldronSkillItem"..i.."ItemDetailsReagent"..j.."Count"];
-- PARANOIA: check if the reagent name, icon, or link are missing
if not reagentInfo.name or not reagentInfo.icon or not reagentInfo.link then
@@ -516,24 +561,38 @@ function Cauldron:UpdateSkillList()
end
reagentFrame:Show();
+ reagentDetailFrame:Show();
+
SetItemButtonTexture(reagentFrame, reagentInfo.icon);
+ SetItemButtonTexture(reagentDetailFrame, reagentInfo.icon);
if reagentNameFrame then
reagentNameFrame:SetText(reagentInfo.name);
end
+ if reagentDetailsNameFrame then
+ reagentDetailsNameFrame:SetText(reagentInfo.name);
+ end
local playerReagentCount = GetItemCount(reagentInfo.name);
if playerReagentCount < reagentInfo.numRequired then
-- Gray out items
SetItemButtonTextureVertexColor(reagentFrame, 0.5, 0.5, 0.5);
+ SetItemButtonTextureVertexColor(reagentDetailFrame, 0.5, 0.5, 0.5);
if reagentNameFrame then
reagentNameFrame:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
end
+ if reagentDetailsNameFrame then
+ reagentDetailsNameFrame:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
+ end
else
SetItemButtonTextureVertexColor(reagentFrame, 1.0, 1.0, 1.0);
+ SetItemButtonTextureVertexColor(reagentDetailFrame, 1.0, 1.0, 1.0);
if reagentNameFrame then
reagentNameFrame:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
end
+ if reagentDetailsNameFrame then
+ reagentDetailsNameFrame:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
+ end
end
if playerReagentCount >= 100 then
playerReagentCount = "*";
@@ -541,15 +600,25 @@ function Cauldron:UpdateSkillList()
if reagentCountFrame then
reagentCountFrame:SetText(playerReagentCount.."/"..reagentInfo.numRequired);
end
+ if reagentDetailsCountFrame then
+ reagentDetailsCountFrame:SetText(playerReagentCount.."/"..reagentInfo.numRequired);
+ end
end
end
end
-
- --[[ TODO: only adjust height for expanded views
- local reagentRows = math.floor((reagentCount - 1) / 2) + 1;
- _G["CauldronSkillItem"..i.."Reagents"]:SetHeight(toolsFrame:GetHeight() + (reagentRows * _G["CauldronSkillItem"..i.."ReagentsItemDetail1"]:GetHeight()));
+
+ -- only adjust height for expanded views
+ if reagentsExpanded then
+ local reagentRows = math.floor((reagentCount - 1) / 4);
+ reagentDetailsFrame:SetHeight(52 + (_G["CauldronSkillItem"..i.."ItemDetailsReagent1"]:GetHeight() * reagentRows));
+ skillFrame:SetHeight(reagentDetailsFrame:GetHeight() + CAULDRON_SKILLITEM_COLLAPSED_HEIGHT + 2);
+ else
+ skillFrame:SetHeight(CAULDRON_SKILLITEM_COLLAPSED_HEIGHT);
+ end
+--[[
+ _G["CauldronSkillItem"..i.."Reagents"]:SetHeight(toolsFrame:GetHeight() + (reagentRows * _G["CauldronSkillItem"..i.."ItemDetailsReagent1"]:GetHeight()));
_G["CauldronSkillItem"..i]:SetHeight(_G["CauldronSkillItem"..i.."SkillIcon"]:GetHeight() + _G["CauldronSkillItem"..i.."Reagents"]:GetHeight());
- --]]
+--]]
--[[
else
_G["CauldronSkillItem"..i.."Reagents"]:Hide();
@@ -653,6 +722,7 @@ function Cauldron:UpdateButtons()
-- CauldronProcessButton:Disable();
-- CauldronClearQueueButton:();
CauldronShowQueueButton:Hide();
+ CauldronShowGuildCraftersButton:Show();
return;
end
@@ -663,6 +733,7 @@ function Cauldron:UpdateButtons()
CauldronIncrementButton:Show();
CauldronCreateAllButton:Show();
CauldronCreateButton:Show();
+ CauldronShowGuildCraftersButton:Hide();
local skillInfo = Cauldron:GetSelectedSkill();
@@ -1437,388 +1508,6 @@ function CauldronSortDropDown_Initialize(self, level)
end
---[====[
-function Cauldron:FilterDropDown_OnLoad(dropdown)
-
---[[
- if CURRENT_TRADESKILL == "" or CURRENT_TRADESKILL == "UNKNOWN" then
- return;
- end
---]]
-
- UIDropDownMenu_Initialize(dropdown, Cauldron.FilterDropDown_Initialize);
- UIDropDownMenu_SetText(CauldronFiltersFilterDropDown, L["Filters"]);
-
-end
-
-function Cauldron:InvSlotDropDown_OnLoad(dropdown)
-
---[[
- if CURRENT_TRADESKILL == "" or CURRENT_TRADESKILL == "UNKNOWN" then
- return;
- end
---]]
-
- UIDropDownMenu_Initialize(dropdown, Cauldron.InvSlotDropDown_Initialize);
- UIDropDownMenu_SetText(CauldronFiltersInvSlotDropDown, L["Slots"]);
-
-end
-
-function Cauldron:CategoryDropDown_OnLoad(dropdown)
-
---[[
- if CURRENT_TRADESKILL == "" or CURRENT_TRADESKILL == "UNKNOWN" then
- return;
- end
---]]
-
- UIDropDownMenu_Initialize(dropdown, Cauldron.CategoryDropDown_Initialize);
- UIDropDownMenu_SetText(CauldronFiltersCategoryDropDown, L["Categories"]);
-
-end
-
-function Cauldron:FilterDropDown_Initialize(level)
-
---[[
- if CURRENT_TRADESKILL == "" or CURRENT_TRADESKILL == "UNKNOWN" then
- return;
- end
---]]
-
- if not Cauldron.db then
- return;
- end
-
- local skillName = CURRENT_TRADESKILL;
- if IsTradeSkillLinked() then
- skillName = "Linked-"..skillName;
- end
- if IsTradeSkillGuild() then
- skillName = "Guild-"..skillName;
- end
-
- UIDropDownMenu_SetText(CauldronFiltersFilterDropDown, L["Filters"]);
-
- -- reset item
- local resetFilters = {
- text = L["Reset filters"],
- checked = false,
- tooltipTitle = L["Reset filters"],
- tooltipText = L["Reset all filters on the skills list"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_Reset(arg1) end,
- arg1 = "",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(resetFilters);
-
- -- spacer
- UIDropDownMenu_AddButton({
- text = "",
- notClickable = true,
- });
-
- local miscTitle = {
- text = L["View"],
- isTitle = true,
- tooltipTitle = "",
- tooltipText = "",
- };
- UIDropDownMenu_AddButton(miscTitle);
-
- -- compact
- local compact = {
- text = L["Compact"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].options.compactView,
- tooltipTitle = L["Compact"],
- tooltipText = L["Display a compacted view of the skill list"],
- func = function(arg1, arg2)
- Cauldron.db.realm.userdata[Cauldron.vars.playername].options.compactView = not Cauldron.db.realm.userdata[Cauldron.vars.playername].options.compactView;
- Cauldron:UpdateSkillList();
- end,
- arg1 = "compact",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(compact);
-
- if not IsTradeSkillLinked() then
- -- favorites
- local faves = {
- text = L["Favorites"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.favorites,
- tooltipTitle = L["Favorites"],
- tooltipText = L["Display only favorite skills"],
- func = function(arg1, arg2)
- Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.favorites = not Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.favorites;
- Cauldron:UpdateSkillList();
- end,
- arg1 = "favorite",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(faves);
-
- -- achievements
- local achievements = {
- text = L["Achievements"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.achievements,
- tooltipTitle = L["Achievements"],
- tooltipText = L["Display only skills for achievements"],
- func = function(arg1, arg2)
- Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.achievements = not Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.achievements;
- Cauldron:UpdateSkillList();
- end,
- arg1 = "achievement",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(achievements);
-
- -- spacer
- UIDropDownMenu_AddButton({
- text = "",
- notClickable = true,
- });
- end
-
- -- sorting
-
- local sortingTitle = {
- text = L["Sort"],
- isTitle = true,
- tooltipTitle = "",
- tooltipText = "",
- };
- UIDropDownMenu_AddButton(sortingTitle);
-
- local sortDefault = {
- text = L["Default"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.sortDefault,
- tooltipTitle = L["Default"],
- tooltipText = L["Set the sorting method to use on the skills list"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_SetSort(arg1) end,
- arg1 = "default",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(sortDefault);
-
- local sortAlpha = {
- text = L["Alphabetically"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.sortAlpha,
- tooltipTitle = L["Alphabetically"],
- tooltipText = L["Set the sorting method to use on the skills list"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_SetSort(arg1) end,
- arg1 = "alpha",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(sortAlpha);
-
- local sortDifficulty = {
- text = L["By difficulty"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.sortDifficulty,
- tooltipTitle = L["By difficulty"],
- tooltipText = L["Set the sorting method to use on the skills list"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_SetSort(arg1) end,
- arg1 = "difficulty",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(sortDifficulty);
-
- local sortItemLevel = {
- text = L["By item level"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.sortItemLevel,
- tooltipTitle = L["By item level"],
- tooltipText = L["Set the sorting method to use on the skills list"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_SetSort(arg1) end,
- arg1 = "itemlevel",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(sortItemLevel);
-
- local sortReqLevel = {
- text = L["By required level"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.sortRequiredLevel,
- tooltipTitle = L["By required level"],
- tooltipText = L["Set the sorting method to use on the skills list"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_SetSort(arg1) end,
- arg1 = "reqlevel",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(sortReqLevel);
-
- --[[
- local sortFaves = {
- text = L["By favorites"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.sortFavorites,
- tooltipTitle = L["By favorites"],
- tooltipText = L["Set the sorting method to use on the skills list"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_SetSort(arg1) end,
- arg1 = "favorite",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(sortFaves);
- --]]
-
- --[[
- local sortBenefit = {
- text = L["By benefit"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[CURRENT_TRADESKILL].window.filter.sortBenefit,
- tooltipTitle = L["By benefit"],
- tooltipText = L["Set the sorting method to use on the skills list"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_SetSort(arg1) end,
- arg1 = "benefit",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(sortBenefit);
- --]]
-
- -- spacer
- UIDropDownMenu_AddButton({
- text = "",
- notClickable = true,
- });
-
- -- skill difficulty
-
- local difficultyTitle = {
- text = L["Difficulty"],
- isTitle = true,
- tooltipTitle = "",
- tooltipText = "",
- };
- UIDropDownMenu_AddButton(difficultyTitle);
-
- local difficultyOptimal = {
- text = L["Optimal"],
--- textR = 1.0,
--- textG = 1.0,
--- textB = 1.0,
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.optimal,
--- keepShownOnClick = true,
- tooltipTitle = L["Optimal"],
- tooltipText = L["Set whether items of this difficulty level should be shown"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_ToggleDifficulty(arg1) end,
- arg1 = "optimal",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(difficultyOptimal);
-
- local difficultyMedium = {
- text = L["Medium"],
--- textR = 1.0,
--- textG = 1.0,
--- textB = 1.0,
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.medium,
--- keepShownOnClick = true,
- tooltipTitle = L["Medium"],
- tooltipText = L["Set whether items of this difficulty level should be shown"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_ToggleDifficulty(arg1) end,
- arg1 = "medium",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(difficultyMedium);
-
- local difficultyEasy = {
- text = L["Easy"],
--- textR = 1.0,
--- textG = 1.0,
--- textB = 1.0,
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.easy,
--- keepShownOnClick = true,
- tooltipTitle = L["Easy"],
- tooltipText = L["Set whether items of this difficulty level should be shown"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_ToggleDifficulty(arg1) end,
- arg1 = "easy",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(difficultyEasy);
-
- local difficultyTrivial = {
- text = L["Trivial"],
--- textR = 1.0,
--- textG = 1.0,
--- textB = 1.0,
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.trivial,
--- keepShownOnClick = true,
- tooltipTitle = L["Trivial"],
- tooltipText = L["Set whether items of this difficulty level should be shown"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_ToggleDifficulty(arg1) end,
- arg1 = "trivial",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(difficultyTrivial);
-
- -- spacer
- UIDropDownMenu_AddButton({
- text = "",
- notClickable = true,
- });
-
- -- reagents availability
-
- local reagentsTitle = {
- text = L["Reagents"],
- isTitle = true,
- tooltipTitle = "",
- tooltipText = "",
- };
- UIDropDownMenu_AddButton(reagentsTitle);
-
- -- force check "normal" if the list is linked
- if IsTradeSkillLinked() then
- Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.haveAllReagents = false;
- Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.haveKeyReagents = false;
- Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.haveAnyReagents = false;
- end
-
- local normal = {
- text = L["Normal"],
- checked = Cauldron:ReagentsFilterNormalCheck(),
- tooltipTitle = L["Reagents"],
- tooltipText = L["Display the normal list of skills"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_SetReagentFilter(arg1) end,
- arg1 = "normal",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(normal);
-
- if not IsTradeSkillLinked() then
-
- local haveAllReagents = {
- text = L["Have all"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.haveAllReagents,
- tooltipTitle = L["Reagents"],
- tooltipText = L["Set whether skills for which you have all the required reagents are shown in the list"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_SetReagentFilter(arg1) end,
- arg1 = "all",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(haveAllReagents);
-
- local haveKeyReagents = {
- text = L["Have key"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.haveKeyReagents,
- tooltipTitle = L["Reagents"],
- tooltipText = L["Set whether skills for which you have all key reagents (non-vendor available) are shown in the list"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_SetReagentFilter(arg1) end,
- arg1 = "key",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(haveKeyReagents);
-
- local haveAnyReagents = {
- text = L["Have any"],
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.filter.haveAnyReagents,
- tooltipTitle = L["Reagents"],
- tooltipText = L["Set whether skills for which you have any reagents are shown in the list"],
- func = function(arg1, arg2) Cauldron:FilterDropDown_SetReagentFilter(arg1) end,
- arg1 = "any",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(haveAnyReagents);
-
- end
-
-end
---]====]
-
function Cauldron:FilterDropDown_Reset()
local skillName = CURRENT_TRADESKILL;
@@ -2154,301 +1843,6 @@ function Cauldron:FilterDropDown_ToggleDifficulty(info)
end
---[====[
-function Cauldron:InvSlotDropDown_Initialize(level)
- Cauldron:debug("InvSlotDropDown_Initialize enter");
-
- local skillName = CURRENT_TRADESKILL;
- if IsTradeSkillLinked() then
- skillName = "Linked-"..skillName;
- end
- if IsTradeSkillGuild() then
- skillName = "Guild-"..skillName;
- end
-
- UIDropDownMenu_SetText(CauldronFiltersInvSlotDropDown, L["Slots"]);
-
- local all = UIDropDownMenu_CreateInfo();
- all.text = ALL_INVENTORY_SLOTS; -- L["All slots"],
- all.func = function(arg1, arg2) Cauldron:InvSlotDropDown_SetSlot(arg1) end;
- all.arg1 = "all";
- UIDropDownMenu_AddButton(all);
-
- local slots = Cauldron:GetSlots(Cauldron.vars.playername, skillName);
- Cauldron:debug("InvSlotDropDown_Initialize: slots="..#slots);
-
- --[[
- if slots["none"] then
- local none = UIDropDownMenu_CreateInfo();
- none.text = L["(None)"];
- none.checked = slots.none.checked;
- none.func = function(arg1, arg2) Cauldron:InvSlotDropDown_SetSlot(arg1) end;
- none.arg1 = "none";
- UIDropDownMenu_AddButton(none);
- end
- --]]
-
- for name, _ in pairs(slots) do
- Cauldron:debug("InvSlotDropDown_Initialize: name="..tostring(name));
- if name ~= "" then
- local slot = UIDropDownMenu_CreateInfo();
- slot.text = _G[name] or L["(None)"];
- slot.checked = slots[name].checked;
- slot.func = function(arg1, arg2) Cauldron:InvSlotDropDown_SetSlot(arg1) end;
- slot.arg1 = name;
- UIDropDownMenu_AddButton(slot);
- end
- end
-
- Cauldron:debug("InvSlotDropDown_Initialize exit");
-end
-
-function Cauldron:SlotsFilterAllCheck()
- Cauldron:debug("SlotsFilterAllCheck enter");
-
- local skillName = CURRENT_TRADESKILL;
- if IsTradeSkillLinked() then
- skillName = "Linked-"..skillName;
- end
- if IsTradeSkillGuild() then
- skillName = "Guild-"..skillName;
- end
-
- local checked = true;
-
- if Cauldron.db then
- for name, slotInfo in pairs(Cauldron:GetSlots(Cauldron.vars.playername, skillName)) do
- if slotInfo.checked then
- checked = false;
- Cauldron:debug("breaking from slot check");
- break;
- end
- end
- end
-
- self:debug("SlotsFilterAllCheck exit");
-
- return checked;
-end
-
-function Cauldron:InvSlotDropDown_SetSlot(info)
- -- self:debug("InvSlotDropDown_SetSlot enter");
-
- local skillName = CURRENT_TRADESKILL;
- if IsTradeSkillLinked() then
- skillName = "Linked-"..skillName;
- end
- if IsTradeSkillGuild() then
- skillName = "Guild-"..skillName;
- end
-
- Cauldron:debug("InvSlotDropDown_SetSlot: info.arg1="..info.arg1);
-
- local slots = Cauldron:GetSlots(Cauldron.vars.playername, skillName);
-
- if info.arg1 == "all" then
- Cauldron:debug("InvSlotDropDown_SetSlot: selecting all slots...");
--- slots["(None)"] = true;
- for name, slotInfo in pairs(slots) do
- Cauldron:debug("InvSlotDropDown_SetSlot: name="..name);
- slotInfo.checked = true;
- end
- --[[
- elseif info.arg1 == "none" then
- Cauldron:debug("InvSlotDropDown_SetSlot: selecting special 'none' slot...");
--- local slotName = "(None)";
- if not slots[slotName] then
- slots[slotName] = true;
- else
- slots[slotName] = not slots[slotName];
- end
- --]]
- else
- self:debug("InvSlotDropDown_SetSlot: select a specific slot: "..info.arg1);
- for name, slotInfo in pairs(slots) do
- Cauldron:debug("InvSlotDropDown_SetSlot: name="..name);
- slotInfo.checked = false;
- end
- slots[info.arg1].checked = true;
--- if not Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.slots[info.arg1] then
--- Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.slots[info.arg1] = true;
--- else
--- Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.slots[info.arg1] = not Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.slots[info.arg1];
--- end
- end
-
- Cauldron:UpdateSkillList();
-
- Cauldron:debug("InvSlotDropDown_SetSlot exit");
-end
-
-function Cauldron:CategoryDropDown_Initialize(level)
-
---[[
- if CURRENT_TRADESKILL == "" or CURRENT_TRADESKILL == "UNKNOWN" then
- return;
- end
---]]
-
- local skillName = CURRENT_TRADESKILL;
- if IsTradeSkillLinked() then
- skillName = "Linked-"..skillName;
- end
- if IsTradeSkillGuild() then
- skillName = "Guild-"..skillName;
- end
-
- UIDropDownMenu_SetText(CauldronFiltersCategoryDropDown, L["Categories"]);
-
- local all = {
- text = L["All categories"],
- checked = false, -- Cauldron:CategoriesFilterAllCheck(),
- tooltipTitle = L["All categories"],
- func = function(arg1, arg2) Cauldron:CategoryDropDown_SetCategory(arg1) end,
- arg1 = "all",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(all);
-
- local none = {
- text = L["No categories"],
- checked = false, -- Cauldron:CategoriesFilterAllCheck(),
- tooltipTitle = L["No categories"],
- func = function(arg1, arg2) Cauldron:CategoryDropDown_SetCategory(arg1) end,
- arg1 = "none",
- arg2 = "",
- };
- UIDropDownMenu_AddButton(none);
-
- local categories = Cauldron:GetDefaultCategories(Cauldron.vars.playername, skillName);
-
- -- sort the category list by alpha
- local c = {};
- for name, _ in pairs(categories) do
- table.insert(c, name);
- end
-
- table.sort(c);
-
- for i, name in ipairs(c) do
- local category = {
- text = name,
- checked = Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.categories[name].shown,
- tooltipTitle = name,
- func = function(arg1, arg2) Cauldron:CategoryDropDown_SetCategory(arg1) end,
- arg1 = name,
- arg2 = "",
- };
- UIDropDownMenu_AddButton(category);
- end
-
-end
-
---[[
-function Cauldron:CategoriesFilterAllCheck()
- self:debug("CategoriesFilterAllCheck enter");
-
- local skillName = CURRENT_TRADESKILL;
- if IsTradeSkillLinked() then
- skillName = "Linked-"..skillName;
- end
- if IsTradeSkillGuild() then
- skillName = "Guild-"..skillName;
- end
-
- local checked = true;
-
- for name, _ in pairs(Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.categories) do
- if Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.categories[name] then
- checked = false;
- break;
- end
- end
-
- self:debug("CategoriesFilterAllCheck exit");
-
- return checked;
-end
---]]
-
-function Cauldron:CategoryDropDown_SetCategory(info)
-
- local skillName = CURRENT_TRADESKILL;
- if IsTradeSkillLinked() then
- skillName = "Linked-"..skillName;
- end
- if IsTradeSkillGuild() then
- skillName = "Guild-"..skillName;
- end
-
- if info.arg1 == "all" or info.arg1 == "none" then
- for name, _ in pairs(Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.categories) do
- local checked = (info.arg1 == "all");
- Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.categories[name].shown = checked;
- end
- else
- if not IsShiftKeyDown() then
- -- uncheck everything
- for name, _ in pairs(Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.categories) do
- Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.categories[name].shown = false;
- end
-
- -- check the clicked item
- Cauldron.db.realm.userdata[self.vars.playername].skills[skillName].window.categories[info.arg1].shown = true;
- else
- Cauldron.db.realm.userdata[self.vars.playername].skills[skillName].window.categories[info.arg1].shown = not Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[CURRENT_TRADESKILL].window.categories[info.arg1].shown;
- end
- end
-
- -- update the UI
- Cauldron:UpdateSkillList();
-
-end
---]====]
-
-function Cauldron:CollapseAllButton_OnClick(button)
-
- local skillName = CURRENT_TRADESKILL;
- if IsTradeSkillLinked() then
- skillName = "Linked-"..skillName;
- end
- if IsTradeSkillGuild() then
- skillName = "Guild-"..skillName;
- end
-
- local expand = true;
- local skillCount = 0;
- local expandedCount = 0;
- local collapsedCount = 0;
-
- -- check if some items are expanded
- for name, info in pairs(Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.skills) do
- if info.expanded then
- expandedCount = expandedCount + 1;
- else
- collapsedCount = collapsedCount + 1;
- end
- skillCount = skillCount + 1;
- end
-
- if expandedCount == 0 then
- expand = true;
- elseif collapsedCount == 0 then
- expand = false;
- end
-
- -- reset all the expanded fields to false
- for name, info in pairs(Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.skills) do
- info.expanded = expand;
- end
-
- -- unselect the selected skill
- -- Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[skillName].window.selected = 0;
-
- -- update the UI
- Cauldron:UpdateSkillList();
-
-end
function Cauldron:CollapseItemButton_OnClick(button)
@@ -2573,40 +1967,6 @@ function Cauldron:FavoriteItemButton_OnClick(button)
end
---[[
-function Cauldron:ConfirmDialog(title, message, okayBtn, okayBtnCB, cancelBtn, cancelBtnCB)
-
- local gui = Cauldron.libs.GUI;
-
- -- Create a container frame
- local f = gui:Create("Frame");
- f:SetCallback("OnClose", function(widget) gui:Release(widget) end);
- f:SetTitle(title);
- f:SetStatusText("");
- f:SetLayout("Flow");
- f:SetWidth(200);
- f:SetHeight(100);
-
- -- Create okay button
- local btn = gui:Create("Button")
- btn:SetWidth(170);
- btn:SetText(okayBtn);
- btn:SetCallback("OnClick", okayBtnCB); -- TODO wrap this callback in another that will close the window
- -- Add the button to the container
- f:AddChild(btn);
-
- -- Create cancel button
- local btn = gui:Create("Button")
- btn:SetWidth(170);
- btn:SetText(cancelBtn);
- btn:SetCallback("OnClick", cancelBtnCB); -- TODO wrap this callback in another that will close the window
- -- Add the button to the container
- f:AddChild(btn);
-
- f:Show();
-end
---]]
-
function Cauldron:AppendToTooltip(tooltip, skillIndex)
if not tooltip then
return;
@@ -2617,3 +1977,41 @@ function Cauldron:AppendToTooltip(tooltip, skillIndex)
end
+
+function Cauldron:ShowGuildCrafters()
+ if CauldronGuildFrame:IsShown() then
+ CauldronGuildFrame:Hide();
+ else
+ CauldronGuildFrame:Show();
+ end
+end
+
+function CauldronGuildFrame_OnShow()
+ CauldronGuildCraftersFrameScrollBar:SetValue(0);
+ CauldronGuilCraftersFrame_Update();
+end
+
+function CauldronGuilCraftersFrame_Update()
+ local skillLineID, recipeID, numMembers = GetGuildRecipeInfoPostQuery();
+ local offset = FauxScrollFrame_GetOffset(CauldronGuildCraftersFrame);
+ local index, button, name, online;
+
+ for i = 1, TRADE_SKILL_GUILD_CRAFTERS_DISPLAYED, 1 do
+ index = i + offset;
+ button = _G["CauldronGuildCrafter"..i];
+ if ( index > numMembers ) then
+ button:Hide();
+ else
+ name, online = GetGuildRecipeMember(index);
+ button:SetText(name);
+ if ( online ) then
+ button:Enable();
+ else
+ button:Disable();
+ end
+ button:Show();
+ button.name = name;
+ end
+ end
+ FauxScrollFrame_Update(CauldronGuildCraftersFrame, numMembers, TRADE_SKILL_GUILD_CRAFTERS_DISPLAYED, TRADE_SKILL_HEIGHT);
+end
diff --git a/CauldronQueueUI.lua b/CauldronQueueUI.lua
index ec5b2ae..c8ecf35 100644
--- a/CauldronQueueUI.lua
+++ b/CauldronQueueUI.lua
@@ -45,19 +45,15 @@ function Cauldron:UpdateQueue()
for i, queueInfo in ipairs(itemQueue) do
local queueItemFrame = _G["CauldronQueueItem"..i];
- self:debug("queueItemFrame: "..tostring(queueItemFrame));
-- check if we have a frame for this position
if not queueItemFrame then
-- create a new frame for the queue information
- self:debug("create a new frame for item "..i..": "..queueInfo.name);
queueItemFrame = CreateFrame("Button",
"CauldronQueueItem"..i,
CauldronQueueFrameScrollFrameQueueSectionsMainItems,
"CauldronQueueItemFrameTemplate");
else
- self:debug("use existing frame for item "..i..": "..queueInfo.name);
-
-- set the frame's parent
queueItemFrame:SetParent(CauldronQueueFrameScrollFrameQueueSectionsMainItems);
end
@@ -112,7 +108,6 @@ function Cauldron:UpdateQueue()
end
else
-- TODO: default color info
- self:debug("Using default color info.");
end
-- set quantity info
@@ -199,8 +194,6 @@ function Cauldron:UpdateQueue()
CauldronQueueFrameScrollFrameQueueSectionsSecondaryItems,
"CauldronQueueItemFrameTemplate");
else
- self:debug("use existing frame for item "..i..": "..queueInfo.name);
-
-- set the frame's parent
queueItemFrame:SetParent(CauldronQueueFrameScrollFrameQueueSectionsSecondaryItems);
end
diff --git a/CauldronTradeskill.lua b/CauldronTradeskill.lua
index 0f5f750..7ba3a87 100644
--- a/CauldronTradeskill.lua
+++ b/CauldronTradeskill.lua
@@ -47,27 +47,19 @@ function Cauldron:NeedsSkillUpdate()
end
if (tonumber(numTradeSkills) ~= tonumber(skillDB.skillCount)) then
--- Cauldron:info("skill count mismatch; update needed");
return true;
end
if (tonumber(rank) ~= tonumber(skillDB.skillLevel)) then
--- Cauldron:info("skill level mismatch; update needed");
return true;
end
if ((time() - tonumber(skillDB.lastScanDate)) > 184000) then
--- Cauldron:info("time since last scan > 184000 seconds; update needed");
end
--- Cauldron:info("all checks passed; no updated needed");
return false;
end
function Cauldron:UpdateSkills(firstIndex, lastIndex)
- self:debug("UpdateSkills enter");
-
--- self:info("updating skills: "..debugstack());
-
--- Cauldron:info("updatingSkills="..tostring(self.updatingSkills));
+
if not self.updatingSkills then
self:debug("not updating skills; return");
return;
@@ -82,7 +74,6 @@ function Cauldron:UpdateSkills(firstIndex, lastIndex)
local numTradeSkills = GetNumTradeSkills();
Cauldron.vars.numSkills = numTradeSkills;
local baseSkillName = skillName;
- self:debug("UpdateSkills: skillName="..skillName);
-- Cauldron:info("scanningSkills="..tostring(self.scanningSkills));
if not Cauldron.scanningSkills then
@@ -90,7 +81,7 @@ function Cauldron:UpdateSkills(firstIndex, lastIndex)
local startTime = GetTime();
Cauldron.scanningSkills = true;
- Cauldron:Print("Scanning recipes..."); -- TODO: remove
+-- Cauldron:Print("Scanning recipes..."); -- TODO: remove
-- make sure we're getting a full list
SetTradeSkillItemNameFilter(nil);
@@ -181,9 +172,7 @@ function Cauldron:UpdateSkills(firstIndex, lastIndex)
local rescanCount = 0;
for i=1,GetNumTradeSkills() do
- -- self:info("i="..tostring(i));
local name, difficulty, avail, expanded, verb, numSkillUps = GetTradeSkillInfo(i);
- -- self:debug("UpdateSkills: name="..name.."; difficulty="..difficulty.."; avail="..avail);
if name and difficulty ~= "header" then
@@ -225,6 +214,9 @@ function Cauldron:UpdateSkills(firstIndex, lastIndex)
-- local msg = string.format(L["Rescanning recipe: %1$s..."], name);
-- Cauldron:Print(msg);
+ -- remove it from the list
+ skillDB.rescan.failedRecipes[name] = nil;
+
-- populate the reagent list
local num = GetTradeSkillNumReagents(i);
for j=1,num do
@@ -248,9 +240,6 @@ function Cauldron:UpdateSkills(firstIndex, lastIndex)
["key"] = key,
};
- -- remove it from the list
- skillDB.rescan.failedRecipes[name] = nil;
-
skillDB.recipes[name].reagents[j] = r;
if not self.db.realm.userdata[self.vars.playername].reagentMap[rName] then
@@ -338,8 +327,8 @@ function Cauldron:UpdateSkills(firstIndex, lastIndex)
-- store the info if it's not already from rescanning
if not rescan then
-- Cauldron:error("Failed to retrieve reagent info; marking recipe for rescan: "..name);
- Cauldron:MarkRecipeForRescan(skillDB, name);
- rescanCount = rescanCount + 1;
+-- Cauldron:MarkRecipeForRescan(skillDB, name);
+-- rescanCount = rescanCount + 1;
end
end
@@ -392,9 +381,11 @@ function Cauldron:UpdateSkills(firstIndex, lastIndex)
Cauldron:info("scan time: "..tostring(endTime-startTime).."ms");
end
+ --[[
if rescanCount > 0 then
Cauldron:Print(rescanCount.." recipes marked for rescan.");
end
+ --]]
end
--[[
@@ -407,11 +398,9 @@ function Cauldron:UpdateSkills(firstIndex, lastIndex)
self.updatingSkills = false;
- self:debug("UpdateSkills exit");
end
function Cauldron:GetDefaultCategories(player, skillName)
- self:debug("GetDefaultCategories enter");
local categories = {};
@@ -423,8 +412,6 @@ function Cauldron:GetDefaultCategories(player, skillName)
-- table.sort(categories);
- self:debug("GetDefaultCategories exit");
-
return categories;
end
@@ -462,8 +449,6 @@ function Cauldron:GetSlots(player, skillName)
-- table.sort(slots);
- self:debug("GetSlots exit");
-
return slots;
end
@@ -506,7 +491,6 @@ function Cauldron:LearnSkill()
end
function Cauldron:GetSkillList(playername, skillName)
- self:debug("GetSkillList enter");
if (not playername) or
(not skillName) then
@@ -523,13 +507,11 @@ function Cauldron:GetSkillList(playername, skillName)
local startTime = GetTime();
for name, recipe in pairs(self.db.realm.userdata[playername].skills[skillName].recipes) do
- self:debug("GetSkillList: name="..name);
local add = true;
-- check the search text
local search = self.db.realm.userdata[playername].skills[skillName].window.search or "";
- self:debug("GetSkillList: search="..search);
if #search > 0 then
-- check for numbers
local minLevel, maxLevel;
@@ -554,24 +536,18 @@ function Cauldron:GetSkillList(playername, skillName)
local _,_,_,itemLevel,reqLevel,_,_,_,_,_ = GetItemInfo(recipe.itemLink);
if itemLevel and (matchItemLevel == "i") then
itemLevel = tonumber(itemLevel) or 0;
- self:debug("GetSkillList: match by item level");
if itemLevel < minLevel or itemLevel > maxLevel then
- self:debug("skipping recipe: "..name.." (level: "..tostring(itemLevel)..")");
add = false;
end
elseif reqLevel then
reqLevel = tonumber(reqLevel) or 0;
- self:debug("GetSkillList: match by required level");
if reqLevel < minLevel or reqLevel > maxLevel then
- self:debug("skipping recipe: "..name.." (level: "..tostring(reqLevel)..")");
add = false;
end
end
else
-- match name or reagents
- self:debug("GetSkillList: match by name or reagents");
if not string.find(string.lower(recipe.keywords or ""), string.lower(search)) then
- self:debug("skipping recipe: "..name.." (keywords: "..tostring(recipe.keywords)..")");
add = false;
end
end
@@ -580,7 +556,6 @@ function Cauldron:GetSkillList(playername, skillName)
-- check difficulty filter
if not self.db.realm.userdata[playername].skills[skillName].window.filter[recipe.difficulty] then
- self:debug("skipping recipe: "..name.." (difficulty: "..recipe.difficulty..")");
add = false;
end
@@ -588,7 +563,6 @@ function Cauldron:GetSkillList(playername, skillName)
local categories = self.db.realm.userdata[playername].skills[skillName].window.categories;
local catInfo = categories[recipe.defaultCategory] or categories[recipe.type] or categories[recipe.subtype];
if catInfo and (not catInfo.shown) then
- self:debug("skipping recipe: "..name.." (category: "..recipe.defaultCategory..")");
add = false;
end
@@ -600,7 +574,6 @@ function Cauldron:GetSkillList(playername, skillName)
local slotInfo = self.db.realm.userdata[playername].skills[skillName].window.slots[slotName];
self:debug("slotInfo: "..tostring(slotInfo));
if slotInfo and not(slotInfo.checked) then
- self:debug("skipping recipe: "..name.." (slot: "..slotName..")");
add = false;
end
@@ -632,9 +605,6 @@ function Cauldron:GetSkillList(playername, skillName)
-- check favorites filter
if self.db.realm.userdata[playername].skills[skillName].window.filter.favorites then
if not self.db.realm.userdata[playername].skills[skillName].window.skills[recipe.name].favorite then
- --@alpha@
- self:debug("skipping recipe: "..name.." (favorite: "..tostring(self.db.realm.userdata[playername].skills[skillName].window.skills[recipe.name].favorite)..")");
- --@end-alpha@
add = false;
end
end
@@ -643,9 +613,6 @@ function Cauldron:GetSkillList(playername, skillName)
if self.db.realm.userdata[playername].skills[skillName].window.filter.achievements then
local achievements = Cauldron:GetAchievementsForSkill(recipe);
if (not achievements) or (#achievements == 0) then
- --@alpha@
- self:debug("skipping recipe: "..name.." (achievements: "..tostring(self.db.realm.userdata[playername].skills[skillName].window.skills[recipe.name].achievements)..")");
- --@end-alpha@
add = false;
end
end
@@ -672,25 +639,13 @@ function Cauldron:GetSkillList(playername, skillName)
return true;
end
- --@alpha@
- self:debug("GetSkillList: sorting: r1.name="..r1.name.."; r2.name="..r2.name);
- --@end-alpha@
if self.db.realm.userdata[playername].skills[skillName].window.filter.sortDefault then
- --@alpha@
- self:debug("GetSkillList: sorting by default (skill index)");
- --@end-alpha@
local r1v = self.db.realm.userdata[playername].skills[skillName].recipes[r1.name].index;
local r2v = self.db.realm.userdata[playername].skills[skillName].recipes[r2.name].index;
return r1v < r2v;
elseif self.db.realm.userdata[playername].skills[skillName].window.filter.sortAlpha then
- --@alpha@
- self:debug("GetSkillList: sorting by alpha");
- --@end-alpha@
return r1.name < r2.name;
elseif self.db.realm.userdata[playername].skills[skillName].window.filter.sortDifficulty then
- --@alpha@
- self:debug("GetSkillList: sorting by difficulty");
- --@end-alpha@
local difficulty = {
optimal = 4,
medium = 3,
@@ -700,50 +655,28 @@ function Cauldron:GetSkillList(playername, skillName)
local r1v = self.db.realm.userdata[playername].skills[skillName].recipes[r1.name].difficulty;
local r2v = self.db.realm.userdata[playername].skills[skillName].recipes[r2.name].difficulty;
- --@alpha@
- self:debug("GetSkillList: r1.difficulty="..r1v);
- self:debug("GetSkillList: r2.difficulty="..r2v);
- --@end-alpha@
return difficulty[r1v] > difficulty[r2v];
elseif self.db.realm.userdata[playername].skills[skillName].window.filter.sortItemLevel then
- --@alpha@
- self:debug("GetSkillList: sorting by item level");
- --@end-alpha@
-
-- get item info from item link
local _,_,_,r1iLevel,_,_,_,_,_,_ = GetItemInfo(r1.itemLink);
local _,_,_,r2iLevel,_,_,_,_,_,_ = GetItemInfo(r2.itemLink);
return (r2iLevel or 0) < (r1iLevel or 0);
elseif self.db.realm.userdata[playername].skills[skillName].window.filter.sortRequiredLevel then
- --@alpha@
- self:debug("GetSkillList: sorting by required level");
- --@end-alpha@
-
-- get item info from item link
local _,_,_,_,r1Level,_,_,_,_,_ = GetItemInfo(r1.itemLink);
local _,_,_,_,r2Level,_,_,_,_,_ = GetItemInfo(r2.itemLink);
return (r2Level or 0) < (r1Level or 0);
elseif self.db.realm.userdata[playername].skills[skillName].window.filter.sortFavorites then
- --@alpha@
- self:debug("GetSkillList: sorting by favorites");
- --@end-alpha@
-
local r1f = (self.db.realm.userdata[playername].skills[skillName].window.skills[r1.name].favorite and 100) or 1;
local r2f = (self.db.realm.userdata[playername].skills[skillName].window.skills[r2.name].favorite and 100) or 1;
return r2f < r1f;
elseif self.db.realm.userdata[playername].skills[skillName].window.filter.sortBenefit then
- --@alpha@
- self:debug("GetSkillList: returning true for benefit sorting");
- --@end-alpha@
return true; -- TODO
end
- --@alpha@
- self:debug("GetSkillList: returning default true");
- --@end-alpha@
return true;
end);
@@ -752,13 +685,10 @@ function Cauldron:GetSkillList(playername, skillName)
Cauldron:info("sort skill list: "..tostring(endTime-startTime).."ms");
end
- self:debug("GetSkillList exit");
-
return skills;
end
function Cauldron:GetSkillInfo(tradeskill, skill)
- self:debug("GetSkillInfo enter");
-- sanity checks
if (not tradeskill) or (not skill) then
@@ -782,8 +712,6 @@ function Cauldron:GetSkillInfo(tradeskill, skill)
end
end
- self:debug("GetSkillInfo exit");
-
return skillInfo;
end
diff --git a/Locale/Cauldron-enUS.lua b/Locale/Cauldron-enUS.lua
index f6cec19..bc0eea9 100644
--- a/Locale/Cauldron-enUS.lua
+++ b/Locale/Cauldron-enUS.lua
@@ -37,6 +37,7 @@ L["Queue All"] = true
L["Process"] = true
L["Clear Queue"] = true
L["Guild"] = true
+L["Show Queue"] = true
L["General"] = true
L["Auto-open shopping list?"] = true