Bodify / BetterBlizzPlates

16 stars 7 forks source link

Broken enemy nameplate after MC #11

Open ado21 opened 3 months ago

ado21 commented 3 months ago

Hey, when enemy player gets MC'ed by your teammate, nameplate of mind controlled unit gets red color for rest of the arena. Buggrabber catched 0 bugs tho. This issue was present even before TWW pre-patch. Most likely since creation of your addon.

Bodify commented 3 months ago

Hey! Thank you for the report. Unfortunately theres not too much I can do about it. The short answer is Blizzard sucks and I've tried. The long answer is that this is a bug with Blizzards own nameplates (which I modify with BBP) that I cannot fully fix due to Blizzard restrictions. When a MC happens I already run an update function when it happens and after it ends and then again after a short delay in an attempt to give Blizzards spaghetti code some time to figure itself out. Assuming the info I get back from the Blizzard API is correct at this point it should be able to update all of my own elements from BBP and also the color. However some restricted elements like nameplate width are stuck in a state where it thinks its the opposite faction of what its supposed to be and theres nothing I can do about that. You can however force a manual update by either looking away from the nameplates and back, tuning nameplates off and on again or hiding UI with alt+z and unhiding it again.

Not quite sure why the color got stuck but it is definitely related. I don't really have any new bright ideas to try add to this. All I could think of is adding even more updates on longer delays but its such an ugly bandaid fix to something that is a core issue with blizzards nameplates themselves so im not sure if I will.

ado21 commented 3 months ago

Got it, didnt know looking away helps to fix it. I understand tho I had similar issues with specific blizz API (UnitName()) which has delay to retrieve proper values for names after loading into arena. If I call it immediately when players load into arena it says their name is "unknown". Fix was to set "hard" delay by x seconds before calling API (3s in my case), however as you said it is bandaid,

Other than that thanks for the addon. I was looking for something like this for a long time.

Close the issue if you like.

ado21 commented 3 months ago

FYI found ur function where you have tried to delay it by 0.2s. I will play with it, ty for info

Bodify commented 3 months ago

Curious if you found any success, or have even had a chance to test it? I'll leave this issue open until I've had at least one more look at it myself too but not sure when I'll bother as its a pain to test.

ado21 commented 3 months ago

Hey, I havent played 2s/3s with priest for a long time so I am awaiting situation when random priest casts MC in blitz. I ll inform you when I will know. Pain to test as you mentioned.

ado21 commented 1 month ago

Hey, I had it set to 1s, however it is still being bugged after MC, so I start to doubt delay would fix it

Bodify commented 1 month ago

I still have never seen this specific bug you mention. I'm aware nameplates can get stuck in a wrong state after the MC, but anything I do with my addon should get reset properly. Width etc is restricted and cannot be changed during combat or automatically.

Are you sure we're on the same page?

ado21 commented 1 month ago

Yes we are, after your teammate mind controls enemy, his nameplate is bugged, nameplate color gets red and width is shortened. I would say the shade of red is identical with pet nameplate color. However buggrabber does not catch anything so seems like you have it secured to not break addon as a whole.

Bodify commented 1 month ago

Are you using any of the nameplate color options? Do you have class colors on in general? Can you share your profile? It sounds very odd. Like mentioned I can't do anything about the width but the color should be fixable.

ado21 commented 1 month ago

Well I have basically class color healthbar for enemies turned on. Do you have any config file in addon which would tell you options I use ? I could send specifically that file rather than screenshoting all of the addon tabs

Bodify commented 1 month ago

Theres an export section where you can export your profile string

ado21 commented 1 month ago

Figured that out while you responded:

BBP-profile.txt

ado21 commented 1 month ago

I guess I ll try to simulate it this evening in gurubashi arena

Bodify commented 1 month ago

Ok pretty barebone profile. Thats odd for sure. Could you run this and let me know what it says?

/run print(GetCVar("ShowClassColorInNameplate"), GetCVar("ShowClassColorInFriendlyNameplate"), BetterBlizzPlatesDB.ShowClassColorInNameplate, BetterBlizzPlatesDB.ShowClassColorInFriendlyNameplate)

ado21 commented 1 month ago

1 0 1 1

Bodify commented 1 month ago

That might be the issue. Do you actually have class colored friendly nameplates atm? Could you try uncheck and re-check the friendly class color setting and see if that fixes things? Assuming you want class colors on friendly nameplates. If not then that is probably the reason they turn red and not proper color; because blizzard thinks theyre friendly and shouldnt be class colored but reaction colored.

ado21 commented 1 month ago

Yeah I have them class colored via your addon. Sure, I will recheck that option for friendly nameplates and we shall see.

Even tho I have healthbar hidden for friendly nameplates so isnt that combination an issue ?

Setting up friendly class color healthbar and then hiding it

ado21 commented 1 month ago

so after testing nameplate still gets red after MC, however width is not being changed atm. So only the color is problem

Bodify commented 1 month ago

What does the print script print now?

ado21 commented 1 month ago

atm it is 1 0 1 0

Bodify commented 1 month ago

Did you not check color friendly nameplates again? You need to check that.

ado21 commented 1 month ago

I am using only "class color name" and hide healthbar for friendly nameplates, tho I checked/unchecked class color healthbar if that helps somehow

Bodify commented 1 month ago

The point im trying to make is that blizzard code is bad and gets messed up after a mc. Because you do not have friendly class colors on it will color the nameplate red instead of class colored due to the mismatch of friendly/enemy etc. Its weird. Try enable the class colors on friendly nameplates and see what gives thats what I tried to say. Because right now you have it off and it will bug due to that is my thought