Open
Conversation
- Add GetAddOnMetadataCompat wrapper for C_AddOns.GetAddOnMetadata - Add IsAddOnLoadedCompat wrapper for C_AddOns.IsAddOnLoaded - Supports TBC Classic, Wrath, Cata, and Retail - Safely checks if C_AddOns namespace exists before using it
- Use GetAddOnMetadataCompat for version detection - Use IsAddOnLoadedCompat for addon compatibility checks - Export compatibility functions in EMAPrivate.Core for use by other modules - Enables other modules to safely call API functions across WoW versions This prepares Core.lua to be fully compatible across Classic, TBC, Wrath, Cata, and Retail versions.
Bearstonk
added a commit
to Bearstonk/ema
that referenced
this pull request
Jan 16, 2026
- DisplayTeam.lua: Replace C_AddOns.IsAddOnLoaded with EMAPrivate.Core.IsAddOnLoaded - Line 29: TrufiGCD initialization - Lines 3263, 3280: TrufiGCD integration checks - Quest-Classic.lua: Replace IsAddOnLoaded with EMAPrivate.Core.IsAddOnLoaded - Line 1959: ElvUI detection for frame positioning Enables cross-version compatibility by using the compatibility wrapper functions exported by Core.lua in PR ebonyfaye#143. Fixes nil value errors in TBC Anniversary. Depends on: PR ebonyfaye#142, PR ebonyfaye#143
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependencies: Requires PR #142 (feat: add API compatibility layer for cross-version support)
This PR updates Core.lua to use the compatibility functions introduced in PR #1...
Update Core.lua to use API compatibility functions
Use GetAddOnMetadataCompat for version detection
Use IsAddOnLoadedCompat for addon checks
Export compatibility functions in EMAPrivate.Core so other modules can use them
Depends on PR 142 (API compatibility layer) - #142
Prepares for PR 144 (module fixes)
Tested on TBC Anniversary on 0230 - no regression

✅ PR #143 introduced no regressions
✅ PR #143 fixed the Core.lua issues (version detection works)
⏳ PR #144 will eliminate DisplayTeam (32x) + Quest-Classic (2x) IsAddOnLoaded errors
To Verify settings still work:
Type /ema config
Settings window should open
Version should display correctly at the top
Expected result after PR #143:
No new errors introduced
Settings functional
Version displays
Important caveat: PR #143 won't eliminate the DisplayTeam.lua and Quest-Classic.lua errors yet (32x + 2x IsAddOnLoaded errors). Those are fixed by PR #144, which will use the compatibility function exports that PR #2 just created.
PR #143 success = "no regressions + settings work"
PR #144 success = "DisplayTeam & Quest-Classic errors gone"