Temporary patch for ents

This commit is contained in:
Treeku
2013-12-30 14:31:17 +00:00
parent 7f32075fc7
commit 57deb504f7
+8 -3
View File
@@ -346,14 +346,19 @@ public class SWGList<E> implements List<E> {
private byte[] item(int type, int index, byte[] data, boolean useIndex, boolean useData) {
int size = 1 + ((useIndex) ? 2 : 0) + ((useData) ? data.length : 0);
if (messageBuilder == null) {
updateCounter++;
return new byte[] { };
}
IoBuffer buffer = messageBuilder.bufferPool.allocate((size), false).order(ByteOrder.LITTLE_ENDIAN);
buffer.put((byte) type);
if (useIndex) buffer.putShort((short) index);
if (useData) buffer.put(data);
updateCounter++;
return buffer.array();
}