Players rearranged in combat - why still an issue

1 year 1 month ago 4 hours 28 minutes ago by Strife.
Strife
Administrator
Administrator
Posts: 508
Karma: 8
More
Topic Author
Players rearranged in combat - why still an issue #2
Players rearranged in combat when someone leaves/joins the raid - Why still an issue? Why no workaround?

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 Classic to 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 unless you want the UI tainted.

There is no workaround, 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 topic has been locked.
Moderators: ctshammyAcirac