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.
22 lines
715 B
22 lines
715 B
package org.openrs2.protocol.login.upstream
|
|
|
|
import io.netty.buffer.ByteBuf
|
|
import org.openrs2.crypto.StreamCipher
|
|
import org.openrs2.protocol.PacketCodec
|
|
import javax.inject.Singleton
|
|
|
|
@Singleton
|
|
public class RequestWorldListCodec : PacketCodec<LoginRequest.RequestWorldList>(
|
|
type = LoginRequest.RequestWorldList::class.java,
|
|
opcode = 23,
|
|
length = 4
|
|
) {
|
|
override fun decode(input: ByteBuf, cipher: StreamCipher): LoginRequest.RequestWorldList {
|
|
val checksum = input.readInt()
|
|
return LoginRequest.RequestWorldList(checksum)
|
|
}
|
|
|
|
override fun encode(input: LoginRequest.RequestWorldList, output: ByteBuf, cipher: StreamCipher) {
|
|
output.writeInt(input.checksum)
|
|
}
|
|
}
|
|
|