Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(2 Kb)
Download
Updated: 04-18-10 09:43 PM
Patch for:
Vendor Buy.
Pictures
File Info
Updated:04-18-10 09:43 PM
Created:04-13-10 01:46 PM
Downloads:1,086
Favorites:0
MD5:

Fix for 'Already known' text not found in tooltip

Version: 1.0004 Fix2
by: Cosmic Cleric [More]

Fixes a bug where the add-on looks at the wrong line in the tooltip for the text "Already known", so it did not properly dim selections that you already know.

The previous patch looked at line 5, instead of the original 3. I found out that the Stormwind Cooking Recipe vendor has the text on line 4, so I rewrote the fix to scan each line of the tooltip. This is that rewrite of the fix.

Just extract the VendorBuy.lua file from the zip file, then copy it over the existing VendorBuy.lua file (mine was located in "C:\Users\Public\Games\World of Warcraft\Interface\AddOns\VendorBuy").

---
Using the Dalaran Jewelcrafter vendor Timothy Jones, Vendor Buy does not work, and recipes that I already known are not dimmed.

If I modify the following code, starting at line 174...

Code:
				if(itemType=="Recipe")then
					VendorBuyTooltip:ClearLines();
					VendorBuyTooltip:SetHyperlink(GetMerchantItemLink(index));
					local a,b,c = _G["VendorBuyTooltipTextLeft3"]:GetTextColor();
					local text = _G["VendorBuyTooltipTextLeft3"]:GetText();
					if ((text=="Already known")and((a>b)and(b==c))) then
						item:SetAlpha(0.5);
					end
				end
to this...

Code:
				if(itemType=="Recipe")then
					VendorBuyTooltip:ClearLines();
					VendorBuyTooltip:SetHyperlink(GetMerchantItemLink(index));
					-- Below code is a fix for 'Already known' appearing on different lines, depending on which vendor
					for i = 1, VendorBuyTooltip:NumLines() do
					   local text = _G["VendorBuyTooltipTextLeft"..i]:GetText();
					   if(text)then
                           local a,b,c = _G["VendorBuyTooltipTextLeft"..i]:GetTextColor();
    					   if ((text=="Already known")and((a>b)and(b==c))) then
    					       item:SetAlpha(0.5);
    					   end
                       end					   
					end
					-- Above code is a fix for 'Already known' appearing on different lines, depending on which vendor
				end
it works fine. Seems the "Already known" text appears on different lines in a tooltip, depending on which vendor displays the tooltip.

For example, the Dalaran JC vendor the 'Already known' text shows on line 5, and the Stormwind Cooking Vendor line 4.

Archived Files (1)
File Name
Version
Size
Author
Date
1.0004 Fix1
2kB
Cosmic Cleric
04-13-10 01:46 PM


There have been no comments posted to this file.
Be the first to add one.



Category Jump: