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.
 
 
 
 
openrs2/protocol/src/main/kotlin/org/openrs2/protocol/world/downstream/WorldListResponse.kt

39 lines
1.1 KiB

package org.openrs2.protocol.world.downstream
import org.openrs2.protocol.Packet
import java.util.SortedMap
public data class WorldListResponse(
public val worldList: WorldList?,
public val players: SortedMap<Int, Int>
) : Packet {
public data class Country(
public val id: Int,
public val name: String
) : Comparable<Country> {
override fun compareTo(other: Country): Int {
return compareValuesBy(this, other, Country::name, Country::id)
}
}
public data class World(
public val country: Country,
public val members: Boolean,
public val quickChat: Boolean,
public val pvp: Boolean,
public val lootShare: Boolean,
public val activity: String,
public val hostname: String
)
public data class WorldList(
public val worlds: SortedMap<Int, World>,
public val checksum: Int
) {
public val countries: List<Country> = worlds.values.map(World::country).distinct().sorted()
}
public companion object {
public const val OFFLINE: Int = -1
}
}