lulzsun / RePlays

Open-source game recording management software
GNU General Public License v3.0
156 stars 18 forks source link

League of Legends games incorrectly labeled as `Loss` in the Session view #216

Closed Puncia closed 2 months ago

Puncia commented 3 months ago

I can't say I'm 100% sure but I suspect that if you Alt+F4 the game while the nexus explodes RePlays will incorrectly label the game as lost despite being a win.

I will update this issue when I have the opportunity to test it again.

Puncia commented 3 months ago

I can confirm this is the case.

Because the game process is quit early, it is unable to send the event and the program assumes it's a loss because it never finds it here (if I understand correctly):

https://github.com/lulzsun/RePlays/blob/6f78a0d30bb18aa5b0776c100128651ded9c392c/Classes/Integrations/LeagueOfLegendsIntegration.cs#L103-L106

I couldn't really come up with a simple solution. Also I understand that this is not a big deal at all, and it should be the player's responsibility to not Alt-F4 the game, but I can propose to either:

Segergren commented 2 months ago

I've removed the game end result if it isn't available, see https://github.com/lulzsun/RePlays/pull/217.

Fetch Riot's Game API and get the value from there

We need a public Riot Game API key to fetch the value. However, keeping this key private in an open-source project is challenging.

Add a third Unknown option to PlayerStats.Win, with the ability to let the user then edit the metadata;

This approach would allow for more flexibility. However, it might increase the project's complexity for such a minor feature. If someone is willing to implement it, I think it would be fine.