Incorrect sorting algorithm used
Closed this issue · 1 comments
mark-b5 commented
Server/src/engine/entity/HeroPoints.ts
Line 33 in 27697f7
The 04scape engine is using the typescript built-in Array.prototype.sort(), which goes without saying it not the sorting algorithm OSRS uses for heropoints
Here is a javascript implementation of a quicksort algorithm that matches the one used by OSRS. This implementation is by Keyboard, the player who figured out OSRS heropoints mechanics, including the qs algorithm and the 16-player limit