Here you go:
Code:
local poisonTextures = {}
local function f(iID)
local name,_,_,_,_,_,_,_,_,tex = GetItemInfo(iID)
if name == "Mind-Numbing Poison" then name = "Mind Numbing Poison" end
poisonTextures["^"..name] = tex
end
f(3775)
f(2892)
f(6947)
f(5237)
f(10918)
local function hastex(x)
local text = x:GetText()
for match, tex in pairs(poisonTextures) do
if text:match(match) then
return tex
end
end
end
local tooltip = CreateFrame("GameTooltip","PoisonScanTooltip",nil,"GameTooltipTemplate")
local function s(f)
return f and f:IsShown()
end
local function get(slot)
tooltip:SetOwner(UIParent,"ANCHOR_NONE")
tooltip:SetInventoryItem("player",slot)
local c = 1
local l = PoisonScanTooltipTextLeft1
while s(l) do
local t = hastex(l)
if t then return t end
c=c+1
l = _G[("PoisonScanTooltipTextLeft%d"):format(c)]
end
end
local giit = GetInventoryItemTexture
function GetInventoryItemTexture(unit,slot)
if UnitIsUnit("player",unit) then
if (slot == 16) then
if GetWeaponEnchantInfo() then
local t = get(16)
if t then
return t
end
end
elseif (slot == 17) then
if select(4,GetWeaponEnchantInfo()) then
local t = get(17)
if t then
return t
end
end
elseif (slot == 18) then
local t = get(18)
if t then
return t
end
end
end
return giit(unit,slot)
end
How to use. Untested. Report back with issues.