[suggestion] Don't load the addon if char is at max level
tflo opened this issue · 0 comments
It seems the addon is also active on toons that are at max. level. Correct me if I'm wrong, but I think there is no need for that.
Sure, with a good addon manager (e.g. SimpleAddonManager) I could create a "Leveler" addon set that builds on top of my regular set, and probably I'm going to do that anyway, but users who aren't using an addon manager are forced to use a per-toon addon setup.
To my knowledge, there are at least 2 ways to check if a toon is not at max level:
With UnitXPMax:
UnitXPMax('player') ~= 100000000
With GetMaxLevelForExpansionLevel:
UnitLevel('player') ~= GetMaxLevelForExpansionLevel(GetExpansionLevel())
So you could just add a check at the top of your file, or – since you've split your code into 3 files – it might be more elegant to split it further into a "loader" and "main" addon, where the "main" is LoadOnDemand, and the "loader" does the check and loads the "main" or not.
Oh, and I really like your addon, mainly because unlike similar addons it shows me (almost) exactly the infos I'm interested in. Thanks!