[Fix] Fixes for small multi proto refactoring and building

This commit is contained in:
hartie95 2024-01-08 00:21:01 +01:00
parent cf2ab47e88
commit a48b55ec1d
9 changed files with 1470 additions and 17 deletions

View File

@ -98,7 +98,8 @@ dependencies {
implementation("org.anime_game_servers:luaj:3.0.3")
implementation("org.anime_game_servers:JNLua_GC:0.1.0")
implementation("org.anime_game_servers:multi-proto-jvm:0.1.32")
implementation("org.anime_game_servers.multi_proto:gi-jvm:0.1.32")
implementation group: 'com.esotericsoftware', name : 'reflectasm', version: '1.11.9'
implementation group: 'com.github.davidmoten', name : 'rtree-multi', version: '0.1'

View File

@ -0,0 +1,692 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: DungeonInterruptChallengeReq.proto
package emu.grasscutter.net.proto;
public final class DungeonInterruptChallengeReqOuterClass {
private DungeonInterruptChallengeReqOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface DungeonInterruptChallengeReqOrBuilder extends
// @@protoc_insertion_point(interface_extends:DungeonInterruptChallengeReq)
com.google.protobuf.MessageOrBuilder {
/**
* <code>uint32 challenge_index = 14;</code>
* @return The challengeIndex.
*/
int getChallengeIndex();
/**
* <code>uint32 group_id = 13;</code>
* @return The groupId.
*/
int getGroupId();
/**
* <code>uint32 challenge_id = 11;</code>
* @return The challengeId.
*/
int getChallengeId();
}
/**
* <pre>
* CmdId: 917
* EnetChannelId: 0
* EnetIsReliable: true
* IsAllowClient: true
* </pre>
*
* Protobuf type {@code DungeonInterruptChallengeReq}
*/
public static final class DungeonInterruptChallengeReq extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:DungeonInterruptChallengeReq)
DungeonInterruptChallengeReqOrBuilder {
private static final long serialVersionUID = 0L;
// Use DungeonInterruptChallengeReq.newBuilder() to construct.
private DungeonInterruptChallengeReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private DungeonInterruptChallengeReq() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DungeonInterruptChallengeReq();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DungeonInterruptChallengeReq(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 88: {
challengeId_ = input.readUInt32();
break;
}
case 104: {
groupId_ = input.readUInt32();
break;
}
case 112: {
challengeIndex_ = input.readUInt32();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.internal_static_DungeonInterruptChallengeReq_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.internal_static_DungeonInterruptChallengeReq_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq.class, emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq.Builder.class);
}
public static final int CHALLENGE_INDEX_FIELD_NUMBER = 14;
private int challengeIndex_;
/**
* <code>uint32 challenge_index = 14;</code>
* @return The challengeIndex.
*/
@java.lang.Override
public int getChallengeIndex() {
return challengeIndex_;
}
public static final int GROUP_ID_FIELD_NUMBER = 13;
private int groupId_;
/**
* <code>uint32 group_id = 13;</code>
* @return The groupId.
*/
@java.lang.Override
public int getGroupId() {
return groupId_;
}
public static final int CHALLENGE_ID_FIELD_NUMBER = 11;
private int challengeId_;
/**
* <code>uint32 challenge_id = 11;</code>
* @return The challengeId.
*/
@java.lang.Override
public int getChallengeId() {
return challengeId_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (challengeId_ != 0) {
output.writeUInt32(11, challengeId_);
}
if (groupId_ != 0) {
output.writeUInt32(13, groupId_);
}
if (challengeIndex_ != 0) {
output.writeUInt32(14, challengeIndex_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (challengeId_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(11, challengeId_);
}
if (groupId_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(13, groupId_);
}
if (challengeIndex_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(14, challengeIndex_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq)) {
return super.equals(obj);
}
emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq other = (emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq) obj;
if (getChallengeIndex()
!= other.getChallengeIndex()) return false;
if (getGroupId()
!= other.getGroupId()) return false;
if (getChallengeId()
!= other.getChallengeId()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CHALLENGE_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getChallengeIndex();
hash = (37 * hash) + GROUP_ID_FIELD_NUMBER;
hash = (53 * hash) + getGroupId();
hash = (37 * hash) + CHALLENGE_ID_FIELD_NUMBER;
hash = (53 * hash) + getChallengeId();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* CmdId: 917
* EnetChannelId: 0
* EnetIsReliable: true
* IsAllowClient: true
* </pre>
*
* Protobuf type {@code DungeonInterruptChallengeReq}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:DungeonInterruptChallengeReq)
emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReqOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.internal_static_DungeonInterruptChallengeReq_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.internal_static_DungeonInterruptChallengeReq_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq.class, emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq.Builder.class);
}
// Construct using emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
challengeIndex_ = 0;
groupId_ = 0;
challengeId_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.internal_static_DungeonInterruptChallengeReq_descriptor;
}
@java.lang.Override
public emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq getDefaultInstanceForType() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq.getDefaultInstance();
}
@java.lang.Override
public emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq build() {
emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq buildPartial() {
emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq result = new emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq(this);
result.challengeIndex_ = challengeIndex_;
result.groupId_ = groupId_;
result.challengeId_ = challengeId_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq) {
return mergeFrom((emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq other) {
if (other == emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq.getDefaultInstance()) return this;
if (other.getChallengeIndex() != 0) {
setChallengeIndex(other.getChallengeIndex());
}
if (other.getGroupId() != 0) {
setGroupId(other.getGroupId());
}
if (other.getChallengeId() != 0) {
setChallengeId(other.getChallengeId());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int challengeIndex_ ;
/**
* <code>uint32 challenge_index = 14;</code>
* @return The challengeIndex.
*/
@java.lang.Override
public int getChallengeIndex() {
return challengeIndex_;
}
/**
* <code>uint32 challenge_index = 14;</code>
* @param value The challengeIndex to set.
* @return This builder for chaining.
*/
public Builder setChallengeIndex(int value) {
challengeIndex_ = value;
onChanged();
return this;
}
/**
* <code>uint32 challenge_index = 14;</code>
* @return This builder for chaining.
*/
public Builder clearChallengeIndex() {
challengeIndex_ = 0;
onChanged();
return this;
}
private int groupId_ ;
/**
* <code>uint32 group_id = 13;</code>
* @return The groupId.
*/
@java.lang.Override
public int getGroupId() {
return groupId_;
}
/**
* <code>uint32 group_id = 13;</code>
* @param value The groupId to set.
* @return This builder for chaining.
*/
public Builder setGroupId(int value) {
groupId_ = value;
onChanged();
return this;
}
/**
* <code>uint32 group_id = 13;</code>
* @return This builder for chaining.
*/
public Builder clearGroupId() {
groupId_ = 0;
onChanged();
return this;
}
private int challengeId_ ;
/**
* <code>uint32 challenge_id = 11;</code>
* @return The challengeId.
*/
@java.lang.Override
public int getChallengeId() {
return challengeId_;
}
/**
* <code>uint32 challenge_id = 11;</code>
* @param value The challengeId to set.
* @return This builder for chaining.
*/
public Builder setChallengeId(int value) {
challengeId_ = value;
onChanged();
return this;
}
/**
* <code>uint32 challenge_id = 11;</code>
* @return This builder for chaining.
*/
public Builder clearChallengeId() {
challengeId_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:DungeonInterruptChallengeReq)
}
// @@protoc_insertion_point(class_scope:DungeonInterruptChallengeReq)
private static final emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq();
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<DungeonInterruptChallengeReq>
PARSER = new com.google.protobuf.AbstractParser<DungeonInterruptChallengeReq>() {
@java.lang.Override
public DungeonInterruptChallengeReq parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DungeonInterruptChallengeReq(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<DungeonInterruptChallengeReq> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<DungeonInterruptChallengeReq> getParserForType() {
return PARSER;
}
@java.lang.Override
public emu.grasscutter.net.proto.DungeonInterruptChallengeReqOuterClass.DungeonInterruptChallengeReq getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_DungeonInterruptChallengeReq_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_DungeonInterruptChallengeReq_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\"DungeonInterruptChallengeReq.proto\"_\n\034" +
"DungeonInterruptChallengeReq\022\027\n\017challeng" +
"e_index\030\016 \001(\r\022\020\n\010group_id\030\r \001(\r\022\024\n\014chall" +
"enge_id\030\013 \001(\rB\033\n\031emu.grasscutter.net.pro" +
"tob\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_DungeonInterruptChallengeReq_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_DungeonInterruptChallengeReq_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_DungeonInterruptChallengeReq_descriptor,
new java.lang.String[] { "ChallengeIndex", "GroupId", "ChallengeId", });
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,760 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: DungeonInterruptChallengeRsp.proto
package emu.grasscutter.net.proto;
public final class DungeonInterruptChallengeRspOuterClass {
private DungeonInterruptChallengeRspOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface DungeonInterruptChallengeRspOrBuilder extends
// @@protoc_insertion_point(interface_extends:DungeonInterruptChallengeRsp)
com.google.protobuf.MessageOrBuilder {
/**
* <code>int32 retcode = 1;</code>
* @return The retcode.
*/
int getRetcode();
/**
* <code>uint32 challenge_index = 2;</code>
* @return The challengeIndex.
*/
int getChallengeIndex();
/**
* <code>uint32 group_id = 15;</code>
* @return The groupId.
*/
int getGroupId();
/**
* <code>uint32 challenge_id = 11;</code>
* @return The challengeId.
*/
int getChallengeId();
}
/**
* <pre>
* CmdId: 902
* EnetChannelId: 0
* EnetIsReliable: true
* </pre>
*
* Protobuf type {@code DungeonInterruptChallengeRsp}
*/
public static final class DungeonInterruptChallengeRsp extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:DungeonInterruptChallengeRsp)
DungeonInterruptChallengeRspOrBuilder {
private static final long serialVersionUID = 0L;
// Use DungeonInterruptChallengeRsp.newBuilder() to construct.
private DungeonInterruptChallengeRsp(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private DungeonInterruptChallengeRsp() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DungeonInterruptChallengeRsp();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DungeonInterruptChallengeRsp(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
retcode_ = input.readInt32();
break;
}
case 16: {
challengeIndex_ = input.readUInt32();
break;
}
case 88: {
challengeId_ = input.readUInt32();
break;
}
case 120: {
groupId_ = input.readUInt32();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.internal_static_DungeonInterruptChallengeRsp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.internal_static_DungeonInterruptChallengeRsp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp.class, emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp.Builder.class);
}
public static final int RETCODE_FIELD_NUMBER = 1;
private int retcode_;
/**
* <code>int32 retcode = 1;</code>
* @return The retcode.
*/
@java.lang.Override
public int getRetcode() {
return retcode_;
}
public static final int CHALLENGE_INDEX_FIELD_NUMBER = 2;
private int challengeIndex_;
/**
* <code>uint32 challenge_index = 2;</code>
* @return The challengeIndex.
*/
@java.lang.Override
public int getChallengeIndex() {
return challengeIndex_;
}
public static final int GROUP_ID_FIELD_NUMBER = 15;
private int groupId_;
/**
* <code>uint32 group_id = 15;</code>
* @return The groupId.
*/
@java.lang.Override
public int getGroupId() {
return groupId_;
}
public static final int CHALLENGE_ID_FIELD_NUMBER = 11;
private int challengeId_;
/**
* <code>uint32 challenge_id = 11;</code>
* @return The challengeId.
*/
@java.lang.Override
public int getChallengeId() {
return challengeId_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (retcode_ != 0) {
output.writeInt32(1, retcode_);
}
if (challengeIndex_ != 0) {
output.writeUInt32(2, challengeIndex_);
}
if (challengeId_ != 0) {
output.writeUInt32(11, challengeId_);
}
if (groupId_ != 0) {
output.writeUInt32(15, groupId_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (retcode_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, retcode_);
}
if (challengeIndex_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, challengeIndex_);
}
if (challengeId_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(11, challengeId_);
}
if (groupId_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(15, groupId_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp)) {
return super.equals(obj);
}
emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp other = (emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp) obj;
if (getRetcode()
!= other.getRetcode()) return false;
if (getChallengeIndex()
!= other.getChallengeIndex()) return false;
if (getGroupId()
!= other.getGroupId()) return false;
if (getChallengeId()
!= other.getChallengeId()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + RETCODE_FIELD_NUMBER;
hash = (53 * hash) + getRetcode();
hash = (37 * hash) + CHALLENGE_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getChallengeIndex();
hash = (37 * hash) + GROUP_ID_FIELD_NUMBER;
hash = (53 * hash) + getGroupId();
hash = (37 * hash) + CHALLENGE_ID_FIELD_NUMBER;
hash = (53 * hash) + getChallengeId();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* CmdId: 902
* EnetChannelId: 0
* EnetIsReliable: true
* </pre>
*
* Protobuf type {@code DungeonInterruptChallengeRsp}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:DungeonInterruptChallengeRsp)
emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRspOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.internal_static_DungeonInterruptChallengeRsp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.internal_static_DungeonInterruptChallengeRsp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp.class, emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp.Builder.class);
}
// Construct using emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
retcode_ = 0;
challengeIndex_ = 0;
groupId_ = 0;
challengeId_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.internal_static_DungeonInterruptChallengeRsp_descriptor;
}
@java.lang.Override
public emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp getDefaultInstanceForType() {
return emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp.getDefaultInstance();
}
@java.lang.Override
public emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp build() {
emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp buildPartial() {
emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp result = new emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp(this);
result.retcode_ = retcode_;
result.challengeIndex_ = challengeIndex_;
result.groupId_ = groupId_;
result.challengeId_ = challengeId_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp) {
return mergeFrom((emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp other) {
if (other == emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp.getDefaultInstance()) return this;
if (other.getRetcode() != 0) {
setRetcode(other.getRetcode());
}
if (other.getChallengeIndex() != 0) {
setChallengeIndex(other.getChallengeIndex());
}
if (other.getGroupId() != 0) {
setGroupId(other.getGroupId());
}
if (other.getChallengeId() != 0) {
setChallengeId(other.getChallengeId());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int retcode_ ;
/**
* <code>int32 retcode = 1;</code>
* @return The retcode.
*/
@java.lang.Override
public int getRetcode() {
return retcode_;
}
/**
* <code>int32 retcode = 1;</code>
* @param value The retcode to set.
* @return This builder for chaining.
*/
public Builder setRetcode(int value) {
retcode_ = value;
onChanged();
return this;
}
/**
* <code>int32 retcode = 1;</code>
* @return This builder for chaining.
*/
public Builder clearRetcode() {
retcode_ = 0;
onChanged();
return this;
}
private int challengeIndex_ ;
/**
* <code>uint32 challenge_index = 2;</code>
* @return The challengeIndex.
*/
@java.lang.Override
public int getChallengeIndex() {
return challengeIndex_;
}
/**
* <code>uint32 challenge_index = 2;</code>
* @param value The challengeIndex to set.
* @return This builder for chaining.
*/
public Builder setChallengeIndex(int value) {
challengeIndex_ = value;
onChanged();
return this;
}
/**
* <code>uint32 challenge_index = 2;</code>
* @return This builder for chaining.
*/
public Builder clearChallengeIndex() {
challengeIndex_ = 0;
onChanged();
return this;
}
private int groupId_ ;
/**
* <code>uint32 group_id = 15;</code>
* @return The groupId.
*/
@java.lang.Override
public int getGroupId() {
return groupId_;
}
/**
* <code>uint32 group_id = 15;</code>
* @param value The groupId to set.
* @return This builder for chaining.
*/
public Builder setGroupId(int value) {
groupId_ = value;
onChanged();
return this;
}
/**
* <code>uint32 group_id = 15;</code>
* @return This builder for chaining.
*/
public Builder clearGroupId() {
groupId_ = 0;
onChanged();
return this;
}
private int challengeId_ ;
/**
* <code>uint32 challenge_id = 11;</code>
* @return The challengeId.
*/
@java.lang.Override
public int getChallengeId() {
return challengeId_;
}
/**
* <code>uint32 challenge_id = 11;</code>
* @param value The challengeId to set.
* @return This builder for chaining.
*/
public Builder setChallengeId(int value) {
challengeId_ = value;
onChanged();
return this;
}
/**
* <code>uint32 challenge_id = 11;</code>
* @return This builder for chaining.
*/
public Builder clearChallengeId() {
challengeId_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:DungeonInterruptChallengeRsp)
}
// @@protoc_insertion_point(class_scope:DungeonInterruptChallengeRsp)
private static final emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp();
}
public static emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<DungeonInterruptChallengeRsp>
PARSER = new com.google.protobuf.AbstractParser<DungeonInterruptChallengeRsp>() {
@java.lang.Override
public DungeonInterruptChallengeRsp parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DungeonInterruptChallengeRsp(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<DungeonInterruptChallengeRsp> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<DungeonInterruptChallengeRsp> getParserForType() {
return PARSER;
}
@java.lang.Override
public emu.grasscutter.net.proto.DungeonInterruptChallengeRspOuterClass.DungeonInterruptChallengeRsp getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_DungeonInterruptChallengeRsp_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_DungeonInterruptChallengeRsp_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\"DungeonInterruptChallengeRsp.proto\"p\n\034" +
"DungeonInterruptChallengeRsp\022\017\n\007retcode\030" +
"\001 \001(\005\022\027\n\017challenge_index\030\002 \001(\r\022\020\n\010group_" +
"id\030\017 \001(\r\022\024\n\014challenge_id\030\013 \001(\rB\033\n\031emu.gr" +
"asscutter.net.protob\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_DungeonInterruptChallengeRsp_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_DungeonInterruptChallengeRsp_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_DungeonInterruptChallengeRsp_descriptor,
new java.lang.String[] { "Retcode", "ChallengeIndex", "GroupId", "ChallengeId", });
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -7,9 +7,8 @@ import com.google.protobuf.GeneratedMessageV3;
import emu.grasscutter.net.proto.PacketHeadOuterClass.PacketHead;
import emu.grasscutter.server.game.GameSession;
import emu.grasscutter.utils.Crypto;
import interfaces.ProtoModel;
import lombok.val;
import messages.VERSION;
import org.anime_game_servers.core.base.Version;
public class BasePacket {
private static final int const1 = 17767; // 0x4567
@ -69,7 +68,7 @@ public class BasePacket {
return shouldBuildHeader;
}
public byte[] getData(VERSION version) {
public byte[] getData(Version version) {
return data;
}

View File

@ -3,7 +3,7 @@ package emu.grasscutter.net.packet;
import com.google.protobuf.GeneratedMessageV3;
import emu.grasscutter.server.game.GameSession;
import interfaces.ProtoModel;
import messages.VERSION;
import org.anime_game_servers.core.base.Version;
public abstract class BaseTypedPacket<Packet extends ProtoModel> extends BasePacket {
@ -23,7 +23,7 @@ public abstract class BaseTypedPacket<Packet extends ProtoModel> extends BasePac
}
@Override
public byte[] getData(VERSION version) {
public byte[] getData(Version version) {
return proto.encodeToByteArray(version);
}

View File

@ -3,7 +3,7 @@ package emu.grasscutter.net.packet;
import emu.grasscutter.server.game.GameSession;
import interfaces.ProtoModel;
import lombok.val;
import messages.VERSION;
import org.anime_game_servers.core.base.Version;
import javax.annotation.Nullable;
import java.lang.reflect.Method;
@ -36,7 +36,7 @@ public abstract class TypedPacketHandler<T extends ProtoModel> extends PacketHan
throw new RuntimeException("Could not find model class for " + getClass().getName());
}
try {
parseMethod = modelClass.getMethod("parseBy", byte[].class, VERSION.class);
parseMethod = modelClass.getMethod("parseBy", byte[].class, Version.class);
if(!parseMethod.getReturnType().isAssignableFrom(modelClass))
throw new RuntimeException("parseBy method does not return " + modelClass.getName());
} catch (NoSuchMethodException e) {
@ -47,7 +47,7 @@ public abstract class TypedPacketHandler<T extends ProtoModel> extends PacketHan
@Override
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
val model = (T) parseMethod.invoke(null, payload, session.getVersion());
handle(session, header, model);
handle(session, header, model);
}
public abstract void handle(GameSession session, byte[] header, T payload) throws Exception;

View File

@ -44,7 +44,7 @@ public class GameServerPacketHandler {
this.handlers.put(opcode.value(), packetHandler);
} catch (Exception e) {
e.printStackTrace();
Grasscutter.getLogger().warn("exception while registering packet handler: {}", handlerClass.getName(), e);
}
}
public void registerTypedPacketHandler(Class<TypedPacketHandler<?>> handlerClass) {

View File

@ -20,7 +20,7 @@ import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import lombok.Getter;
import lombok.Setter;
import messages.VERSION;
import org.anime_game_servers.core.base.Version;
import package_id.PackageIds;
import static emu.grasscutter.config.Configuration.*;
@ -39,7 +39,7 @@ public class GameSession implements GameSessionManager.KcpChannel {
@Getter private int clientTime;
@Getter private long lastPingTime;
private int lastClientSeq = 10;
@Getter private VERSION version = VERSION.V3_2_0; // TODO actually get the version from the client
@Getter private Version version = Version.GI_3_2_0; // TODO actually get the version from the client
@Getter private PackageIdProvider packageIdProvider = PackageIds.getMapper(version);
public GameSession(GameServer server) {

View File

@ -13,9 +13,10 @@ import emu.grasscutter.utils.Utils;
import io.javalin.Javalin;
import io.javalin.http.Context;
import lombok.val;
import messages.VERSION;
import messages.general.server.RegionInfo;
import messages.login.QueryCurrRegionHttpRsp;
import org.anime_game_servers.core.base.Game;
import org.anime_game_servers.core.base.Version;
import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream;
@ -170,8 +171,8 @@ public final class RegionHandler implements Router {
int versionMajor = Integer.parseInt(versionCode[0]);
int versionMinor = Integer.parseInt(versionCode[1]);
int versionFix = Integer.parseInt(versionCode[2]);
val versionId = VERSION.idFromVersion(versionMajor, versionMinor, versionFix);
val version = VERSION.fromId(versionId);
val versionId = Version.idFromVersion(Game.GI, versionMajor, versionMinor, versionFix);
val version = Version.fromId(Game.GI, versionId);
if (version == null){
Grasscutter.getLogger().error("Client {} request: query_cur_region/{} with invalid version {}", ctx.ip(), regionName, versionName);
@ -186,7 +187,7 @@ public final class RegionHandler implements Router {
}
if (versionId > VERSION.V2_7_0.getId()) {
if (versionId > Version.GI_2_7_0.getId()) {
try {
QueryCurrentRegionEvent event = new QueryCurrentRegionEvent(regionData); event.call();
@ -265,7 +266,7 @@ public final class RegionHandler implements Router {
return this.regionQuery;
}
public String getBase64(VERSION version) {
public String getBase64(Version version) {
return Utils.base64Encode(regionQuery.encodeToByteArray(version));
}
}