oUF-wow / oUF

WoW AddOn - Unit frame framework.
MIT License
221 stars 58 forks source link

Castbar broken for vehicle during world quest #676

Closed p3lim closed 5 months ago

p3lim commented 5 months ago

Describe the bug During the world quest A Dangerous Harvest the spell used for opening the animacones is cast by the player and not the vehicle, thus the castbar is never shown.

How to reproduce

  1. Pick up the world quest
  2. Use the extra ability to turn into a moth
  3. Loot an animacone

What did you expect? Castbar showing

p3lim commented 5 months ago

I think an actual exclusion here is the best way to deal with it. Either by allowing the player casts to show while in a vehicle, or specifically for this spell. The former might pose a problem, but I'm unsure when that could be the case.

p3lim commented 5 months ago

Before the element revamp in #480 the unit checks used to also check for realUnit, maybe @ls can give some insight into why this was removed.

p3lim commented 5 months ago

Hah, I was the one that added that support way back in 2014 with #230.

ls- commented 5 months ago

Huh? Am I missing something? image

Ah, wait, I just realised it's my pet castbar since the player is shown in the pet frame in this case 🤔

ls- commented 5 months ago

Basically, unlike in the default UI where the player isn't shown in the pet frame we show both, the player is in the pet frame and the vehicle is in the player frame. They both have castbars in oUF, for instance, the moth has 2 abilities with 1s cast times, allergen cloud and dream dust in slots 1 and 2 respectively.

And here's the main difference. oUF shows castbars for those, but the default UI doesn't because after the default castbar was rewritten in DF it doesn't even switch units anymore, it's always locked to "player", there's literally no vehicle castbar in the default UI anymore.

Iirc, the reason why I removed that .realUnit was because it often resulted in double castbars for the same ability, like, both the pet and player/vehicle castbars would show up whenever something was cast by the player that's in the pet frame which isn't ideal, imho. For instance, here you can see both vehicle and pet/player castbars with different abilities at the same time.

image

Like, in this case, if the .realUnit check was still in place two abilities would be competing for the same castbar, and depending on which was cast last we'd get 2 "Collecting" castbars.

All in all, I'm not particularly interested in mimicking the default UI behaviour in this case. I'm not even entirely sure that the lack of player <-> vehicle switching was truly intentional on their end. The DF rewrite was kinda rough...