diff options
Diffstat (limited to 'packets/messages/types/SvcPacketEntities.go')
| -rw-r--r-- | packets/messages/types/SvcPacketEntities.go | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/packets/messages/types/SvcPacketEntities.go b/packets/messages/types/SvcPacketEntities.go deleted file mode 100644 index 9d8a8b0..0000000 --- a/packets/messages/types/SvcPacketEntities.go +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | package types | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "github.com/pektezol/bitreader" | ||
| 5 | ) | ||
| 6 | |||
| 7 | type SvcPacketEntities struct { | ||
| 8 | MaxEntries uint16 | ||
| 9 | IsDelta bool | ||
| 10 | DeltaFrom int32 | ||
| 11 | BaseLine bool | ||
| 12 | UpdatedEntries uint16 | ||
| 13 | UpdateBaseline bool | ||
| 14 | Data []byte | ||
| 15 | } | ||
| 16 | |||
| 17 | func ParseSvcPacketEntities(reader *bitreader.ReaderType) SvcPacketEntities { | ||
| 18 | maxentries := reader.TryReadBits(11) | ||
| 19 | isdelta := reader.TryReadBool() | ||
| 20 | var deltafrom int32 | ||
| 21 | if isdelta { | ||
| 22 | deltafrom = int32(reader.TryReadInt32()) | ||
| 23 | } else { | ||
| 24 | deltafrom = -1 | ||
| 25 | } | ||
| 26 | baseline := reader.TryReadBool() | ||
| 27 | updatedentries := reader.TryReadBits(11) | ||
| 28 | length := reader.TryReadBits(20) | ||
| 29 | updatebaseline := reader.TryReadBool() | ||
| 30 | return SvcPacketEntities{ | ||
| 31 | MaxEntries: uint16(maxentries), | ||
| 32 | IsDelta: isdelta, | ||
| 33 | DeltaFrom: deltafrom, | ||
| 34 | BaseLine: baseline, | ||
| 35 | UpdatedEntries: uint16(updatedentries), | ||
| 36 | UpdateBaseline: updatebaseline, | ||
| 37 | Data: reader.TryReadBitsToSlice(int(length)), | ||
| 38 | } | ||
| 39 | } | ||