Skip to content

Commit 7d0ceb7

Browse files
committed
- add option to never automatically roll NEED, leaving those rolls interactive; disabled by default
- add Devourer DH spec; built-in weights are placeholder junk; use Pawn for weights - add scroll region for options menu - disable 2 options by default: "Automatically complete quests which award items" and "Automatically accept party invitations"; these being enabled by default can be mysterious and unexpected in a UI with many addons
1 parent b53b221 commit 7d0ceb7

File tree

1 file changed

+51
-13
lines changed

1 file changed

+51
-13
lines changed

AutoGear.lua

Lines changed: 51 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,17 @@ if TOC_VERSION_CURRENT < TOC_VERSION_CATA then
492492
RedSockets = E, YellowSockets = E, BlueSockets = E, MetaSockets = E,
493493
HealingProc = E, DamageProc = 1, DamageSpellProc = E, MeleeProc = 1, RangedProc = E,
494494
DPS = 2
495+
},
496+
["Devourer"] = {
497+
weapons = "dual wield",
498+
Strength = E, Agility = E, Stamina = 0.05, Intellect = 1.05, Spirit = E,
499+
Armor = 0.001, Dodge = E, Parry = E, Block = E, Defense = E,
500+
SpellPower = 1, SpellPenetration = E, Haste = 1.5, Mp5 = E,
501+
AttackPower = E, ArmorPenetration = E, Crit = 1.1, SpellCrit = 1.1, Hit = 1.75, SpellHit = 1.75,
502+
Expertise = 1.85, Versatility = 0.8, Multistrike = 1, Mastery = 1.5, ExperienceGained = 100,
503+
RedSockets = E, YellowSockets = E, BlueSockets = E, MetaSockets = E,
504+
HealingProc = E, DamageProc = 1, DamageSpellProc = 0.9, MeleeProc = 1, RangedProc = E,
505+
DPS = E
495506
}
496507
},
497508
["DRUID"] = {
@@ -1037,6 +1048,17 @@ else
10371048
RedSockets = E, YellowSockets = E, BlueSockets = E, MetaSockets = E,
10381049
HealingProc = E, DamageProc = 1, DamageSpellProc = E, MeleeProc = 1, RangedProc = E,
10391050
DPS = 2
1051+
},
1052+
["Devourer"] = {
1053+
weapons = "dual wield",
1054+
Strength = E, Agility = E, Stamina = 0.05, Intellect = 1.05, Spirit = E,
1055+
Armor = 0.001, Dodge = E, Parry = E, Block = E, Defense = E,
1056+
SpellPower = 1, SpellPenetration = E, Haste = 1.5, Mp5 = E,
1057+
AttackPower = E, ArmorPenetration = E, Crit = 1.1, SpellCrit = 1.1, Hit = 1.75, SpellHit = 1.75,
1058+
Expertise = 1.85, Versatility = 0.8, Multistrike = 1, Mastery = 1.5, ExperienceGained = 100,
1059+
RedSockets = E, YellowSockets = E, BlueSockets = E, MetaSockets = E,
1060+
HealingProc = E, DamageProc = 1, DamageSpellProc = 0.9, MeleeProc = 1, RangedProc = E,
1061+
DPS = E
10401062
}
10411063
},
10421064
["DRUID"] = {
@@ -1556,7 +1578,7 @@ AutoGearOverrideSpecs = {
15561578
},
15571579
{
15581580
["label"] = "Demon Hunter",
1559-
["subLabels"] = {"None", "Havoc", "Vengeance"}
1581+
["subLabels"] = {"None", "Havoc", "Vengeance", "Devourer"}
15601582
},
15611583
{
15621584
["label"] = "Druid",
@@ -1908,10 +1930,13 @@ local function optionsSetup(optionsMenu)
19081930
frame[i]:SetScript("OnLeave", function() GameTooltip:Hide() end)
19091931
end
19101932

1911-
local optionsMenu = CreateFrame("Frame", "AutoGearOptionsPanel")
1912-
-- local optionsMenu = CreateFrame("Frame", "AutoGearOptionsPanel", InterfaceOptionsFramePanelContainer)
1913-
optionsMenu.name = "AutoGear"
1914-
InterfaceOptions_AddCategory(optionsMenu)
1933+
local optionsMenu = CreateFrame("Frame", "AutoGearOptionsMenu")
1934+
optionsMenu:SetWidth(1) -- must be set to at least 1 or the menu is invisible in the scroll frame, but will expand to show everything
1935+
optionsMenu:SetHeight(1) -- must be set to at least 1 or the menu is invisible in the scroll frame, but will expand to show everything
1936+
local optionsMenuParent = CreateFrame("ScrollFrame", "AutoGearOptionsMenuScrollFrame", nil, "UIPanelScrollFrameTemplate")
1937+
optionsMenuParent.name = "AutoGear"
1938+
optionsMenuParent:SetScrollChild(optionsMenu)
1939+
InterfaceOptions_AddCategory(optionsMenuParent)
19151940
if InterfaceAddOnsList_Update then InterfaceAddOnsList_Update() end
19161941

19171942
--handle PLAYER_ENTERING_WORLD events for initialization
@@ -1926,12 +1951,13 @@ optionsMenu:SetScript("OnEvent", function (self, event, arg1, arg2, ...)
19261951
AutoRollOnBoEBlues = false,
19271952
AutoRollOnEpics = false,
19281953
RollOnNonGearLoot = true,
1954+
NeverAutoNeed = false,
19291955
AutoConfirmBinding = true,
19301956
AutoConfirmBindingBlues = false,
19311957
AutoConfirmBindingEpics = false,
19321958
AutoAcceptQuests = false,
1933-
AutoCompleteItemQuests = true,
1934-
AutoAcceptPartyInvitations = true,
1959+
AutoCompleteItemQuests = false,
1960+
AutoAcceptPartyInvitations = false,
19351961
ScoreInTooltips = true,
19361962
ReasonsInTooltips = false,
19371963
AlwaysCompareGear = GetCVarBool("alwaysCompareItems"),
@@ -2005,6 +2031,16 @@ optionsMenu:SetScript("OnEvent", function (self, event, arg1, arg2, ...)
20052031
["toggleDescriptionTrue"] = "Rolling on non-gear loot is now enabled. AutoGear will roll GREED on non-gear, non-mount loot and NEED on mounts.",
20062032
["toggleDescriptionFalse"] = "Rolling on non-gear loot is now disabled."
20072033
},
2034+
{
2035+
["option"] = "NeverAutoNeed",
2036+
["cliCommands"] = { "neverautoneed", "neverneed", "noneed", "onlyautogreed", "onlygreed", "greedonly", "justgreed" },
2037+
["cliTrue"] = { "enable", "on", "start" },
2038+
["cliFalse"] = { "disable", "off", "stop" },
2039+
["label"] = "Never auto-need; only greed",
2040+
["description"] = "Never automatically roll NEED. If this is enabled, AutoGear will be prevented from automatically rolling NEED when it detects an upgrade, leaving the loot roll interactive to allow manual control of that roll. It will still be allowed to roll GREED when an upgrade is not detected and automatic rolling is enabled for the detected rarity.",
2041+
["toggleDescriptionTrue"] = "Rolling only GREED automatically is now enabled. AutoGear will be unable to roll NEED automatically.",
2042+
["toggleDescriptionFalse"] = "Rolling only GREED automatically is now disabled. AutoGear will be able to roll NEED on detected upgrades automatically."
2043+
},
20082044
{
20092045
["option"] = "AutoConfirmBinding",
20102046
["cliCommands"] = { "bind", "boe", "soulbinding" },
@@ -2367,6 +2403,7 @@ function AutoGearPrintHelp()
23672403
AutoGearPrint("AutoGear: '/ag [gear/toggle]/[enable/on/start]/[disable/off/stop]': toggle automatic gearing", 0)
23682404
AutoGearPrint("AutoGear: '/ag roll [enable/on/start]/[disable/off/stop]': toggle automatic loot rolling", 0)
23692405
AutoGearPrint("AutoGear: '/ag bind [enable/on/start]/[disable/off/stop]': toggle automatic soul-binding confirmation", 0)
2406+
AutoGearPrint("AutoGear: '/ag neverneed [enable/on/start]/[disable/off/stop]': toggle preventing automatically rolling NEED", 0)
23702407
AutoGearPrint("AutoGear: '/ag quest [enable/on/start]/[disable/off/stop]': toggle automatic quest handling", 0)
23712408
AutoGearPrint("AutoGear: '/ag party [enable/on/start]/[disable/off/stop]': toggle automatic acceptance of party invitations", 0)
23722409
AutoGearPrint("AutoGear: '/ag tooltip [toggle/show/hide]': toggle showing score in item tooltips", 0)
@@ -4476,7 +4513,7 @@ function AutoGearDetectHoveredItemGUID()
44764513
focusParentName:match("Inv") or
44774514
focusParentName:match("Bag") or
44784515
focusParentName:match("Container")
4479-
) then
4516+
) then
44804517
local item = Item:CreateFromBagAndSlot(focusParent:GetID(), focus:GetID())
44814518
if (not item) or (not item.IsItemEmpty) or item:IsItemEmpty() then return end
44824519
return item:GetItemGUID()
@@ -4787,15 +4824,16 @@ function AutoGearMain()
47874824
if curAction.action == "roll" then
47884825
if GetTime() > curAction.t then
47894826
if curAction.rollType == 1 then
4790-
AutoGearPrint("AutoGear: "..((AutoGearDB.AutoLootRoll == true) and "Rolling " or "If automatic loot rolling was enabled, would roll ")..GREEN_FONT_COLOR_CODE.."NEED"..FONT_COLOR_CODE_CLOSE.." on "..curAction.info.link..".", 1)
4827+
AutoGearPrint("AutoGear: "..(((AutoGearDB.AutoLootRoll == true) and (AutoGearDB.NeverAutoNeed ~= true)) and "Rolling " or "If automatically rolling "..((AutoGearDB.NeverAutoNeed ~= true) and "" or (GREEN_FONT_COLOR_CODE.."NEED"..FONT_COLOR_CODE_CLOSE.." ")).."on loot was enabled, would roll ")..GREEN_FONT_COLOR_CODE.."NEED"..FONT_COLOR_CODE_CLOSE.." on "..curAction.info.link..".", 1)
47914828
elseif curAction.rollType == 2 then
4792-
AutoGearPrint("AutoGear: "..((AutoGearDB.AutoLootRoll == true) and "Rolling " or "If automatic loot rolling was enabled, would roll ")..RED_FONT_COLOR_CODE.."GREED"..FONT_COLOR_CODE_CLOSE.." on "..curAction.info.link..".", 1)
4829+
AutoGearPrint("AutoGear: "..((AutoGearDB.AutoLootRoll == true) and "Rolling " or "If automatically rolling on loot was enabled, would roll ")..RED_FONT_COLOR_CODE.."GREED"..FONT_COLOR_CODE_CLOSE.." on "..curAction.info.link..".", 1)
47934830
end
47944831
local rarity = curAction.info.rarity
4795-
if (((rarity < 3) or (rarity == 3 and not (curAction.info.boe))) and (AutoGearDB.AutoLootRoll == true)) or
4832+
if ((AutoGearDB.NeverAutoNeed ~= true) or (curAction.rollType ~= 1)) and
4833+
((((rarity < 3) or (rarity == 3 and not (curAction.info.boe))) and (AutoGearDB.AutoLootRoll == true)) or
47964834
((rarity == 3) and curAction.info.boe and (AutoGearDB.AutoRollOnBoEBlues == true)) or
4797-
((rarity == 4) and (AutoGearDB.AutoRollOnEpics == true)) then
4798-
RollOnLoot(curAction.rollID, curAction.rollType)
4835+
((rarity == 4) and (AutoGearDB.AutoRollOnEpics == true))) then
4836+
RollOnLoot(curAction.rollID, curAction.rollType)
47994837
end
48004838
table.remove(AutoGearActionQueue, i)
48014839
end

0 commit comments

Comments
 (0)