forked from openrs2/openrs2
Signed-off-by: Graham <gpe@openrs2.org>bzip2
parent
7b9964461f
commit
7b4f2903fd
@ -0,0 +1,8 @@ |
||||
package org.openrs2.protocol.login |
||||
|
||||
import org.openrs2.protocol.EmptyPacketCodec |
||||
|
||||
public object ClientOutOfDateCodec : EmptyPacketCodec<LoginResponse.ClientOutOfDate>( |
||||
packet = LoginResponse.ClientOutOfDate, |
||||
opcode = 6 |
||||
) |
@ -0,0 +1,19 @@ |
||||
package org.openrs2.protocol.login |
||||
|
||||
import io.netty.buffer.ByteBuf |
||||
import org.openrs2.protocol.PacketCodec |
||||
|
||||
public object InitJs5RemoteConnectionCodec : PacketCodec<LoginRequest.InitJs5RemoteConnection>( |
||||
type = LoginRequest.InitJs5RemoteConnection::class.java, |
||||
opcode = 15, |
||||
length = 4 |
||||
) { |
||||
override fun decode(input: ByteBuf): LoginRequest.InitJs5RemoteConnection { |
||||
val version = input.readInt() |
||||
return LoginRequest.InitJs5RemoteConnection(version) |
||||
} |
||||
|
||||
override fun encode(input: LoginRequest.InitJs5RemoteConnection, output: ByteBuf) { |
||||
output.writeInt(input.version) |
||||
} |
||||
} |
@ -0,0 +1,8 @@ |
||||
package org.openrs2.protocol.login |
||||
|
||||
import org.openrs2.protocol.EmptyPacketCodec |
||||
|
||||
public object IpLimitCodec : EmptyPacketCodec<LoginResponse.IpLimit>( |
||||
packet = LoginResponse.IpLimit, |
||||
opcode = 9 |
||||
) |
@ -0,0 +1,8 @@ |
||||
package org.openrs2.protocol.login |
||||
|
||||
import org.openrs2.protocol.EmptyPacketCodec |
||||
|
||||
public object Js5OkCodec : EmptyPacketCodec<LoginResponse.Js5Ok>( |
||||
packet = LoginResponse.Js5Ok, |
||||
opcode = 0 |
||||
) |
@ -0,0 +1,7 @@ |
||||
package org.openrs2.protocol.login |
||||
|
||||
import org.openrs2.protocol.Packet |
||||
|
||||
public sealed class LoginRequest : Packet { |
||||
public class InitJs5RemoteConnection(public val version: Int) : LoginRequest() |
||||
} |
@ -0,0 +1,10 @@ |
||||
package org.openrs2.protocol.login |
||||
|
||||
import org.openrs2.protocol.Packet |
||||
|
||||
public sealed class LoginResponse : Packet { |
||||
public object Js5Ok : LoginResponse() |
||||
public object ClientOutOfDate : LoginResponse() |
||||
public object ServerFull : LoginResponse() |
||||
public object IpLimit : LoginResponse() |
||||
} |
@ -0,0 +1,8 @@ |
||||
package org.openrs2.protocol.login |
||||
|
||||
import org.openrs2.protocol.EmptyPacketCodec |
||||
|
||||
public object ServerFullCodec : EmptyPacketCodec<LoginResponse.ServerFull>( |
||||
packet = LoginResponse.ServerFull, |
||||
opcode = 7 |
||||
) |
Loading…
Reference in new issue