public static byte[] createRpcPacket(ArrayList contents, bool timedRPC, WorldClient client) { RPCPacket rpcp = new RPCPacket(client); for (int i = 0; i < contents.Count; i++) { rpcp.appendMsgBlock((byte[])contents[i]); } return(rpcp.getBytesWithHeader(timedRPC)); }
public static byte[] createBigRpcPacket(ArrayList[] contents, bool timedRPC, WorldClient client) { RPCPacket rpcp = new RPCPacket(client); // Max size is 4 for (int i = 0; i < contents.Length; i++) { RPCPacket temp = new RPCPacket(client); for (int j = 0; j < contents[i].Count; j++) { temp.appendMsgBlock((byte[])contents[i][j]); } rpcp.appendRpc(temp); } return(rpcp.getBytesWithHeader(timedRPC)); }
public void appendRpc(RPCPacket newRPC) { din.append(newRPC.getBytes()); rpcInside++; }