foe-helfer-extension icon indicating copy to clipboard operation
foe-helfer-extension copied to clipboard

Statistics messed in guild memeber stat on Guild Buildigs page

Open masolodkov opened this issue 1 year ago • 0 comments

In the detailed view on the Guild Buildings page, the statistics were incorrect. For example, in the summary, I could see 76 arcs in the guild, but in the detailed view, there were only 60 members with arcs.

After a little investigation, the problem was locally fixed by changing one line of code in guildmemberstat.js:

Original source code (in ShowGuildBuildings):

let buildingID = helper.str.cleanup(obj.member) + '' + obj.gbid;

Fixed line:

let buildingID = `${obj.player_id}-${obj.gbid}`;

After this change, everything worked fine.

If you could incorporate this fix into the main code, we would be grateful. :)

PS: to be more informative about this bug - for some members helper.str.cleanup(obj.member) return empty string, so buildingId became not unique. While player_id is fine for all cases.

masolodkov avatar Feb 18 '24 19:02 masolodkov