From 5ac92a1583fb361ebd82db2438ea9d358f75c11f Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Thu, 12 Dec 2019 14:17:03 -0800 Subject: [PATCH] Upgraded to Flatbuffers 1.11.0 --- build.gradle | 2 +- .../gen/com/riiablo/net/packet/bncs/BNCS.java | 2 +- .../riiablo/net/packet/bncs/ChatEvent.java | 11 ++--- .../gen/com/riiablo/net/packet/bnls/BNLS.java | 11 ++--- .../net/packet/bnls/ConnectionAccepted.java | 2 +- .../net/packet/bnls/ConnectionClosed.java | 2 +- .../net/packet/bnls/LoginResponse.java | 2 +- .../riiablo/net/packet/bnls/QueryRealms.java | 2 +- .../com/riiablo/net/packet/bnls/Realm.java | 2 +- .../riiablo/net/packet/d2gs/CofAlphas.java | 38 ++++++++++++++ .../net/packet/d2gs/CofComponents.java | 38 ++++++++++++++ .../net/packet/d2gs/CofTransforms.java | 38 ++++++++++++++ .../riiablo/net/packet/d2gs/Connection.java | 11 ++--- .../gen/com/riiablo/net/packet/d2gs/D2GS.java | 2 +- .../com/riiablo/net/packet/d2gs/D2GSData.java | 3 +- .../riiablo/net/packet/d2gs/RunToEntity.java | 2 +- .../net/packet/d2gs/RunToLocation.java | 2 +- .../gen/com/riiablo/net/packet/d2gs/Sync.java | 49 +++++++++++++++++++ .../com/riiablo/net/packet/d2gs/SyncData.java | 16 ++++++ .../riiablo/net/packet/d2gs/WalkToEntity.java | 2 +- .../net/packet/d2gs/WalkToLocation.java | 2 +- .../net/packet/mcp/ConnectionAccepted.java | 2 +- .../net/packet/mcp/ConnectionClosed.java | 2 +- .../riiablo/net/packet/mcp/CreateGame.java | 2 +- .../riiablo/net/packet/mcp/GameSession.java | 2 +- .../com/riiablo/net/packet/mcp/JoinGame.java | 2 +- .../com/riiablo/net/packet/mcp/ListGames.java | 2 +- core/gen/com/riiablo/net/packet/mcp/MCP.java | 2 +- core/gen/com/riiablo/net/packet/msi/MSI.java | 2 +- .../riiablo/net/packet/msi/StartInstance.java | 2 +- core/src/com/riiablo/net/d2gs/D2GS.fbs | 4 +- 31 files changed, 220 insertions(+), 41 deletions(-) create mode 100644 core/gen/com/riiablo/net/packet/d2gs/CofAlphas.java create mode 100644 core/gen/com/riiablo/net/packet/d2gs/CofComponents.java create mode 100644 core/gen/com/riiablo/net/packet/d2gs/CofTransforms.java create mode 100644 core/gen/com/riiablo/net/packet/d2gs/Sync.java create mode 100644 core/gen/com/riiablo/net/packet/d2gs/SyncData.java diff --git a/build.gradle b/build.gradle index 4381ad08..a0931c29 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { diff --git a/core/gen/com/riiablo/net/packet/bncs/BNCS.java b/core/gen/com/riiablo/net/packet/bncs/BNCS.java index 9e683288..392231bf 100644 --- a/core/gen/com/riiablo/net/packet/bncs/BNCS.java +++ b/core/gen/com/riiablo/net/packet/bncs/BNCS.java @@ -12,7 +12,7 @@ import java.nio.ByteOrder; 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; } diff --git a/core/gen/com/riiablo/net/packet/bncs/ChatEvent.java b/core/gen/com/riiablo/net/packet/bncs/ChatEvent.java index 0d5b5459..77263194 100644 --- a/core/gen/com/riiablo/net/packet/bncs/ChatEvent.java +++ b/core/gen/com/riiablo/net/packet/bncs/ChatEvent.java @@ -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; } diff --git a/core/gen/com/riiablo/net/packet/bnls/BNLS.java b/core/gen/com/riiablo/net/packet/bnls/BNLS.java index 7915e974..dd964ff1 100644 --- a/core/gen/com/riiablo/net/packet/bnls/BNLS.java +++ b/core/gen/com/riiablo/net/packet/bnls/BNLS.java @@ -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; } diff --git a/core/gen/com/riiablo/net/packet/bnls/ConnectionAccepted.java b/core/gen/com/riiablo/net/packet/bnls/ConnectionAccepted.java index be6d621f..fb0f2e27 100644 --- a/core/gen/com/riiablo/net/packet/bnls/ConnectionAccepted.java +++ b/core/gen/com/riiablo/net/packet/bnls/ConnectionAccepted.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; 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; } diff --git a/core/gen/com/riiablo/net/packet/bnls/ConnectionClosed.java b/core/gen/com/riiablo/net/packet/bnls/ConnectionClosed.java index dddaf986..6eb8a262 100644 --- a/core/gen/com/riiablo/net/packet/bnls/ConnectionClosed.java +++ b/core/gen/com/riiablo/net/packet/bnls/ConnectionClosed.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; 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; } diff --git a/core/gen/com/riiablo/net/packet/bnls/LoginResponse.java b/core/gen/com/riiablo/net/packet/bnls/LoginResponse.java index 47781912..02813551 100644 --- a/core/gen/com/riiablo/net/packet/bnls/LoginResponse.java +++ b/core/gen/com/riiablo/net/packet/bnls/LoginResponse.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; 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; } diff --git a/core/gen/com/riiablo/net/packet/bnls/QueryRealms.java b/core/gen/com/riiablo/net/packet/bnls/QueryRealms.java index 7edae71a..238992b3 100644 --- a/core/gen/com/riiablo/net/packet/bnls/QueryRealms.java +++ b/core/gen/com/riiablo/net/packet/bnls/QueryRealms.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; 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); } diff --git a/core/gen/com/riiablo/net/packet/bnls/Realm.java b/core/gen/com/riiablo/net/packet/bnls/Realm.java index 62a554e4..40e1fea5 100644 --- a/core/gen/com/riiablo/net/packet/bnls/Realm.java +++ b/core/gen/com/riiablo/net/packet/bnls/Realm.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; 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; } diff --git a/core/gen/com/riiablo/net/packet/d2gs/CofAlphas.java b/core/gen/com/riiablo/net/packet/d2gs/CofAlphas.java new file mode 100644 index 00000000..04e02404 --- /dev/null +++ b/core/gen/com/riiablo/net/packet/d2gs/CofAlphas.java @@ -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; + } +} + diff --git a/core/gen/com/riiablo/net/packet/d2gs/CofComponents.java b/core/gen/com/riiablo/net/packet/d2gs/CofComponents.java new file mode 100644 index 00000000..ca27a69a --- /dev/null +++ b/core/gen/com/riiablo/net/packet/d2gs/CofComponents.java @@ -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; + } +} + diff --git a/core/gen/com/riiablo/net/packet/d2gs/CofTransforms.java b/core/gen/com/riiablo/net/packet/d2gs/CofTransforms.java new file mode 100644 index 00000000..18dcf60a --- /dev/null +++ b/core/gen/com/riiablo/net/packet/d2gs/CofTransforms.java @@ -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; + } +} + diff --git a/core/gen/com/riiablo/net/packet/d2gs/Connection.java b/core/gen/com/riiablo/net/packet/d2gs/Connection.java index 1da9f0ed..8d70aed2 100644 --- a/core/gen/com/riiablo/net/packet/d2gs/Connection.java +++ b/core/gen/com/riiablo/net/packet/d2gs/Connection.java @@ -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; } diff --git a/core/gen/com/riiablo/net/packet/d2gs/D2GS.java b/core/gen/com/riiablo/net/packet/d2gs/D2GS.java index 5e58c51e..6a78c4a5 100644 --- a/core/gen/com/riiablo/net/packet/d2gs/D2GS.java +++ b/core/gen/com/riiablo/net/packet/d2gs/D2GS.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; 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; } diff --git a/core/gen/com/riiablo/net/packet/d2gs/D2GSData.java b/core/gen/com/riiablo/net/packet/d2gs/D2GSData.java index 2e2abc92..b4195c96 100644 --- a/core/gen/com/riiablo/net/packet/d2gs/D2GSData.java +++ b/core/gen/com/riiablo/net/packet/d2gs/D2GSData.java @@ -10,8 +10,9 @@ public final class 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]; } } diff --git a/core/gen/com/riiablo/net/packet/d2gs/RunToEntity.java b/core/gen/com/riiablo/net/packet/d2gs/RunToEntity.java index b881bc77..5f12bdcf 100644 --- a/core/gen/com/riiablo/net/packet/d2gs/RunToEntity.java +++ b/core/gen/com/riiablo/net/packet/d2gs/RunToEntity.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; 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; } diff --git a/core/gen/com/riiablo/net/packet/d2gs/RunToLocation.java b/core/gen/com/riiablo/net/packet/d2gs/RunToLocation.java index 3853a13e..da7fb6df 100644 --- a/core/gen/com/riiablo/net/packet/d2gs/RunToLocation.java +++ b/core/gen/com/riiablo/net/packet/d2gs/RunToLocation.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; 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; } diff --git a/core/gen/com/riiablo/net/packet/d2gs/Sync.java b/core/gen/com/riiablo/net/packet/d2gs/Sync.java new file mode 100644 index 00000000..dc2cf216 --- /dev/null +++ b/core/gen/com/riiablo/net/packet/d2gs/Sync.java @@ -0,0 +1,49 @@ +// 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 Sync extends Table { + public static Sync getRootAsSync(ByteBuffer _bb) { return getRootAsSync(_bb, new Sync()); } + public static Sync getRootAsSync(ByteBuffer _bb, Sync 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 Sync __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int entityId() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public byte dataType(int j) { int o = __offset(6); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int dataTypeLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer dataTypeAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer dataTypeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public Table data(Table obj, int j) { int o = __offset(8); return o != 0 ? __union(obj, __vector(o) + j * 4 - bb_pos) : null; } + public int dataLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + + public static int createSync(FlatBufferBuilder builder, + int entityId, + int data_typeOffset, + int dataOffset) { + builder.startObject(3); + Sync.addData(builder, dataOffset); + Sync.addDataType(builder, data_typeOffset); + Sync.addEntityId(builder, entityId); + return Sync.endSync(builder); + } + + public static void startSync(FlatBufferBuilder builder) { builder.startObject(3); } + public static void addEntityId(FlatBufferBuilder builder, int entityId) { builder.addInt(0, entityId, 0); } + public static void addDataType(FlatBufferBuilder builder, int dataTypeOffset) { builder.addOffset(1, dataTypeOffset, 0); } + public static int createDataTypeVector(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 startDataTypeVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addData(FlatBufferBuilder builder, int dataOffset) { builder.addOffset(2, dataOffset, 0); } + public static int createDataVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startDataVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endSync(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/core/gen/com/riiablo/net/packet/d2gs/SyncData.java b/core/gen/com/riiablo/net/packet/d2gs/SyncData.java new file mode 100644 index 00000000..1261c449 --- /dev/null +++ b/core/gen/com/riiablo/net/packet/d2gs/SyncData.java @@ -0,0 +1,16 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.riiablo.net.packet.d2gs; + +public final class SyncData { + private SyncData() { } + public static final byte NONE = 0; + public static final byte CofComponents = 1; + public static final byte CofTransforms = 2; + public static final byte CofAlphas = 3; + + public static final String[] names = { "NONE", "CofComponents", "CofTransforms", "CofAlphas", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/core/gen/com/riiablo/net/packet/d2gs/WalkToEntity.java b/core/gen/com/riiablo/net/packet/d2gs/WalkToEntity.java index 4e350167..606ead68 100644 --- a/core/gen/com/riiablo/net/packet/d2gs/WalkToEntity.java +++ b/core/gen/com/riiablo/net/packet/d2gs/WalkToEntity.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; public final class WalkToEntity extends Table { public static WalkToEntity getRootAsWalkToEntity(ByteBuffer _bb) { return getRootAsWalkToEntity(_bb, new WalkToEntity()); } public static WalkToEntity getRootAsWalkToEntity(ByteBuffer _bb, WalkToEntity 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 WalkToEntity __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; } diff --git a/core/gen/com/riiablo/net/packet/d2gs/WalkToLocation.java b/core/gen/com/riiablo/net/packet/d2gs/WalkToLocation.java index 764ae724..81afe958 100644 --- a/core/gen/com/riiablo/net/packet/d2gs/WalkToLocation.java +++ b/core/gen/com/riiablo/net/packet/d2gs/WalkToLocation.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; public final class WalkToLocation extends Table { public static WalkToLocation getRootAsWalkToLocation(ByteBuffer _bb) { return getRootAsWalkToLocation(_bb, new WalkToLocation()); } public static WalkToLocation getRootAsWalkToLocation(ByteBuffer _bb, WalkToLocation 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 WalkToLocation __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; } diff --git a/core/gen/com/riiablo/net/packet/mcp/ConnectionAccepted.java b/core/gen/com/riiablo/net/packet/mcp/ConnectionAccepted.java index a999661d..c0cfd9e7 100644 --- a/core/gen/com/riiablo/net/packet/mcp/ConnectionAccepted.java +++ b/core/gen/com/riiablo/net/packet/mcp/ConnectionAccepted.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; 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; } diff --git a/core/gen/com/riiablo/net/packet/mcp/ConnectionClosed.java b/core/gen/com/riiablo/net/packet/mcp/ConnectionClosed.java index 86c34fe6..62b57571 100644 --- a/core/gen/com/riiablo/net/packet/mcp/ConnectionClosed.java +++ b/core/gen/com/riiablo/net/packet/mcp/ConnectionClosed.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; 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; } diff --git a/core/gen/com/riiablo/net/packet/mcp/CreateGame.java b/core/gen/com/riiablo/net/packet/mcp/CreateGame.java index 98a87fbd..14075cc7 100644 --- a/core/gen/com/riiablo/net/packet/mcp/CreateGame.java +++ b/core/gen/com/riiablo/net/packet/mcp/CreateGame.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; public final class CreateGame extends Table { public static CreateGame getRootAsCreateGame(ByteBuffer _bb) { return getRootAsCreateGame(_bb, new CreateGame()); } public static CreateGame getRootAsCreateGame(ByteBuffer _bb, CreateGame 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 CreateGame __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public int diff() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } diff --git a/core/gen/com/riiablo/net/packet/mcp/GameSession.java b/core/gen/com/riiablo/net/packet/mcp/GameSession.java index 45b8f41a..b13b20e9 100644 --- a/core/gen/com/riiablo/net/packet/mcp/GameSession.java +++ b/core/gen/com/riiablo/net/packet/mcp/GameSession.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; public final class GameSession extends Table { public static GameSession getRootAsGameSession(ByteBuffer _bb) { return getRootAsGameSession(_bb, new GameSession()); } public static GameSession getRootAsGameSession(ByteBuffer _bb, GameSession 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 GameSession __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long index() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } diff --git a/core/gen/com/riiablo/net/packet/mcp/JoinGame.java b/core/gen/com/riiablo/net/packet/mcp/JoinGame.java index 359f4688..d73ce580 100644 --- a/core/gen/com/riiablo/net/packet/mcp/JoinGame.java +++ b/core/gen/com/riiablo/net/packet/mcp/JoinGame.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; public final class JoinGame extends Table { public static JoinGame getRootAsJoinGame(ByteBuffer _bb) { return getRootAsJoinGame(_bb, new JoinGame()); } public static JoinGame getRootAsJoinGame(ByteBuffer _bb, JoinGame 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 JoinGame __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public String gameName() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } diff --git a/core/gen/com/riiablo/net/packet/mcp/ListGames.java b/core/gen/com/riiablo/net/packet/mcp/ListGames.java index 29f35303..5abf47dc 100644 --- a/core/gen/com/riiablo/net/packet/mcp/ListGames.java +++ b/core/gen/com/riiablo/net/packet/mcp/ListGames.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; public final class ListGames extends Table { public static ListGames getRootAsListGames(ByteBuffer _bb) { return getRootAsListGames(_bb, new ListGames()); } public static ListGames getRootAsListGames(ByteBuffer _bb, ListGames 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 ListGames __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long flags() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } diff --git a/core/gen/com/riiablo/net/packet/mcp/MCP.java b/core/gen/com/riiablo/net/packet/mcp/MCP.java index c5d46d68..27a9f43e 100644 --- a/core/gen/com/riiablo/net/packet/mcp/MCP.java +++ b/core/gen/com/riiablo/net/packet/mcp/MCP.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; public final class MCP extends Table { public static MCP getRootAsMCP(ByteBuffer _bb) { return getRootAsMCP(_bb, new MCP()); } public static MCP getRootAsMCP(ByteBuffer _bb, MCP 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 MCP __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; } diff --git a/core/gen/com/riiablo/net/packet/msi/MSI.java b/core/gen/com/riiablo/net/packet/msi/MSI.java index 8a55f3ee..97bb58ce 100644 --- a/core/gen/com/riiablo/net/packet/msi/MSI.java +++ b/core/gen/com/riiablo/net/packet/msi/MSI.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; public final class MSI extends Table { public static MSI getRootAsMSI(ByteBuffer _bb) { return getRootAsMSI(_bb, new MSI()); } public static MSI getRootAsMSI(ByteBuffer _bb, MSI 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 MSI __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; } diff --git a/core/gen/com/riiablo/net/packet/msi/StartInstance.java b/core/gen/com/riiablo/net/packet/msi/StartInstance.java index f8cb4e8d..f9f2b6b2 100644 --- a/core/gen/com/riiablo/net/packet/msi/StartInstance.java +++ b/core/gen/com/riiablo/net/packet/msi/StartInstance.java @@ -11,7 +11,7 @@ import com.google.flatbuffers.*; public final class StartInstance extends Table { public static StartInstance getRootAsStartInstance(ByteBuffer _bb) { return getRootAsStartInstance(_bb, new StartInstance()); } public static StartInstance getRootAsStartInstance(ByteBuffer _bb, StartInstance 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 StartInstance __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public byte result() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } diff --git a/core/src/com/riiablo/net/d2gs/D2GS.fbs b/core/src/com/riiablo/net/d2gs/D2GS.fbs index 59e5132e..97f73884 100644 --- a/core/src/com/riiablo/net/d2gs/D2GS.fbs +++ b/core/src/com/riiablo/net/d2gs/D2GS.fbs @@ -3,6 +3,7 @@ include "WalkToEntity.fbs"; include "RunToLocation.fbs"; include "RunToEntity.fbs"; include "Connection.fbs"; +include "Sync.fbs"; namespace com.riiablo.net.packet.d2gs; @@ -11,7 +12,8 @@ union D2GSData { WalkToEntity, RunToLocation, RunToEntity, - Connection + Connection, + Sync, } table D2GS {