diff KBF.lua @ 62:31eac67dd283

Add the weapon slot to the weapon enchant tooltip
author Chris Mellon <arkanes@gmail.com>
date Mon, 28 Nov 2011 05:59:55 -0600
parents 46ba8e0a63c7
children e5c07fdfb70b
line wrap: on
line diff
--- a/KBF.lua	Wed Aug 17 19:40:26 2011 -0500
+++ b/KBF.lua	Mon Nov 28 05:59:55 2011 -0600
@@ -157,6 +157,7 @@
 		if not self.tempEnchant3 then
 			-- largely copy/pasted code from SAH to bind to third weapon
 			self.tempEnchant3 = CreateFrame("Button", nil, self.secureHeader);
+			self.tempEnchant3.unit = "player"
 			self.tempEnchant3:SetWidth(200+16)
 			self.tempEnchant3:SetHeight(16)
 			self.tempEnchant3:Show()
@@ -290,7 +291,7 @@
 				spellId, duration = unpack(info)
 				name, _, _ = GetSpellInfo(spellId)
 				local slots = {[16] = "Main Hand", [17] = "Off Hand", [18] = "Thrown"}
-				name = name .. " (" .. slots[slot] .. ")"
+				name = tag .. " (" .. slots[slot] .. ")"
 				break
 			end
 		end
@@ -378,6 +379,8 @@
     		local name = GetItemInfo(GetInventoryItemID("player", slot))
     		local r, g, b = GetItemQualityColor(GetInventoryItemQuality("player", slot))
     		GameTooltip:SetText(name, r, g, b)
+			local slots = {[16] = "Main Hand", [17] = "Off Hand", [18] = "Thrown"}
+			GameTooltip:AddLine(slots[slot])
     		GameTooltip:AddLine(" ")
     		GameTooltip:AddSpellByID(button.spellId)
     	else