http://www.wowpedia.org/API_GetLootRollItemInfo
local _, _, _, quality, bop, canNeed, canGreed, canDE = GetLootRollItemInfo(id)
while trying to improve my misc helper disenchanting module I noticed that when you're in a guildgroup canNeed is always 1 ... is this intended or is it a bug ? In a guildgroup you can even roll need on chaosorbs.
http://www.wowpedia.org/API_IsEquippableItem is not helpfull in this situation ... has someone an idea how I can check if the item should be disenchanted (eg plate,mail,leather when on my priest)
My code looks like this atm
lua Code:
local qualityTab = {'','Green','Blue','Epic'}
local function handleId(id,bop,quality,arg1,arg2)
if(bop or (not bop and not getPref2('pass'..qualityTab[quality]))) then
RollOnLoot(id,getPref2('de'..qualityTab[quality]) and arg1 or arg2)
else
if(getPref2('greedBOE') and not getPref2('de'..qualityTab[quality])) then
RollOnLoot(id,getPref2('pass'..qualityTab[quality]) and nil or arg2)
else
RollOnLoot(id,getPref2('pass'..qualityTab[quality]) and nil or arg1)
end
end
end
local function START_LOOT_ROLL(event,id,...)
if (not id) then return end
if(getPref2('ignoreOrbs') and orbList[tonumber(addon['getItemId'](GetLootRollItemLink(id)))]) then return end
local _, _, _, quality, bop, canNeed, canGreed, canDE = GetLootRollItemInfo(id)
if(canNeed and quality>2 and getPref2('skipNeed')) then return end
handleId(id,bop,quality,canDE and 3 or 2,2)
end