Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8856d99
feat: revision 237 (initial copy of 236)
Z-Kris Mar 24, 2026
8783cfc
refactor: rename opnpc/loc/obj to _v1 suffix
Z-Kris Mar 24, 2026
7937e9a
refactor: rename rebuild packets to _v1 suffix
Z-Kris Mar 24, 2026
568443c
fix: rename missed op* methods
Z-Kris Mar 24, 2026
3dd3ecc
feat: new rebuild packets
Z-Kris Mar 24, 2026
d6232c3
feat: new op*v2 packets
Z-Kris Mar 24, 2026
d4ec254
feat: new resume p count dialog long
Z-Kris Mar 24, 2026
5348b25
feat: update prots (excluding infos)
Z-Kris Mar 25, 2026
f0c70d8
feat: 237 player info
Z-Kris Mar 25, 2026
615c66c
feat: 237 npc info
Z-Kris Mar 25, 2026
e655736
feat: 237 worldentity info
Z-Kris Mar 25, 2026
de89d91
fix: update zone partial enclosed order
Z-Kris Mar 25, 2026
02652fb
feat: enable revision 237
Z-Kris Mar 25, 2026
47c71b6
feat: load revision 237
Z-Kris Mar 25, 2026
21bdf0e
feat: hitmark and headbar logging
Z-Kris Mar 25, 2026
de782e3
fix: head/body customisation v2 handling of 0xFFFF model
Z-Kris Mar 25, 2026
f924f1c
feat: add in missing transcribers
Z-Kris Mar 25, 2026
f80fd05
fix: fill in missing session tracker packets
Z-Kris Mar 25, 2026
f6cd750
fix: toplevel world handling in 237+
Z-Kris Mar 25, 2026
3458238
feat: basic npctype decoding (missing newer op handling)
Z-Kris Mar 25, 2026
f5eff9d
fix: missing decoder
Z-Kris Mar 25, 2026
5f33544
fix: worldentity info packed size typo
Z-Kris Mar 25, 2026
34c22a9
fix: destroy dynamic worlds on reconnect
Z-Kris Mar 25, 2026
f0d22c7
fix: stick to world -1 for root world
Z-Kris Mar 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions cache/src/main/kotlin/net/rsprox/cache/type/OldSchoolNpcType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,24 @@ public class OldSchoolNpcType(
}
}
}
61 -> {
val count = buffer.g1()
this.model =
buildList(count) {
for (i in 0..<count) {
add(buffer.g4())
}
}
}
62 -> {
val count = buffer.g1()
this.headmodel =
buildList(count) {
for (i in 0..<count) {
add(buffer.g4())
}
}
}
74 -> this.stat[0] = buffer.g2()
75 -> this.stat[1] = buffer.g2()
76 -> this.stat[2] = buffer.g2()
Expand Down
10 changes: 5 additions & 5 deletions cache/src/main/kotlin/net/rsprox/cache/type/ParamTypeHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ internal object ParamTypeHelper {
) {
val count = buffer.g1()
for (i in 0..<count) {
val isString = buffer.g1() == 1
val type = buffer.g1()
val id = buffer.g3()
val value =
if (isString) {
buffer.gjstr()
} else {
buffer.g4()
when (type) {
1 -> buffer.gjstr()
2 -> buffer.g8()
else -> buffer.g4()
}
params[id] = value
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package net.rsprox.processor.state

import net.rsprot.protocol.message.IncomingMessage
import net.rsprox.protocol.common.CoordGrid
import net.rsprox.protocol.game.outgoing.model.map.RebuildLogin
import net.rsprox.protocol.game.outgoing.model.map.RebuildNormal
import net.rsprox.protocol.game.outgoing.model.map.RebuildRegion
import net.rsprox.protocol.game.outgoing.model.map.RebuildLoginV1
import net.rsprox.protocol.game.outgoing.model.map.RebuildNormalV1
import net.rsprox.protocol.game.outgoing.model.map.RebuildRegionV1
import net.rsprox.protocol.game.outgoing.model.map.util.BuildArea
import net.rsprox.protocol.game.outgoing.model.misc.client.ServerTickEnd
import net.rsprox.protocol.game.outgoing.model.zone.header.UpdateZoneFullFollows
Expand Down Expand Up @@ -40,7 +40,10 @@ public data class BinarySessionState(
*
* This method is mainly used for zone prots where limited coord information is available. (3-bit coordinate offset)
*/
public fun absCoord(xInZone: Int, zInZone: Int): CoordGrid {
public fun absCoord(
xInZone: Int,
zInZone: Int,
): CoordGrid {
val zoneBase = CoordGrid(updateZone.level, buildArea.x + updateZone.x, buildArea.z + updateZone.z)
val coord = CoordGrid(zoneBase.level, zoneBase.x + xInZone, zoneBase.z + zInZone)
return absCoord(buildArea, regionZones, coord)
Expand All @@ -51,19 +54,19 @@ public data class BinarySessionState(
is ServerTickEnd -> {
return copy(currentTick = currentTick + 1)
}
is RebuildNormal -> {
is RebuildNormalV1 -> {
val buildAreaX = (message.zoneX - 6) shl 3
val buildAreaZ = (message.zoneZ - 6) shl 3
val buildArea = CoordGrid(0, buildAreaX, buildAreaZ)
return copy(buildArea = buildArea, regionZones = null)
}
is RebuildRegion -> {
is RebuildRegionV1 -> {
val buildAreaX = (message.zoneX - 6) shl 3
val buildAreaZ = (message.zoneZ - 6) shl 3
val buildArea = CoordGrid(0, buildAreaX, buildAreaZ)
return copy(buildArea = buildArea, regionZones = message.buildArea)
}
is RebuildLogin -> {
is RebuildLoginV1 -> {
val localIndex = message.playerInfoInitBlock.localPlayerIndex
val buildAreaX = (message.zoneX - 6) shl 3
val buildAreaZ = (message.zoneZ - 6) shl 3
Expand Down Expand Up @@ -96,7 +99,11 @@ public data class BinarySessionState(
regionZones = null,
)

private fun absCoord(buildArea: CoordGrid, regionZones: BuildArea?, coord: CoordGrid): CoordGrid {
private fun absCoord(
buildArea: CoordGrid,
regionZones: BuildArea?,
coord: CoordGrid,
): CoordGrid {
if (regionZones == null || coord.x < 6400) {
return coord
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ package net.rsprox.protocol.v223.game.incoming.decoder.codec.locs
import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.model.locs.OpLoc
import net.rsprox.protocol.game.incoming.model.locs.OpLocV1
import net.rsprox.protocol.session.Session
import net.rsprox.protocol.v223.game.incoming.decoder.prot.GameClientProt

internal class OpLoc1Decoder : ProxyMessageDecoder<OpLoc> {
internal class OpLoc1Decoder : ProxyMessageDecoder<OpLocV1> {
override val prot: ClientProt = GameClientProt.OPLOC1

override fun decode(
buffer: JagByteBuf,
session: Session,
): OpLoc {
): OpLocV1 {
val id = buffer.g2()
val x = buffer.g2Alt1()
val z = buffer.g2Alt3()
val controlKey = buffer.g1() == 1
return OpLoc(
return OpLocV1(
id,
x,
z,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ package net.rsprox.protocol.v223.game.incoming.decoder.codec.locs
import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.model.locs.OpLoc
import net.rsprox.protocol.game.incoming.model.locs.OpLocV1
import net.rsprox.protocol.session.Session
import net.rsprox.protocol.v223.game.incoming.decoder.prot.GameClientProt

internal class OpLoc2Decoder : ProxyMessageDecoder<OpLoc> {
internal class OpLoc2Decoder : ProxyMessageDecoder<OpLocV1> {
override val prot: ClientProt = GameClientProt.OPLOC2

override fun decode(
buffer: JagByteBuf,
session: Session,
): OpLoc {
): OpLocV1 {
val controlKey = buffer.g1() == 1
val id = buffer.g2Alt2()
val x = buffer.g2Alt3()
val z = buffer.g2()
return OpLoc(
return OpLocV1(
id,
x,
z,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ package net.rsprox.protocol.v223.game.incoming.decoder.codec.locs
import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.model.locs.OpLoc
import net.rsprox.protocol.game.incoming.model.locs.OpLocV1
import net.rsprox.protocol.session.Session
import net.rsprox.protocol.v223.game.incoming.decoder.prot.GameClientProt

internal class OpLoc3Decoder : ProxyMessageDecoder<OpLoc> {
internal class OpLoc3Decoder : ProxyMessageDecoder<OpLocV1> {
override val prot: ClientProt = GameClientProt.OPLOC3

override fun decode(
buffer: JagByteBuf,
session: Session,
): OpLoc {
): OpLocV1 {
val controlKey = buffer.g1Alt1() == 1
val z = buffer.g2Alt1()
val id = buffer.g2Alt3()
val x = buffer.g2Alt3()
return OpLoc(
return OpLocV1(
id,
x,
z,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ package net.rsprox.protocol.v223.game.incoming.decoder.codec.locs
import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.model.locs.OpLoc
import net.rsprox.protocol.game.incoming.model.locs.OpLocV1
import net.rsprox.protocol.session.Session
import net.rsprox.protocol.v223.game.incoming.decoder.prot.GameClientProt

internal class OpLoc4Decoder : ProxyMessageDecoder<OpLoc> {
internal class OpLoc4Decoder : ProxyMessageDecoder<OpLocV1> {
override val prot: ClientProt = GameClientProt.OPLOC4

override fun decode(
buffer: JagByteBuf,
session: Session,
): OpLoc {
): OpLocV1 {
val z = buffer.g2Alt3()
val x = buffer.g2Alt2()
val id = buffer.g2Alt2()
val controlKey = buffer.g1Alt1() == 1
return OpLoc(
return OpLocV1(
id,
x,
z,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ package net.rsprox.protocol.v223.game.incoming.decoder.codec.locs
import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.model.locs.OpLoc
import net.rsprox.protocol.game.incoming.model.locs.OpLocV1
import net.rsprox.protocol.session.Session
import net.rsprox.protocol.v223.game.incoming.decoder.prot.GameClientProt

internal class OpLoc5Decoder : ProxyMessageDecoder<OpLoc> {
internal class OpLoc5Decoder : ProxyMessageDecoder<OpLocV1> {
override val prot: ClientProt = GameClientProt.OPLOC5

override fun decode(
buffer: JagByteBuf,
session: Session,
): OpLoc {
): OpLocV1 {
val z = buffer.g2Alt3()
val id = buffer.g2Alt2()
val x = buffer.g2Alt2()
val controlKey = buffer.g1Alt2() == 1
return OpLoc(
return OpLocV1(
id,
x,
z,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ package net.rsprox.protocol.v223.game.incoming.decoder.codec.npcs
import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.model.npcs.OpNpc
import net.rsprox.protocol.game.incoming.model.npcs.OpNpcV1
import net.rsprox.protocol.session.Session
import net.rsprox.protocol.v223.game.incoming.decoder.prot.GameClientProt

internal class OpNpc1Decoder : ProxyMessageDecoder<OpNpc> {
internal class OpNpc1Decoder : ProxyMessageDecoder<OpNpcV1> {
override val prot: ClientProt = GameClientProt.OPNPC1

override fun decode(
buffer: JagByteBuf,
session: Session,
): OpNpc {
): OpNpcV1 {
val index = buffer.g2Alt2()
val controlKey = buffer.g1() == 1
return OpNpc(
return OpNpcV1(
index,
controlKey,
1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ package net.rsprox.protocol.v223.game.incoming.decoder.codec.npcs
import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.model.npcs.OpNpc
import net.rsprox.protocol.game.incoming.model.npcs.OpNpcV1
import net.rsprox.protocol.session.Session
import net.rsprox.protocol.v223.game.incoming.decoder.prot.GameClientProt

internal class OpNpc2Decoder : ProxyMessageDecoder<OpNpc> {
internal class OpNpc2Decoder : ProxyMessageDecoder<OpNpcV1> {
override val prot: ClientProt = GameClientProt.OPNPC2

override fun decode(
buffer: JagByteBuf,
session: Session,
): OpNpc {
): OpNpcV1 {
val index = buffer.g2Alt3()
val controlKey = buffer.g1() == 1
return OpNpc(
return OpNpcV1(
index,
controlKey,
2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ package net.rsprox.protocol.v223.game.incoming.decoder.codec.npcs
import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.model.npcs.OpNpc
import net.rsprox.protocol.game.incoming.model.npcs.OpNpcV1
import net.rsprox.protocol.session.Session
import net.rsprox.protocol.v223.game.incoming.decoder.prot.GameClientProt

internal class OpNpc3Decoder : ProxyMessageDecoder<OpNpc> {
internal class OpNpc3Decoder : ProxyMessageDecoder<OpNpcV1> {
override val prot: ClientProt = GameClientProt.OPNPC3

override fun decode(
buffer: JagByteBuf,
session: Session,
): OpNpc {
): OpNpcV1 {
val index = buffer.g2Alt3()
val controlKey = buffer.g1Alt3() == 1
return OpNpc(
return OpNpcV1(
index,
controlKey,
3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ package net.rsprox.protocol.v223.game.incoming.decoder.codec.npcs
import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.model.npcs.OpNpc
import net.rsprox.protocol.game.incoming.model.npcs.OpNpcV1
import net.rsprox.protocol.session.Session
import net.rsprox.protocol.v223.game.incoming.decoder.prot.GameClientProt

internal class OpNpc4Decoder : ProxyMessageDecoder<OpNpc> {
internal class OpNpc4Decoder : ProxyMessageDecoder<OpNpcV1> {
override val prot: ClientProt = GameClientProt.OPNPC4

override fun decode(
buffer: JagByteBuf,
session: Session,
): OpNpc {
): OpNpcV1 {
val controlKey = buffer.g1Alt1() == 1
val index = buffer.g2Alt1()
return OpNpc(
return OpNpcV1(
index,
controlKey,
4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ package net.rsprox.protocol.v223.game.incoming.decoder.codec.npcs
import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.model.npcs.OpNpc
import net.rsprox.protocol.game.incoming.model.npcs.OpNpcV1
import net.rsprox.protocol.session.Session
import net.rsprox.protocol.v223.game.incoming.decoder.prot.GameClientProt

internal class OpNpc5Decoder : ProxyMessageDecoder<OpNpc> {
internal class OpNpc5Decoder : ProxyMessageDecoder<OpNpcV1> {
override val prot: ClientProt = GameClientProt.OPNPC5

override fun decode(
buffer: JagByteBuf,
session: Session,
): OpNpc {
): OpNpcV1 {
val index = buffer.g2Alt2()
val controlKey = buffer.g1Alt1() == 1
return OpNpc(
return OpNpcV1(
index,
controlKey,
5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ package net.rsprox.protocol.v223.game.incoming.decoder.codec.objs
import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.model.objs.OpObj
import net.rsprox.protocol.game.incoming.model.objs.OpObjV1
import net.rsprox.protocol.session.Session
import net.rsprox.protocol.v223.game.incoming.decoder.prot.GameClientProt

internal class OpObj1Decoder : ProxyMessageDecoder<OpObj> {
internal class OpObj1Decoder : ProxyMessageDecoder<OpObjV1> {
override val prot: ClientProt = GameClientProt.OPOBJ1

override fun decode(
buffer: JagByteBuf,
session: Session,
): OpObj {
): OpObjV1 {
val id = buffer.g2Alt1()
val z = buffer.g2Alt3()
val controlKey = buffer.g1Alt1() == 1
val x = buffer.g2Alt1()
return OpObj(
return OpObjV1(
id,
x,
z,
Expand Down
Loading
Loading