Originally I ruled out UnitIsVisible because I felt that during the course of an instance there are too much cases when a subset of your raid is not visible but I thought it handled line of sight as well as rendering radius check. Since obviously it does not I think I'll add it as a separate option (should be done inside the hour :P ).
As for GetSubZoneText(), according to /razone implementation in ora2 GetRealZoneName() was the most reasonnable match against the "zone" output argument of GetRaidRosterInfo but I haven't have the time to actually check it. If you know how I could get GetSubZoneText() for each raid unit, please tell me :)
Edit : finally made the sort by class and name work, all is well now :P
Yeah, it's possible that the API doesn't allow to check the subzone for raid units. But probably it's not relevant anyways as using UnitIsVisible() should be enough.
Btw, UnitIsVisible() has a 100yrd range - it's set to true when a unit is close enough that the client has to process it, and if it's set to false, the unit is so far away the client can trash cached graphics data, ignore buffs etc.
It's not related to LoS, and unfortunately there isn't any way to check if a unit is out of LoS other than parsing the error messages when a cast failed (otherwise this would be a great indicator for Grid too).
First of all, I really love this addon. Great work!
Two things I realized in yesterdays raid. When logging in while being in a raid I get the same error as Lewzephyr stated.
The other is that my client seems to freeze for a fraction of a second every 10 seconds or so. When I disable DynamicLayout in Grid to a "static" layout things are immediately back to normal. I am not sure how to trace/debug this sort of behaviour so if you have any suggestions I will be glad to try them out to give you more detailed feedback about this.
Hmm I'm looking at the code right now and line 581 is a debug line, I've commented it (but chances are that it will pop an error at line 582 instead :P ) since I'm still in India and don't have the SVN tools installed I attached the corrected file here, can someone test it ?
As for the freezes happening every 10 second : is it because of a real update of the raid layout (a warrior changing stance, a druid changing form etc...) ? Or is it just a random freeze ? If it is the first case I'm afraid I cannot do anything about it, loading a new layout (which is essentially what I do each time I have to update it) is a time consuming operation in Grid (or any raidframe for that matter) and it will freeze your game... What you can do :
- Do not use it in a battleground setting : too much things going on in a chaotic fashion, GridDynamicLayout is tailored for PvE raid use
- Activate statistical analysis (in the Grid/Layout/GridDynamicLayout) options to see if that alleviate the number of updates, it should prevent the feral druid changing form between fights or shadowpriest dropping shadowform to rez people from triggering updates
Thanks a lot to whoever translated in Korean, you made my day sir (or madam :P )
As for the freezes happening every 10 second : is it because of a real update of the raid layout (a warrior changing stance, a druid changing form etc...) ? Or is it just a random freeze ? If it is the first case I'm afraid I cannot do anything about it, loading a new layout (which is essentially what I do each time I have to update it) is a time consuming operation in Grid (or any raidframe for that matter) and it will freeze your game...
I had a closer look on it yesterday. The freeze appears every time when the layout changes. It makes no difference if DynamicLayout changes it or if I manually change it by choosing various "static" layouts. So it's not your mod, I'm sorry for the false alarm.
The error at line 581 didn't popup at all during the raid yesterday evening. Since you made no changes in the SVN this is a bit weird. Perhaps an updated lib or so fixed that by chance? Well, who knows...
Thanks a lot for your second stack, I cannot believe I wrote what I did...
Anyway, I believe I have a correction for this. From the symptoms I guess it only happens when you get into a raid, relog in a raid or a raidmember relogs... UnitClass function seems to sometimes returns nil at critical times such as these.
Same deal as before, attached is the corrected file and I'll commit to svn whenever I'll be back...
UnitClass function seems to sometimes returns nil at critical times such as these.
I don't know if things have changed a lot in the last patches, but for quite a while lots of unit information wasn't available for 'new' units - which is the main reason why we all ended up writing and using RosterLib. I guess Jerry is now the master of unit events, as he spent days tracking down some blizzard bugs related to raid pet events.