From 9f5e8f230d35fffb106088b72e5fdb148905f450 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Thu, 10 Nov 2022 22:59:32 +0300 Subject: added almost all net/svc messages - currently broken --- packets/messages/types/SvcVoiceData.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 packets/messages/types/SvcVoiceData.go (limited to 'packets/messages/types/SvcVoiceData.go') diff --git a/packets/messages/types/SvcVoiceData.go b/packets/messages/types/SvcVoiceData.go new file mode 100644 index 0000000..f99db38 --- /dev/null +++ b/packets/messages/types/SvcVoiceData.go @@ -0,0 +1,19 @@ +package types + +import "github.com/pektezol/bitreader" + +type SvcVoiceData struct { + Client int8 + Proximity int8 + Data []byte +} + +func ParseSvcVoiceData(reader *bitreader.ReaderType) SvcVoiceData { + svcvoicedata := SvcVoiceData{ + Client: int8(reader.TryReadInt8()), + Proximity: int8(reader.TryReadInt8()), + } + length := reader.TryReadInt16() + svcvoicedata.Data = reader.TryReadBytesToSlice(int(length / 8)) + return svcvoicedata +} -- cgit v1.2.3