Open-source multiplayer game server compatible with the RuneScape client
https://www.openrs2.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
510 B
23 lines
510 B
8 months ago
|
package org.openrs2.archive.world
|
||
|
|
||
|
import io.netty.buffer.ByteBuf
|
||
|
|
||
|
public data class WorldList(
|
||
|
public val worlds: List<World>
|
||
|
) {
|
||
|
public companion object {
|
||
|
public fun read(buf: ByteBuf): WorldList {
|
||
|
buf.skipBytes(4)
|
||
|
|
||
|
val count = buf.readUnsignedShort()
|
||
|
val worlds = buildList(count) {
|
||
|
for (i in 0 until count) {
|
||
|
add(World.read(buf))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return WorldList(worlds)
|
||
|
}
|
||
|
}
|
||
|
}
|