Add all settings
This commit is contained in:
612
Autoloot.lua
612
Autoloot.lua
@@ -243,14 +243,15 @@ function shared.Autoloot.Init()
|
||||
local type = Type(slot)
|
||||
if not type:Eq("Tradeskill") then return false end
|
||||
local subtype = SubType(slot)
|
||||
return shared.config.autoloot.filter.profession.professions[subtype] or false
|
||||
local professions = { strsplit(",", shared.config.autoloot.filter.profession.professions) }
|
||||
return shared.TableContains(professions, subtype) or false
|
||||
end
|
||||
}
|
||||
---@class ValueFilter : Filter
|
||||
local ValueFilter = {
|
||||
Matches = function(self, slot)
|
||||
if not shared.config.autoloot.filter.value.enabled then return false end
|
||||
local value = ItemValue(slot)
|
||||
local value = Value(slot)
|
||||
if shared.config.autoloot.filter.value.byStack then
|
||||
value = value * Quantity(slot).value
|
||||
end
|
||||
@@ -263,7 +264,7 @@ function shared.Autoloot.Init()
|
||||
if not shared.config.autoloot.filter.greyvalue.enabled then return false end
|
||||
local quality = Quality(slot)
|
||||
if not quality:Eq(0) then return false end
|
||||
local value = ItemValue(slot)
|
||||
local value = Value(slot)
|
||||
if shared.config.autoloot.filter.greyvalue.byStack then
|
||||
value = value * Quantity(slot).value
|
||||
end
|
||||
@@ -293,7 +294,7 @@ function shared.Autoloot.Init()
|
||||
local NameFilter = {
|
||||
Matches = function(self, slot)
|
||||
if not shared.config.autoloot.filter.name.enabled then return false end
|
||||
local whitelist = strsplit(",", shared.config.autoloot.filter.name.whitelist)
|
||||
local whitelist = { strsplit(",", shared.config.autoloot.filter.name.whitelist) }
|
||||
for _, name in ipairs(whitelist) do
|
||||
if not shared.config.autoloot.filter.name.caseSensitive then name = name:lower() end
|
||||
if shared.config.autoloot.filter.name.exact then
|
||||
@@ -324,7 +325,8 @@ function shared.Autoloot.Init()
|
||||
local APFilter = {
|
||||
Matches = function(self, slot)
|
||||
if not shared.config.autoloot.filter.ap.enabled then return false end
|
||||
return Value(slot):Eq(0) and Type(slot):Eq("Consumable") and SubType(slot):Eq("Other") and SubclassId(slot):Eq(8)
|
||||
return Value(slot):Eq(0) and Type(slot):Eq("Consumable") and SubType(slot):Eq("Other") and
|
||||
SubclassId(slot):Eq(8)
|
||||
end
|
||||
}
|
||||
---@class EverythingFilter : Filter
|
||||
@@ -380,306 +382,306 @@ function shared.Autoloot.Init()
|
||||
end
|
||||
|
||||
skills = {
|
||||
--Warrior
|
||||
[1] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Paladin
|
||||
[2] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Hunter
|
||||
[3] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Rogue
|
||||
[4] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Priest
|
||||
[5] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Death Knight
|
||||
[6] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Shaman
|
||||
[7] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Mage
|
||||
[8] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Warlock
|
||||
[9] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Monk
|
||||
[10] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Druid
|
||||
[11] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Demon Hunter
|
||||
[12] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Warrior
|
||||
[1] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Paladin
|
||||
[2] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Hunter
|
||||
[3] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Rogue
|
||||
[4] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Priest
|
||||
[5] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Death Knight
|
||||
[6] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Shaman
|
||||
[7] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Mage
|
||||
[8] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Warlock
|
||||
[9] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Monk
|
||||
[10] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Druid
|
||||
[11] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Demon Hunter
|
||||
[12] = {
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
}
|
||||
--aura_env.qualityColors = {
|
||||
-- "\124cff9d9d9d", -- Poor
|
||||
|
69
Cyka.lua
69
Cyka.lua
@@ -11,6 +11,7 @@ local addonname, shared = ...
|
||||
---@field data CykaData
|
||||
---@field GetOrDefault fun(table: table<any, any>, keys: string[], default: any): any
|
||||
---@field DumpTable fun(table: table<any, any>, depth: number)
|
||||
---@field TableContains fun(table: table<any, any>, value: any): boolean
|
||||
---@field Autoloot Autoloot
|
||||
|
||||
---@class CykaData
|
||||
@@ -24,6 +25,17 @@ local addonname, shared = ...
|
||||
|
||||
---@class CykaAutoLootFilterConfig
|
||||
---@field gold { enabled: boolean }
|
||||
---@field orderResource { enabled: boolean }
|
||||
---@field mount { enabled: boolean }
|
||||
---@field ilvl { enabled: boolean, value: number }
|
||||
---@field profession { enabled: boolean, professions: string }
|
||||
---@field value { enabled: boolean, byStack: boolean, value: number }
|
||||
---@field greyvalue { enabled: boolean, byStack: boolean, value: number }
|
||||
---@field questItem { enabled: boolean }
|
||||
---@field classGear { enabled: boolean, ilvlThreshold: number, qualityThreshold: number }
|
||||
---@field name { enabled: boolean, exact: boolean, caseSensitive: boolean, whitelist: string }
|
||||
---@field boe { enabled: boolean, ilvlThreshold: number, qualityThreshold: number }
|
||||
---@field ap { enabled: boolean }
|
||||
|
||||
local function init()
|
||||
if not CykaPersistentData then CykaPersistentData = {} end
|
||||
@@ -74,13 +86,68 @@ local function init()
|
||||
end
|
||||
end
|
||||
|
||||
---@param table table<any, any>
|
||||
---@param value any
|
||||
shared.TableContains = function(table, value)
|
||||
for _, v in pairs(table) do
|
||||
if v == value then return true end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
shared.config = {
|
||||
autoloot = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "enabled" }, true),
|
||||
filter = {
|
||||
gold = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "gold", "enabled" }, true),
|
||||
}
|
||||
},
|
||||
orderResource = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "orderResource", "enabled" }, true),
|
||||
},
|
||||
mount = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "mount", "enabled" }, true),
|
||||
},
|
||||
ilvl = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "ilvl", "enabled" }, true),
|
||||
value = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "ilvl", "value" }, 910),
|
||||
},
|
||||
profession = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "profession", "enabled" }, true),
|
||||
professions = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "profession", "professions" }, ""),
|
||||
},
|
||||
value = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "value", "enabled" }, true),
|
||||
byStack = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "value", "byStack" }, false),
|
||||
value = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "value", "value" }, 10000),
|
||||
},
|
||||
greyvalue = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "greyvalue", "enabled" }, true),
|
||||
byStack = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "greyvalue", "byStack" }, false),
|
||||
value = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "greyvalue", "value" }, 100000),
|
||||
},
|
||||
questItem = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "questItem", "enabled" }, true),
|
||||
},
|
||||
classGear = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "classGear", "enabled" }, true),
|
||||
ilvlThreshold = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "classGear", "ilvlThreshold" }, 910),
|
||||
qualityThreshold = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "classGear", "qualityThreshold" }, 3),
|
||||
},
|
||||
boe = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "boe", "enabled" }, true),
|
||||
ilvlThreshold = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "boe", "ilvlThreshold" }, 910),
|
||||
qualityThreshold = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "boe", "qualityThreshold" }, 3),
|
||||
},
|
||||
ap = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "ap", "enabled" }, true),
|
||||
},
|
||||
name = {
|
||||
enabled = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "name", "enabled" }, false),
|
||||
exact = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "name", "exact" }, false),
|
||||
caseSensitive = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "name", "caseSensitive" }, false),
|
||||
whitelist = shared.GetOrDefault(CykaPersistentData.config, { "autoloot", "filter", "name", "whitelist" }, ""),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user