diff --git a/server/netty/src/com/riiablo/net/reliable/Packet.java b/server/netty/src/com/riiablo/net/reliable/Packet.java index bb8e0042..4d07333d 100644 --- a/server/netty/src/com/riiablo/net/reliable/Packet.java +++ b/server/netty/src/com/riiablo/net/reliable/Packet.java @@ -178,6 +178,16 @@ public abstract class Packet { writeAckBitByteFlags(bb, ackBits); } + + static void writeAck(ByteBuf bb, int channelId, int ack, int ackBits) { + int prefixByte = getAckBitByteFlags(ackBits, ACK); + + bb.writeByte(prefixByte); + bb.writeByte(channelId); + bb.writeShortLE(ack); + + writeAckBitByteFlags(bb, ackBits); + } } static class FragmentedPacket extends Packet { @@ -270,16 +280,4 @@ public abstract class Packet { return headerSize; } } - - static class AckPacket { - static void writeHeader(ByteBuf bb, int channelId, int ack, int ackBits) { - int prefixByte = getAckBitByteFlags(ackBits, ACK); - - bb.writeByte(prefixByte); - bb.writeByte(channelId); - bb.writeShortLE(ack); - - writeAckBitByteFlags(bb, ackBits); - } - } }