juce / fiveserver

Open-Source network server for PES5 and PES6 families of the game
https://sites.google.com/site/fiveservercom/home
BSD 2-Clause "Simplified" License
38 stars 17 forks source link

Not an issue, a fix for seconds_played bug #2

Closed moth1995 closed 3 years ago

moth1995 commented 3 years ago

Hi!

i just wanted to share something i found i notice that the value "seconds_played" on profiles table wont go over 86399 so i did some research and i found that the main problem was that it was code with .seconds function we should change it to .total_seconds() we must modify the following files in the specific lines

pes5.py line 266 old 'playTime':struct.pack('!i', profile.playTime.seconds), new 'playTime':struct.pack('!i', profile.playTime.total_seconds()),

pes6.py line 147

old 'playTime':struct.pack('!i', profile.playTime.seconds), new 'playTime':struct.pack('!i', profile.playTime.total_seconds()),

data.py line 231 old p.rank, p.points, p.disconnects, p.playTime.seconds, new p.rank, p.points, p.disconnects, p.playTime.total_seconds(),

data.py line 233 old p.points, p.disconnects, p.playTime.seconds) new p.points, p.disconnects, p.playTime.total_seconds())

data6.py line 116 old p.rank, p.rating, p.points, p.disconnects, p.playTime.seconds, new p.rank, p.rating, p.points, p.disconnects, p.playTime.total_seconds(),

data6.py line 118 old p.rating, p.points, p.disconnects, p.playTime.seconds, new p.rating, p.points, p.disconnects, p.playTime.total_seconds(),

thats all! i hope it helps to most of you! Regards

VyktoryDrakonis commented 3 years ago

Opened a pull request with your code, hope you don't mind that. A friend and I have been doing some tweaking privately as of late, and we've got some rev-engineering going on some PES games.

juce commented 3 years ago

merged and adjusted to use total_seconds correctly. thanks