# HG changeset patch # User Chris Mellon # Date 1322481595 21600 # Node ID 31eac67dd2830d32556a46dff48f98b3d090142e # Parent 46ba8e0a63c7a1dd9912b6305c90d5099655e7e9 Add the weapon slot to the weapon enchant tooltip diff -r 46ba8e0a63c7 -r 31eac67dd283 KBF.lua --- 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