PetCastingBarFrame still showing for vehicles
p3lim opened this issue ยท 4 comments
I spawn the player castingbar like normal, and I'd expect that to replace the vehicle castingbar as well.
I know it's disabled for pet frames, and vehicles are considered pets, but in oUF (and vanilla) they replace the player frame.
Because of this you actually end up with two castingbars in oUF.
I know I could easily fix this in the layout, but this should probably be handled by the element.
Had this happen to me again today, so I took another look at it.
The default pet castbar (PetCastingBarFrame) has not been used for normal pet casts since before 2008 (that's how far back @tekkub's source repo goes), it's only used for displaying possessed pet's casts.
Since this is handled by the player castbar in oUF, it's safe to completely disable PetCastingBarFrame when a player castbar is created in oUF, instead of when a pet castbar is created (as it is currently).
I'm submitting a PR for this.
I encountered this with one of the first quests in Azshara on the horde side, you control a goblin shredder for a few quests there.
I tested whether any of the normal pets you'd have would display the PetCastingBarFrame, like the Imp, Succubus and Water Elemental, but none of them seem to display a casting bar any more.
Edit:
It is primarily used for possessed mobs, while vehicles use the player's casting bar (afaik).
Thing is that even though that mob was considered a vehicle, it was possessed, so in the default UI, the player casting bar is hidden and the pet one is used.
In oUF however, there are no checks for this, so for example while controlling this mob, the Runaway Shredder, UNIT_SPELLCAST_START fires twice, for the pet and vehicle unit.
I normally don't spawn a pet frame for my layout, but if I were to do that and use the castbar element for both, they would both show up.
Not sure what you'd want to do with this, preventing the player casting bar from showing (being the vehicle one), using UnitIsPossessed('pet'), would be one option, and is the same way that the default UI does it.