Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Friends Chat System #486

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions data/packets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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<ChatTypeMessage>() {

override fun decode(
opcode: Int, opcodeIndex: Int, values: HashMap<String, Number>, stringValues: HashMap<String, String>
): ChatTypeMessage {
val type = values["type"]!!.toInt()
return ChatTypeMessage(type)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package gg.rsmod.game.message.impl

import gg.rsmod.game.message.Message

data class ChatTypeMessage(val type: Int) : Message
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just testing this, as requested by Tyluur