sylvanaar / wow-instant-messenger

WIM (WoW Instant Messenger) is a World of Warcraft addon which brings an instant messenger feel to communication in game.
https://www.curseforge.com/wow/addons/wim-3
MIT License
12 stars 14 forks source link

ReglohPri_Deprecated_GuildRoster #30

Closed ReglohPri closed 3 years ago

ReglohPri commented 3 years ago

Since Patch 8.2.0 is GuildRoster() deprecated. I changed it to C_GuildInfo.GuildRoster().

Tested on the PTR Server for Shadowlands. I'm not sure if it works under classic

Merge first my Patches for 9.0.1 and then this here.

MysticalOS commented 3 years ago

the 8.2.0 change needs to consider that classic is based off 8.1.5 and doesn't have that change.

I'm was told that at some point they will bring classic up to 9.0 code base though since they recognize the fragmentation being an issue (not just for authors but actual UI team)

ReglohPri commented 3 years ago

Then we need our own variable to distinguish the rest from Classic

MysticalOS commented 3 years ago

just do a simple upvalue above the usage along the lines of local GuildRoster = _G.GuildRoster or _G.C_GuildInfo.GuildRoster() or whatever correct formatting is

ReglohPri commented 3 years ago

I have to do it like this, otherwise my debugger will complain.

if (select (4, GetBuildInfo ()) <= 19999) then

MysticalOS commented 3 years ago

I still think it's better to see if GuildRoster function exists, in 9.0 the deprecated functions will be deleted, so they will be nil. This ensures future compat automatically if/when classic updates to a newer code base than 8.1.5

that fix would need to be refixed. although I guess that's not a bad thing since if classic does update to later code base the entire check should just be removed. So second thought yeah that'd probably be fine because then at least we'll be forced to remember to remove it. :D

ReglohPri commented 3 years ago

So, i will close this pull request and create a new pull request with my changes