I have created a set of icon displays inside a group. They all occupy the same x,y co-ordinates so you can only see one icon at once. The intention is to create a priority frame, so the icon for the highest priority spell appears on top. The Frame Strata option for the group and all the displays within it is set to Inherited.
As I understand it the order of the displays within the group determines the relative frame strata on screen. So my highest priority spell icons are at the bottom of the group. This all works fine until I relog (or reload UI). After which the ordering seems screwed up and doesn't appear to obey any sort of pattern. To fix it I have to open the WeakAuras options and either move a display up and then down again within the group ordering or toggle the Load - Never option for the group (on and then off again). As you can imagine it is quite annoying to have to do this every time I log in to fix my auras.
Any ideas how I can solve this?
Set up multiple conditionals for each one. It's a little more tedious to set up, but it will do the job, and is arguably the "proper" way to do it. That way only the one you want will be shown, and the others will be hidden. Then strata doesn't matter.
It sounds like you're trying to set up something that shows your spell rotation for you, but since I don't know what you're going for, I can only give a vague example:
Spell priority is A > B > C
Spell A trigger:
Spell A is usable
Spell B trigger:
Spell A is on cooldown,
Spell B is usable
Spell C trigger:
Spell A is on cooldown,
Spell B is on cooldown,
Spell C is usable
Hopefully that makes some sense.
Hi Crytuff, thanks for your suggestion. I understand what you are saying, unfortunately it doesn't really suit my needs. I was hoping to create something that would be easily maintainable if the spell priority I wanted to follow would change. With what I currently have set up it is as simple as re-ordering the displays within the group. However with your suggestion I would need to go and edit multiple triggers on all of the displays to change the priority order. Also not all of my displays have only one trigger, making the logic for the inverse even more complex to add to all the other displays that are lower down in the priority queue.
I know I am probably trying to do something with WeakAuras that it wasn't intended for, but that flexibility is what I love about this addon.
I have managed to fix my issue with a code change in WeakAuras.lua. The problem appears to be that the frameLevels of controlledChildren within a group are not set until the ordering of the group is modified (from the options window). Then they are not maintained when the addon is reloaded.
To solve this I added the following function to the bottom of WeakAuras.lua:
for id, data in pairs(db.displays) do
local lowestRegion = WeakAuras.regions[data.controlledChildren] and WeakAuras.regions[data.controlledChildren].region;
local frameLevel = lowestRegion:GetFrameLevel();
for i=2,#data.controlledChildren do
local childRegion = WeakAuras.regions[data.controlledChildren[i]] and WeakAuras.regions[data.controlledChildren[i]].region;
frameLevel = frameLevel + 1;
Then at the bottom of the ADDON_LOADED OnEvent function (around line 1525):
WeakAuras.ResolveCollisions(function() registeredFromAddons = true; end);
I lifted the body of FixGroupChildrenOrder() from the 'modify' function in RegionTypes\group.lua.
There is probably a cleaner way of doing this, but I'm not too familiar with the WeakAuras code yet. Would it be possible to add this fix or something equivalent into the official release?
I am having a similar problem, and I would love to see this become a fix for the official release. It seems like a bug, but was probably just overlooked. Hopefully it will be fixed soon.
You must login to post a comment. Don't have an account? Register to get one!