Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The War Within #5071

Merged
merged 13 commits into from
May 28, 2024
Merged

The War Within #5071

merged 13 commits into from
May 28, 2024

Conversation

mrbuds
Copy link
Contributor

@mrbuds mrbuds commented May 10, 2024

Description

Pull Request for TWW

This will let the bot create packages in comments

TODO

@mrbuds mrbuds added 👩‍🔬 Work in Progress This pull request is still being actively developed and shouldn't be merged. 🆕 Feature Preview This is a draft intended to show a preview of an upcoming feature. 🔜Future Issue This ticket concerns issues found on a PTR/beta client, but which aren't yet a problem on live WoW. labels May 10, 2024
@mrbuds mrbuds force-pushed the war-within branch 2 times, most recently from eb7638d to 7743d38 Compare May 10, 2024 16:42
Copy link

github-actions bot commented May 13, 2024

An experimental build of WeakAuras with the changes in this pull request is available here.
Build Time: Mon May 27 19:13:33 UTC 2024

@Stanzilla
Copy link
Contributor

✨✨ Here's an AI-assisted sketch of how you might approach this issue saved by @Stanzilla using Copilot Workspace v0.17

Topic

Analyze this PR and check for mistakes

Before
  • The PR introduces changes to multiple files, including .luacheckrc, WeakAuras/BuffTrigger2.lua, WeakAuras/Compatibility.lua, WeakAuras/GenericTrigger.lua, WeakAuras/Init.lua, WeakAuras/Prototypes.lua, and others, affecting functionality related to WeakAuras addon for World of Warcraft.
  • The PR updates interface version numbers in .toc files to 110000.
  • It adds a new file WeakAuras/Compatibility.lua to handle functions that work differently across WoW versions.
  • Changes in WeakAuras/BuffTrigger2.lua and other Lua files replace direct GetSpellInfo calls with WeakAuras.GetSpellInfo to utilize the newly introduced compatibility layer.
  • The PR removes specific Wrath of the Lich King Classic checks, consolidating version checks under broader categories like IsCataOrRetail.
  • Adjustments are made to talent-related functionality, reflecting changes in the game's API and data structures in different WoW versions.
  • The PR aims to ensure compatibility and functionality of the WeakAuras addon across multiple versions of World of Warcraft, including Classic Era, Cataclysm Classic, and Retail.
After
  • The PR correctly updates interface version numbers in .toc files to 110000.
  • The new file WeakAuras/Compatibility.lua properly handles functions across different WoW versions.
  • Direct GetSpellInfo calls are replaced with WeakAuras.GetSpellInfo to utilize the compatibility layer.
  • The consolidation of version checks under broader categories like IsCataOrRetail is accurate.
  • Adjustments to talent-related functionality reflect the game's API and data structures across WoW versions.
Plan
  • WeakAuras/Compatibility.lua (CHANGE)
    • Add compatibility layer for GetSpellInfo across different WoW versions.
  • .luacheckrc (CHANGE)
    • Add C_Reputation to globals section.
  • WeakAuras/BuffTrigger2.lua (CHANGE)
    • Replace GetSpellInfo with WeakAuras.GetSpellInfo for compatibility across WoW versions.
    • Adjust talent-related functionality to reflect changes in the game's API and data structures.
  • WeakAuras/GenericTrigger.lua (CHANGE)
    • Update function calls to use the new compatibility layer functions.
    • Remove specific Wrath of the Lich King Classic checks.
  • WeakAuras/Init.lua (CHANGE)
    • Update interface version numbers in .toc files to 110000.
    • Consolidate version checks under broader categories like IsCataOrRetail.
  • WeakAuras/Prototypes.lua (CHANGE)
    • Adjust talent-related functionality to use the compatibility layer.
  • WeakAuras/Types.lua (CHANGE)
    • Update powerTypes and other version-specific checks to use the compatibility layer.
  • WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMiniTalent_Dragonflight.lua (CHANGE)
    • Ensure compatibility with the new talent system structure.
  • WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBox.lua (CHANGE)
    • Replace GetSpellInfo with WeakAuras.GetSpellInfo for drag-and-drop functionality.
  • WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua (CHANGE)
    • Update to use WeakAuras.GetSpellInfo for drag-and-drop functionality.
  • WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpinBox.lua (CHANGE)
    • Adjust UI offsets and widths for compatibility across WoW versions.
  • WeakAurasOptions/LoadOptions.lua (CHANGE)
    • Replace GetSpellInfo with WeakAuras.GetSpellInfo in spell name correction function.
  • WeakAurasOptions/OptionsFrames/IconPicker.lua (CHANGE)
    • Use WeakAuras.GetSpellInfo for fetching spell icons.
  • WeakAurasOptions/OptionsFrames/OptionsFrame.lua (CHANGE)
    • Adjust UI element positions for compatibility across WoW versions.
  • WeakAurasTemplates/TriggerTemplatesData.lua (CHANGE)
    • Update to use WeakAuras.GetSpellInfo for spell data.
Sketch of implementation

An implementation sketch has not been generated or was not included

Details

Code analyzed at e0fb057

@m33shoq
Copy link

m33shoq commented May 24, 2024

Got this error when was switching between spell triggers, especially whenever I clicked Charges Changed Event or Cooldown Ready Event. Triggers worked as usual though

3x Lua error in aura 'New 8': Trigger 1
WeakAuras Version: 5.13.1-16-gef4ee43
bad argument #1 to '?' (Usage: local name = C_Spell.GetSpellName(spellIdentifier))
[string "=[C]"]: in function `GetSpellName'
[string "@WeakAuras/Prototypes.lua"]:1116: in function `CompareSpellIds'
[string ""]:4: in function <[string ""]:2>
[string "=[C]"]: in function `xpcall'
[string "@WeakAuras/GenericTrigger.lua"]:704: in function <WeakAuras/GenericTrigger.lua:627>
[string "@WeakAuras/GenericTrigger.lua"]:1039: in function `CreateFakeStates'
[string "@WeakAuras/WeakAuras.lua"]:4508: in function `UpdateFakeStatesFor'
[string "@WeakAuras/WeakAuras.lua"]:4484: in function `FakeStatesFor'
[string "@WeakAuras/WeakAuras.lua"]:3179: in function <WeakAuras/WeakAuras.lua:3034>
[string "@WeakAuras/WeakAuras.lua"]:3199: in function `Add'
[string "@WeakAurasOptions/GenericTrigger.lua"]:456: in function <WeakAurasOptions/GenericTrigger.lua:454>
[string "=[C]"]: ?
[string "@WeakAuras/Libs/AceConfig-3.0-3/AceConfigDialog-3.0-86/AceConfigDialog-3.0.lua"]:45: in function <...nfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua:43>
[string "@WeakAuras/Libs/AceConfig-3.0-3/AceConfigDialog-3.0-86/AceConfigDialog-3.0.lua"]:836: in function <...nfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua:658>
[string "=[C]"]: ?
[string "@WeakAuras/Libs/AceGUI-3.0-41/AceGUI-3.0.lua"]:66: in function <...faceWeakAuras/Libs/AceGUI-3.0/AceGUI-3.0.lua:64>
[string "@WeakAuras/Libs/AceGUI-3.0-41/AceGUI-3.0.lua"]:300: in function `Fire'
[string "@WeakAuras/Libs/AceGUI-3.0-41/widgets/AceGUIWidget-DropDown.lua"]:432: in function <...as/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua:423>
[string "=[C]"]: ?
[string "@WeakAuras/Libs/AceGUI-3.0-41/AceGUI-3.0.lua"]:66: in function <...faceWeakAuras/Libs/AceGUI-3.0/AceGUI-3.0.lua:64>
[string "@WeakAuras/Libs/AceGUI-3.0-41/AceGUI-3.0.lua"]:300: in function `Fire'
[string "@WeakAuras/Libs/AceGUI-3.0-41/widgets/AceGUIWidget-DropDown-Items.lua"]:351: in function <...s/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua:341>

Locals:
(*temporary) = "bad argument #1 to '?' (Usage: local name = C_Spell.GetSpellName(spellIdentifier))"

@mrbuds
Copy link
Contributor Author

mrbuds commented May 25, 2024

Got this error when was switching between spell triggers, especially whenever I clicked Charges Changed Event or Cooldown Ready Event. Triggers worked as usual though

Thanks for the report, this should be fixed now

@ljosberinn
Copy link

ljosberinn commented May 26, 2024

  • GetItemSetInfo in Prototypes.lua now needs to be C_Item.GetItemSetInfo
  • It'd be nice of Compatibility.lua would include something for GetSpellCooldown (now C_Spell.GetSpellCooldown and also returns a table)

@mrbuds
Copy link
Contributor Author

mrbuds commented May 26, 2024

* It'd be nice of `Compatibility.lua` would include something for `GetSpellCooldown` (now `C_Spell.GetSpellCooldown` and also returns a table)

Your question raise a future problem, if people start using them, then it is weakauras addon burden to keep them working forever.
These helper functions were only made for internal usage and may be deleted without warning when all versions of the game handle them the same way.
I'd prefer move all functions of Compatibility.lua to private namespace before it is an issue.

@hambold
Copy link

hambold commented May 27, 2024

Hi,

I noticed that running the C_TooltipInfo.GetHyperlink() function inside of WeakAuras (or in a Plater script) is throwing an error ("unable to find mixin (ColorMixin)") even though the function never changed for TWW. The function runs with no errors if executed via the chat with /run or /dump or if directly put into an addon's code.
I'm sorry if this isn't an issue with WeakAuras but I don't know why the same command runs fine in one place but fails in another :|

So basically running this from chat works:
/dump C_TooltipInfo.GetHyperlink ("unit:" .. UnitGUID("player"))

But putting this in a WeakAura throws the error "unable to find mixin (ColorMixin)":
local tooltipInfo = C_TooltipInfo.GetHyperlink ("unit:" .. UnitGUID("player"))

PS:
It fails with any GUID, I just use the player's here for convenience.

Here's the full error from a WeakAura that has just that one line of code:

1x Lua error in aura 'Hyperlink WA': init
WeakAuras Version: 5.13.1-15-g3a05188
unable to find mixin (ColorMixin)
[string "=[C]"]: in function `GetHyperlink'
[string "return function() C_TooltipInfo.GetHyperlink ("unit:" .. UnitGUID("player"))"]:1: in function <[string "return function() C_TooltipInfo.GetHyperlin..."]:1>
[string "=[C]"]: in function `xpcall'
[string "@WeakAuras/AuraEnvironment.lua"]:374: in function `ActivateAuraEnvironment'
[string "@WeakAuras/GenericTrigger.lua"]:1063: in function `ScanWithFakeEvent'
[string "@WeakAuras/GenericTrigger.lua"]:1413: in function `LoadDisplays'
[string "@WeakAuras/WeakAuras.lua"]:2030: in function `LoadDisplays'
[string "@WeakAuras/WeakAuras.lua"]:1812: in function <WeakAuras/WeakAuras.lua:1649>
[string "@WeakAuras/WeakAuras.lua"]:2007: in function `Resume'
[string "@WeakAurasOptions/OptionsFrames/OptionsFrame.lua"]:170: in function <...dOns/WeakAurasOptions/OptionsFrames/OptionsFrame.lua:150>
[string "=[C]"]: in function `Hide'
[string "@Blizzard_UIParentPanelManager/Mainline/UIParentPanelManager.lua"]:1046: in function <...ParentPanelManager/Mainline/UIParentPanelManager.lua:1041>
[string "@DevTool/Libs/AceConfig-3.0-3/AceConfigDialog-3.0-86/AceConfigDialog-3.0.lua"]:1846: in function <...nfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua:1845>
[string "=[C]"]: in function `securecall'
[string "@Blizzard_UIParentPanelManager/Mainline/UIParentPanelManager.lua"]:1087: in function `CloseWindows'
[string "@Blizzard_UIParentPanelManager/Mainline/UIParentPanelManager.lua"]:1101: in function <...ParentPanelManager/Mainline/UIParentPanelManager.lua:1099>
[string "=[C]"]: in function `securecall'
[string "@Blizzard_UIParent/Mainline/UIParent.lua"]:2841: in function `ToggleGameMenu'
[string "TOGGLEGAMEMENU"]:1: in function <[string "TOGGLEGAMEMENU"]:1>

Locals:
(*temporary) = "unable to find mixin (ColorMixin)"

WeakAuras/Prototypes.lua Outdated Show resolved Hide resolved
WeakAuras/Types_Retail.lua Outdated Show resolved Hide resolved
WeakAuras/Prototypes.lua Outdated Show resolved Hide resolved
WeakAuras/Prototypes.lua Outdated Show resolved Hide resolved
@InfusOnWoW InfusOnWoW merged commit ec86e49 into main May 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 Feature Preview This is a draft intended to show a preview of an upcoming feature. 🔜Future Issue This ticket concerns issues found on a PTR/beta client, but which aren't yet a problem on live WoW. 👩‍🔬 Work in Progress This pull request is still being actively developed and shouldn't be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants