Added missing encode and decode methods to some SWGPackets and refactored SWGPacket's CRC field to be set through a string

This commit is contained in:
Waverunner
2015-07-06 16:25:51 -04:00
parent ce6cac38a6
commit a2e6adc43c
45 changed files with 457 additions and 374 deletions
+6 -1
View File
@@ -80,6 +80,11 @@ public class Packet {
}
public static void addList(ByteBuffer bb, Collection<? extends Encodable> list) {
if (list == null) {
addInt(bb, 0);
return;
}
addInt(bb, list.size());
for (Encodable encodable : list) {
addData(bb, encodable.encode());
@@ -237,7 +242,7 @@ public class Packet {
int size = getInt(bb);
if (size <= 0)
return null;
return new ArrayList<>();
try {
for (int i = 0; i < size; i++) {