MilleXIV / XIV_Databar

19 stars 19 forks source link

[Bug] Guild online number not updating #18

Closed Mikeprod closed 7 years ago

Mikeprod commented 8 years ago

I have noticed it and a comment on curse underlined it too. Most of the time the online guildies number does not update unless it gets refreshed by opening the guild Ui.

The first glance at the code tells me it's a weird thing happening.

MilleXIV commented 8 years ago

Hmm...this is probably due to not calling GuildRoster() frequently enough. Should be called with the OnEnter and OnEvent scripts before doing anything else. Will add to rewrite.

Mikeprod commented 8 years ago

I'd rather think specifying the event to be GUILD_ROSTER_UPDATE to update the number of online guild members. No time to try / develop the fix.

MilleXIV commented 8 years ago

It currently already registers for GUILD_ROSTER_UPDATE, which is very oddly triggered. A call to GuildRoster (which the Guild UI does) forces the event to fire. Just need to make sure I run it in a way that doesn't cause a loop.

Might also hit issues in that GuildRoster is throttled at once every 10 seconds.

Mikeprod commented 8 years ago

If you want to check a module I made for auto inviting guildies that works perfectly. It may inspire some things FS_Core Autoinvite That makes me wonder that I call directly the GuildRoster function to force the update despite the triggered event of connection.

MilleXIV commented 8 years ago

This should be working now. If anybody still has any problems go ahead and post here, but I'll close this in say...10 days if no update.