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