-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: make .txt transcripts of bin differ in last-modified timestamp This ensures that tools such as notepad will pick up on changes to the file, as they rely on the last-modified date changing. The new implementation will begin the timestamp at .bin +1ms, incrementing by +1ms every time the tool is re-ran, if the .txt file already exists. Visually the timestamps will remain the same, but for sorting purposes, and file-change-listeners, it'll behave as one would want. * feat: revision 228 (initial copy of 227) * feat: update client prots to 228 * feat: fill in loc add change v2 (incomplete) * feat: server prots * feat: update proxy service to revision 228 * feat: update transcriber to support loc_add_change_v2 * fix: increment loc add change v2's op indices so it doesn't start at 0
- Loading branch information
Showing
256 changed files
with
10,872 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
dependencies { | ||
implementation(platform(rootProject.libs.netty.bom)) | ||
implementation(rootProject.libs.netty.buffer) | ||
implementation(rootProject.libs.netty.transport) | ||
implementation(rootProject.libs.netty.handler) | ||
implementation(rootProject.libs.rsprot.buffer) | ||
implementation(rootProject.libs.rsprot.compression) | ||
implementation(rootProject.libs.rsprot.protocol) | ||
implementation(rootProject.libs.rsprot.crypto) | ||
implementation(platform(rootProject.libs.log4j.bom)) | ||
implementation(rootProject.libs.bundles.log4j) | ||
implementation(projects.protocol) | ||
implementation(projects.cache.cacheApi) | ||
} |
25 changes: 25 additions & 0 deletions
25
protocol/osrs-228/src/main/kotlin/net/rsprox/protocol/v228/ClientPacketDecoderServiceV228.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.rsprox.protocol.v228 | ||
|
||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.compression.HuffmanCodec | ||
import net.rsprot.protocol.message.IncomingMessage | ||
import net.rsprox.protocol.ClientPacketDecoder | ||
import net.rsprox.protocol.session.Session | ||
import net.rsprox.protocol.v228.game.incoming.decoder.prot.ClientMessageDecoderRepository | ||
|
||
public class ClientPacketDecoderServiceV228( | ||
huffmanCodec: HuffmanCodec, | ||
) : ClientPacketDecoder { | ||
@OptIn(ExperimentalStdlibApi::class) | ||
private val repository = ClientMessageDecoderRepository.build(huffmanCodec) | ||
|
||
override fun decode( | ||
opcode: Int, | ||
payload: JagByteBuf, | ||
session: Session, | ||
): IncomingMessage { | ||
return repository | ||
.getDecoder(opcode) | ||
.decode(payload, session) | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
protocol/osrs-228/src/main/kotlin/net/rsprox/protocol/v228/GameClientProtProviderV228.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package net.rsprox.protocol.v228 | ||
|
||
import net.rsprox.protocol.ProtProvider | ||
import net.rsprox.protocol.v228.game.incoming.decoder.prot.GameClientProt | ||
|
||
public data object GameClientProtProviderV228 : ProtProvider<GameClientProt> { | ||
override fun get(opcode: Int): GameClientProt { | ||
return GameClientProt.entries.firstOrNull { it.opcode == opcode } | ||
?: throw IllegalArgumentException("Unknown game client prot: $opcode") | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
protocol/osrs-228/src/main/kotlin/net/rsprox/protocol/v228/GameServerProtProviderV228.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package net.rsprox.protocol.v228 | ||
|
||
import net.rsprox.protocol.ProtProvider | ||
import net.rsprox.protocol.v228.game.outgoing.decoder.prot.GameServerProt | ||
|
||
public data object GameServerProtProviderV228 : ProtProvider<GameServerProt> { | ||
override fun get(opcode: Int): GameServerProt { | ||
return GameServerProt.entries.firstOrNull { it.opcode == opcode } | ||
?: throw IllegalArgumentException("Unknown game server prot: $opcode") | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
protocol/osrs-228/src/main/kotlin/net/rsprox/protocol/v228/ServerPacketDecoderServiceV228.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package net.rsprox.protocol.v228 | ||
|
||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.compression.HuffmanCodec | ||
import net.rsprot.protocol.message.IncomingMessage | ||
import net.rsprox.cache.api.CacheProvider | ||
import net.rsprox.protocol.ServerPacketDecoder | ||
import net.rsprox.protocol.session.Session | ||
import net.rsprox.protocol.v228.game.outgoing.decoder.prot.ServerMessageDecoderRepository | ||
|
||
public class ServerPacketDecoderServiceV228( | ||
huffmanCodec: HuffmanCodec, | ||
cache: CacheProvider, | ||
) : ServerPacketDecoder { | ||
@OptIn(ExperimentalStdlibApi::class) | ||
private val repository = | ||
ServerMessageDecoderRepository.build( | ||
huffmanCodec, | ||
cache, | ||
) | ||
|
||
override fun decode( | ||
opcode: Int, | ||
payload: JagByteBuf, | ||
session: Session, | ||
): IncomingMessage { | ||
return repository | ||
.getDecoder(opcode) | ||
.decode(payload, session) | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...n/kotlin/net/rsprox/protocol/v228/game/incoming/decoder/codec/buttons/If1ButtonDecoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package net.rsprox.protocol.v228.game.incoming.decoder.codec.buttons | ||
|
||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ClientProt | ||
import net.rsprox.protocol.session.Session | ||
import net.rsprox.protocol.game.incoming.model.buttons.If1Button | ||
import net.rsprox.protocol.v228.game.incoming.decoder.prot.GameClientProt | ||
import net.rsprox.protocol.ProxyMessageDecoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
import net.rsprot.protocol.util.gCombinedId | ||
|
||
@Consistent | ||
public class If1ButtonDecoder : ProxyMessageDecoder<If1Button> { | ||
override val prot: ClientProt = GameClientProt.IF_BUTTON | ||
|
||
override fun decode( | ||
buffer: JagByteBuf, | ||
session: Session, | ||
): If1Button { | ||
val combinedId = buffer.gCombinedId() | ||
return If1Button(combinedId) | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...n/kotlin/net/rsprox/protocol/v228/game/incoming/decoder/codec/buttons/If3ButtonDecoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package net.rsprox.protocol.v228.game.incoming.decoder.codec.buttons | ||
|
||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprox.protocol.game.incoming.model.buttons.If3Button | ||
import net.rsprox.protocol.v228.game.incoming.decoder.prot.GameClientProt | ||
import net.rsprox.protocol.ProxyMessageDecoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
import net.rsprot.protocol.util.gCombinedId | ||
import net.rsprox.protocol.session.Session | ||
|
||
@Consistent | ||
public class If3ButtonDecoder( | ||
override val prot: GameClientProt, | ||
private val op: Int, | ||
) : ProxyMessageDecoder<If3Button> { | ||
override fun decode( | ||
buffer: JagByteBuf, | ||
session: Session, | ||
): If3Button { | ||
val combinedId = buffer.gCombinedId() | ||
val sub = buffer.g2() | ||
val obj = buffer.g2() | ||
return If3Button( | ||
combinedId, | ||
sub, | ||
obj, | ||
op, | ||
) | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...n/kotlin/net/rsprox/protocol/v228/game/incoming/decoder/codec/buttons/IfButtonDDecoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package net.rsprox.protocol.v228.game.incoming.decoder.codec.buttons | ||
|
||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ClientProt | ||
import net.rsprox.protocol.session.Session | ||
import net.rsprox.protocol.game.incoming.model.buttons.IfButtonD | ||
import net.rsprox.protocol.v228.game.incoming.decoder.prot.GameClientProt | ||
import net.rsprox.protocol.ProxyMessageDecoder | ||
import net.rsprot.protocol.util.gCombinedId | ||
|
||
public class IfButtonDDecoder : ProxyMessageDecoder<IfButtonD> { | ||
override val prot: ClientProt = GameClientProt.IF_BUTTOND | ||
|
||
override fun decode( | ||
buffer: JagByteBuf, | ||
session: Session, | ||
): IfButtonD { | ||
val selectedObj = buffer.g2() | ||
val targetSub = buffer.g2Alt2() | ||
val selectedSub = buffer.g2Alt2() | ||
val targetCombinedId = buffer.gCombinedId() | ||
val targetObj = buffer.g2() | ||
val selectedCombinedId = buffer.gCombinedId() | ||
return IfButtonD( | ||
selectedCombinedId, | ||
selectedSub, | ||
selectedObj, | ||
targetCombinedId, | ||
targetSub, | ||
targetObj, | ||
) | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...n/kotlin/net/rsprox/protocol/v228/game/incoming/decoder/codec/buttons/IfButtonTDecoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package net.rsprox.protocol.v228.game.incoming.decoder.codec.buttons | ||
|
||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ClientProt | ||
import net.rsprox.protocol.session.Session | ||
import net.rsprox.protocol.game.incoming.model.buttons.IfButtonT | ||
import net.rsprox.protocol.v228.game.incoming.decoder.prot.GameClientProt | ||
import net.rsprox.protocol.ProxyMessageDecoder | ||
import net.rsprot.protocol.util.gCombinedIdAlt1 | ||
import net.rsprot.protocol.util.gCombinedIdAlt2 | ||
|
||
public class IfButtonTDecoder : ProxyMessageDecoder<IfButtonT> { | ||
override val prot: ClientProt = GameClientProt.IF_BUTTONT | ||
|
||
override fun decode( | ||
buffer: JagByteBuf, | ||
session: Session, | ||
): IfButtonT { | ||
val selectedCombinedId = buffer.gCombinedIdAlt1() | ||
val targetSub = buffer.g2() | ||
val targetCombinedId = buffer.gCombinedIdAlt2() | ||
val selectedSub = buffer.g2Alt3() | ||
val targetObj = buffer.g2Alt3() | ||
val selectedObj = buffer.g2() | ||
return IfButtonT( | ||
selectedCombinedId, | ||
selectedSub, | ||
selectedObj, | ||
targetCombinedId, | ||
targetSub, | ||
targetObj, | ||
) | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...ain/kotlin/net/rsprox/protocol/v228/game/incoming/decoder/codec/buttons/IfSubOpDecoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package net.rsprox.protocol.v228.game.incoming.decoder.codec.buttons | ||
|
||
import net.rsprot.buffer.JagByteBuf | ||
import net.rsprot.protocol.ClientProt | ||
import net.rsprox.protocol.session.Session | ||
import net.rsprox.protocol.game.incoming.model.buttons.IfSubOp | ||
import net.rsprox.protocol.v228.game.incoming.decoder.prot.GameClientProt | ||
import net.rsprox.protocol.ProxyMessageDecoder | ||
import net.rsprot.protocol.metadata.Consistent | ||
import net.rsprot.protocol.util.gCombinedId | ||
|
||
@Consistent | ||
public class IfSubOpDecoder : ProxyMessageDecoder<IfSubOp> { | ||
override val prot: ClientProt = GameClientProt.IF_SUBOP | ||
|
||
override fun decode( | ||
buffer: JagByteBuf, | ||
session: Session, | ||
): IfSubOp { | ||
val combinedId = buffer.gCombinedId() | ||
val sub = buffer.g2() | ||
val obj = buffer.g2() | ||
val subop = buffer.g1() | ||
val op = buffer.g1() | ||
return IfSubOp( | ||
combinedId, | ||
sub, | ||
obj, | ||
op + 1, | ||
subop, | ||
) | ||
} | ||
} |
Oops, something went wrong.