As in title, e.g. for event GetPersonalMightStats response data looks like this:
{"operationCode":1,"returnCode":0,"debugMessage":null,"parameters":{"0":[237,232,34,65,186,74,234,74,185,107,114,203,25,187,88,206],"1":"PVE","2":134217728,"3":186,"4":415,"6":[...],"7":[6,6,6,4,4,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1],"253":443,"255":6}}
Where instead it should look like this
{"operationCode":1,"returnCode":0,"debugMessage":null,"parameters":{"0":[237,232,34,65,186,74,234,74,185,107,114,203,25,187,88,206],"1":"PVE","2":2315155055,"3":2336358590,"4":415,"6":[...],"7":[1742812494,1103995838,802667310,3647433636,2561571255,4001435819,2617407307,2209865443,2097659511,1912423127,1667383635,1115799955,777335399,2905233955,2740158339,2533375806,1881953123,1421702878,746563231,485725434,185347390,4021612805,3818117021,3179383439,2622636621,2590798599,2466152141,2415188731],"253":443,"255":421}}
If I go down the leaderboard, first it goes into negatives and eventually starts to display expected values, hence I guess there is some problem with integer overflow:
{"operationCode":1,"returnCode":0,"debugMessage":null,"parameters":{"0":[237,232,34,65,186,74,234,74,185,107,114,203,25,187,88,206],"1":"PVE","2":134217728,"3":186,"4":415,"5":85,"6":[...],"7":[-1946157056,-1979711488,-1996488704,-1996488704,-2030043136,-2046820352,-2080374784,-2113929216,-2130706432,-2130706432,-2130706432,2130706432,2113929216,2097152000,2097152000,2080374784,2013265920,1996488704,1979711488,1979711488,1979711488,1946157056,1929379840,1929379840,1895825408,1895825408,1828716544,1828716544],"253":443,"255":4}}
Replacing Deserializer#deserializeLong with the next code fixes my problem, though I'm not an expert in JS and don't know if that is a proper solution
deserializeLong(stream) {
const buf = stream.ReadBytes(8);
const high = (buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]) >>> 0;
const low = (buf[4] << 24 | buf[5] << 16 | buf[6] << 8 | buf[7]) >>> 0;
return high * 2 ** 32 + low;
}
As in title, e.g. for event GetPersonalMightStats response data looks like this:
{"operationCode":1,"returnCode":0,"debugMessage":null,"parameters":{"0":[237,232,34,65,186,74,234,74,185,107,114,203,25,187,88,206],"1":"PVE","2":134217728,"3":186,"4":415,"6":[...],"7":[6,6,6,4,4,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1],"253":443,"255":6}}Where instead it should look like this
{"operationCode":1,"returnCode":0,"debugMessage":null,"parameters":{"0":[237,232,34,65,186,74,234,74,185,107,114,203,25,187,88,206],"1":"PVE","2":2315155055,"3":2336358590,"4":415,"6":[...],"7":[1742812494,1103995838,802667310,3647433636,2561571255,4001435819,2617407307,2209865443,2097659511,1912423127,1667383635,1115799955,777335399,2905233955,2740158339,2533375806,1881953123,1421702878,746563231,485725434,185347390,4021612805,3818117021,3179383439,2622636621,2590798599,2466152141,2415188731],"253":443,"255":421}}If I go down the leaderboard, first it goes into negatives and eventually starts to display expected values, hence I guess there is some problem with integer overflow:
{"operationCode":1,"returnCode":0,"debugMessage":null,"parameters":{"0":[237,232,34,65,186,74,234,74,185,107,114,203,25,187,88,206],"1":"PVE","2":134217728,"3":186,"4":415,"5":85,"6":[...],"7":[-1946157056,-1979711488,-1996488704,-1996488704,-2030043136,-2046820352,-2080374784,-2113929216,-2130706432,-2130706432,-2130706432,2130706432,2113929216,2097152000,2097152000,2080374784,2013265920,1996488704,1979711488,1979711488,1979711488,1946157056,1929379840,1929379840,1895825408,1895825408,1828716544,1828716544],"253":443,"255":4}}Replacing
Deserializer#deserializeLongwith the next code fixes my problem, though I'm not an expert in JS and don't know if that is a proper solution