aboutsummaryrefslogtreecommitdiff
path: root/pkg/messages/types/svcCmdKeyValues.go
blob: 5c80d0b228f8a5a7f7b46a3454ac05c34a306a35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package messages

import (
	"github.com/pektezol/bitreader"
	"github.com/pektezol/demoparser/pkg/writer"
)

type SvcCmdKeyValues struct {
	Length uint32
	Data   []byte
}

func ParseSvcCmdKeyValues(reader *bitreader.Reader) SvcCmdKeyValues {
	svcCmdKeyValues := SvcCmdKeyValues{
		Length: reader.TryReadUInt32(),
	}
	svcCmdKeyValues.Data = reader.TryReadBytesToSlice(uint64(svcCmdKeyValues.Length))
	writer.TempAppendLine("\t\tData: %v", svcCmdKeyValues.Data)
	return svcCmdKeyValues
}