Servertick
Added by barbaros almost 7 years ago
Hello,
recently Leanon has passed the s32 integer. The API now returns a negative servertick and wrong dates.
http://atys.ryzom.com/api/time.php?shardid=lea
-2146509461
http://atys.ryzom.com/api/time.php?shardid=lea&format=txt
7h - Quinteth, Pluvia 23, 2e CA 2490
It should be:
19h - Quarta, Nivia 22, 2e CA 2559
Solution, use u32 or s64.
Replies (4)
RE: Servertick - Added by nimetu almost 7 years ago
server itself is using TGameCycle which is uint32
problem is probably in 32bit php. for example unpack 'l' and 'L' both return same value, even tho one is for signed and other unsigned. (64bit returns correct values ofcourse)
just add 2*2147483647 to tick when it's negative. simple $tick+=2*2147483647 should work.
RE: Servertick - Added by barbaros almost 7 years ago
Addendum.
This also affects in-game. On Leanon the Factions-PvP is broken, it says your flag is enabled and will be disabled in 110567 hours.
There might be others, it can't hurt to look through the sources and verify that all calculations with/references to game cycle are aware of this.
RE: Servertick - Added by barbaros almost 7 years ago
Addendum.
Ingame hotfix for Leanon does work but now the time and character API is completely broken.
Does not return any data or "Character not found".
http://atys.ryzom.com/api/time.php?shardid=lea
http://atys.ryzom.com/api/time.php?shardid=lea&format=txt
http://atys.ryzom.com/api/character.php?key=FR521366R0REA16F998
RE: Servertick - Added by SirCotare almost 7 years ago
Indeed, the API only reports <error>Character Not Found</error> for any character as it seems. Quite awful for the Ryzom Armory :(
(1-4/4)