Quantcast

Skip past item names

Kevin Lyles [09-17-09 - 03:25]
Skip past item names

Also skips "Currently Equipped" on comparison tooltips
Filename
WeightsWatcher.lua
diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua
index 8e23599..5207bb1 100644
--- a/WeightsWatcher.lua
+++ b/WeightsWatcher.lua
@@ -75,7 +75,13 @@ function DisplayItemInfo(tooltip, ttname)

 	_, _, _, _, _, itemType, _, stackSize = GetItemInfo(link)
 	if IsEquippableItem(link) or (itemType == "Gem" and stackSize == 1) then
-		for i = 1, tooltip:NumLines() do
+		-- Skip item name and "currently equipped"
+		if getglobal(ttname .. "TextLeft1"):GetText() == CURRENTLY_EQUIPPED then
+			start = 3
+		else
+			start = 2
+		end
+		for i = start, tooltip:NumLines() do
 			text = getglobal(ttname .. "TextLeft" .. i):GetText()
 			for _, regex in pairs(ProcessedLines) do
 				start, _, value, name = string.find(text, regex)