× General topics about the Retail version of Healbot

Players rearranged in combat - why still an issue

3 years 3 months ago 3 months 2 weeks ago by Strife.
Strife's Avatar
Strife
Administrator
Administrator
Posts: 1603
Karma: 8
More
Topic Author
Players rearranged in combat - why still an issue #1
Players rearranged in combat when someone leaves/joins the raid - Why still an issue?
For a workaround, see the bottom of this post

Things to know
Healbot is not rearranging the unit frames, it is Blizzard rearranging the unit id's

This is not a healbot issue rather a change from Vanilla to Original TBC that introduced the UI Lockdown to stop addons from having the ability to cast any spell on any player with the click on a single button.
Rather than kill addons completely, blizzard introduced the requirement that Unit frames had to inherit the SecureUnitButtonTemplate and this allowed the creation of a protected frame, allowing certain actions during combat such as casting predefined spells or actions against a predefined unit.

While in combat protected frames cannot be programatically shown, hidden, re-sized or re-anchored, nor can its attributes be changed.

So should a Players unit id change during combat due to another player leaving the raid, all that can be done is update the unit frames with things that are allowed such as the units name, health and mana.

In Summary
When in combat Healbot is:
  • Not moving unit frames
  • Not changing attributes
  • Healbot is actively avoiding the possibility of breaking your UI through a Taint.

Imagine this senario
The addon is setup with separate frames for Tanks, Healers and the Raid, further referred to as groups.
Fred the Healer and Frank the Tank are both in the same 25 man raid.
Fred the Healer has the unit id raid17 and is grouped with the other healers in the healers group.
Frank the Tank has the unit id raid25 and is grouped with the other tank in the tanks group.

Just after the start of a large trash fight, Fred the Healer leaves the raid.

- What happens next...?
There are only 24 raid members so raid25 is reassigned to raid17.
Now Frank the Tank has the unit id raid17.

- but wait we are still in combat and the UI is Locked so addons cannot magically update the unit id's like they did in Classic.
That is true, now Frank the Tank is raid17 and the unit frame with the unit attribute raid17 is in the healers group, so Frank is now grouped with the Healers and this cannot be changed while in combat. The other unit frame in the tanks group is now inactive as there is no raid25 and the name now displays "unknown"

To make things even worse, Fiona the Healer has joined the raid while the fight is ongoing, Fiona the healer is assigned the unit id raid25, so for the rest of combat Fiona the Healer is now using the raid25 unit frame in the tanks group.

- so what can be done.
When using unit frames based on SecureUnitButtonTemplates for the purpose of spell casting and while InCombatLockdown nothing can be done to place players in the correct frames while in combat, otherwise this would defeat the purpose of why Blizzard locks the UI

If Blizzard had allowed Global Unit ID's (Unit GUID) to be bound to the unit attribute in unit frames based on SecureUnitButtonTemplates then this issue would not exist, unfortunately Unit GUID's was an after thought and introduced in 2.3.

When Combat ends, then Healbot can move the unit frames to the correct groups.

The Workaround
If players are missing from a raid when combat starts and join during combat, more often than not they will take the unitid of other players. This can result in the new player shown in HealBot while other players disappear (Missing unitid's cannot be added during UI lockdown, so when a new player joins someone is going to end up with the missing unitid).

To workaround this specific situation, HealBot can reserve unitid's in the frames, the bar will show a grayed out name such as "raid22" or "player4", this is the actual unitid not allocated to anyone due to players missing from the raid/group.

To use this workaround, install and enable the HealBot Plugin CombatProt
The topic has been locked.
Moderators: ctshammyAcirac