Skip to content
Permalink
Browse files

Upgraded to Flatbuffers 1.11.0

  • Loading branch information
collinsmith committed Dec 12, 2019
1 parent e4df005 commit 5ac92a1583fb361ebd82db2438ea9d358f75c11f
Showing with 220 additions and 41 deletions.
  1. +1 −1 build.gradle
  2. +1 −1 core/gen/com/riiablo/net/packet/bncs/BNCS.java
  3. +5 −6 core/gen/com/riiablo/net/packet/bncs/ChatEvent.java
  4. +5 −6 core/gen/com/riiablo/net/packet/bnls/BNLS.java
  5. +1 −1 core/gen/com/riiablo/net/packet/bnls/ConnectionAccepted.java
  6. +1 −1 core/gen/com/riiablo/net/packet/bnls/ConnectionClosed.java
  7. +1 −1 core/gen/com/riiablo/net/packet/bnls/LoginResponse.java
  8. +1 −1 core/gen/com/riiablo/net/packet/bnls/QueryRealms.java
  9. +1 −1 core/gen/com/riiablo/net/packet/bnls/Realm.java
  10. +38 −0 core/gen/com/riiablo/net/packet/d2gs/CofAlphas.java
  11. +38 −0 core/gen/com/riiablo/net/packet/d2gs/CofComponents.java
  12. +38 −0 core/gen/com/riiablo/net/packet/d2gs/CofTransforms.java
  13. +5 −6 core/gen/com/riiablo/net/packet/d2gs/Connection.java
  14. +1 −1 core/gen/com/riiablo/net/packet/d2gs/D2GS.java
  15. +2 −1 core/gen/com/riiablo/net/packet/d2gs/D2GSData.java
  16. +1 −1 core/gen/com/riiablo/net/packet/d2gs/RunToEntity.java
  17. +1 −1 core/gen/com/riiablo/net/packet/d2gs/RunToLocation.java
  18. +49 −0 core/gen/com/riiablo/net/packet/d2gs/Sync.java
  19. +16 −0 core/gen/com/riiablo/net/packet/d2gs/SyncData.java
  20. +1 −1 core/gen/com/riiablo/net/packet/d2gs/WalkToEntity.java
  21. +1 −1 core/gen/com/riiablo/net/packet/d2gs/WalkToLocation.java
  22. +1 −1 core/gen/com/riiablo/net/packet/mcp/ConnectionAccepted.java
  23. +1 −1 core/gen/com/riiablo/net/packet/mcp/ConnectionClosed.java
  24. +1 −1 core/gen/com/riiablo/net/packet/mcp/CreateGame.java
  25. +1 −1 core/gen/com/riiablo/net/packet/mcp/GameSession.java
  26. +1 −1 core/gen/com/riiablo/net/packet/mcp/JoinGame.java
  27. +1 −1 core/gen/com/riiablo/net/packet/mcp/ListGames.java
  28. +1 −1 core/gen/com/riiablo/net/packet/mcp/MCP.java
  29. +1 −1 core/gen/com/riiablo/net/packet/msi/MSI.java
  30. +1 −1 core/gen/com/riiablo/net/packet/msi/StartInstance.java
  31. +3 −1 core/src/com/riiablo/net/d2gs/D2GS.fbs
@@ -210,7 +210,7 @@ project(":core") {
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
compile group: 'com.jcraft', name: 'jzlib', version: '1.1.3'
compile group: 'com.google.flatbuffers', name: 'flatbuffers-java', version: '1.9.0'
compile group: 'com.google.flatbuffers', name: 'flatbuffers-java', version: '1.11.0'
}

dependencies {
@@ -12,7 +12,7 @@
public final class BNCS extends Table {
public static BNCS getRootAsBNCS(ByteBuffer _bb) { return getRootAsBNCS(_bb, new BNCS()); }
public static BNCS getRootAsBNCS(ByteBuffer _bb, BNCS obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public BNCS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public byte dataType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
@@ -2,17 +2,16 @@

package com.riiablo.net.packet.bncs;

import com.google.flatbuffers.FlatBufferBuilder;
import com.google.flatbuffers.Table;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class ChatEvent extends Table {
public static ChatEvent getRootAsChatEvent(ByteBuffer _bb) { return getRootAsChatEvent(_bb, new ChatEvent()); }
public static ChatEvent getRootAsChatEvent(ByteBuffer _bb, ChatEvent obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public ChatEvent __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public byte eid() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 19; }
@@ -2,17 +2,16 @@

package com.riiablo.net.packet.bnls;

import com.google.flatbuffers.FlatBufferBuilder;
import com.google.flatbuffers.Table;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class BNLS extends Table {
public static BNLS getRootAsBNLS(ByteBuffer _bb) { return getRootAsBNLS(_bb, new BNLS()); }
public static BNLS getRootAsBNLS(ByteBuffer _bb, BNLS obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public BNLS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public byte dataType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
@@ -11,7 +11,7 @@
public final class ConnectionAccepted extends Table {
public static ConnectionAccepted getRootAsConnectionAccepted(ByteBuffer _bb) { return getRootAsConnectionAccepted(_bb, new ConnectionAccepted()); }
public static ConnectionAccepted getRootAsConnectionAccepted(ByteBuffer _bb, ConnectionAccepted obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public ConnectionAccepted __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }


@@ -11,7 +11,7 @@
public final class ConnectionClosed extends Table {
public static ConnectionClosed getRootAsConnectionClosed(ByteBuffer _bb) { return getRootAsConnectionClosed(_bb, new ConnectionClosed()); }
public static ConnectionClosed getRootAsConnectionClosed(ByteBuffer _bb, ConnectionClosed obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public ConnectionClosed __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public String reason() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
@@ -11,7 +11,7 @@
public final class LoginResponse extends Table {
public static LoginResponse getRootAsLoginResponse(ByteBuffer _bb) { return getRootAsLoginResponse(_bb, new LoginResponse()); }
public static LoginResponse getRootAsLoginResponse(ByteBuffer _bb, LoginResponse obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public LoginResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public String username() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
@@ -11,7 +11,7 @@
public final class QueryRealms extends Table {
public static QueryRealms getRootAsQueryRealms(ByteBuffer _bb) { return getRootAsQueryRealms(_bb, new QueryRealms()); }
public static QueryRealms getRootAsQueryRealms(ByteBuffer _bb, QueryRealms obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public QueryRealms __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public Realm realms(int j) { return realms(new Realm(), j); }
@@ -11,7 +11,7 @@
public final class Realm extends Table {
public static Realm getRootAsRealm(ByteBuffer _bb) { return getRootAsRealm(_bb, new Realm()); }
public static Realm getRootAsRealm(ByteBuffer _bb, Realm obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public Realm __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
@@ -0,0 +1,38 @@
// automatically generated by the FlatBuffers compiler, do not modify

package com.riiablo.net.packet.d2gs;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class CofAlphas extends Table {
public static CofAlphas getRootAsCofAlphas(ByteBuffer _bb) { return getRootAsCofAlphas(_bb, new CofAlphas()); }
public static CofAlphas getRootAsCofAlphas(ByteBuffer _bb, CofAlphas obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public CofAlphas __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public float alpha(int j) { int o = __offset(4); return o != 0 ? bb.getFloat(__vector(o) + j * 4) : 0; }
public int alphaLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
public ByteBuffer alphaAsByteBuffer() { return __vector_as_bytebuffer(4, 4); }
public ByteBuffer alphaInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 4); }

public static int createCofAlphas(FlatBufferBuilder builder,
int alphaOffset) {
builder.startObject(1);
CofAlphas.addAlpha(builder, alphaOffset);
return CofAlphas.endCofAlphas(builder);
}

public static void startCofAlphas(FlatBufferBuilder builder) { builder.startObject(1); }
public static void addAlpha(FlatBufferBuilder builder, int alphaOffset) { builder.addOffset(0, alphaOffset, 0); }
public static int createAlphaVector(FlatBufferBuilder builder, float[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addFloat(data[i]); return builder.endVector(); }
public static void startAlphaVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
public static int endCofAlphas(FlatBufferBuilder builder) {
int o = builder.endObject();
return o;
}
}

@@ -0,0 +1,38 @@
// automatically generated by the FlatBuffers compiler, do not modify

package com.riiablo.net.packet.d2gs;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class CofComponents extends Table {
public static CofComponents getRootAsCofComponents(ByteBuffer _bb) { return getRootAsCofComponents(_bb, new CofComponents()); }
public static CofComponents getRootAsCofComponents(ByteBuffer _bb, CofComponents obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public CofComponents __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public int component(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; }
public int componentLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
public ByteBuffer componentAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
public ByteBuffer componentInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }

public static int createCofComponents(FlatBufferBuilder builder,
int componentOffset) {
builder.startObject(1);
CofComponents.addComponent(builder, componentOffset);
return CofComponents.endCofComponents(builder);
}

public static void startCofComponents(FlatBufferBuilder builder) { builder.startObject(1); }
public static void addComponent(FlatBufferBuilder builder, int componentOffset) { builder.addOffset(0, componentOffset, 0); }
public static int createComponentVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); }
public static void startComponentVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
public static int endCofComponents(FlatBufferBuilder builder) {
int o = builder.endObject();
return o;
}
}

@@ -0,0 +1,38 @@
// automatically generated by the FlatBuffers compiler, do not modify

package com.riiablo.net.packet.d2gs;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class CofTransforms extends Table {
public static CofTransforms getRootAsCofTransforms(ByteBuffer _bb) { return getRootAsCofTransforms(_bb, new CofTransforms()); }
public static CofTransforms getRootAsCofTransforms(ByteBuffer _bb, CofTransforms obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public CofTransforms __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public int transform(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; }
public int transformLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
public ByteBuffer transformAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
public ByteBuffer transformInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }

public static int createCofTransforms(FlatBufferBuilder builder,
int transformOffset) {
builder.startObject(1);
CofTransforms.addTransform(builder, transformOffset);
return CofTransforms.endCofTransforms(builder);
}

public static void startCofTransforms(FlatBufferBuilder builder) { builder.startObject(1); }
public static void addTransform(FlatBufferBuilder builder, int transformOffset) { builder.addOffset(0, transformOffset, 0); }
public static int createTransformVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); }
public static void startTransformVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
public static int endCofTransforms(FlatBufferBuilder builder) {
int o = builder.endObject();
return o;
}
}

@@ -2,17 +2,16 @@

package com.riiablo.net.packet.d2gs;

import com.google.flatbuffers.FlatBufferBuilder;
import com.google.flatbuffers.Table;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class Connection extends Table {
public static Connection getRootAsConnection(ByteBuffer _bb) { return getRootAsConnection(_bb, new Connection()); }
public static Connection getRootAsConnection(ByteBuffer _bb, Connection obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public Connection __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public int charClass() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
@@ -11,7 +11,7 @@
public final class D2GS extends Table {
public static D2GS getRootAsD2GS(ByteBuffer _bb) { return getRootAsD2GS(_bb, new D2GS()); }
public static D2GS getRootAsD2GS(ByteBuffer _bb, D2GS obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public D2GS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public byte dataType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
@@ -10,8 +10,9 @@ private D2GSData() { }
public static final byte RunToLocation = 3;
public static final byte RunToEntity = 4;
public static final byte Connection = 5;
public static final byte Sync = 6;

public static final String[] names = { "NONE", "WalkToLocation", "WalkToEntity", "RunToLocation", "RunToEntity", "Connection", };
public static final String[] names = { "NONE", "WalkToLocation", "WalkToEntity", "RunToLocation", "RunToEntity", "Connection", "Sync", };

public static String name(int e) { return names[e]; }
}
@@ -11,7 +11,7 @@
public final class RunToEntity extends Table {
public static RunToEntity getRootAsRunToEntity(ByteBuffer _bb) { return getRootAsRunToEntity(_bb, new RunToEntity()); }
public static RunToEntity getRootAsRunToEntity(ByteBuffer _bb, RunToEntity obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public RunToEntity __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public int type() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
@@ -11,7 +11,7 @@
public final class RunToLocation extends Table {
public static RunToLocation getRootAsRunToLocation(ByteBuffer _bb) { return getRootAsRunToLocation(_bb, new RunToLocation()); }
public static RunToLocation getRootAsRunToLocation(ByteBuffer _bb, RunToLocation obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public RunToLocation __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public short x() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) : 0; }

0 comments on commit 5ac92a1

Please sign in to comment.
You can’t perform that action at this time.