feat: add API compatibility layer for cross-version support#142
Open
Bearstonk wants to merge 1 commit intoebonyfaye:masterfrom
Open
feat: add API compatibility layer for cross-version support#142Bearstonk wants to merge 1 commit intoebonyfaye:masterfrom
Bearstonk wants to merge 1 commit intoebonyfaye:masterfrom
Conversation
Author
Author
0404089 to
056d431
Compare
- 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
056d431 to
4706bb3
Compare
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.




What This Does
Adds compatibility wrapper functions for the C_AddOns API, which doesn't exist in TBC Classic but does in Retail WoW.
Context
The current deployed version (v4.3) uses the older GetAddOnMetadata/IsAddOnLoaded API
which works in TBC Classic. However, newer code in master uses C_AddOns namespace
which doesn't exist in TBC, causing nil errors.
This PR adds a compatibility layer to support both APIs, allowing the addon to work
across all WoW versions (Classic, TBC, Wrath, Cata, Retail).
Why It's Needed
How It Works
GetAddOnMetadataCompat and IsAddOnLoadedCompat check:
Files Changed
Next Steps
This is foundation for subsequent PRs that will use these wrappers throughout the codebase.