id = addon:getItemId(link) |
if(id) then |
info = addon:itemInfo(id) |
if(info) then |
if(info['itemRarity'] == 0 or (getPref2('sellCards') and info['itemName'] == GetItemInfo(62559))) then |
if(info['itemSellPrice'] and info['itemSellPrice'] > 0) then |
local _, itemCount, _, _, _ = GetContainerItemInfo(a, b) |
addon:Print(message['solditem'](link,info['itemSellPrice'])) |
earnedMoney = earnedMoney + info['itemSellPrice'] * itemCount |
UseContainerItem(a, b) |
end |
if(info['itemRarity'] == 0 or (getPref2('sellCards') and info['itemName'] == GetItemInfo(62559))) then |
if(info['itemSellPrice'] and info['itemSellPrice'] > 0) then |
local _, itemCount, _, _, _ = GetContainerItemInfo(a, b) |
addon:Print(message['solditem'](link,info['itemSellPrice'])) |
earnedMoney = earnedMoney + info['itemSellPrice'] * itemCount |
UseContainerItem(a, b) |
end |
end |
end |