View Single Post
Unread 12-07-12, 11:56 AM   #7
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 549
Maybe this will help, I'm copying it here in case something happens to the original.
From Ro on http://us.battle.net/wow/en/forum/topic/7199032730#9:
Lua Code:
  1. function GetActualItemLevel(link)
  2.   local levelAdjust={ -- 11th item:id field and level adjustment
  3.     ["0"]=0,["1"]=8,["373"]=4,["374"]=8,["375"]=4,["376"]=4,
  4.     ["377"]=4,["379"]=4,["380"]=4,["445"]=0,["446"]=4,["447"]=8,
  5.     ["451"]=0,["452"]=8,["453"]=0,["454"]=4,["455"]=8,["456"]=0,
  6.     ["457"]=8,["458"]=0,["459"]=4,["460"]=8,["461"]=12,["462"]=16}
  7.   local baseLevel = select(4,GetItemInfo(link))
  8.   local upgrade = link:match(":(%d+)\124h%[")
  9.   if baseLevel and upgrade then
  10.     return baseLevel + levelAdjust[upgrade]
  11.   else
  12.     return baseLevel
  13.   end
  14. end
Probably less reliable than just pulling the item level straight out of the tooltip.

Last edited by semlar : 12-07-12 at 12:01 PM.
semlar is online now