public
Description: WoW Addon - Adds notes to item tooltips
Homepage: http://www.tekkub.net
Clone URL: git://github.com/tekkub/engravings.git
Click here to lend your support to: engravings and make a donation at www.pledgie.com !
engravings / Data / WeightediLevel.lua
100644 15 lines (13 sloc) 0.312 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Engravings["Weighted iLevel:"] = setmetatable({}, {
  __index = function(t,i)
    local _, _, qual, ilvl = GetItemInfo(i)
    local wilvl = false
    if qual == 3 then
      wilvl = math.floor((ilvl-.75)/0.9 + 8)
    elseif qual ==4 then
      wilvl = math.floor((ilvl-26)/0.6 + 8)
    end
    t[i] = wilvl
    return wilvl
  end
})