Quantcast

Some tweaks for already known check

Darthpred [09-09-16 - 15:58]
Some tweaks for already known check
Filename
ElvUI_SLE/skins/blizzard/merchant.lua
ElvUI_SLE/skins/blizzard/merchantList.lua
diff --git a/ElvUI_SLE/skins/blizzard/merchant.lua b/ElvUI_SLE/skins/blizzard/merchant.lua
index b9d0566..9b16aa2 100644
--- a/ElvUI_SLE/skins/blizzard/merchant.lua
+++ b/ElvUI_SLE/skins/blizzard/merchant.lua
@@ -125,10 +125,10 @@ local function isKnown(link, itemType, itemSubType)

 	_G["SLE_Merchant_HiddenTooltip"]:SetOwner(UIParent, "ANCHOR_NONE");
 	_G["SLE_Merchant_HiddenTooltip"]:SetHyperlink(link);
-	upperLimit = isRecipe and _G["SLE_Merchant_HiddenTooltip"]:NumLines() - 1 or 0
+	upperLimit = isRecipe and _G["SLE_Merchant_HiddenTooltip"]:NumLines() or 0

 	for i=2, _G["SLE_Merchant_HiddenTooltip"]:NumLines() do
-		if (isRecipe and (i <= 5 or i == upperLimit)) or isMount or not isRecipe then
+		if (isRecipe and (i <= 5 or i >= upperLimit - 3)) or isMount or not isRecipe then
 			local text = _G["SLE_Merchant_HiddenTooltipTextLeft"..i];
 			local r, g, b = text:GetTextColor();
 			local gettext = text:GetText();
diff --git a/ElvUI_SLE/skins/blizzard/merchantList.lua b/ElvUI_SLE/skins/blizzard/merchantList.lua
index 59490a5..06a8639 100644
--- a/ElvUI_SLE/skins/blizzard/merchantList.lua
+++ b/ElvUI_SLE/skins/blizzard/merchantList.lua
@@ -218,10 +218,10 @@ local function List_GetError(link, itemType, itemSubType)

 	_G["SLE_Merchant_HiddenTooltip"]:SetOwner(UIParent, "ANCHOR_NONE");
 	_G["SLE_Merchant_HiddenTooltip"]:SetHyperlink(link);
-	upperLimit = isRecipe and _G["SLE_Merchant_HiddenTooltip"]:NumLines() - 1 or 0
+	upperLimit = isRecipe and _G["SLE_Merchant_HiddenTooltip"]:NumLines() or 0

 	for i=2, _G["SLE_Merchant_HiddenTooltip"]:NumLines() do
-		if (isRecipe and (i <= 5 or i == upperLimit)) or isMount or not isRecipe then
+		if (isRecipe and (i <= 5 or i >= upperLimit - 3)) or isMount or not isRecipe then
 			local text = _G["SLE_Merchant_HiddenTooltipTextLeft"..i];
 			local r, g, b = text:GetTextColor();
 			local gettext = text:GetText();