timiimit/UT4MasterServer

undefined's All-Time Stats

Closed this issue · 6 comments

Related: #22
FYI: @belmirp

image

Repro steps

  1. Create new account
  2. Login into game, don't play
  3. Click on "Show stats for this player, friends, and recent opponents." button
    image

@Saibamen This is on the stats page, but player's name is fetched from other endpoint I believe. Stats endpoint is only returning weapon statistics in an array. Generally, this page triggers couple of HTTP calls to different endpoints: players list, MMR ratings, recent matches and the weapon stats (which is issue #22).

After playing one match (or training), I can see my username:
image

That has to be related to something else, since I am not returning in any case player's name. I will check what the page is calling.

It doesn't seem like any endpoint which could get username is being called when stats open. maybe its retrieved from stats.json somehow.

Yeah, it seems it is extracted from stats.json which is the last 5 matches.
This is the code in stats.html that populates it:
document.getElementById('PlayerName').innerHTML = Stats.PlayerName;

Then the only way to "fix" this would be to respond with a fake stats.json when its empty. I'll try to do that.