spamwax / EavesDrop

WoW Addon to glance at incoming/outgoing hits & heals quickly and easily!
19 stars 2 forks source link

WoW Dragonflight PTR Client Breaks Eavesdrop #7

Open Nazgul084 opened 1 year ago

Nazgul084 commented 1 year ago

Blizzard, once again, made core API changes to the new Dragonflight (v10) PTR client. I forked the build of EavesDrop, updated the Ace-3 libraries, and got it working. I think. The fork ALSO appears to function in the 9.2.7 client, though should be tested further in both. @spamwax

spamwax commented 1 year ago

I have also fixed the core functionality of Eavesdrop in 10.0.1, working on fix to the changes to options/settings. There are some function changes in 10.0.1 that will break the addon for SL as well as Classic. I think, I will have to start branching the code to support those client soon.

Nazgul084 commented 1 year ago

I did not expect my changes to be functional in Retail and Wrath Classic with the new DL API changes, but I've now tested what I forked on DF/SL PTR, SL Retail, and Wrath Classic, and it appears that all of the functionality now works without error. I'm not sure how truly unified their code base is between current DF Beta, DF/SL PTR, SL Retail, and Classic, but I now suspect quite a bit.

spamwax commented 1 year ago

You are right that they are pretty unified, however I've noticed some behavior differences (bugs?) between clients. For example SetGradient doesn't produce the same result under retail vs DF depending on how you pass the color parameters.

More importantly, where did you get the files to update the Ace3 libraries. I am using their latest downloads from https://www.wowace.com/projects/ace3/files, and I am not getting the same results as with the files you have added to your fork!

spamwax commented 1 year ago

oh, nvm, their r1281 release has a bug.

Nazgul084 commented 1 year ago
  1. I manually updated all of the Ace3 libraries and LibSharedMedia3, because often whenever addons break, it's a change that impacts those libraries in some manner.
  2. Blizzard deprecated a lot of functions, so I exported the WoW Interface Code from the console to obtain a current look at what works, and how.
  3. Blizzard deprecated SetGradientAlpha, and their new preferred format for passing color information to SetGradient appears to include a call to CreateColor. Your Dragonflight code doesn't appear to make that call, so that could account for some of the behavior differences you mentioned related to color parameters.
  4. Classic used Legion as its code base, and I believe Wrath uses BFA as its code base. CreateColor has been around since Legion. That could account for the compatibility my code testing showed.
  5. Interesting solution you chose for the frame.delay / frame.alpha issue.
spamwax commented 1 year ago

Your Dragonflight code doesn't appear to make that call

I used CreateColor and got different results in each client, so I decided to just directly provide the color table in DF and leave the old ones untouched. It is very subtle to notice as using CreateColor in SL causes a solid background to appear at top/bottom of EavesDrop frame as opposed to having an actual gradient. Maybe you can verify on your end?

Interesting solution you chose for the frame.delay / frame.alpha issue

:) frame.alpha was getting values like 0.0002 before being subtracted, so that's the first thing that came to my mind. I think your solution is technically better as it fully hides each frame rather than setting its alpha to 0.0002

How do you dump WoW's Interface code? I know there are git repos's showing the diff but I don't know how they got them!

Nazgul084 commented 1 year ago

Maybe you can verify on your end?

I'll check it out later this evening. I may not have noticed that issue, as I use ElvUI and AddOnSkins for both Retail and WotLK, and it deskins everything and changes fonts.

I think your solution is technically better as it fully hides each frame

I was just attempting to work the problem of it blowing up if I attempted to display the frame right after logging in and before anything new would show up in the log. It looked like the old code may have been missing a validation check, and may have been blowing up if it attempted to set a negative alpha value.

How do you dump WoW's Interface code? I know there are git repos's showing the diff but I don't know how they got them!

I think there are a few references out there, but here are the essentials on how to do it:

  1. Open up the Battle.net client.
  2. Select the Battle.net Menu (Blue Swirly Logo) in the upper left corner.
  3. Select [Settings].
  4. Select [Game Settings].
  5. Select World of Warcraft client (or PTR or Classic variant)
  6. Check [Additional command line arguments].
  7. Enter "-console"
  8. Click < Done >
  9. Start your World of Warcraft client.
  10. Enter the In-game Developer Client by typing the backtick ( ` ) character, typically left of the number 1 key.
  11. Extract LUA and XML code assets by entering "exportInterfaceFiles code".
  12. Extract Art assets by entering "exportInterfaceFiles art" (This dumps a whole lot of files and requires a few GB of space!).

After you dump the assets, I'd go back into the Battle.net client and remove the -console startup command, unless there are other variables you want to take a peek at. (None of this is secret, BTW) Enjoy!