Removed handling of the TRADE_SKILL_UPDATE event, since it seemed unnecessary.
Paul Schifferer [12-18-10 - 16:47]
Removed handling of the TRADE_SKILL_UPDATE event, since it seemed unnecessary.
diff --git a/CauldronMain.lua b/CauldronMain.lua
index 6a700d1..dd037a9 100644
--- a/CauldronMain.lua
+++ b/CauldronMain.lua
@@ -285,7 +285,7 @@ function Cauldron:OnEnable()
self:RegisterEvent("TRADE_SKILL_SHOW", "OnTradeShow");
self:RegisterEvent("TRADE_SKILL_UPDATE", "OnSkillUpdate");
self:RegisterEvent("TRADE_SKILL_CLOSE", "OnTradeClose");
- self:RegisterEvent("TRADE_TARGET_ITEM_CHANGED", "OnTradeItemChanged");
+-- self:RegisterEvent("TRADE_TARGET_ITEM_CHANGED", "OnTradeItemChanged");
self:RegisterEvent("SKILL_LINES_CHANGED", "OnSkillUpdate");
self:RegisterEvent("ADDON_LOADED", "OnAddonLoaded");
self:RegisterEvent("UNIT_PORTRAIT_UPDATE", "OnEvent");
@@ -409,14 +409,18 @@ function Cauldron:OnTradeClose()
end
+--[[
function Cauldron:OnTradeItemChanged()
Cauldron:info("trade item changed");
-- Cauldron:UpdateSkillList();
end
+--]]
-function Cauldron:OnSkillUpdate()
+function Cauldron:OnSkillUpdate(event)
+Cauldron:info("skill update: event="..tostring(event));
+--[[
if CURRENT_TRADESKILL ~= "" then
if not Cauldron.db.realm.userdata[Cauldron.vars.playername].skills[CURRENT_TRADESKILL] then
return;
@@ -430,13 +434,14 @@ function Cauldron:OnSkillUpdate()
Cauldron.updatingSkills = Cauldron:NeedsSkillUpdate();
Cauldron:UpdateSkills();
Cauldron.updatingSkills = false;
+
+ CauldronQueue:CalculateAllRequiredItems(Cauldron.db.realm.userdata[Cauldron.vars.playername].queue);
+
+ Cauldron.needsRedraw = true;
+ self:Frame_Update();
end
- CauldronQueue:CalculateAllRequiredItems(Cauldron.db.realm.userdata[Cauldron.vars.playername].queue);
end
-
- Cauldron.needsRedraw = true;
- self:Frame_Update();
-
+ --]]
end
function Cauldron:OnTradeSkillRecast()
diff --git a/CauldronMainUI.lua b/CauldronMainUI.lua
index e0cadc0..1a9964a 100644
--- a/CauldronMainUI.lua
+++ b/CauldronMainUI.lua
@@ -23,7 +23,7 @@ self:debug("frame show: "..tostring(CauldronQueueWindowFrame));
ShowUIPanel(CauldronFrame);
SetPortraitToTexture(CauldronFramePortrait, GetTradeSkillTexture());
CauldronInputBox:SetNumber(1);
- CauldronFrameTitleText:SetText(L["Cauldron"].." "..Cauldron.version);
+ CauldronFrameTitleText:SetText(L["Cauldron"] --[[.." "..Cauldron.version--]]);
-- show queue UI
if Cauldron.vars.showQueue and not(IsTradeSkillLinked() or IsTradeSkillGuild()) then
@@ -1313,6 +1313,7 @@ function CauldronSortDropDown_Initialize(self, level)
sortDefault.keepShownOnClick = false;
sortDefault.func = function()
Cauldron:FilterDropDown_SetSort("default");
+ Cauldron:UpdateSkillList();
end;
UIDropDownMenu_AddButton(sortDefault, level);
@@ -1336,6 +1337,7 @@ function CauldronSortDropDown_Initialize(self, level)
sortAlpha.keepShownOnClick = false;
sortAlpha.func = function()
Cauldron:FilterDropDown_SetSort("alpha");
+ Cauldron:UpdateSkillList();
end;
UIDropDownMenu_AddButton(sortAlpha, level);
@@ -1359,6 +1361,7 @@ function CauldronSortDropDown_Initialize(self, level)
sortDifficulty.keepShownOnClick = false;
sortDifficulty.func = function()
Cauldron:FilterDropDown_SetSort("difficulty");
+ Cauldron:UpdateSkillList();
end;
UIDropDownMenu_AddButton(sortDifficulty, level);
@@ -1382,6 +1385,7 @@ function CauldronSortDropDown_Initialize(self, level)
sortItemLevel.keepShownOnClick = false;
sortItemLevel.func = function()
Cauldron:FilterDropDown_SetSort("itemlevel");
+ Cauldron:UpdateSkillList();
end;
UIDropDownMenu_AddButton(sortItemLevel, level);
@@ -1405,6 +1409,7 @@ function CauldronSortDropDown_Initialize(self, level)
sortReqLevel.keepShownOnClick = false;
sortReqLevel.func = function()
Cauldron:FilterDropDown_SetSort("reqlevel");
+ Cauldron:UpdateSkillList();
end;
UIDropDownMenu_AddButton(sortReqLevel, level);