Add boe filter
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -71,6 +71,13 @@ local function getItemIcon(slot)
|
|||||||
if (itemLink == nil) then return nil end
|
if (itemLink == nil) then return nil end
|
||||||
return select(10, GetItemInfo(itemLink))
|
return select(10, GetItemInfo(itemLink))
|
||||||
end
|
end
|
||||||
|
local function getBindType(slot)
|
||||||
|
aura_env.debugLog("getBindType " .. tostring(slot))
|
||||||
|
if (slot == nil) then return nil end
|
||||||
|
local itemLink = getItemLink(slot)
|
||||||
|
if (itemLink == nil) then return nil end
|
||||||
|
return select(14, GetItemInfo(itemLink)) or 0
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local doLoot = function(slot)
|
local doLoot = function(slot)
|
||||||
@@ -250,7 +257,7 @@ local classGearFilter = {
|
|||||||
qualityThreshold = 2,
|
qualityThreshold = 2,
|
||||||
filter = function(self, slot)
|
filter = function(self, slot)
|
||||||
if (self.enabled) then
|
if (self.enabled) then
|
||||||
aura_env.debugLog("Class gear filter; slot: " .. tostring(slot))
|
aura_env.debugLog("BoE filter; slot: " .. tostring(slot))
|
||||||
local itemType = getItemType(slot)
|
local itemType = getItemType(slot)
|
||||||
local itemEquipLoc = getItemEquipLocation(slot)
|
local itemEquipLoc = getItemEquipLocation(slot)
|
||||||
if (itemType == "Armor"
|
if (itemType == "Armor"
|
||||||
@@ -349,6 +356,34 @@ local bloodOfSargerasFilter = {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
local boeFilter = {
|
||||||
|
enabled = true,
|
||||||
|
ilvlThreshold = 800,
|
||||||
|
qualityThreshold = 1,
|
||||||
|
filter = function(self, slot)
|
||||||
|
if (self.enabled) then
|
||||||
|
aura_env.debugLog("BoE filter; slot: " .. tostring(slot))
|
||||||
|
local itemType = getItemType(slot)
|
||||||
|
local itemEquipLoc = getItemEquipLocation(slot)
|
||||||
|
if (itemType == "Armor"
|
||||||
|
or itemType == "Weapon"
|
||||||
|
or itemEquipLoc == "INVTYPE_FINGER"
|
||||||
|
or itemEquipLoc == "INVTYPE_TRINKET"
|
||||||
|
or itemEquipLoc == "INVTYPE_CLOAK"
|
||||||
|
or itemEquipLoc == "INVTYPE_NECK") then
|
||||||
|
local itemLevel = getItemLevel(slot)
|
||||||
|
local itemQuality = getItemQuality(slot)
|
||||||
|
local bindType = getBindType(slot)
|
||||||
|
|
||||||
|
if (itemLevel and itemQuality and bindType and itemLevel > self.ilvlThreshold and itemQuality > self.qualityThreshold and bindType == 1) then
|
||||||
|
aura_env.debugLog("BoE filter pass")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
aura_env.debugLog("BoE filter fais " .. tostring(itemType) .. " " .. tostring(itemEquipLoc))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
aura_env.filterService = {
|
aura_env.filterService = {
|
||||||
filters = {
|
filters = {
|
||||||
@@ -365,7 +400,8 @@ aura_env.filterService = {
|
|||||||
arguniteFilter,
|
arguniteFilter,
|
||||||
ancientManaFilter,
|
ancientManaFilter,
|
||||||
reicpeFilter,
|
reicpeFilter,
|
||||||
bloodOfSargerasFilter
|
bloodOfSargerasFilter,
|
||||||
|
boeFilter
|
||||||
},
|
},
|
||||||
slotsToLoot = {},
|
slotsToLoot = {},
|
||||||
run = function(self, lootInfo)
|
run = function(self, lootInfo)
|
||||||
|
|||||||
Reference in New Issue
Block a user