diff --git a/data/packets.yml b/data/packets.yml index 4eeb15183..97f52aefc 100644 --- a/data/packets.yml +++ b/data/packets.yml @@ -695,12 +695,6 @@ in-packets: length: 6 ignore: true - - message: gg.rsmod.game.message.impl.IgnoreMessage # No data - type: FIXED - opcode: 23 - length: 1 - ignore: true - - message: gg.rsmod.game.message.impl.IgnoreMessage # No data type: VARIABLE_BYTE opcode: 37 @@ -1151,4 +1145,12 @@ in-packets: - name: height type: SHORT - name: display_mode + type: BYTE + + - message: gg.rsmod.game.message.impl.ChatTypeMessage + type: FIXED + opcode: 23 + length: 1 + structure: + - name: type type: BYTE \ No newline at end of file diff --git a/game/src/main/kotlin/gg/rsmod/game/message/decoder/ChatTypeDecoder.kt b/game/src/main/kotlin/gg/rsmod/game/message/decoder/ChatTypeDecoder.kt new file mode 100644 index 000000000..3a8e6410f --- /dev/null +++ b/game/src/main/kotlin/gg/rsmod/game/message/decoder/ChatTypeDecoder.kt @@ -0,0 +1,14 @@ +package gg.rsmod.game.message.decoder + +import gg.rsmod.game.message.MessageDecoder +import gg.rsmod.game.message.impl.ChatTypeMessage + +class ChatTypeDecoder : MessageDecoder() { + + override fun decode( + opcode: Int, opcodeIndex: Int, values: HashMap, stringValues: HashMap + ): ChatTypeMessage { + val type = values["type"]!!.toInt() + return ChatTypeMessage(type) + } +} \ No newline at end of file diff --git a/game/src/main/kotlin/gg/rsmod/game/message/impl/ChatTypeMessage.kt b/game/src/main/kotlin/gg/rsmod/game/message/impl/ChatTypeMessage.kt new file mode 100644 index 000000000..9f1c27dcb --- /dev/null +++ b/game/src/main/kotlin/gg/rsmod/game/message/impl/ChatTypeMessage.kt @@ -0,0 +1,5 @@ +package gg.rsmod.game.message.impl + +import gg.rsmod.game.message.Message + +data class ChatTypeMessage(val type: Int) : Message \ No newline at end of file