Skip to content

Commit c839c23

Browse files
committed
- Try to use TooltipDataHandlerMixin.GetPrimaryTooltipData before TooltipDataHandlerMixin.GetTooltipData
- Don't automatically sell greys or repair by default, and recommend using Leatrix Plus for more complete implementation of features instead - Tidy up some finished to-do comments
1 parent ee9c8d5 commit c839c23

File tree

6 files changed

+22
-29
lines changed

6 files changed

+22
-29
lines changed

.vscode/settings.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@
9494
"PaperDollItemsFrame",
9595
"Settings",
9696
"EmbeddedItemTooltip",
97-
"SettingsPanel"
97+
"SettingsPanel",
98+
"NORMAL_FONT_COLOR",
99+
"SOUNDKIT"
98100
],
99101
"Lua.runtime.version": "Lua 5.1",
100102
"Lua.runtime.builtin": {
@@ -109,6 +111,6 @@
109111
"utf8": "disable"
110112
},
111113
"Lua.workspace.library": [
112-
"~/.vscode/extensions/ketho.wow-api-0.17.6/Annotations"
114+
"~/.vscode/extensions/ketho.wow-api-0.19.1/Annotations"
113115
]
114116
}

AutoGear-Cata.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Interface: 40401
1+
## Interface: 40402
22
## Title: AutoGear
33
## Notes: Automatically chooses loot and equips gear
44
## Author: Synthetikaryote, BujuArena

AutoGear-Mainline.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Interface: 110005
1+
## Interface: 110105
22
## Title: AutoGear
33
## Notes: Automatically chooses loot and equips gear
44
## Author: Synthetikaryote, BujuArena

AutoGear-Vanilla.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Interface: 11505
1+
## Interface: 11506
22
## Title: AutoGear
33
## Notes: Automatically chooses loot and equips gear
44
## Author: Synthetikaryote, BujuArena

AutoGear.lua

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,10 @@
66
-- In general, needing on one-handers that are near-worthless. The plan is to only roll if it passes a minimum threshold. That threshold should be 3x the highest weight among the 5 main stats.
77
-- Don't roll on loot I already have in my bag
88
-- Greeded in something within 5 levels that was an upgrade. Specifically, Gauntlets of Divinity versus equipped Algae Fists.
9-
-- Auto-equip bags if they're not BOP and you have an empty slot
109

1110
-- accomodate for "no item link received"
12-
-- identify bag rolls and roll need when appropriate
13-
-- roll need on mounts that the character doesn't have
14-
-- identify bag rolls and roll need when appropriate
1511
-- fix guild repairs
16-
-- make seperate stat weights for main and off hand
17-
-- add a weight for weapon damage
18-
-- fix weapons for rogues properly. (dagger and any can equip dagger and shield, put slow in main hand for outlaw, etc)
19-
-- remove the armor penetration weight
20-
-- make gem weights have level tiers (70-79, 80-84, 85)
2112
-- other non-gear it should let you roll
22-
-- add a ui
2313
-- add rolling on offset
2414
-- factor in racial weapon bonuses
2515
-- eye of arachnida slot nil error
@@ -1942,8 +1932,8 @@ optionsMenu:SetScript("OnEvent", function (self, event, arg1, arg2, ...)
19421932
ReasonsInTooltips = false,
19431933
AlwaysCompareGear = GetCVarBool("alwaysCompareItems"),
19441934
AlwaysShowScoreComparisons = false,
1945-
AutoSellGreys = true,
1946-
AutoRepair = true,
1935+
AutoSellGreys = false,
1936+
AutoRepair = false,
19471937
Override = false,
19481938
OverrideSpec = AutoGearGetDefaultOverrideSpec(),
19491939
UsePawn = true, --AutoGear built-in weights are deprecated. We're using Pawn mainly now, so default true.
@@ -2117,9 +2107,9 @@ optionsMenu:SetScript("OnEvent", function (self, event, arg1, arg2, ...)
21172107
["cliCommands"] = { "sell", "sellgreys", "greys" },
21182108
["cliTrue"] = { "enable", "on", "start" },
21192109
["cliFalse"] = { "disable", "off", "stop" },
2120-
["label"] = "Automatically sell greys",
2121-
["description"] = "Automatically sell all grey items when interacting with a vendor.",
2122-
["toggleDescriptionTrue"] = "Automatic selling of grey items is now enabled.",
2110+
["label"] = "Automatically sell greys ("..RED_FONT_COLOR_CODE.."warning"..FONT_COLOR_CODE_CLOSE..": not feature-complete; use Leatrix Plus instead)",
2111+
["description"] = "Automatically sell all grey items when interacting with a vendor.\n\n"..RED_FONT_COLOR_CODE.."Warning"..FONT_COLOR_CODE_CLOSE..": This feature is not feature-complete and does not correctly handle having max gold, vendors who can't buy items, and avoiding selling greys that can be used for trading with vendors. Using Leatrix Plus instead for this feature is recommended."..FONT_COLOR_CODE_CLOSE,
2112+
["toggleDescriptionTrue"] = "Automatic selling of grey items is now enabled. ("..RED_FONT_COLOR_CODE.."warning"..FONT_COLOR_CODE_CLOSE..": This feature is not feature-complete and does not correctly handle having max gold, vendors who can't buy items, and avoiding selling greys that can be used for trading with vendors. Using Leatrix Plus instead for this feature is recommended.)",
21232113
["toggleDescriptionFalse"] = "Automatic selling of grey items is now disabled."
21242114
},
21252115
{
@@ -2211,9 +2201,9 @@ optionsMenu:SetScript("OnEvent", function (self, event, arg1, arg2, ...)
22112201
["cliCommands"] = { "debuginfo", "debuginfointooltips", "test", "testmode", "rolltestmode" },
22122202
["cliTrue"] = { "enable", "on", "start" },
22132203
["cliFalse"] = { "disable", "off", "stop" },
2214-
["label"] = "Show debug info in item tooltips (warning: "..RED_FONT_COLOR_CODE.."laggy"..FONT_COLOR_CODE_CLOSE.."!)",
2215-
["description"] = "This is a test mode to show debug info in tooltips, such as the real roll outcome if the item viewed dropped as a loot roll. This is to help the developers find and fix bugs in AutoGear. You can use it to help too and report issues. (warning: "..RED_FONT_COLOR_CODE.."laggy"..FONT_COLOR_CODE_CLOSE.."!)",
2216-
["toggleDescriptionTrue"] = "Debug info in tooltips is now enabled. Info such as whether AutoGear would \""..GREEN_FONT_COLOR_CODE.."NEED"..FONT_COLOR_CODE_CLOSE.."\" or \""..RED_FONT_COLOR_CODE.."GREED"..FONT_COLOR_CODE_CLOSE.."\" on an item will be shown in item tooltips. (warning: "..RED_FONT_COLOR_CODE.."laggy"..FONT_COLOR_CODE_CLOSE.."!)",
2204+
["label"] = "Show debug info in item tooltips ("..RED_FONT_COLOR_CODE.."warning"..FONT_COLOR_CODE_CLOSE..": laggy!)",
2205+
["description"] = "This is a test mode to show debug info in tooltips, such as the real roll outcome if the item viewed dropped as a loot roll. This is to help the developers find and fix bugs in AutoGear. You can use it to help too and report issues.\n\n"..RED_FONT_COLOR_CODE.."Warning"..FONT_COLOR_CODE_CLOSE..": laggy!",
2206+
["toggleDescriptionTrue"] = "Debug info in tooltips is now enabled. Info such as whether AutoGear would \""..GREEN_FONT_COLOR_CODE.."NEED"..FONT_COLOR_CODE_CLOSE.."\" or \""..RED_FONT_COLOR_CODE.."GREED"..FONT_COLOR_CODE_CLOSE.."\" on an item will be shown in item tooltips. ("..RED_FONT_COLOR_CODE.."warning"..FONT_COLOR_CODE_CLOSE..": laggy!)",
22172207
["toggleDescriptionFalse"] = "Debug info in tooltips is now disabled."
22182208
}
22192209
}
@@ -3127,6 +3117,7 @@ function AutoGearGetValidGearSlots(info)
31273117
and { INVSLOT_MAINHAND, INVSLOT_OFFHAND }
31283118
or (((weapons == "any")
31293119
or (weapons == "2h"))
3120+
-- or ((weapons == "dual wield") and (not CanDualWield()))
31303121
and { INVSLOT_TABARD }
31313122
or nil),
31323123
[Enum.InventoryType.IndexWeaponmainhandType] = ((weapons == "any")
@@ -4483,8 +4474,8 @@ function AutoGearTooltipHook(tooltip)
44834474
if (not (tooltipName=="GameTooltip" or tooltipName=="ShoppingTooltip1" or tooltipName=="ShoppingTooltip2" or tooltipName=="ItemRefTooltip")) or (not tooltip:IsVisible()) then return end
44844475
if (not AutoGearCurrentWeighting) then AutoGearSetStatWeights() end
44854476
local name, link, equipped, guid, tooltipData
4486-
if tooltip.GetTooltipData then
4487-
tooltipData = tooltip:GetTooltipData()
4477+
if tooltip.GetPrimaryTooltipData or tooltip.GetTooltipData then
4478+
tooltipData = tooltip.GetPrimaryTooltipData and tooltip:GetPrimaryTooltipData() or (tooltip.GetTooltipData and tooltip:GetTooltipData())
44884479
if not tooltipData then tooltip:AddDoubleLine("AutoGear error:", "no tooltip data") return end
44894480
guid = tooltipData.guid
44904481
name = tooltipData.lines[1].leftText

AutoGear.toc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
## Interface: 110005
2-
## Interface-Mainline: 100005
3-
## Interface-Cata: 40401
1+
## Interface: 110100
2+
## Interface-Mainline: 110100
3+
## Interface-Cata: 40402
44
## Interface-Wrath: 30403
55
## Interface-TBC: 20505
6-
## Interface-Vanilla: 11505
6+
## Interface-Vanilla: 11506
77
## Title: AutoGear
88
## Notes: Automatically chooses loot and equips gear
99
## Author: Synthetikaryote, BujuArena

0 commit comments

Comments
 (0)