Skip to content

Commit

Permalink
🚧 packet event
Browse files Browse the repository at this point in the history
  • Loading branch information
NuroC committed Jan 23, 2023
1 parent 439ece2 commit 3c92c9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/_game/external/modules/Bot/server/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ class Server implements IServer {
let data = new Uint8Array(event.data);
let encoded = MooMoo.msgpack.decode(data);
let [packet, [...packetData]] = encoded;
instance.emit("packet", {
packet: packet,
data: packetData
})
if (packet == "io-init") {
instance.onConnect(this);
}
Expand Down

0 comments on commit 3c92c9e

Please sign in to comment.