Skip to content

Commit

Permalink
Merge pull request #210 from bpapuni/master
Browse files Browse the repository at this point in the history
Fixed tooltip issues introduced in 10.2
  • Loading branch information
Sellorio authored Dec 5, 2023
2 parents 13c6aee + 7ad2be7 commit 91455ad
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,38 @@
"Lua.diagnostics.disable": [
"lowercase-global",
"unused-function"
],
"Lua.diagnostics.globals": [
"CooldownFrame_Set",
"ActionButton_HideOverlayGlow",
"ClearChargeCooldown",
"ActionButton_ShowOverlayGlow",
"RANGE_INDICATOR",
"COOLDOWN_TYPE_LOSS_OF_CONTROL",
"COOLDOWN_TYPE_NORMAL",
"StartChargeCooldown",
"RED_FONT_COLOR",
"LIGHTGRAY_FONT_COLOR",
"FauxScrollFrame_Update",
"BuildIconArray",
"FauxScrollFrame_GetOffset",
"SpellBook_GetSpellBookSlot",
"MAX_SPELLS",
"SpellBookFrame",
"MacroFrame",
"QueryCastSequence",
"message",
"UIPanelWindows",
"UISpecialFrames",
"SlashCmdList",
"ShowMacroFrame",
"GameTooltip_SetDefaultAnchor",
"StaticPopupDialogs",
"CONFIRM_DELETE_MACRO",
"OKAY",
"CANCEL",
"PanelTemplates_SetNumTabs",
"PanelTemplates_SetTab",
"ScrollingEdit_OnTextChanged"
]
}
6 changes: 5 additions & 1 deletion src/engine/mega-macro-action-bar-engine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,12 @@ function MegaMacroActionBarEngine.OnUpdate(elapsed)

iterator(function(button)
local action = button:GetAttribute("action") or button.action
local macroName = GetActionText(action)
local macroCode = GetMacroBody(macroName)
local type, actionArg1 = GetActionInfo(action)
local macroId = type == "macro" and MegaMacroEngine.GetMacroIdFromIndex(actionArg1)
-- As of 10.2 GetActionInfo isn't returning the correct value for actionArg1
-- local macroId = type == "macro" and MegaMacroEngine.GetMacroIdFromIndex(actionArg1)
local macroId = type == "macro" and macroCode and tonumber(string.sub(macroCode, 2, 4))

if macroId then
ActionsBoundToMegaMacros[button] = true
Expand Down

0 comments on commit 91455ad

Please sign in to comment.