Changed the reagent item template to call SetTradeSkillItem() instead of SetHyperlink().
pschifferer [02-26-09 - 01:12]
Changed the reagent item template to call SetTradeSkillItem() instead of SetHyperlink().
diff --git a/Cauldron.toc b/Cauldron.toc
index b2b89f0..58ac338 100755
--- a/Cauldron.toc
+++ b/Cauldron.toc
@@ -1,6 +1,6 @@
## Interface: 30000
## Title: Cauldron |cff7fff7f -Ace3-|r
-## Version: 0.9.10.@project-revision@
+## Version: 0.9.11.@project-revision@
## Author: Caendra of Silver Hand
## Notes: An improved interface for your trade skills
## RequiredDeps:
diff --git a/CauldronMain.lua b/CauldronMain.lua
index 039cf93..6f247b0 100644
--- a/CauldronMain.lua
+++ b/CauldronMain.lua
@@ -4,7 +4,7 @@
Cauldron = LibStub("AceAddon-3.0"):NewAddon("Cauldron", "AceEvent-3.0", "AceTimer-3.0", "AceConsole-3.0", "AceHook-3.0", "LibLogger-1.0");
local L = LibStub("AceLocale-3.0"):GetLocale("Cauldron");
-Cauldron.version = "0.9.10.@project-revision@";
+Cauldron.version = "0.9.11.@project-revision@";
Cauldron.date = string.sub("$Date$", 8, 17);
-- key binding names
@@ -734,7 +734,7 @@ function Cauldron:HookTooltips()
-- self:SecureHook(GameTooltip, "SetBagItem");
-- self:SecureHook(GameTooltip, "SetInventoryItem");
-- self:SecureHook(GameTooltip, "SetLootItem");
--- self:SecureHook(GameTooltip, "SetHyperlink");
+ self:SecureHook(GameTooltip, "SetHyperlink");
self:SecureHook(GameTooltip, "SetTradeSkillItem");
-- self:SecureHook(GameTooltip, "SetMerchantItem");
-- self:SecureHook(GameTooltip, "SetAuctionItem");
@@ -772,6 +772,12 @@ function Cauldron:SetTradeSkillItem(tooltip, itemIndex, reagentIndex)
tooltip:Show();
end
+function Cauldron:SetHyperlink(tooltip, link)
+
+-- local name = Cauldron:GetNameFromLink(link);
+-- local skillInfo = Cauldron:
+end
+
----------------------------------------------------------------------
-- Property functions
----------------------------------------------------------------------
diff --git a/CauldronMain.xml b/CauldronMain.xml
index 7aec0a2..e33d328 100644
--- a/CauldronMain.xml
+++ b/CauldronMain.xml
@@ -28,7 +28,8 @@
<Scripts>
<OnEnter>
GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT");
- GameTooltip:SetHyperlink(self.link);
+ -- GameTooltip:SetHyperlink(self.link);
+ GameTooltip:SetTradeSkillItem(self.skillIndex, self.reagentIndex);
CursorUpdate(self);
</OnEnter>
<OnLeave>
diff --git a/CauldronMainUI.lua b/CauldronMainUI.lua
index ad8f88b..1f02c2f 100644
--- a/CauldronMainUI.lua
+++ b/CauldronMainUI.lua
@@ -385,8 +385,8 @@ function Cauldron:UpdateSkillList()
else
local reagentInfo = reagents[j];
--- reagentFrame.skillIndex = skillInfo.index;
--- reagentFrame.reagentIndex = reagentInfo.index;
+ reagentFrame.skillIndex = skillInfo.index;
+ reagentFrame.reagentIndex = reagentInfo.index;
reagentFrame.link = reagentInfo.link;
local reagentNameFrame = _G["CauldronSkillItem"..i.."ReagentsItemDetail"..j.."Name"];