Quantcast
Guilds: Number of members is displayed/returned incorrectly - ESOUI
Thread Tools Display Modes
12/02/20, 04:25 AM   #1
@DeadSoon
AddOn Author - Click to view addons
Join Date: Sep 2018
Posts: 15
Guilds: Number of members is displayed/returned incorrectly

Hello,

for some reasons the number of active members (guild size) is returned incorrectly for smaller guilds (of which I am not a member). For larger guilds it is returned correctly and accurate but for guilds that have only 1-20? members it just returns 0 all the time. I access the data on the following way:

Lua Code:
  1. GUILD_BROWSER_MANAGER:RequestGuildData(guildId)
  2.  
  3. -- some delay.... I know the data is not available instantly
  4.  
  5. local guildData = GUILD_BROWSER_MANAGER:GetGuildData(guildId)
  6. d(guildData.size)  -- accurate number for a big guild but stays 0 for a small guild

Of course, the number is returned correctly if Im a member of the guild -> the bug appears only when viewing other guilds. Furthermore, the number is always the same as displayed in the guild information. I supose I access the data the same way the game itself does. Therefore, the bug is also present e.g. when you open a guild chat link of a small guild.
  1. Is there any mistake in my approach or exists another way to access the size of a guild I am not a member of?
  2. Is there a intentional minimum size limit in order to prevent the server from calculating the size for all the smaller guilds!?
  3. Or is it just a bug, what I think?

Thanks in advance
__________________
Author of the Addon BeamMeUp - feel free to check it out

Last edited by @DeadSoon : 12/02/20 at 04:47 AM.
  Reply With Quote
12/02/20, 07:04 AM   #2
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 3,279
I'd register a callback function to this event to start your code as the guilddata is ready:
https://github.com/esoui/esoui/blob/...shared.lua#L35

Lua Code:
  1. local function OnGuildDataReady(guildId)
  2. ...
  3. end
  4.  
  5. GUILD_BROWSER_MANAGER:RegisterCallback("OnGuildDataReady", OnGuildDataReady)

This is how the ZOs code does it.

Create your own callback register and use e.g. anoher local function MyOnGuildDataReady, and in there do your checks on the guilddata. This should strip your "wait some time" code as it shouldl fire as your requested guildData IS ready.

Maybe this will already fix he 0 issue then.

btw: Did you check the guildId is correct and given? Maybe it is 0 itsself and thus the function returns 0 ?


Guild size data:
https://github.com/esoui/esoui/blob/...nager.lua#L199
Maybe this helps and returns another value (which would make me wonder) GetGuildSizeAttribute(guildId)

Last edited by Baertram : 12/02/20 at 07:12 AM.
  Reply With Quote
12/03/20, 03:21 PM   #3
@DeadSoon
AddOn Author - Click to view addons
Join Date: Sep 2018
Posts: 15
Thank you Baertram for your helpful hints.

Unfortunately, this does not solve the 0 problem. Your code and also GetGuildSizeAttribute(guildId) works the same way as expected and returns 0 for smaller guilds.

Here is just one example: This guild on NA server is currently small. If you can reach it somehow to get the number of the member without joining the guild. Please let me know:

|H1:guild:738317|hKBMU|h

However, thanks for considering and best regards
__________________
Author of the Addon BeamMeUp - feel free to check it out
  Reply With Quote

ESOUI » Developer Discussions » Bug Reports » Guilds: Number of members is displayed/returned incorrectly

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off