diff --git a/src/generated/main/java/emu/grasscutter/net/proto/AchievementAllDataNotifyOuterClass.java b/src/generated/main/java/emu/grasscutter/net/proto/AchievementAllDataNotifyOuterClass.java new file mode 100644 index 000000000..2d463266f --- /dev/null +++ b/src/generated/main/java/emu/grasscutter/net/proto/AchievementAllDataNotifyOuterClass.java @@ -0,0 +1,1172 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: AchievementAllDataNotify.proto + +package emu.grasscutter.net.proto; + +public final class AchievementAllDataNotifyOuterClass { + private AchievementAllDataNotifyOuterClass() {} + 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 AchievementAllDataNotifyOrBuilder extends + // @@protoc_insertion_point(interface_extends:AchievementAllDataNotify) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @return A list containing the rewardTakenGoalIdList. + */ + java.util.List getRewardTakenGoalIdListList(); + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @return The count of rewardTakenGoalIdList. + */ + int getRewardTakenGoalIdListCount(); + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @param index The index of the element to return. + * @return The rewardTakenGoalIdList at the given index. + */ + int getRewardTakenGoalIdList(int index); + + /** + * repeated .Achievement achievementList = 4; + */ + java.util.List + getAchievementListList(); + /** + * repeated .Achievement achievementList = 4; + */ + emu.grasscutter.net.proto.AchievementOuterClass.Achievement getAchievementList(int index); + /** + * repeated .Achievement achievementList = 4; + */ + int getAchievementListCount(); + /** + * repeated .Achievement achievementList = 4; + */ + java.util.List + getAchievementListOrBuilderList(); + /** + * repeated .Achievement achievementList = 4; + */ + emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder getAchievementListOrBuilder( + int index); + } + /** + * Protobuf type {@code AchievementAllDataNotify} + */ + public static final class AchievementAllDataNotify extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:AchievementAllDataNotify) + AchievementAllDataNotifyOrBuilder { + private static final long serialVersionUID = 0L; + // Use AchievementAllDataNotify.newBuilder() to construct. + private AchievementAllDataNotify(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AchievementAllDataNotify() { + rewardTakenGoalIdList_ = emptyIntList(); + achievementList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AchievementAllDataNotify(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AchievementAllDataNotify( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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 34: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + achievementList_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + achievementList_.add( + input.readMessage(emu.grasscutter.net.proto.AchievementOuterClass.Achievement.parser(), extensionRegistry)); + break; + } + case 64: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + rewardTakenGoalIdList_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + rewardTakenGoalIdList_.addInt(input.readUInt32()); + break; + } + case 66: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + rewardTakenGoalIdList_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + rewardTakenGoalIdList_.addInt(input.readUInt32()); + } + input.popLimit(limit); + 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 { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + achievementList_ = java.util.Collections.unmodifiableList(achievementList_); + } + if (((mutable_bitField0_ & 0x00000001) != 0)) { + rewardTakenGoalIdList_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.internal_static_AchievementAllDataNotify_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.internal_static_AchievementAllDataNotify_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify.class, emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify.Builder.class); + } + + /** + * Protobuf enum {@code AchievementAllDataNotify.BPPEPMJFOPO} + */ + public enum BPPEPMJFOPO + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NONE = 0; + */ + NONE(0, 0), + /** + * PEPPOHPHJOJ = 2688; + */ + PEPPOHPHJOJ(1, 2688), + /** + * NNBKOLMPOEA = 1; + */ + NNBKOLMPOEA(3, 1), + UNRECOGNIZED(-1, -1), + ; + + /** + * DCDNILFDFLB = 0; + */ + public static final BPPEPMJFOPO DCDNILFDFLB = NONE; + /** + * NONE = 0; + */ + public static final int NONE_VALUE = 0; + /** + * PEPPOHPHJOJ = 2688; + */ + public static final int PEPPOHPHJOJ_VALUE = 2688; + /** + * DCDNILFDFLB = 0; + */ + public static final int DCDNILFDFLB_VALUE = 0; + /** + * NNBKOLMPOEA = 1; + */ + public static final int NNBKOLMPOEA_VALUE = 1; + + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BPPEPMJFOPO valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BPPEPMJFOPO forNumber(int value) { + switch (value) { + case 0: return NONE; + case 2688: return PEPPOHPHJOJ; + case 1: return NNBKOLMPOEA; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BPPEPMJFOPO> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BPPEPMJFOPO findValueByNumber(int number) { + return BPPEPMJFOPO.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (index == -1) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify.getDescriptor().getEnumTypes().get(0); + } + + private static final BPPEPMJFOPO[] VALUES = getStaticValuesArray(); + private static BPPEPMJFOPO[] getStaticValuesArray() { + return new BPPEPMJFOPO[] { + NONE, PEPPOHPHJOJ, DCDNILFDFLB, NNBKOLMPOEA, + }; + } + public static BPPEPMJFOPO valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private BPPEPMJFOPO(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:AchievementAllDataNotify.BPPEPMJFOPO) + } + + public static final int REWARDTAKENGOALIDLIST_FIELD_NUMBER = 8; + private com.google.protobuf.Internal.IntList rewardTakenGoalIdList_; + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @return A list containing the rewardTakenGoalIdList. + */ + @java.lang.Override + public java.util.List + getRewardTakenGoalIdListList() { + return rewardTakenGoalIdList_; + } + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @return The count of rewardTakenGoalIdList. + */ + public int getRewardTakenGoalIdListCount() { + return rewardTakenGoalIdList_.size(); + } + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @param index The index of the element to return. + * @return The rewardTakenGoalIdList at the given index. + */ + public int getRewardTakenGoalIdList(int index) { + return rewardTakenGoalIdList_.getInt(index); + } + private int rewardTakenGoalIdListMemoizedSerializedSize = -1; + + public static final int ACHIEVEMENTLIST_FIELD_NUMBER = 4; + private java.util.List achievementList_; + /** + * repeated .Achievement achievementList = 4; + */ + @java.lang.Override + public java.util.List getAchievementListList() { + return achievementList_; + } + /** + * repeated .Achievement achievementList = 4; + */ + @java.lang.Override + public java.util.List + getAchievementListOrBuilderList() { + return achievementList_; + } + /** + * repeated .Achievement achievementList = 4; + */ + @java.lang.Override + public int getAchievementListCount() { + return achievementList_.size(); + } + /** + * repeated .Achievement achievementList = 4; + */ + @java.lang.Override + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement getAchievementList(int index) { + return achievementList_.get(index); + } + /** + * repeated .Achievement achievementList = 4; + */ + @java.lang.Override + public emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder getAchievementListOrBuilder( + int index) { + return achievementList_.get(index); + } + + 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 { + getSerializedSize(); + for (int i = 0; i < achievementList_.size(); i++) { + output.writeMessage(4, achievementList_.get(i)); + } + if (getRewardTakenGoalIdListList().size() > 0) { + output.writeUInt32NoTag(66); + output.writeUInt32NoTag(rewardTakenGoalIdListMemoizedSerializedSize); + } + for (int i = 0; i < rewardTakenGoalIdList_.size(); i++) { + output.writeUInt32NoTag(rewardTakenGoalIdList_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < achievementList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, achievementList_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < rewardTakenGoalIdList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(rewardTakenGoalIdList_.getInt(i)); + } + size += dataSize; + if (!getRewardTakenGoalIdListList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + rewardTakenGoalIdListMemoizedSerializedSize = dataSize; + } + 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.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify)) { + return super.equals(obj); + } + emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify other = (emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify) obj; + + if (!getRewardTakenGoalIdListList() + .equals(other.getRewardTakenGoalIdListList())) return false; + if (!getAchievementListList() + .equals(other.getAchievementListList())) 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(); + if (getRewardTakenGoalIdListCount() > 0) { + hash = (37 * hash) + REWARDTAKENGOALIDLIST_FIELD_NUMBER; + hash = (53 * hash) + getRewardTakenGoalIdListList().hashCode(); + } + if (getAchievementListCount() > 0) { + hash = (37 * hash) + ACHIEVEMENTLIST_FIELD_NUMBER; + hash = (53 * hash) + getAchievementListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify 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.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify 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.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify 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.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify 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.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify 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.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify 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; + } + /** + * Protobuf type {@code AchievementAllDataNotify} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:AchievementAllDataNotify) + emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotifyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.internal_static_AchievementAllDataNotify_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.internal_static_AchievementAllDataNotify_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify.class, emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify.Builder.class); + } + + // Construct using emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAchievementListFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + rewardTakenGoalIdList_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (achievementListBuilder_ == null) { + achievementList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + achievementListBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.internal_static_AchievementAllDataNotify_descriptor; + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify getDefaultInstanceForType() { + return emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify.getDefaultInstance(); + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify build() { + emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify buildPartial() { + emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify result = new emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + rewardTakenGoalIdList_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rewardTakenGoalIdList_ = rewardTakenGoalIdList_; + if (achievementListBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + achievementList_ = java.util.Collections.unmodifiableList(achievementList_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.achievementList_ = achievementList_; + } else { + result.achievementList_ = achievementListBuilder_.build(); + } + 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.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify) { + return mergeFrom((emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify other) { + if (other == emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify.getDefaultInstance()) return this; + if (!other.rewardTakenGoalIdList_.isEmpty()) { + if (rewardTakenGoalIdList_.isEmpty()) { + rewardTakenGoalIdList_ = other.rewardTakenGoalIdList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRewardTakenGoalIdListIsMutable(); + rewardTakenGoalIdList_.addAll(other.rewardTakenGoalIdList_); + } + onChanged(); + } + if (achievementListBuilder_ == null) { + if (!other.achievementList_.isEmpty()) { + if (achievementList_.isEmpty()) { + achievementList_ = other.achievementList_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAchievementListIsMutable(); + achievementList_.addAll(other.achievementList_); + } + onChanged(); + } + } else { + if (!other.achievementList_.isEmpty()) { + if (achievementListBuilder_.isEmpty()) { + achievementListBuilder_.dispose(); + achievementListBuilder_ = null; + achievementList_ = other.achievementList_; + bitField0_ = (bitField0_ & ~0x00000002); + achievementListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAchievementListFieldBuilder() : null; + } else { + achievementListBuilder_.addAllMessages(other.achievementList_); + } + } + } + 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.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.IntList rewardTakenGoalIdList_ = emptyIntList(); + private void ensureRewardTakenGoalIdListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rewardTakenGoalIdList_ = mutableCopy(rewardTakenGoalIdList_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @return A list containing the rewardTakenGoalIdList. + */ + public java.util.List + getRewardTakenGoalIdListList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(rewardTakenGoalIdList_) : rewardTakenGoalIdList_; + } + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @return The count of rewardTakenGoalIdList. + */ + public int getRewardTakenGoalIdListCount() { + return rewardTakenGoalIdList_.size(); + } + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @param index The index of the element to return. + * @return The rewardTakenGoalIdList at the given index. + */ + public int getRewardTakenGoalIdList(int index) { + return rewardTakenGoalIdList_.getInt(index); + } + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @param index The index to set the value at. + * @param value The rewardTakenGoalIdList to set. + * @return This builder for chaining. + */ + public Builder setRewardTakenGoalIdList( + int index, int value) { + ensureRewardTakenGoalIdListIsMutable(); + rewardTakenGoalIdList_.setInt(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @param value The rewardTakenGoalIdList to add. + * @return This builder for chaining. + */ + public Builder addRewardTakenGoalIdList(int value) { + ensureRewardTakenGoalIdListIsMutable(); + rewardTakenGoalIdList_.addInt(value); + onChanged(); + return this; + } + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @param values The rewardTakenGoalIdList to add. + * @return This builder for chaining. + */ + public Builder addAllRewardTakenGoalIdList( + java.lang.Iterable values) { + ensureRewardTakenGoalIdListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rewardTakenGoalIdList_); + onChanged(); + return this; + } + /** + * repeated uint32 rewardTakenGoalIdList = 8; + * @return This builder for chaining. + */ + public Builder clearRewardTakenGoalIdList() { + rewardTakenGoalIdList_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private java.util.List achievementList_ = + java.util.Collections.emptyList(); + private void ensureAchievementListIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + achievementList_ = new java.util.ArrayList(achievementList_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.AchievementOuterClass.Achievement, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder, emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder> achievementListBuilder_; + + /** + * repeated .Achievement achievementList = 4; + */ + public java.util.List getAchievementListList() { + if (achievementListBuilder_ == null) { + return java.util.Collections.unmodifiableList(achievementList_); + } else { + return achievementListBuilder_.getMessageList(); + } + } + /** + * repeated .Achievement achievementList = 4; + */ + public int getAchievementListCount() { + if (achievementListBuilder_ == null) { + return achievementList_.size(); + } else { + return achievementListBuilder_.getCount(); + } + } + /** + * repeated .Achievement achievementList = 4; + */ + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement getAchievementList(int index) { + if (achievementListBuilder_ == null) { + return achievementList_.get(index); + } else { + return achievementListBuilder_.getMessage(index); + } + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder setAchievementList( + int index, emu.grasscutter.net.proto.AchievementOuterClass.Achievement value) { + if (achievementListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAchievementListIsMutable(); + achievementList_.set(index, value); + onChanged(); + } else { + achievementListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder setAchievementList( + int index, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder builderForValue) { + if (achievementListBuilder_ == null) { + ensureAchievementListIsMutable(); + achievementList_.set(index, builderForValue.build()); + onChanged(); + } else { + achievementListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder addAchievementList(emu.grasscutter.net.proto.AchievementOuterClass.Achievement value) { + if (achievementListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAchievementListIsMutable(); + achievementList_.add(value); + onChanged(); + } else { + achievementListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder addAchievementList( + int index, emu.grasscutter.net.proto.AchievementOuterClass.Achievement value) { + if (achievementListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAchievementListIsMutable(); + achievementList_.add(index, value); + onChanged(); + } else { + achievementListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder addAchievementList( + emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder builderForValue) { + if (achievementListBuilder_ == null) { + ensureAchievementListIsMutable(); + achievementList_.add(builderForValue.build()); + onChanged(); + } else { + achievementListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder addAchievementList( + int index, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder builderForValue) { + if (achievementListBuilder_ == null) { + ensureAchievementListIsMutable(); + achievementList_.add(index, builderForValue.build()); + onChanged(); + } else { + achievementListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder addAllAchievementList( + java.lang.Iterable values) { + if (achievementListBuilder_ == null) { + ensureAchievementListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, achievementList_); + onChanged(); + } else { + achievementListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder clearAchievementList() { + if (achievementListBuilder_ == null) { + achievementList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + achievementListBuilder_.clear(); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder removeAchievementList(int index) { + if (achievementListBuilder_ == null) { + ensureAchievementListIsMutable(); + achievementList_.remove(index); + onChanged(); + } else { + achievementListBuilder_.remove(index); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder getAchievementListBuilder( + int index) { + return getAchievementListFieldBuilder().getBuilder(index); + } + /** + * repeated .Achievement achievementList = 4; + */ + public emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder getAchievementListOrBuilder( + int index) { + if (achievementListBuilder_ == null) { + return achievementList_.get(index); } else { + return achievementListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Achievement achievementList = 4; + */ + public java.util.List + getAchievementListOrBuilderList() { + if (achievementListBuilder_ != null) { + return achievementListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(achievementList_); + } + } + /** + * repeated .Achievement achievementList = 4; + */ + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder addAchievementListBuilder() { + return getAchievementListFieldBuilder().addBuilder( + emu.grasscutter.net.proto.AchievementOuterClass.Achievement.getDefaultInstance()); + } + /** + * repeated .Achievement achievementList = 4; + */ + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder addAchievementListBuilder( + int index) { + return getAchievementListFieldBuilder().addBuilder( + index, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.getDefaultInstance()); + } + /** + * repeated .Achievement achievementList = 4; + */ + public java.util.List + getAchievementListBuilderList() { + return getAchievementListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.AchievementOuterClass.Achievement, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder, emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder> + getAchievementListFieldBuilder() { + if (achievementListBuilder_ == null) { + achievementListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.AchievementOuterClass.Achievement, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder, emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder>( + achievementList_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + achievementList_ = null; + } + return achievementListBuilder_; + } + @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:AchievementAllDataNotify) + } + + // @@protoc_insertion_point(class_scope:AchievementAllDataNotify) + private static final emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify(); + } + + public static emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AchievementAllDataNotify parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AchievementAllDataNotify(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass.AchievementAllDataNotify getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_AchievementAllDataNotify_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_AchievementAllDataNotify_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\036AchievementAllDataNotify.proto\032\021Achiev" + + "ement.proto\"\261\001\n\030AchievementAllDataNotify" + + "\022\035\n\025rewardTakenGoalIdList\030\010 \003(\r\022%\n\017achie" + + "vementList\030\004 \003(\0132\014.Achievement\"O\n\013BPPEPM" + + "JFOPO\022\010\n\004NONE\020\000\022\020\n\013PEPPOHPHJOJ\020\200\025\022\017\n\013DCD" + + "NILFDFLB\020\000\022\017\n\013NNBKOLMPOEA\020\001\032\002\020\001B\033\n\031emu.g" + + "rasscutter.net.protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + emu.grasscutter.net.proto.AchievementOuterClass.getDescriptor(), + }); + internal_static_AchievementAllDataNotify_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_AchievementAllDataNotify_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_AchievementAllDataNotify_descriptor, + new java.lang.String[] { "RewardTakenGoalIdList", "AchievementList", }); + emu.grasscutter.net.proto.AchievementOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/generated/main/java/emu/grasscutter/net/proto/AchievementOuterClass.java b/src/generated/main/java/emu/grasscutter/net/proto/AchievementOuterClass.java new file mode 100644 index 000000000..d83781301 --- /dev/null +++ b/src/generated/main/java/emu/grasscutter/net/proto/AchievementOuterClass.java @@ -0,0 +1,857 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Achievement.proto + +package emu.grasscutter.net.proto; + +public final class AchievementOuterClass { + private AchievementOuterClass() {} + 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 AchievementOrBuilder extends + // @@protoc_insertion_point(interface_extends:Achievement) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 curProgress = 10; + * @return The curProgress. + */ + int getCurProgress(); + + /** + * uint32 id = 13; + * @return The id. + */ + int getId(); + + /** + * uint32 totalProgress = 14; + * @return The totalProgress. + */ + int getTotalProgress(); + + /** + * .Status status = 5; + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * .Status status = 5; + * @return The status. + */ + emu.grasscutter.net.proto.StatusOuterClass.Status getStatus(); + + /** + * uint32 finishTimestamp = 6; + * @return The finishTimestamp. + */ + int getFinishTimestamp(); + } + /** + * Protobuf type {@code Achievement} + */ + public static final class Achievement extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Achievement) + AchievementOrBuilder { + private static final long serialVersionUID = 0L; + // Use Achievement.newBuilder() to construct. + private Achievement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Achievement() { + status_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Achievement(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Achievement( + 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 40: { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + case 48: { + + finishTimestamp_ = input.readUInt32(); + break; + } + case 80: { + + curProgress_ = input.readUInt32(); + break; + } + case 104: { + + id_ = input.readUInt32(); + break; + } + case 112: { + + totalProgress_ = 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.AchievementOuterClass.internal_static_Achievement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.AchievementOuterClass.internal_static_Achievement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.AchievementOuterClass.Achievement.class, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder.class); + } + + public static final int CURPROGRESS_FIELD_NUMBER = 10; + private int curProgress_; + /** + * uint32 curProgress = 10; + * @return The curProgress. + */ + @java.lang.Override + public int getCurProgress() { + return curProgress_; + } + + public static final int ID_FIELD_NUMBER = 13; + private int id_; + /** + * uint32 id = 13; + * @return The id. + */ + @java.lang.Override + public int getId() { + return id_; + } + + public static final int TOTALPROGRESS_FIELD_NUMBER = 14; + private int totalProgress_; + /** + * uint32 totalProgress = 14; + * @return The totalProgress. + */ + @java.lang.Override + public int getTotalProgress() { + return totalProgress_; + } + + public static final int STATUS_FIELD_NUMBER = 5; + private int status_; + /** + * .Status status = 5; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + * .Status status = 5; + * @return The status. + */ + @java.lang.Override public emu.grasscutter.net.proto.StatusOuterClass.Status getStatus() { + @SuppressWarnings("deprecation") + emu.grasscutter.net.proto.StatusOuterClass.Status result = emu.grasscutter.net.proto.StatusOuterClass.Status.valueOf(status_); + return result == null ? emu.grasscutter.net.proto.StatusOuterClass.Status.UNRECOGNIZED : result; + } + + public static final int FINISHTIMESTAMP_FIELD_NUMBER = 6; + private int finishTimestamp_; + /** + * uint32 finishTimestamp = 6; + * @return The finishTimestamp. + */ + @java.lang.Override + public int getFinishTimestamp() { + return finishTimestamp_; + } + + 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 (status_ != emu.grasscutter.net.proto.StatusOuterClass.Status.STATUS_INVALID.getNumber()) { + output.writeEnum(5, status_); + } + if (finishTimestamp_ != 0) { + output.writeUInt32(6, finishTimestamp_); + } + if (curProgress_ != 0) { + output.writeUInt32(10, curProgress_); + } + if (id_ != 0) { + output.writeUInt32(13, id_); + } + if (totalProgress_ != 0) { + output.writeUInt32(14, totalProgress_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != emu.grasscutter.net.proto.StatusOuterClass.Status.STATUS_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, status_); + } + if (finishTimestamp_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, finishTimestamp_); + } + if (curProgress_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, curProgress_); + } + if (id_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(13, id_); + } + if (totalProgress_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(14, totalProgress_); + } + 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.AchievementOuterClass.Achievement)) { + return super.equals(obj); + } + emu.grasscutter.net.proto.AchievementOuterClass.Achievement other = (emu.grasscutter.net.proto.AchievementOuterClass.Achievement) obj; + + if (getCurProgress() + != other.getCurProgress()) return false; + if (getId() + != other.getId()) return false; + if (getTotalProgress() + != other.getTotalProgress()) return false; + if (status_ != other.status_) return false; + if (getFinishTimestamp() + != other.getFinishTimestamp()) 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) + CURPROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getCurProgress(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId(); + hash = (37 * hash) + TOTALPROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getTotalProgress(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (37 * hash) + FINISHTIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getFinishTimestamp(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static emu.grasscutter.net.proto.AchievementOuterClass.Achievement parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.AchievementOuterClass.Achievement 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.AchievementOuterClass.Achievement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.AchievementOuterClass.Achievement 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.AchievementOuterClass.Achievement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.AchievementOuterClass.Achievement parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static emu.grasscutter.net.proto.AchievementOuterClass.Achievement parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.AchievementOuterClass.Achievement 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.AchievementOuterClass.Achievement parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.AchievementOuterClass.Achievement 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.AchievementOuterClass.Achievement parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.AchievementOuterClass.Achievement 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.AchievementOuterClass.Achievement 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; + } + /** + * Protobuf type {@code Achievement} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Achievement) + emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return emu.grasscutter.net.proto.AchievementOuterClass.internal_static_Achievement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.AchievementOuterClass.internal_static_Achievement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.AchievementOuterClass.Achievement.class, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder.class); + } + + // Construct using emu.grasscutter.net.proto.AchievementOuterClass.Achievement.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(); + curProgress_ = 0; + + id_ = 0; + + totalProgress_ = 0; + + status_ = 0; + + finishTimestamp_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return emu.grasscutter.net.proto.AchievementOuterClass.internal_static_Achievement_descriptor; + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement getDefaultInstanceForType() { + return emu.grasscutter.net.proto.AchievementOuterClass.Achievement.getDefaultInstance(); + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement build() { + emu.grasscutter.net.proto.AchievementOuterClass.Achievement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement buildPartial() { + emu.grasscutter.net.proto.AchievementOuterClass.Achievement result = new emu.grasscutter.net.proto.AchievementOuterClass.Achievement(this); + result.curProgress_ = curProgress_; + result.id_ = id_; + result.totalProgress_ = totalProgress_; + result.status_ = status_; + result.finishTimestamp_ = finishTimestamp_; + 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.AchievementOuterClass.Achievement) { + return mergeFrom((emu.grasscutter.net.proto.AchievementOuterClass.Achievement)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(emu.grasscutter.net.proto.AchievementOuterClass.Achievement other) { + if (other == emu.grasscutter.net.proto.AchievementOuterClass.Achievement.getDefaultInstance()) return this; + if (other.getCurProgress() != 0) { + setCurProgress(other.getCurProgress()); + } + if (other.getId() != 0) { + setId(other.getId()); + } + if (other.getTotalProgress() != 0) { + setTotalProgress(other.getTotalProgress()); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (other.getFinishTimestamp() != 0) { + setFinishTimestamp(other.getFinishTimestamp()); + } + 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.AchievementOuterClass.Achievement parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (emu.grasscutter.net.proto.AchievementOuterClass.Achievement) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int curProgress_ ; + /** + * uint32 curProgress = 10; + * @return The curProgress. + */ + @java.lang.Override + public int getCurProgress() { + return curProgress_; + } + /** + * uint32 curProgress = 10; + * @param value The curProgress to set. + * @return This builder for chaining. + */ + public Builder setCurProgress(int value) { + + curProgress_ = value; + onChanged(); + return this; + } + /** + * uint32 curProgress = 10; + * @return This builder for chaining. + */ + public Builder clearCurProgress() { + + curProgress_ = 0; + onChanged(); + return this; + } + + private int id_ ; + /** + * uint32 id = 13; + * @return The id. + */ + @java.lang.Override + public int getId() { + return id_; + } + /** + * uint32 id = 13; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(int value) { + + id_ = value; + onChanged(); + return this; + } + /** + * uint32 id = 13; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = 0; + onChanged(); + return this; + } + + private int totalProgress_ ; + /** + * uint32 totalProgress = 14; + * @return The totalProgress. + */ + @java.lang.Override + public int getTotalProgress() { + return totalProgress_; + } + /** + * uint32 totalProgress = 14; + * @param value The totalProgress to set. + * @return This builder for chaining. + */ + public Builder setTotalProgress(int value) { + + totalProgress_ = value; + onChanged(); + return this; + } + /** + * uint32 totalProgress = 14; + * @return This builder for chaining. + */ + public Builder clearTotalProgress() { + + totalProgress_ = 0; + onChanged(); + return this; + } + + private int status_ = 0; + /** + * .Status status = 5; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + * .Status status = 5; + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + * .Status status = 5; + * @return The status. + */ + @java.lang.Override + public emu.grasscutter.net.proto.StatusOuterClass.Status getStatus() { + @SuppressWarnings("deprecation") + emu.grasscutter.net.proto.StatusOuterClass.Status result = emu.grasscutter.net.proto.StatusOuterClass.Status.valueOf(status_); + return result == null ? emu.grasscutter.net.proto.StatusOuterClass.Status.UNRECOGNIZED : result; + } + /** + * .Status status = 5; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(emu.grasscutter.net.proto.StatusOuterClass.Status value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .Status status = 5; + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + private int finishTimestamp_ ; + /** + * uint32 finishTimestamp = 6; + * @return The finishTimestamp. + */ + @java.lang.Override + public int getFinishTimestamp() { + return finishTimestamp_; + } + /** + * uint32 finishTimestamp = 6; + * @param value The finishTimestamp to set. + * @return This builder for chaining. + */ + public Builder setFinishTimestamp(int value) { + + finishTimestamp_ = value; + onChanged(); + return this; + } + /** + * uint32 finishTimestamp = 6; + * @return This builder for chaining. + */ + public Builder clearFinishTimestamp() { + + finishTimestamp_ = 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:Achievement) + } + + // @@protoc_insertion_point(class_scope:Achievement) + private static final emu.grasscutter.net.proto.AchievementOuterClass.Achievement DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new emu.grasscutter.net.proto.AchievementOuterClass.Achievement(); + } + + public static emu.grasscutter.net.proto.AchievementOuterClass.Achievement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Achievement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Achievement(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Achievement_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Achievement_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\021Achievement.proto\032\014Status.proto\"w\n\013Ach" + + "ievement\022\023\n\013curProgress\030\n \001(\r\022\n\n\002id\030\r \001(" + + "\r\022\025\n\rtotalProgress\030\016 \001(\r\022\027\n\006status\030\005 \001(\016" + + "2\007.Status\022\027\n\017finishTimestamp\030\006 \001(\rB\033\n\031em" + + "u.grasscutter.net.protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + emu.grasscutter.net.proto.StatusOuterClass.getDescriptor(), + }); + internal_static_Achievement_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Achievement_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Achievement_descriptor, + new java.lang.String[] { "CurProgress", "Id", "TotalProgress", "Status", "FinishTimestamp", }); + emu.grasscutter.net.proto.StatusOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/generated/main/java/emu/grasscutter/net/proto/AchievementUpdateNotifyOuterClass.java b/src/generated/main/java/emu/grasscutter/net/proto/AchievementUpdateNotifyOuterClass.java new file mode 100644 index 000000000..ee6fe2df4 --- /dev/null +++ b/src/generated/main/java/emu/grasscutter/net/proto/AchievementUpdateNotifyOuterClass.java @@ -0,0 +1,977 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: AchievementUpdateNotify.proto + +package emu.grasscutter.net.proto; + +public final class AchievementUpdateNotifyOuterClass { + private AchievementUpdateNotifyOuterClass() {} + 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 AchievementUpdateNotifyOrBuilder extends + // @@protoc_insertion_point(interface_extends:AchievementUpdateNotify) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .Achievement achievementList = 4; + */ + java.util.List + getAchievementListList(); + /** + * repeated .Achievement achievementList = 4; + */ + emu.grasscutter.net.proto.AchievementOuterClass.Achievement getAchievementList(int index); + /** + * repeated .Achievement achievementList = 4; + */ + int getAchievementListCount(); + /** + * repeated .Achievement achievementList = 4; + */ + java.util.List + getAchievementListOrBuilderList(); + /** + * repeated .Achievement achievementList = 4; + */ + emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder getAchievementListOrBuilder( + int index); + } + /** + * Protobuf type {@code AchievementUpdateNotify} + */ + public static final class AchievementUpdateNotify extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:AchievementUpdateNotify) + AchievementUpdateNotifyOrBuilder { + private static final long serialVersionUID = 0L; + // Use AchievementUpdateNotify.newBuilder() to construct. + private AchievementUpdateNotify(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AchievementUpdateNotify() { + achievementList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AchievementUpdateNotify(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AchievementUpdateNotify( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + achievementList_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + achievementList_.add( + input.readMessage(emu.grasscutter.net.proto.AchievementOuterClass.Achievement.parser(), extensionRegistry)); + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + achievementList_ = java.util.Collections.unmodifiableList(achievementList_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.internal_static_AchievementUpdateNotify_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.internal_static_AchievementUpdateNotify_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify.class, emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify.Builder.class); + } + + /** + * Protobuf enum {@code AchievementUpdateNotify.LKDGLEKOFGN} + */ + public enum LKDGLEKOFGN + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NONE = 0; + */ + NONE(0, 0), + /** + * PEPPOHPHJOJ = 2695; + */ + PEPPOHPHJOJ(1, 2695), + /** + * NNBKOLMPOEA = 1; + */ + NNBKOLMPOEA(3, 1), + UNRECOGNIZED(-1, -1), + ; + + /** + * DCDNILFDFLB = 0; + */ + public static final LKDGLEKOFGN DCDNILFDFLB = NONE; + /** + * NONE = 0; + */ + public static final int NONE_VALUE = 0; + /** + * PEPPOHPHJOJ = 2695; + */ + public static final int PEPPOHPHJOJ_VALUE = 2695; + /** + * DCDNILFDFLB = 0; + */ + public static final int DCDNILFDFLB_VALUE = 0; + /** + * NNBKOLMPOEA = 1; + */ + public static final int NNBKOLMPOEA_VALUE = 1; + + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LKDGLEKOFGN valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LKDGLEKOFGN forNumber(int value) { + switch (value) { + case 0: return NONE; + case 2695: return PEPPOHPHJOJ; + case 1: return NNBKOLMPOEA; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LKDGLEKOFGN> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LKDGLEKOFGN findValueByNumber(int number) { + return LKDGLEKOFGN.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (index == -1) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify.getDescriptor().getEnumTypes().get(0); + } + + private static final LKDGLEKOFGN[] VALUES = getStaticValuesArray(); + private static LKDGLEKOFGN[] getStaticValuesArray() { + return new LKDGLEKOFGN[] { + NONE, PEPPOHPHJOJ, DCDNILFDFLB, NNBKOLMPOEA, + }; + } + public static LKDGLEKOFGN valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private LKDGLEKOFGN(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:AchievementUpdateNotify.LKDGLEKOFGN) + } + + public static final int ACHIEVEMENTLIST_FIELD_NUMBER = 4; + private java.util.List achievementList_; + /** + * repeated .Achievement achievementList = 4; + */ + @java.lang.Override + public java.util.List getAchievementListList() { + return achievementList_; + } + /** + * repeated .Achievement achievementList = 4; + */ + @java.lang.Override + public java.util.List + getAchievementListOrBuilderList() { + return achievementList_; + } + /** + * repeated .Achievement achievementList = 4; + */ + @java.lang.Override + public int getAchievementListCount() { + return achievementList_.size(); + } + /** + * repeated .Achievement achievementList = 4; + */ + @java.lang.Override + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement getAchievementList(int index) { + return achievementList_.get(index); + } + /** + * repeated .Achievement achievementList = 4; + */ + @java.lang.Override + public emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder getAchievementListOrBuilder( + int index) { + return achievementList_.get(index); + } + + 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 { + for (int i = 0; i < achievementList_.size(); i++) { + output.writeMessage(4, achievementList_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < achievementList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, achievementList_.get(i)); + } + 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.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify)) { + return super.equals(obj); + } + emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify other = (emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify) obj; + + if (!getAchievementListList() + .equals(other.getAchievementListList())) 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(); + if (getAchievementListCount() > 0) { + hash = (37 * hash) + ACHIEVEMENTLIST_FIELD_NUMBER; + hash = (53 * hash) + getAchievementListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify 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.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify 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.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify 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.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify 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.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify 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.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify 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; + } + /** + * Protobuf type {@code AchievementUpdateNotify} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:AchievementUpdateNotify) + emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotifyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.internal_static_AchievementUpdateNotify_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.internal_static_AchievementUpdateNotify_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify.class, emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify.Builder.class); + } + + // Construct using emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAchievementListFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (achievementListBuilder_ == null) { + achievementList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + achievementListBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.internal_static_AchievementUpdateNotify_descriptor; + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify getDefaultInstanceForType() { + return emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify.getDefaultInstance(); + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify build() { + emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify buildPartial() { + emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify result = new emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify(this); + int from_bitField0_ = bitField0_; + if (achievementListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + achievementList_ = java.util.Collections.unmodifiableList(achievementList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.achievementList_ = achievementList_; + } else { + result.achievementList_ = achievementListBuilder_.build(); + } + 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.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify) { + return mergeFrom((emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify other) { + if (other == emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify.getDefaultInstance()) return this; + if (achievementListBuilder_ == null) { + if (!other.achievementList_.isEmpty()) { + if (achievementList_.isEmpty()) { + achievementList_ = other.achievementList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAchievementListIsMutable(); + achievementList_.addAll(other.achievementList_); + } + onChanged(); + } + } else { + if (!other.achievementList_.isEmpty()) { + if (achievementListBuilder_.isEmpty()) { + achievementListBuilder_.dispose(); + achievementListBuilder_ = null; + achievementList_ = other.achievementList_; + bitField0_ = (bitField0_ & ~0x00000001); + achievementListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAchievementListFieldBuilder() : null; + } else { + achievementListBuilder_.addAllMessages(other.achievementList_); + } + } + } + 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.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List achievementList_ = + java.util.Collections.emptyList(); + private void ensureAchievementListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + achievementList_ = new java.util.ArrayList(achievementList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.AchievementOuterClass.Achievement, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder, emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder> achievementListBuilder_; + + /** + * repeated .Achievement achievementList = 4; + */ + public java.util.List getAchievementListList() { + if (achievementListBuilder_ == null) { + return java.util.Collections.unmodifiableList(achievementList_); + } else { + return achievementListBuilder_.getMessageList(); + } + } + /** + * repeated .Achievement achievementList = 4; + */ + public int getAchievementListCount() { + if (achievementListBuilder_ == null) { + return achievementList_.size(); + } else { + return achievementListBuilder_.getCount(); + } + } + /** + * repeated .Achievement achievementList = 4; + */ + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement getAchievementList(int index) { + if (achievementListBuilder_ == null) { + return achievementList_.get(index); + } else { + return achievementListBuilder_.getMessage(index); + } + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder setAchievementList( + int index, emu.grasscutter.net.proto.AchievementOuterClass.Achievement value) { + if (achievementListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAchievementListIsMutable(); + achievementList_.set(index, value); + onChanged(); + } else { + achievementListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder setAchievementList( + int index, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder builderForValue) { + if (achievementListBuilder_ == null) { + ensureAchievementListIsMutable(); + achievementList_.set(index, builderForValue.build()); + onChanged(); + } else { + achievementListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder addAchievementList(emu.grasscutter.net.proto.AchievementOuterClass.Achievement value) { + if (achievementListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAchievementListIsMutable(); + achievementList_.add(value); + onChanged(); + } else { + achievementListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder addAchievementList( + int index, emu.grasscutter.net.proto.AchievementOuterClass.Achievement value) { + if (achievementListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAchievementListIsMutable(); + achievementList_.add(index, value); + onChanged(); + } else { + achievementListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder addAchievementList( + emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder builderForValue) { + if (achievementListBuilder_ == null) { + ensureAchievementListIsMutable(); + achievementList_.add(builderForValue.build()); + onChanged(); + } else { + achievementListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder addAchievementList( + int index, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder builderForValue) { + if (achievementListBuilder_ == null) { + ensureAchievementListIsMutable(); + achievementList_.add(index, builderForValue.build()); + onChanged(); + } else { + achievementListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder addAllAchievementList( + java.lang.Iterable values) { + if (achievementListBuilder_ == null) { + ensureAchievementListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, achievementList_); + onChanged(); + } else { + achievementListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder clearAchievementList() { + if (achievementListBuilder_ == null) { + achievementList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + achievementListBuilder_.clear(); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public Builder removeAchievementList(int index) { + if (achievementListBuilder_ == null) { + ensureAchievementListIsMutable(); + achievementList_.remove(index); + onChanged(); + } else { + achievementListBuilder_.remove(index); + } + return this; + } + /** + * repeated .Achievement achievementList = 4; + */ + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder getAchievementListBuilder( + int index) { + return getAchievementListFieldBuilder().getBuilder(index); + } + /** + * repeated .Achievement achievementList = 4; + */ + public emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder getAchievementListOrBuilder( + int index) { + if (achievementListBuilder_ == null) { + return achievementList_.get(index); } else { + return achievementListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Achievement achievementList = 4; + */ + public java.util.List + getAchievementListOrBuilderList() { + if (achievementListBuilder_ != null) { + return achievementListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(achievementList_); + } + } + /** + * repeated .Achievement achievementList = 4; + */ + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder addAchievementListBuilder() { + return getAchievementListFieldBuilder().addBuilder( + emu.grasscutter.net.proto.AchievementOuterClass.Achievement.getDefaultInstance()); + } + /** + * repeated .Achievement achievementList = 4; + */ + public emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder addAchievementListBuilder( + int index) { + return getAchievementListFieldBuilder().addBuilder( + index, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.getDefaultInstance()); + } + /** + * repeated .Achievement achievementList = 4; + */ + public java.util.List + getAchievementListBuilderList() { + return getAchievementListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.AchievementOuterClass.Achievement, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder, emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder> + getAchievementListFieldBuilder() { + if (achievementListBuilder_ == null) { + achievementListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.AchievementOuterClass.Achievement, emu.grasscutter.net.proto.AchievementOuterClass.Achievement.Builder, emu.grasscutter.net.proto.AchievementOuterClass.AchievementOrBuilder>( + achievementList_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + achievementList_ = null; + } + return achievementListBuilder_; + } + @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:AchievementUpdateNotify) + } + + // @@protoc_insertion_point(class_scope:AchievementUpdateNotify) + private static final emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify(); + } + + public static emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AchievementUpdateNotify parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AchievementUpdateNotify(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass.AchievementUpdateNotify getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_AchievementUpdateNotify_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_AchievementUpdateNotify_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\035AchievementUpdateNotify.proto\032\021Achieve" + + "ment.proto\"\221\001\n\027AchievementUpdateNotify\022%" + + "\n\017achievementList\030\004 \003(\0132\014.Achievement\"O\n" + + "\013LKDGLEKOFGN\022\010\n\004NONE\020\000\022\020\n\013PEPPOHPHJOJ\020\207\025" + + "\022\017\n\013DCDNILFDFLB\020\000\022\017\n\013NNBKOLMPOEA\020\001\032\002\020\001B\033" + + "\n\031emu.grasscutter.net.protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + emu.grasscutter.net.proto.AchievementOuterClass.getDescriptor(), + }); + internal_static_AchievementUpdateNotify_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_AchievementUpdateNotify_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_AchievementUpdateNotify_descriptor, + new java.lang.String[] { "AchievementList", }); + emu.grasscutter.net.proto.AchievementOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/generated/main/java/emu/grasscutter/net/proto/StatusOuterClass.java b/src/generated/main/java/emu/grasscutter/net/proto/StatusOuterClass.java new file mode 100644 index 000000000..5eea5ca03 --- /dev/null +++ b/src/generated/main/java/emu/grasscutter/net/proto/StatusOuterClass.java @@ -0,0 +1,164 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Status.proto + +package emu.grasscutter.net.proto; + +public final class StatusOuterClass { + private StatusOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code Status} + */ + public enum Status + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STATUS_INVALID = 0; + */ + STATUS_INVALID(0), + /** + * STATUS_UNFINISHED = 1; + */ + STATUS_UNFINISHED(1), + /** + * STATUS_FINISHED = 2; + */ + STATUS_FINISHED(2), + /** + * STATUS_REWARD_TAKEN = 3; + */ + STATUS_REWARD_TAKEN(3), + UNRECOGNIZED(-1), + ; + + /** + * STATUS_INVALID = 0; + */ + public static final int STATUS_INVALID_VALUE = 0; + /** + * STATUS_UNFINISHED = 1; + */ + public static final int STATUS_UNFINISHED_VALUE = 1; + /** + * STATUS_FINISHED = 2; + */ + public static final int STATUS_FINISHED_VALUE = 2; + /** + * STATUS_REWARD_TAKEN = 3; + */ + public static final int STATUS_REWARD_TAKEN_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Status valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Status forNumber(int value) { + switch (value) { + case 0: return STATUS_INVALID; + case 1: return STATUS_UNFINISHED; + case 2: return STATUS_FINISHED; + case 3: return STATUS_REWARD_TAKEN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Status> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Status findValueByNumber(int number) { + return Status.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return emu.grasscutter.net.proto.StatusOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final Status[] VALUES = values(); + + public static Status valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Status(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:Status) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\014Status.proto*a\n\006Status\022\022\n\016STATUS_INVAL" + + "ID\020\000\022\025\n\021STATUS_UNFINISHED\020\001\022\023\n\017STATUS_FI" + + "NISHED\020\002\022\027\n\023STATUS_REWARD_TAKEN\020\003B\033\n\031emu" + + ".grasscutter.net.protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/generated/main/java/emu/grasscutter/net/proto/TakeAchievementGoalRewardReqOuterClass.java b/src/generated/main/java/emu/grasscutter/net/proto/TakeAchievementGoalRewardReqOuterClass.java new file mode 100644 index 000000000..ea8925ed1 --- /dev/null +++ b/src/generated/main/java/emu/grasscutter/net/proto/TakeAchievementGoalRewardReqOuterClass.java @@ -0,0 +1,805 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TakeAchievementGoalRewardReq.proto + +package emu.grasscutter.net.proto; + +public final class TakeAchievementGoalRewardReqOuterClass { + private TakeAchievementGoalRewardReqOuterClass() {} + 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 TakeAchievementGoalRewardReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:TakeAchievementGoalRewardReq) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated uint32 idList = 7; + * @return A list containing the idList. + */ + java.util.List getIdListList(); + /** + * repeated uint32 idList = 7; + * @return The count of idList. + */ + int getIdListCount(); + /** + * repeated uint32 idList = 7; + * @param index The index of the element to return. + * @return The idList at the given index. + */ + int getIdList(int index); + } + /** + * Protobuf type {@code TakeAchievementGoalRewardReq} + */ + public static final class TakeAchievementGoalRewardReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TakeAchievementGoalRewardReq) + TakeAchievementGoalRewardReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use TakeAchievementGoalRewardReq.newBuilder() to construct. + private TakeAchievementGoalRewardReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TakeAchievementGoalRewardReq() { + idList_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TakeAchievementGoalRewardReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TakeAchievementGoalRewardReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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 56: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + idList_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + idList_.addInt(input.readUInt32()); + break; + } + case 58: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + idList_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + idList_.addInt(input.readUInt32()); + } + input.popLimit(limit); + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + idList_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.internal_static_TakeAchievementGoalRewardReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.internal_static_TakeAchievementGoalRewardReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq.class, emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq.Builder.class); + } + + /** + * Protobuf enum {@code TakeAchievementGoalRewardReq.DOKFANBCKNJ} + */ + public enum DOKFANBCKNJ + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NONE = 0; + */ + NONE(0, 0), + /** + * PEPPOHPHJOJ = 2669; + */ + PEPPOHPHJOJ(1, 2669), + /** + * NNBKOLMPOEA = 1; + */ + NNBKOLMPOEA(3, 1), + UNRECOGNIZED(-1, -1), + ; + + /** + * DCDNILFDFLB = 0; + */ + public static final DOKFANBCKNJ DCDNILFDFLB = NONE; + /** + * EAJIABGAOCI = 1; + */ + public static final DOKFANBCKNJ EAJIABGAOCI = NNBKOLMPOEA; + /** + * NONE = 0; + */ + public static final int NONE_VALUE = 0; + /** + * PEPPOHPHJOJ = 2669; + */ + public static final int PEPPOHPHJOJ_VALUE = 2669; + /** + * DCDNILFDFLB = 0; + */ + public static final int DCDNILFDFLB_VALUE = 0; + /** + * NNBKOLMPOEA = 1; + */ + public static final int NNBKOLMPOEA_VALUE = 1; + /** + * EAJIABGAOCI = 1; + */ + public static final int EAJIABGAOCI_VALUE = 1; + + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DOKFANBCKNJ valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DOKFANBCKNJ forNumber(int value) { + switch (value) { + case 0: return NONE; + case 2669: return PEPPOHPHJOJ; + case 1: return NNBKOLMPOEA; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DOKFANBCKNJ> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DOKFANBCKNJ findValueByNumber(int number) { + return DOKFANBCKNJ.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (index == -1) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq.getDescriptor().getEnumTypes().get(0); + } + + private static final DOKFANBCKNJ[] VALUES = getStaticValuesArray(); + private static DOKFANBCKNJ[] getStaticValuesArray() { + return new DOKFANBCKNJ[] { + NONE, PEPPOHPHJOJ, DCDNILFDFLB, NNBKOLMPOEA, EAJIABGAOCI, + }; + } + public static DOKFANBCKNJ valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private DOKFANBCKNJ(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:TakeAchievementGoalRewardReq.DOKFANBCKNJ) + } + + public static final int IDLIST_FIELD_NUMBER = 7; + private com.google.protobuf.Internal.IntList idList_; + /** + * repeated uint32 idList = 7; + * @return A list containing the idList. + */ + @java.lang.Override + public java.util.List + getIdListList() { + return idList_; + } + /** + * repeated uint32 idList = 7; + * @return The count of idList. + */ + public int getIdListCount() { + return idList_.size(); + } + /** + * repeated uint32 idList = 7; + * @param index The index of the element to return. + * @return The idList at the given index. + */ + public int getIdList(int index) { + return idList_.getInt(index); + } + private int idListMemoizedSerializedSize = -1; + + 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 { + getSerializedSize(); + if (getIdListList().size() > 0) { + output.writeUInt32NoTag(58); + output.writeUInt32NoTag(idListMemoizedSerializedSize); + } + for (int i = 0; i < idList_.size(); i++) { + output.writeUInt32NoTag(idList_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < idList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(idList_.getInt(i)); + } + size += dataSize; + if (!getIdListList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + idListMemoizedSerializedSize = dataSize; + } + 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.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq)) { + return super.equals(obj); + } + emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq other = (emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq) obj; + + if (!getIdListList() + .equals(other.getIdListList())) 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(); + if (getIdListCount() > 0) { + hash = (37 * hash) + IDLIST_FIELD_NUMBER; + hash = (53 * hash) + getIdListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq 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.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq 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.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq 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.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq 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.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq 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.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq 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; + } + /** + * Protobuf type {@code TakeAchievementGoalRewardReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TakeAchievementGoalRewardReq) + emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.internal_static_TakeAchievementGoalRewardReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.internal_static_TakeAchievementGoalRewardReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq.class, emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq.Builder.class); + } + + // Construct using emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq.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(); + idList_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.internal_static_TakeAchievementGoalRewardReq_descriptor; + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq getDefaultInstanceForType() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq.getDefaultInstance(); + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq build() { + emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq buildPartial() { + emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq result = new emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + idList_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.idList_ = idList_; + 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.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq) { + return mergeFrom((emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq other) { + if (other == emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq.getDefaultInstance()) return this; + if (!other.idList_.isEmpty()) { + if (idList_.isEmpty()) { + idList_ = other.idList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdListIsMutable(); + idList_.addAll(other.idList_); + } + onChanged(); + } + 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.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.IntList idList_ = emptyIntList(); + private void ensureIdListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + idList_ = mutableCopy(idList_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated uint32 idList = 7; + * @return A list containing the idList. + */ + public java.util.List + getIdListList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(idList_) : idList_; + } + /** + * repeated uint32 idList = 7; + * @return The count of idList. + */ + public int getIdListCount() { + return idList_.size(); + } + /** + * repeated uint32 idList = 7; + * @param index The index of the element to return. + * @return The idList at the given index. + */ + public int getIdList(int index) { + return idList_.getInt(index); + } + /** + * repeated uint32 idList = 7; + * @param index The index to set the value at. + * @param value The idList to set. + * @return This builder for chaining. + */ + public Builder setIdList( + int index, int value) { + ensureIdListIsMutable(); + idList_.setInt(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 idList = 7; + * @param value The idList to add. + * @return This builder for chaining. + */ + public Builder addIdList(int value) { + ensureIdListIsMutable(); + idList_.addInt(value); + onChanged(); + return this; + } + /** + * repeated uint32 idList = 7; + * @param values The idList to add. + * @return This builder for chaining. + */ + public Builder addAllIdList( + java.lang.Iterable values) { + ensureIdListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, idList_); + onChanged(); + return this; + } + /** + * repeated uint32 idList = 7; + * @return This builder for chaining. + */ + public Builder clearIdList() { + idList_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + 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:TakeAchievementGoalRewardReq) + } + + // @@protoc_insertion_point(class_scope:TakeAchievementGoalRewardReq) + private static final emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq(); + } + + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TakeAchievementGoalRewardReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TakeAchievementGoalRewardReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TakeAchievementGoalRewardReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TakeAchievementGoalRewardReq_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\"TakeAchievementGoalRewardReq.proto\"\220\001\n" + + "\034TakeAchievementGoalRewardReq\022\016\n\006idList\030" + + "\007 \003(\r\"`\n\013DOKFANBCKNJ\022\010\n\004NONE\020\000\022\020\n\013PEPPOH" + + "PHJOJ\020\355\024\022\017\n\013DCDNILFDFLB\020\000\022\017\n\013NNBKOLMPOEA" + + "\020\001\022\017\n\013EAJIABGAOCI\020\001\032\002\020\001B\033\n\031emu.grasscutt" + + "er.net.protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_TakeAchievementGoalRewardReq_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TakeAchievementGoalRewardReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TakeAchievementGoalRewardReq_descriptor, + new java.lang.String[] { "IdList", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/generated/main/java/emu/grasscutter/net/proto/TakeAchievementGoalRewardRspOuterClass.java b/src/generated/main/java/emu/grasscutter/net/proto/TakeAchievementGoalRewardRspOuterClass.java new file mode 100644 index 000000000..801deeee8 --- /dev/null +++ b/src/generated/main/java/emu/grasscutter/net/proto/TakeAchievementGoalRewardRspOuterClass.java @@ -0,0 +1,1242 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TakeAchievementGoalRewardRsp.proto + +package emu.grasscutter.net.proto; + +public final class TakeAchievementGoalRewardRspOuterClass { + private TakeAchievementGoalRewardRspOuterClass() {} + 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 TakeAchievementGoalRewardRspOrBuilder extends + // @@protoc_insertion_point(interface_extends:TakeAchievementGoalRewardRsp) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 retcode = 14; + * @return The retcode. + */ + int getRetcode(); + + /** + * repeated .ItemParam itemList = 6; + */ + java.util.List + getItemListList(); + /** + * repeated .ItemParam itemList = 6; + */ + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam getItemList(int index); + /** + * repeated .ItemParam itemList = 6; + */ + int getItemListCount(); + /** + * repeated .ItemParam itemList = 6; + */ + java.util.List + getItemListOrBuilderList(); + /** + * repeated .ItemParam itemList = 6; + */ + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder getItemListOrBuilder( + int index); + + /** + * repeated uint32 idList = 15; + * @return A list containing the idList. + */ + java.util.List getIdListList(); + /** + * repeated uint32 idList = 15; + * @return The count of idList. + */ + int getIdListCount(); + /** + * repeated uint32 idList = 15; + * @param index The index of the element to return. + * @return The idList at the given index. + */ + int getIdList(int index); + } + /** + * Protobuf type {@code TakeAchievementGoalRewardRsp} + */ + public static final class TakeAchievementGoalRewardRsp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TakeAchievementGoalRewardRsp) + TakeAchievementGoalRewardRspOrBuilder { + private static final long serialVersionUID = 0L; + // Use TakeAchievementGoalRewardRsp.newBuilder() to construct. + private TakeAchievementGoalRewardRsp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TakeAchievementGoalRewardRsp() { + itemList_ = java.util.Collections.emptyList(); + idList_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TakeAchievementGoalRewardRsp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TakeAchievementGoalRewardRsp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + itemList_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + itemList_.add( + input.readMessage(emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.parser(), extensionRegistry)); + break; + } + case 112: { + + retcode_ = input.readInt32(); + break; + } + case 120: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + idList_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + idList_.addInt(input.readUInt32()); + break; + } + case 122: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + idList_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + idList_.addInt(input.readUInt32()); + } + input.popLimit(limit); + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + itemList_ = java.util.Collections.unmodifiableList(itemList_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + idList_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.internal_static_TakeAchievementGoalRewardRsp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.internal_static_TakeAchievementGoalRewardRsp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp.class, emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp.Builder.class); + } + + /** + * Protobuf enum {@code TakeAchievementGoalRewardRsp.KGKAJONLMDD} + */ + public enum KGKAJONLMDD + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NONE = 0; + */ + NONE(0, 0), + /** + * PEPPOHPHJOJ = 2693; + */ + PEPPOHPHJOJ(1, 2693), + /** + * NNBKOLMPOEA = 1; + */ + NNBKOLMPOEA(3, 1), + UNRECOGNIZED(-1, -1), + ; + + /** + * DCDNILFDFLB = 0; + */ + public static final KGKAJONLMDD DCDNILFDFLB = NONE; + /** + * NONE = 0; + */ + public static final int NONE_VALUE = 0; + /** + * PEPPOHPHJOJ = 2693; + */ + public static final int PEPPOHPHJOJ_VALUE = 2693; + /** + * DCDNILFDFLB = 0; + */ + public static final int DCDNILFDFLB_VALUE = 0; + /** + * NNBKOLMPOEA = 1; + */ + public static final int NNBKOLMPOEA_VALUE = 1; + + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KGKAJONLMDD valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static KGKAJONLMDD forNumber(int value) { + switch (value) { + case 0: return NONE; + case 2693: return PEPPOHPHJOJ; + case 1: return NNBKOLMPOEA; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + KGKAJONLMDD> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public KGKAJONLMDD findValueByNumber(int number) { + return KGKAJONLMDD.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (index == -1) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp.getDescriptor().getEnumTypes().get(0); + } + + private static final KGKAJONLMDD[] VALUES = getStaticValuesArray(); + private static KGKAJONLMDD[] getStaticValuesArray() { + return new KGKAJONLMDD[] { + NONE, PEPPOHPHJOJ, DCDNILFDFLB, NNBKOLMPOEA, + }; + } + public static KGKAJONLMDD valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private KGKAJONLMDD(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:TakeAchievementGoalRewardRsp.KGKAJONLMDD) + } + + public static final int RETCODE_FIELD_NUMBER = 14; + private int retcode_; + /** + * int32 retcode = 14; + * @return The retcode. + */ + @java.lang.Override + public int getRetcode() { + return retcode_; + } + + public static final int ITEMLIST_FIELD_NUMBER = 6; + private java.util.List itemList_; + /** + * repeated .ItemParam itemList = 6; + */ + @java.lang.Override + public java.util.List getItemListList() { + return itemList_; + } + /** + * repeated .ItemParam itemList = 6; + */ + @java.lang.Override + public java.util.List + getItemListOrBuilderList() { + return itemList_; + } + /** + * repeated .ItemParam itemList = 6; + */ + @java.lang.Override + public int getItemListCount() { + return itemList_.size(); + } + /** + * repeated .ItemParam itemList = 6; + */ + @java.lang.Override + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam getItemList(int index) { + return itemList_.get(index); + } + /** + * repeated .ItemParam itemList = 6; + */ + @java.lang.Override + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder getItemListOrBuilder( + int index) { + return itemList_.get(index); + } + + public static final int IDLIST_FIELD_NUMBER = 15; + private com.google.protobuf.Internal.IntList idList_; + /** + * repeated uint32 idList = 15; + * @return A list containing the idList. + */ + @java.lang.Override + public java.util.List + getIdListList() { + return idList_; + } + /** + * repeated uint32 idList = 15; + * @return The count of idList. + */ + public int getIdListCount() { + return idList_.size(); + } + /** + * repeated uint32 idList = 15; + * @param index The index of the element to return. + * @return The idList at the given index. + */ + public int getIdList(int index) { + return idList_.getInt(index); + } + private int idListMemoizedSerializedSize = -1; + + 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 { + getSerializedSize(); + for (int i = 0; i < itemList_.size(); i++) { + output.writeMessage(6, itemList_.get(i)); + } + if (retcode_ != 0) { + output.writeInt32(14, retcode_); + } + if (getIdListList().size() > 0) { + output.writeUInt32NoTag(122); + output.writeUInt32NoTag(idListMemoizedSerializedSize); + } + for (int i = 0; i < idList_.size(); i++) { + output.writeUInt32NoTag(idList_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < itemList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, itemList_.get(i)); + } + if (retcode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(14, retcode_); + } + { + int dataSize = 0; + for (int i = 0; i < idList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(idList_.getInt(i)); + } + size += dataSize; + if (!getIdListList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + idListMemoizedSerializedSize = dataSize; + } + 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.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp)) { + return super.equals(obj); + } + emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp other = (emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp) obj; + + if (getRetcode() + != other.getRetcode()) return false; + if (!getItemListList() + .equals(other.getItemListList())) return false; + if (!getIdListList() + .equals(other.getIdListList())) 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(); + if (getItemListCount() > 0) { + hash = (37 * hash) + ITEMLIST_FIELD_NUMBER; + hash = (53 * hash) + getItemListList().hashCode(); + } + if (getIdListCount() > 0) { + hash = (37 * hash) + IDLIST_FIELD_NUMBER; + hash = (53 * hash) + getIdListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp 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.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp 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.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp 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.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp 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.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp 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.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp 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; + } + /** + * Protobuf type {@code TakeAchievementGoalRewardRsp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TakeAchievementGoalRewardRsp) + emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRspOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.internal_static_TakeAchievementGoalRewardRsp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.internal_static_TakeAchievementGoalRewardRsp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp.class, emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp.Builder.class); + } + + // Construct using emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getItemListFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + retcode_ = 0; + + if (itemListBuilder_ == null) { + itemList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + itemListBuilder_.clear(); + } + idList_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.internal_static_TakeAchievementGoalRewardRsp_descriptor; + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp getDefaultInstanceForType() { + return emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp.getDefaultInstance(); + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp build() { + emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp buildPartial() { + emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp result = new emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp(this); + int from_bitField0_ = bitField0_; + result.retcode_ = retcode_; + if (itemListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + itemList_ = java.util.Collections.unmodifiableList(itemList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.itemList_ = itemList_; + } else { + result.itemList_ = itemListBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + idList_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.idList_ = idList_; + 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.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp) { + return mergeFrom((emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp other) { + if (other == emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp.getDefaultInstance()) return this; + if (other.getRetcode() != 0) { + setRetcode(other.getRetcode()); + } + if (itemListBuilder_ == null) { + if (!other.itemList_.isEmpty()) { + if (itemList_.isEmpty()) { + itemList_ = other.itemList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureItemListIsMutable(); + itemList_.addAll(other.itemList_); + } + onChanged(); + } + } else { + if (!other.itemList_.isEmpty()) { + if (itemListBuilder_.isEmpty()) { + itemListBuilder_.dispose(); + itemListBuilder_ = null; + itemList_ = other.itemList_; + bitField0_ = (bitField0_ & ~0x00000001); + itemListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getItemListFieldBuilder() : null; + } else { + itemListBuilder_.addAllMessages(other.itemList_); + } + } + } + if (!other.idList_.isEmpty()) { + if (idList_.isEmpty()) { + idList_ = other.idList_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIdListIsMutable(); + idList_.addAll(other.idList_); + } + onChanged(); + } + 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.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int retcode_ ; + /** + * int32 retcode = 14; + * @return The retcode. + */ + @java.lang.Override + public int getRetcode() { + return retcode_; + } + /** + * int32 retcode = 14; + * @param value The retcode to set. + * @return This builder for chaining. + */ + public Builder setRetcode(int value) { + + retcode_ = value; + onChanged(); + return this; + } + /** + * int32 retcode = 14; + * @return This builder for chaining. + */ + public Builder clearRetcode() { + + retcode_ = 0; + onChanged(); + return this; + } + + private java.util.List itemList_ = + java.util.Collections.emptyList(); + private void ensureItemListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + itemList_ = new java.util.ArrayList(itemList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder> itemListBuilder_; + + /** + * repeated .ItemParam itemList = 6; + */ + public java.util.List getItemListList() { + if (itemListBuilder_ == null) { + return java.util.Collections.unmodifiableList(itemList_); + } else { + return itemListBuilder_.getMessageList(); + } + } + /** + * repeated .ItemParam itemList = 6; + */ + public int getItemListCount() { + if (itemListBuilder_ == null) { + return itemList_.size(); + } else { + return itemListBuilder_.getCount(); + } + } + /** + * repeated .ItemParam itemList = 6; + */ + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam getItemList(int index) { + if (itemListBuilder_ == null) { + return itemList_.get(index); + } else { + return itemListBuilder_.getMessage(index); + } + } + /** + * repeated .ItemParam itemList = 6; + */ + public Builder setItemList( + int index, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam value) { + if (itemListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemListIsMutable(); + itemList_.set(index, value); + onChanged(); + } else { + itemListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .ItemParam itemList = 6; + */ + public Builder setItemList( + int index, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder builderForValue) { + if (itemListBuilder_ == null) { + ensureItemListIsMutable(); + itemList_.set(index, builderForValue.build()); + onChanged(); + } else { + itemListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ItemParam itemList = 6; + */ + public Builder addItemList(emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam value) { + if (itemListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemListIsMutable(); + itemList_.add(value); + onChanged(); + } else { + itemListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .ItemParam itemList = 6; + */ + public Builder addItemList( + int index, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam value) { + if (itemListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemListIsMutable(); + itemList_.add(index, value); + onChanged(); + } else { + itemListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .ItemParam itemList = 6; + */ + public Builder addItemList( + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder builderForValue) { + if (itemListBuilder_ == null) { + ensureItemListIsMutable(); + itemList_.add(builderForValue.build()); + onChanged(); + } else { + itemListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .ItemParam itemList = 6; + */ + public Builder addItemList( + int index, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder builderForValue) { + if (itemListBuilder_ == null) { + ensureItemListIsMutable(); + itemList_.add(index, builderForValue.build()); + onChanged(); + } else { + itemListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ItemParam itemList = 6; + */ + public Builder addAllItemList( + java.lang.Iterable values) { + if (itemListBuilder_ == null) { + ensureItemListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, itemList_); + onChanged(); + } else { + itemListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .ItemParam itemList = 6; + */ + public Builder clearItemList() { + if (itemListBuilder_ == null) { + itemList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + itemListBuilder_.clear(); + } + return this; + } + /** + * repeated .ItemParam itemList = 6; + */ + public Builder removeItemList(int index) { + if (itemListBuilder_ == null) { + ensureItemListIsMutable(); + itemList_.remove(index); + onChanged(); + } else { + itemListBuilder_.remove(index); + } + return this; + } + /** + * repeated .ItemParam itemList = 6; + */ + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder getItemListBuilder( + int index) { + return getItemListFieldBuilder().getBuilder(index); + } + /** + * repeated .ItemParam itemList = 6; + */ + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder getItemListOrBuilder( + int index) { + if (itemListBuilder_ == null) { + return itemList_.get(index); } else { + return itemListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .ItemParam itemList = 6; + */ + public java.util.List + getItemListOrBuilderList() { + if (itemListBuilder_ != null) { + return itemListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(itemList_); + } + } + /** + * repeated .ItemParam itemList = 6; + */ + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder addItemListBuilder() { + return getItemListFieldBuilder().addBuilder( + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.getDefaultInstance()); + } + /** + * repeated .ItemParam itemList = 6; + */ + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder addItemListBuilder( + int index) { + return getItemListFieldBuilder().addBuilder( + index, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.getDefaultInstance()); + } + /** + * repeated .ItemParam itemList = 6; + */ + public java.util.List + getItemListBuilderList() { + return getItemListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder> + getItemListFieldBuilder() { + if (itemListBuilder_ == null) { + itemListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder>( + itemList_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + itemList_ = null; + } + return itemListBuilder_; + } + + private com.google.protobuf.Internal.IntList idList_ = emptyIntList(); + private void ensureIdListIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + idList_ = mutableCopy(idList_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated uint32 idList = 15; + * @return A list containing the idList. + */ + public java.util.List + getIdListList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(idList_) : idList_; + } + /** + * repeated uint32 idList = 15; + * @return The count of idList. + */ + public int getIdListCount() { + return idList_.size(); + } + /** + * repeated uint32 idList = 15; + * @param index The index of the element to return. + * @return The idList at the given index. + */ + public int getIdList(int index) { + return idList_.getInt(index); + } + /** + * repeated uint32 idList = 15; + * @param index The index to set the value at. + * @param value The idList to set. + * @return This builder for chaining. + */ + public Builder setIdList( + int index, int value) { + ensureIdListIsMutable(); + idList_.setInt(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 idList = 15; + * @param value The idList to add. + * @return This builder for chaining. + */ + public Builder addIdList(int value) { + ensureIdListIsMutable(); + idList_.addInt(value); + onChanged(); + return this; + } + /** + * repeated uint32 idList = 15; + * @param values The idList to add. + * @return This builder for chaining. + */ + public Builder addAllIdList( + java.lang.Iterable values) { + ensureIdListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, idList_); + onChanged(); + return this; + } + /** + * repeated uint32 idList = 15; + * @return This builder for chaining. + */ + public Builder clearIdList() { + idList_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + 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:TakeAchievementGoalRewardRsp) + } + + // @@protoc_insertion_point(class_scope:TakeAchievementGoalRewardRsp) + private static final emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp(); + } + + public static emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TakeAchievementGoalRewardRsp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TakeAchievementGoalRewardRsp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TakeAchievementGoalRewardRsp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TakeAchievementGoalRewardRsp_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\"TakeAchievementGoalRewardRsp.proto\032\017It" + + "emParam.proto\"\256\001\n\034TakeAchievementGoalRew" + + "ardRsp\022\017\n\007retcode\030\016 \001(\005\022\034\n\010itemList\030\006 \003(" + + "\0132\n.ItemParam\022\016\n\006idList\030\017 \003(\r\"O\n\013KGKAJON" + + "LMDD\022\010\n\004NONE\020\000\022\020\n\013PEPPOHPHJOJ\020\205\025\022\017\n\013DCDN" + + "ILFDFLB\020\000\022\017\n\013NNBKOLMPOEA\020\001\032\002\020\001B\033\n\031emu.gr" + + "asscutter.net.protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + emu.grasscutter.net.proto.ItemParamOuterClass.getDescriptor(), + }); + internal_static_TakeAchievementGoalRewardRsp_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TakeAchievementGoalRewardRsp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TakeAchievementGoalRewardRsp_descriptor, + new java.lang.String[] { "Retcode", "ItemList", "IdList", }); + emu.grasscutter.net.proto.ItemParamOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/generated/main/java/emu/grasscutter/net/proto/TakeAchievementRewardRspOuterClass.java b/src/generated/main/java/emu/grasscutter/net/proto/TakeAchievementRewardRspOuterClass.java new file mode 100644 index 000000000..2824c080b --- /dev/null +++ b/src/generated/main/java/emu/grasscutter/net/proto/TakeAchievementRewardRspOuterClass.java @@ -0,0 +1,1242 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TakeAchievementRewardRsp.proto + +package emu.grasscutter.net.proto; + +public final class TakeAchievementRewardRspOuterClass { + private TakeAchievementRewardRspOuterClass() {} + 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 TakeAchievementRewardRspOrBuilder extends + // @@protoc_insertion_point(interface_extends:TakeAchievementRewardRsp) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .ItemParam itemList = 7; + */ + java.util.List + getItemListList(); + /** + * repeated .ItemParam itemList = 7; + */ + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam getItemList(int index); + /** + * repeated .ItemParam itemList = 7; + */ + int getItemListCount(); + /** + * repeated .ItemParam itemList = 7; + */ + java.util.List + getItemListOrBuilderList(); + /** + * repeated .ItemParam itemList = 7; + */ + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder getItemListOrBuilder( + int index); + + /** + * repeated uint32 idList = 4; + * @return A list containing the idList. + */ + java.util.List getIdListList(); + /** + * repeated uint32 idList = 4; + * @return The count of idList. + */ + int getIdListCount(); + /** + * repeated uint32 idList = 4; + * @param index The index of the element to return. + * @return The idList at the given index. + */ + int getIdList(int index); + + /** + * int32 retcode = 13; + * @return The retcode. + */ + int getRetcode(); + } + /** + * Protobuf type {@code TakeAchievementRewardRsp} + */ + public static final class TakeAchievementRewardRsp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TakeAchievementRewardRsp) + TakeAchievementRewardRspOrBuilder { + private static final long serialVersionUID = 0L; + // Use TakeAchievementRewardRsp.newBuilder() to construct. + private TakeAchievementRewardRsp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TakeAchievementRewardRsp() { + itemList_ = java.util.Collections.emptyList(); + idList_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TakeAchievementRewardRsp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TakeAchievementRewardRsp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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 32: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + idList_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + idList_.addInt(input.readUInt32()); + break; + } + case 34: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + idList_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + idList_.addInt(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + itemList_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + itemList_.add( + input.readMessage(emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.parser(), extensionRegistry)); + break; + } + case 104: { + + retcode_ = input.readInt32(); + 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 { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + idList_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000001) != 0)) { + itemList_ = java.util.Collections.unmodifiableList(itemList_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.internal_static_TakeAchievementRewardRsp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.internal_static_TakeAchievementRewardRsp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp.class, emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp.Builder.class); + } + + /** + * Protobuf enum {@code TakeAchievementRewardRsp.LDLMKKMLOPI} + */ + public enum LDLMKKMLOPI + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NONE = 0; + */ + NONE(0, 0), + /** + * PEPPOHPHJOJ = 2691; + */ + PEPPOHPHJOJ(1, 2691), + /** + * NNBKOLMPOEA = 1; + */ + NNBKOLMPOEA(3, 1), + UNRECOGNIZED(-1, -1), + ; + + /** + * DCDNILFDFLB = 0; + */ + public static final LDLMKKMLOPI DCDNILFDFLB = NONE; + /** + * NONE = 0; + */ + public static final int NONE_VALUE = 0; + /** + * PEPPOHPHJOJ = 2691; + */ + public static final int PEPPOHPHJOJ_VALUE = 2691; + /** + * DCDNILFDFLB = 0; + */ + public static final int DCDNILFDFLB_VALUE = 0; + /** + * NNBKOLMPOEA = 1; + */ + public static final int NNBKOLMPOEA_VALUE = 1; + + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LDLMKKMLOPI valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LDLMKKMLOPI forNumber(int value) { + switch (value) { + case 0: return NONE; + case 2691: return PEPPOHPHJOJ; + case 1: return NNBKOLMPOEA; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LDLMKKMLOPI> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LDLMKKMLOPI findValueByNumber(int number) { + return LDLMKKMLOPI.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (index == -1) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp.getDescriptor().getEnumTypes().get(0); + } + + private static final LDLMKKMLOPI[] VALUES = getStaticValuesArray(); + private static LDLMKKMLOPI[] getStaticValuesArray() { + return new LDLMKKMLOPI[] { + NONE, PEPPOHPHJOJ, DCDNILFDFLB, NNBKOLMPOEA, + }; + } + public static LDLMKKMLOPI valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private LDLMKKMLOPI(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:TakeAchievementRewardRsp.LDLMKKMLOPI) + } + + public static final int ITEMLIST_FIELD_NUMBER = 7; + private java.util.List itemList_; + /** + * repeated .ItemParam itemList = 7; + */ + @java.lang.Override + public java.util.List getItemListList() { + return itemList_; + } + /** + * repeated .ItemParam itemList = 7; + */ + @java.lang.Override + public java.util.List + getItemListOrBuilderList() { + return itemList_; + } + /** + * repeated .ItemParam itemList = 7; + */ + @java.lang.Override + public int getItemListCount() { + return itemList_.size(); + } + /** + * repeated .ItemParam itemList = 7; + */ + @java.lang.Override + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam getItemList(int index) { + return itemList_.get(index); + } + /** + * repeated .ItemParam itemList = 7; + */ + @java.lang.Override + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder getItemListOrBuilder( + int index) { + return itemList_.get(index); + } + + public static final int IDLIST_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.IntList idList_; + /** + * repeated uint32 idList = 4; + * @return A list containing the idList. + */ + @java.lang.Override + public java.util.List + getIdListList() { + return idList_; + } + /** + * repeated uint32 idList = 4; + * @return The count of idList. + */ + public int getIdListCount() { + return idList_.size(); + } + /** + * repeated uint32 idList = 4; + * @param index The index of the element to return. + * @return The idList at the given index. + */ + public int getIdList(int index) { + return idList_.getInt(index); + } + private int idListMemoizedSerializedSize = -1; + + public static final int RETCODE_FIELD_NUMBER = 13; + private int retcode_; + /** + * int32 retcode = 13; + * @return The retcode. + */ + @java.lang.Override + public int getRetcode() { + return retcode_; + } + + 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 { + getSerializedSize(); + if (getIdListList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(idListMemoizedSerializedSize); + } + for (int i = 0; i < idList_.size(); i++) { + output.writeUInt32NoTag(idList_.getInt(i)); + } + for (int i = 0; i < itemList_.size(); i++) { + output.writeMessage(7, itemList_.get(i)); + } + if (retcode_ != 0) { + output.writeInt32(13, retcode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < idList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(idList_.getInt(i)); + } + size += dataSize; + if (!getIdListList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + idListMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < itemList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, itemList_.get(i)); + } + if (retcode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(13, retcode_); + } + 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.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp)) { + return super.equals(obj); + } + emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp other = (emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp) obj; + + if (!getItemListList() + .equals(other.getItemListList())) return false; + if (!getIdListList() + .equals(other.getIdListList())) return false; + if (getRetcode() + != other.getRetcode()) 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(); + if (getItemListCount() > 0) { + hash = (37 * hash) + ITEMLIST_FIELD_NUMBER; + hash = (53 * hash) + getItemListList().hashCode(); + } + if (getIdListCount() > 0) { + hash = (37 * hash) + IDLIST_FIELD_NUMBER; + hash = (53 * hash) + getIdListList().hashCode(); + } + hash = (37 * hash) + RETCODE_FIELD_NUMBER; + hash = (53 * hash) + getRetcode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp 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.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp 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.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp 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.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp 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.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp 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.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp 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; + } + /** + * Protobuf type {@code TakeAchievementRewardRsp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TakeAchievementRewardRsp) + emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRspOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.internal_static_TakeAchievementRewardRsp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.internal_static_TakeAchievementRewardRsp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp.class, emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp.Builder.class); + } + + // Construct using emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getItemListFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (itemListBuilder_ == null) { + itemList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + itemListBuilder_.clear(); + } + idList_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + retcode_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.internal_static_TakeAchievementRewardRsp_descriptor; + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp getDefaultInstanceForType() { + return emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp.getDefaultInstance(); + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp build() { + emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp buildPartial() { + emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp result = new emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp(this); + int from_bitField0_ = bitField0_; + if (itemListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + itemList_ = java.util.Collections.unmodifiableList(itemList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.itemList_ = itemList_; + } else { + result.itemList_ = itemListBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + idList_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.idList_ = idList_; + result.retcode_ = retcode_; + 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.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp) { + return mergeFrom((emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp other) { + if (other == emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp.getDefaultInstance()) return this; + if (itemListBuilder_ == null) { + if (!other.itemList_.isEmpty()) { + if (itemList_.isEmpty()) { + itemList_ = other.itemList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureItemListIsMutable(); + itemList_.addAll(other.itemList_); + } + onChanged(); + } + } else { + if (!other.itemList_.isEmpty()) { + if (itemListBuilder_.isEmpty()) { + itemListBuilder_.dispose(); + itemListBuilder_ = null; + itemList_ = other.itemList_; + bitField0_ = (bitField0_ & ~0x00000001); + itemListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getItemListFieldBuilder() : null; + } else { + itemListBuilder_.addAllMessages(other.itemList_); + } + } + } + if (!other.idList_.isEmpty()) { + if (idList_.isEmpty()) { + idList_ = other.idList_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIdListIsMutable(); + idList_.addAll(other.idList_); + } + onChanged(); + } + if (other.getRetcode() != 0) { + setRetcode(other.getRetcode()); + } + 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.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List itemList_ = + java.util.Collections.emptyList(); + private void ensureItemListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + itemList_ = new java.util.ArrayList(itemList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder> itemListBuilder_; + + /** + * repeated .ItemParam itemList = 7; + */ + public java.util.List getItemListList() { + if (itemListBuilder_ == null) { + return java.util.Collections.unmodifiableList(itemList_); + } else { + return itemListBuilder_.getMessageList(); + } + } + /** + * repeated .ItemParam itemList = 7; + */ + public int getItemListCount() { + if (itemListBuilder_ == null) { + return itemList_.size(); + } else { + return itemListBuilder_.getCount(); + } + } + /** + * repeated .ItemParam itemList = 7; + */ + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam getItemList(int index) { + if (itemListBuilder_ == null) { + return itemList_.get(index); + } else { + return itemListBuilder_.getMessage(index); + } + } + /** + * repeated .ItemParam itemList = 7; + */ + public Builder setItemList( + int index, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam value) { + if (itemListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemListIsMutable(); + itemList_.set(index, value); + onChanged(); + } else { + itemListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .ItemParam itemList = 7; + */ + public Builder setItemList( + int index, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder builderForValue) { + if (itemListBuilder_ == null) { + ensureItemListIsMutable(); + itemList_.set(index, builderForValue.build()); + onChanged(); + } else { + itemListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ItemParam itemList = 7; + */ + public Builder addItemList(emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam value) { + if (itemListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemListIsMutable(); + itemList_.add(value); + onChanged(); + } else { + itemListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .ItemParam itemList = 7; + */ + public Builder addItemList( + int index, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam value) { + if (itemListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemListIsMutable(); + itemList_.add(index, value); + onChanged(); + } else { + itemListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .ItemParam itemList = 7; + */ + public Builder addItemList( + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder builderForValue) { + if (itemListBuilder_ == null) { + ensureItemListIsMutable(); + itemList_.add(builderForValue.build()); + onChanged(); + } else { + itemListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .ItemParam itemList = 7; + */ + public Builder addItemList( + int index, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder builderForValue) { + if (itemListBuilder_ == null) { + ensureItemListIsMutable(); + itemList_.add(index, builderForValue.build()); + onChanged(); + } else { + itemListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ItemParam itemList = 7; + */ + public Builder addAllItemList( + java.lang.Iterable values) { + if (itemListBuilder_ == null) { + ensureItemListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, itemList_); + onChanged(); + } else { + itemListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .ItemParam itemList = 7; + */ + public Builder clearItemList() { + if (itemListBuilder_ == null) { + itemList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + itemListBuilder_.clear(); + } + return this; + } + /** + * repeated .ItemParam itemList = 7; + */ + public Builder removeItemList(int index) { + if (itemListBuilder_ == null) { + ensureItemListIsMutable(); + itemList_.remove(index); + onChanged(); + } else { + itemListBuilder_.remove(index); + } + return this; + } + /** + * repeated .ItemParam itemList = 7; + */ + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder getItemListBuilder( + int index) { + return getItemListFieldBuilder().getBuilder(index); + } + /** + * repeated .ItemParam itemList = 7; + */ + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder getItemListOrBuilder( + int index) { + if (itemListBuilder_ == null) { + return itemList_.get(index); } else { + return itemListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .ItemParam itemList = 7; + */ + public java.util.List + getItemListOrBuilderList() { + if (itemListBuilder_ != null) { + return itemListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(itemList_); + } + } + /** + * repeated .ItemParam itemList = 7; + */ + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder addItemListBuilder() { + return getItemListFieldBuilder().addBuilder( + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.getDefaultInstance()); + } + /** + * repeated .ItemParam itemList = 7; + */ + public emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder addItemListBuilder( + int index) { + return getItemListFieldBuilder().addBuilder( + index, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.getDefaultInstance()); + } + /** + * repeated .ItemParam itemList = 7; + */ + public java.util.List + getItemListBuilderList() { + return getItemListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder> + getItemListFieldBuilder() { + if (itemListBuilder_ == null) { + itemListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam.Builder, emu.grasscutter.net.proto.ItemParamOuterClass.ItemParamOrBuilder>( + itemList_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + itemList_ = null; + } + return itemListBuilder_; + } + + private com.google.protobuf.Internal.IntList idList_ = emptyIntList(); + private void ensureIdListIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + idList_ = mutableCopy(idList_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated uint32 idList = 4; + * @return A list containing the idList. + */ + public java.util.List + getIdListList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(idList_) : idList_; + } + /** + * repeated uint32 idList = 4; + * @return The count of idList. + */ + public int getIdListCount() { + return idList_.size(); + } + /** + * repeated uint32 idList = 4; + * @param index The index of the element to return. + * @return The idList at the given index. + */ + public int getIdList(int index) { + return idList_.getInt(index); + } + /** + * repeated uint32 idList = 4; + * @param index The index to set the value at. + * @param value The idList to set. + * @return This builder for chaining. + */ + public Builder setIdList( + int index, int value) { + ensureIdListIsMutable(); + idList_.setInt(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 idList = 4; + * @param value The idList to add. + * @return This builder for chaining. + */ + public Builder addIdList(int value) { + ensureIdListIsMutable(); + idList_.addInt(value); + onChanged(); + return this; + } + /** + * repeated uint32 idList = 4; + * @param values The idList to add. + * @return This builder for chaining. + */ + public Builder addAllIdList( + java.lang.Iterable values) { + ensureIdListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, idList_); + onChanged(); + return this; + } + /** + * repeated uint32 idList = 4; + * @return This builder for chaining. + */ + public Builder clearIdList() { + idList_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + private int retcode_ ; + /** + * int32 retcode = 13; + * @return The retcode. + */ + @java.lang.Override + public int getRetcode() { + return retcode_; + } + /** + * int32 retcode = 13; + * @param value The retcode to set. + * @return This builder for chaining. + */ + public Builder setRetcode(int value) { + + retcode_ = value; + onChanged(); + return this; + } + /** + * int32 retcode = 13; + * @return This builder for chaining. + */ + public Builder clearRetcode() { + + retcode_ = 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:TakeAchievementRewardRsp) + } + + // @@protoc_insertion_point(class_scope:TakeAchievementRewardRsp) + private static final emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp(); + } + + public static emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TakeAchievementRewardRsp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TakeAchievementRewardRsp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TakeAchievementRewardRsp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TakeAchievementRewardRsp_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\036TakeAchievementRewardRsp.proto\032\017ItemPa" + + "ram.proto\"\252\001\n\030TakeAchievementRewardRsp\022\034" + + "\n\010itemList\030\007 \003(\0132\n.ItemParam\022\016\n\006idList\030\004" + + " \003(\r\022\017\n\007retcode\030\r \001(\005\"O\n\013LDLMKKMLOPI\022\010\n\004" + + "NONE\020\000\022\020\n\013PEPPOHPHJOJ\020\203\025\022\017\n\013DCDNILFDFLB\020" + + "\000\022\017\n\013NNBKOLMPOEA\020\001\032\002\020\001B\033\n\031emu.grasscutte" + + "r.net.protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + emu.grasscutter.net.proto.ItemParamOuterClass.getDescriptor(), + }); + internal_static_TakeAchievementRewardRsp_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TakeAchievementRewardRsp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TakeAchievementRewardRsp_descriptor, + new java.lang.String[] { "ItemList", "IdList", "Retcode", }); + emu.grasscutter.net.proto.ItemParamOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/emu/grasscutter/command/commands/AchievementCommand.java b/src/main/java/emu/grasscutter/command/commands/AchievementCommand.java new file mode 100644 index 000000000..7b2510c12 --- /dev/null +++ b/src/main/java/emu/grasscutter/command/commands/AchievementCommand.java @@ -0,0 +1,130 @@ +package emu.grasscutter.command.commands; + +import emu.grasscutter.command.Command; +import emu.grasscutter.command.CommandHandler; +import emu.grasscutter.data.GameData; +import emu.grasscutter.data.excels.AchievementData; +import emu.grasscutter.game.achievement.AchievementControlReturns; +import emu.grasscutter.game.achievement.Achievements; +import emu.grasscutter.game.player.Player; + +import java.util.List; +import java.util.Optional; +import java.util.concurrent.atomic.AtomicInteger; + +@Command( + label = "achievement", + usage = {"(grant|revoke) ", "progress ", "grantall", "revokeall"}, + aliases = {"am"}, + permission = "player.achievement", + permissionTargeted = "player.achievement.others", + targetRequirement = Command.TargetRequirement.PLAYER, + threading = true) +public class AchievementCommand implements CommandHandler { + @Override + public void execute(Player sender, Player targetPlayer, List args) { + if (args.size() < 1) { + this.sendUsageMessage(sender); + return; + } + + var command = args.remove(0).toLowerCase(); + var achievements = Achievements.getByPlayer(targetPlayer); + switch (command) { + case "grant" -> this.grant(sender, targetPlayer, achievements, args); + case "revoke" -> this.revoke(sender, targetPlayer, achievements, args); + case "progress" -> this.progress(sender, targetPlayer, achievements, args); + case "grantall" -> grantAll(sender, targetPlayer, achievements); + case "revokeall" -> revokeAll(sender, targetPlayer, achievements); + default -> this.sendUsageMessage(sender); + } + } + + private void grant(Player sender, Player targetPlayer, Achievements achievements, List args) { + if (args.size() < 1) { + this.sendUsageMessage(sender); + } + + parseInt(args.remove(0)).ifPresentOrElse(integer -> { + var ret = achievements.grant(integer); + switch (ret.getRet()) { + case SUCCESS -> sendSuccessMessage(sender, "grant", targetPlayer.getNickname()); + case ACHIEVEMENT_NOT_FOUND -> CommandHandler.sendTranslatedMessage(sender, ret.getRet().getKey()); + case ALREADY_ACHIEVED -> CommandHandler.sendTranslatedMessage(sender, ret.getRet().getKey(), targetPlayer.getNickname()); + } + }, () -> this.sendUsageMessage(sender)); + } + + private void revoke(Player sender, Player targetPlayer, Achievements achievements, List args) { + if (args.size() < 1) { + this.sendUsageMessage(sender); + } + + parseInt(args.remove(0)).ifPresentOrElse(integer -> { + var ret = achievements.revoke(integer); + switch (ret.getRet()) { + case SUCCESS -> sendSuccessMessage(sender, "revoke", targetPlayer.getNickname()); + case ACHIEVEMENT_NOT_FOUND -> CommandHandler.sendTranslatedMessage(sender, ret.getRet().getKey()); + case NOT_YET_ACHIEVED -> CommandHandler.sendTranslatedMessage(sender, ret.getRet().getKey(), targetPlayer.getNickname()); + } + }, () -> this.sendUsageMessage(sender)); + } + + private void progress(Player sender, Player targetPlayer, Achievements achievements, List args) { + if (args.size() < 2) { + this.sendUsageMessage(sender); + } + + parseInt(args.remove(0)).ifPresentOrElse(integer -> { + parseInt(args.remove(0)).ifPresentOrElse(progress -> { + var ret = achievements.progress(integer, progress); + switch (ret.getRet()) { + case SUCCESS -> sendSuccessMessage(sender, "progress", targetPlayer.getNickname(), integer, progress); + case ACHIEVEMENT_NOT_FOUND -> CommandHandler.sendTranslatedMessage(sender, ret.getRet().getKey()); + } + }, () -> this.sendUsageMessage(sender)); + }, () -> this.sendUsageMessage(sender)); + } + + private static void sendSuccessMessage(Player sender, String cmd, Object... args) { + CommandHandler.sendTranslatedMessage(sender, AchievementControlReturns.Return.SUCCESS.getKey() + cmd, args); + } + + private static Optional parseInt(String s) { + try { + return Optional.of(Integer.parseInt(s)); + } catch (NumberFormatException e) { + return Optional.empty(); + } + } + + private static void grantAll(Player sender, Player targetPlayer, Achievements achievements) { + var counter = new AtomicInteger(); + GameData.getAchievementDataMap().values().stream() + .filter(AchievementData::isUsed) + .filter(AchievementData::isParent) + .forEach(data -> { + var success = achievements.grant(data.getId()); + if (success.getRet() == AchievementControlReturns.Return.SUCCESS) { + counter.addAndGet(success.getChangedAchievementStatusNum()); + } + }); + + sendSuccessMessage(sender, "grantall", counter.intValue(), targetPlayer.getNickname()); + } + + private static void revokeAll(Player sender, Player targetPlayer, Achievements achievements) { + var counter = new AtomicInteger(); + GameData.getAchievementDataMap().values().stream() + .filter(AchievementData::isUsed) + .filter(AchievementData::isParent) + .forEach(data -> { + var success = achievements.revoke(data.getId()); + if (success.getRet() == AchievementControlReturns.Return.SUCCESS) { + counter.addAndGet(success.getChangedAchievementStatusNum()); + } + }); + + sendSuccessMessage(sender, "revokeall", counter.intValue(), targetPlayer.getNickname()); + } +} diff --git a/src/main/java/emu/grasscutter/data/GameData.java b/src/main/java/emu/grasscutter/data/GameData.java index ea0801d30..ac304916e 100644 --- a/src/main/java/emu/grasscutter/data/GameData.java +++ b/src/main/java/emu/grasscutter/data/GameData.java @@ -41,6 +41,8 @@ public class GameData { // ExcelConfigs @Getter private static final ArrayList codexReliquaryArrayList = new ArrayList<>(); + private static final Int2ObjectMap achievementDataMap = new Int2ObjectOpenHashMap<>(); + @Getter private static final Int2ObjectMap achievementGoalDataMap = new Int2ObjectOpenHashMap<>(); @Getter private static final Int2ObjectMap activityDataMap = new Int2ObjectOpenHashMap<>(); @Getter private static final Int2ObjectMap activityShopDataMap = new Int2ObjectOpenHashMap<>(); @Getter private static final Int2ObjectMap activityWatcherDataMap = new Int2ObjectOpenHashMap<>(); @@ -233,4 +235,9 @@ public class GameData { return shopGoods; } + + public static Int2ObjectMap getAchievementDataMap() { + AchievementData.divideIntoGroups(); + return achievementDataMap; + } } diff --git a/src/main/java/emu/grasscutter/data/excels/AchievementData.java b/src/main/java/emu/grasscutter/data/excels/AchievementData.java new file mode 100644 index 000000000..da3ef3526 --- /dev/null +++ b/src/main/java/emu/grasscutter/data/excels/AchievementData.java @@ -0,0 +1,96 @@ +package emu.grasscutter.data.excels; + +import com.github.davidmoten.guavamini.Lists; +import emu.grasscutter.data.GameData; +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; +import lombok.Getter; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.stream.Collectors; + +@Getter +@ResourceType(name = "AchievementExcelConfigData.json") +public class AchievementData extends GameResource { + private static final AtomicBoolean isDivided = new AtomicBoolean(); + private int goalId; + private int preStageAchievementId; + private Set groupAchievementIdList = new HashSet<>(); + private boolean isParent; + private long titleTextMapHash; + private long descTextMapHash; + private int finishRewardId; + private boolean isDeleteWatcherAfterFinish; + private int id; + private BattlePassMissionData.TriggerConfig triggerConfig; + private int progress; + private boolean isDisuse; + + public boolean hasPreStageAchievement() { + return this.preStageAchievementId != 0; + } + + public boolean hasGroupAchievements() { + return !this.groupAchievementIdList.isEmpty(); + } + + public boolean isUsed() { + return !this.isDisuse; + } + + public Set getGroupAchievementIdList() { + return this.groupAchievementIdList.stream().collect(Collectors.toUnmodifiableSet()); + } + + public Set getExcludedGroupAchievementIdList() { + return this.groupAchievementIdList.stream().filter(integer -> integer != this.getId()).collect(Collectors.toUnmodifiableSet()); + } + + public static void divideIntoGroups() { + if (isDivided.get()) { + return; + } + + isDivided.set(true); + var map = GameData.getAchievementDataMap(); + var achievementDataList = map.values().stream().filter(AchievementData::isUsed).toList(); + for (var data : achievementDataList) { + if (!data.hasPreStageAchievement() || data.hasGroupAchievements()) { + continue; + } + + List ids = Lists.newArrayList(); + int parentId = data.getId(); + while (true) { + var next = map.get(parentId + 1); + if (next == null || parentId != next.getPreStageAchievementId()) { + break; + } + + parentId++; + } + + map.get(parentId).isParent = true; + + while (true) { + ids.add(parentId); + var previous = map.get(--parentId); + if (previous == null) { + break; + } else if (!previous.hasPreStageAchievement()) { + ids.add(parentId); + break; + } + } + + for (int i : ids) { + map.get(i).groupAchievementIdList.addAll(ids); + } + } + + map.values().stream().filter(a -> !a.hasGroupAchievements() && a.isUsed()).forEach(a -> a.isParent = true); + } +} diff --git a/src/main/java/emu/grasscutter/data/excels/AchievementGoalData.java b/src/main/java/emu/grasscutter/data/excels/AchievementGoalData.java new file mode 100644 index 000000000..e5f1f3035 --- /dev/null +++ b/src/main/java/emu/grasscutter/data/excels/AchievementGoalData.java @@ -0,0 +1,13 @@ +package emu.grasscutter.data.excels; + +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "AchievementGoalExcelConfigData.json") +public class AchievementGoalData extends GameResource { + private int id; + private long nameTextMapHash; + private int finishRewardId; +} diff --git a/src/main/java/emu/grasscutter/database/DatabaseHelper.java b/src/main/java/emu/grasscutter/database/DatabaseHelper.java index 933f15b68..3bc532c1a 100644 --- a/src/main/java/emu/grasscutter/database/DatabaseHelper.java +++ b/src/main/java/emu/grasscutter/database/DatabaseHelper.java @@ -11,6 +11,7 @@ import dev.morphia.query.experimental.filters.Filters; import emu.grasscutter.GameConstants; import emu.grasscutter.Grasscutter; import emu.grasscutter.game.Account; +import emu.grasscutter.game.achievement.Achievements; import emu.grasscutter.game.activity.PlayerActivityData; import emu.grasscutter.game.activity.musicgame.MusicGameBeatmap; import emu.grasscutter.game.avatar.Avatar; @@ -133,6 +134,7 @@ public final class DatabaseHelper { } int uid = player.getUid(); // Delete data from collections + DatabaseManager.getGameDatabase().getCollection("achievements").deleteMany(eq("uid", uid)); DatabaseManager.getGameDatabase().getCollection("activities").deleteMany(eq("uid", uid)); DatabaseManager.getGameDatabase().getCollection("homes").deleteMany(eq("ownerUid", uid)); DatabaseManager.getGameDatabase().getCollection("mail").deleteMany(eq("ownerUid", uid)); @@ -359,4 +361,14 @@ public final class DatabaseHelper { public static void saveMusicGameBeatmap(MusicGameBeatmap musicGameBeatmap) { DatabaseManager.getGameDatastore().save(musicGameBeatmap); } + + public static Achievements getAchievementData(int uid) { + return DatabaseManager.getGameDatastore().find(Achievements.class) + .filter(Filters.and(Filters.eq("uid", uid))) + .first(); + } + + public static void saveAchievementData(Achievements achievements) { + DatabaseManager.getGameDatastore().save(achievements); + } } diff --git a/src/main/java/emu/grasscutter/game/achievement/Achievement.java b/src/main/java/emu/grasscutter/game/achievement/Achievement.java new file mode 100644 index 000000000..fe3479064 --- /dev/null +++ b/src/main/java/emu/grasscutter/game/achievement/Achievement.java @@ -0,0 +1,38 @@ +package emu.grasscutter.game.achievement; + +import dev.morphia.annotations.Entity; +import emu.grasscutter.net.proto.AchievementOuterClass; +import emu.grasscutter.net.proto.StatusOuterClass; +import lombok.Getter; +import lombok.Setter; + +@Entity +@Getter +public class Achievement { + @Setter + private StatusOuterClass.Status status; + private int id; + private int totalProgress; + @Setter + private int curProgress; + @Setter + private int finishTimestampSec; + + public Achievement(StatusOuterClass.Status status, int id, int totalProgress, int curProgress, int finishTimestampSec) { + this.status = status; + this.id = id; + this.totalProgress = totalProgress; + this.curProgress = curProgress; + this.finishTimestampSec = finishTimestampSec; + } + + public AchievementOuterClass.Achievement toProto() { + return AchievementOuterClass.Achievement.newBuilder() + .setStatus(this.getStatus()) + .setId(this.getId()) + .setTotalProgress(this.getTotalProgress()) + .setCurProgress(this.getCurProgress()) + .setFinishTimestamp(this.getFinishTimestampSec()) + .build(); + } +} diff --git a/src/main/java/emu/grasscutter/game/achievement/AchievementControlReturns.java b/src/main/java/emu/grasscutter/game/achievement/AchievementControlReturns.java new file mode 100644 index 000000000..fecbb7c77 --- /dev/null +++ b/src/main/java/emu/grasscutter/game/achievement/AchievementControlReturns.java @@ -0,0 +1,48 @@ +package emu.grasscutter.game.achievement; + +import lombok.Getter; + +@Getter +public class AchievementControlReturns { + private final Return ret; + private final int changedAchievementStatusNum; + + private AchievementControlReturns(Return ret) { + this(ret, 0); + } + + private AchievementControlReturns(Return ret, int changedAchievementStatusNum) { + this.ret = ret; + this.changedAchievementStatusNum = changedAchievementStatusNum; + } + + public static AchievementControlReturns success(int changedAchievementStatusNum) { + return new AchievementControlReturns(Return.SUCCESS, changedAchievementStatusNum); + } + + public static AchievementControlReturns achievementNotFound() { + return new AchievementControlReturns(Return.ACHIEVEMENT_NOT_FOUND); + } + + public static AchievementControlReturns alreadyAchieved() { + return new AchievementControlReturns(Return.ALREADY_ACHIEVED); + } + + public static AchievementControlReturns notYetAchieved() { + return new AchievementControlReturns(Return.NOT_YET_ACHIEVED); + } + + public enum Return { + SUCCESS("commands.achievement.success."), + ACHIEVEMENT_NOT_FOUND("commands.achievement.fail.achievement_not_found"), + ALREADY_ACHIEVED("commands.achievement.fail.already_achieved"), + NOT_YET_ACHIEVED("commands.achievement.fail.not_yet_achieved"); + + @Getter + private final String key; + + Return(String key) { + this.key = key; + } + } +} diff --git a/src/main/java/emu/grasscutter/game/achievement/Achievements.java b/src/main/java/emu/grasscutter/game/achievement/Achievements.java new file mode 100644 index 000000000..317410193 --- /dev/null +++ b/src/main/java/emu/grasscutter/game/achievement/Achievements.java @@ -0,0 +1,290 @@ +package emu.grasscutter.game.achievement; + +import com.github.davidmoten.guavamini.Lists; +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Id; +import dev.morphia.annotations.Transient; +import emu.grasscutter.Grasscutter; +import emu.grasscutter.data.GameData; +import emu.grasscutter.data.excels.AchievementData; +import emu.grasscutter.database.DatabaseHelper; +import emu.grasscutter.game.inventory.GameItem; +import emu.grasscutter.game.player.Player; +import emu.grasscutter.game.props.ActionReason; +import emu.grasscutter.net.proto.StatusOuterClass; +import emu.grasscutter.server.packet.send.PacketAchievementAllDataNotify; +import emu.grasscutter.server.packet.send.PacketAchievementUpdateNotify; +import emu.grasscutter.server.packet.send.PacketTakeAchievementGoalRewardRsp; +import emu.grasscutter.server.packet.send.PacketTakeAchievementRewardRsp; +import lombok.Builder; +import lombok.Data; +import lombok.Getter; +import org.bson.types.ObjectId; + +import javax.annotation.Nullable; +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.IntSupplier; + +@Entity("achievements") +@Data +@Builder(builderMethodName = "of") +public class Achievements { + private static final IntSupplier currentTimeSecs = () -> (int) (System.currentTimeMillis() / 1000L); + private static final Achievement INVALID = new Achievement(StatusOuterClass.Status.STATUS_INVALID, -1, 0, 0, 0); + @Id + private ObjectId id; + private int uid; + @Transient + private Player player; + private Map achievementList; + @Getter + private int finishedAchievementNum; + private List takenGoalRewardIdList; + + public static Achievements getByPlayer(Player player) { + var achievements = player.getAchievements() == null ? DatabaseHelper.getAchievementData(player.getUid()) : player.getAchievements(); + if (achievements == null) { + achievements = create(player.getUid()); + } + return achievements; + } + + public static Achievements create(int uid) { + var newAchievement = Achievements.of() + .uid(uid) + .achievementList(init()) + .finishedAchievementNum(0) + .takenGoalRewardIdList(Lists.newArrayList()) + .build(); + newAchievement.save(); + return newAchievement; + } + + private static Map init() { + Map map = new HashMap<>(); + GameData.getAchievementDataMap().values().stream() + .filter(AchievementData::isUsed) + .forEach(a -> { + map.put(a.getId(), new Achievement(StatusOuterClass.Status.STATUS_UNFINISHED, a.getId(), a.getProgress(), 0, 0)); + }); + return map; + } + + public AchievementControlReturns grant(int achievementId) { + var a = this.getAchievement(achievementId); + + if (a == null || this.isFinished(achievementId)) { + return a == null ? AchievementControlReturns.achievementNotFound() : AchievementControlReturns.alreadyAchieved(); + } + + return this.progress(achievementId, a.getTotalProgress()); + } + + public AchievementControlReturns revoke(int achievementId) { + var a = this.getAchievement(achievementId); + + if (a == null || !this.isFinished(achievementId)) { + return a == null ? AchievementControlReturns.achievementNotFound() : AchievementControlReturns.notYetAchieved(); + } + + return this.progress(achievementId, 0); + } + + public AchievementControlReturns progress(int achievementId, int progress) { + var a = this.getAchievement(achievementId); + if (a == null) { + return AchievementControlReturns.achievementNotFound(); + } + + a.setCurProgress(progress); + return AchievementControlReturns.success(this.notifyOtherAchievements(a)); + } + + private int notifyOtherAchievements(Achievement a) { + var changedNum = new AtomicInteger(); + + changedNum.addAndGet(this.update(a) ? 1 : 0); + + GameData.getAchievementDataMap().get(a.getId()) + .getExcludedGroupAchievementIdList().stream() + .map(this::getAchievement) + .filter(Objects::nonNull) + .forEach(other -> { + other.setCurProgress(a.getCurProgress()); + changedNum.addAndGet(this.update(other) ? 1 : 0); + }); + + this.computeFinishedAchievementNum(); + this.save(); + this.sendUpdatePacket(a); + return changedNum.intValue(); + } + + private boolean update(Achievement a) { + if (a.getStatus() == StatusOuterClass.Status.STATUS_UNFINISHED && a.getCurProgress() >= a.getTotalProgress()) { + a.setStatus(StatusOuterClass.Status.STATUS_FINISHED); + a.setFinishTimestampSec(currentTimeSecs.getAsInt()); + return true; + } else if (this.isFinished(a.getId()) && a.getCurProgress() < a.getTotalProgress()) { + a.setStatus(StatusOuterClass.Status.STATUS_UNFINISHED); + a.setFinishTimestampSec(0); + return true; + } + + return false; + } + + private void computeFinishedAchievementNum() { + this.finishedAchievementNum = GameData.getAchievementDataMap().values().stream() + .filter(a -> this.isFinished(a.getId())) + .mapToInt(value -> 1) + .sum(); + } + + private void sendUpdatePacket(Achievement achievement) { + List achievements = Lists.newArrayList(achievement); + achievements.addAll(GameData.getAchievementDataMap().get(achievement.getId()) + .getExcludedGroupAchievementIdList() + .stream().map(this::getAchievement) + .filter(Objects::nonNull) + .toList() + ); + + this.sendUpdatePacket(achievements); + } + + private void sendUpdatePacket(List achievement) { + if (this.isPacketSendable()) { + this.player.sendPacket(new PacketAchievementUpdateNotify(achievement)); + } + } + + @Nullable + public Achievement getAchievement(int achievementId) { + if (this.isInvalid(achievementId)) { + return null; + } + + return this.getAchievementList().computeIfAbsent(achievementId, id -> { + return new Achievement(StatusOuterClass.Status.STATUS_UNFINISHED, id, GameData.getAchievementDataMap().get(id.intValue()).getProgress(), 0, 0); + }); + } + + public boolean isInvalid(int achievementId) { + var data = GameData.getAchievementDataMap().get(achievementId); + return data == null || data.isDisuse(); + } + + public StatusOuterClass.Status getStatus(int achievementId) { + return this.getAchievementList().getOrDefault(achievementId, INVALID).getStatus(); + } + + public boolean isFinished(int achievementId) { + var status = this.getStatus(achievementId); + return status == StatusOuterClass.Status.STATUS_FINISHED || status == StatusOuterClass.Status.STATUS_REWARD_TAKEN; + } + + public void takeReward(List ids) { + List rewards = Lists.newArrayList(); + + for (int i : ids) { + var target = GameData.getAchievementDataMap().get(i); + if (target == null) { + Grasscutter.getLogger().warn("null returned while taking reward!"); + return; + } + + if (this.isRewardTaken(i)) { + this.player.sendPacket(new PacketTakeAchievementRewardRsp()); + return; + } + + var data = GameData.getRewardDataMap().get(target.getFinishRewardId()); + if (data == null) { + Grasscutter.getLogger().warn("null returned while getting reward data!"); + continue; + } + + data.getRewardItemList().forEach(itemParamData -> { + var itemData = GameData.getItemDataMap().get(itemParamData.getId()); + if (itemData == null) { + Grasscutter.getLogger().warn("itemData == null!"); + return; + } + + rewards.add(new GameItem(itemData, itemParamData.getCount())); + }); + + var a = this.getAchievement(i); + a.setStatus(StatusOuterClass.Status.STATUS_REWARD_TAKEN); + this.save(); + this.sendUpdatePacket(a); + } + + this.player.getInventory().addItems(rewards, ActionReason.AchievementReward); + this.player.sendPacket(new PacketTakeAchievementRewardRsp(ids, rewards.stream().map(GameItem::toItemParam).toList())); + } + + public void takeGoalReward(List ids) { + List rewards = Lists.newArrayList(); + + for (int i : ids) { + if (this.takenGoalRewardIdList.contains(i)) { + this.player.sendPacket(new PacketTakeAchievementGoalRewardRsp()); + } + + var goalData = GameData.getAchievementGoalDataMap().get(i); + if (goalData == null) { + Grasscutter.getLogger().warn("null returned while getting goal reward data!"); + continue; + } + + var data = GameData.getRewardDataMap().get(goalData.getFinishRewardId()); + if (data == null) { + Grasscutter.getLogger().warn("null returned while getting reward data!"); + continue; + } + + data.getRewardItemList().forEach(itemParamData -> { + var itemData = GameData.getItemDataMap().get(itemParamData.getId()); + if (itemData == null) { + Grasscutter.getLogger().warn("itemData == null!"); + return; + } + + rewards.add(new GameItem(itemData, itemParamData.getCount())); + }); + + this.takenGoalRewardIdList.add(i); + this.save(); + } + + this.player.getInventory().addItems(rewards, ActionReason.AchievementGoalReward); + this.player.sendPacket(new PacketTakeAchievementGoalRewardRsp(ids, rewards.stream().map(GameItem::toItemParam).toList())); + } + + public boolean isRewardTaken(int achievementId) { + return this.getStatus(achievementId) == StatusOuterClass.Status.STATUS_REWARD_TAKEN; + } + + public boolean isRewardLeft(int achievementId) { + return this.getStatus(achievementId) == StatusOuterClass.Status.STATUS_FINISHED; + } + + private boolean isPacketSendable() { + return this.player != null; + } + + public void save() { + DatabaseHelper.saveAchievementData(this); + } + + public void onLogin(Player player) { + if (this.player == null) { + this.player = player; + } + + this.player.sendPacket(new PacketAchievementAllDataNotify(this.player)); + } +} diff --git a/src/main/java/emu/grasscutter/game/player/Player.java b/src/main/java/emu/grasscutter/game/player/Player.java index 05fba44ae..1e504dd2d 100644 --- a/src/main/java/emu/grasscutter/game/player/Player.java +++ b/src/main/java/emu/grasscutter/game/player/Player.java @@ -10,6 +10,7 @@ import emu.grasscutter.database.DatabaseHelper; import emu.grasscutter.game.Account; import emu.grasscutter.game.CoopRequest; import emu.grasscutter.game.ability.AbilityManager; +import emu.grasscutter.game.achievement.Achievements; import emu.grasscutter.game.activity.ActivityManager; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.avatar.AvatarStorage; @@ -168,6 +169,7 @@ public class Player { @Getter private transient SatiationManager satiationManager; // Manager data (Save-able to the database) + @Getter private transient Achievements achievements; private PlayerProfile playerProfile; // Getter has null-check @Getter private TeamManager teamManager; private TowerData towerData; // Getter has null-check @@ -973,11 +975,15 @@ public class Player { .setIsShowAvatar(this.isShowAvatars()) .addAllShowAvatarInfoList(socialShowAvatarInfoList) .addAllShowNameCardIdList(this.getShowNameCardInfoList()) - .setFinishAchievementNum(0) + .setFinishAchievementNum(this.getFinishedAchievementNum()) .setFriendEnterHomeOptionValue(this.getHome() == null ? 0 : this.getHome().getEnterHomeOption()); return social; } + public int getFinishedAchievementNum() { + return Achievements.getByPlayer(this).getFinishedAchievementNum(); + } + public List getShowAvatarInfoList() { List showAvatarInfoList = new ArrayList<>(); @@ -1172,6 +1178,7 @@ public class Player { } // Load from db + this.achievements = Achievements.getByPlayer(this); this.getAvatars().loadFromDatabase(); this.getInventory().loadFromDatabase(); this.loadBattlePassManager(); // Call before avatar postLoad to avoid null pointer @@ -1224,6 +1231,10 @@ public class Player { session.send(new PacketQuestListNotify(this)); session.send(new PacketCodexDataFullNotify(this)); session.send(new PacketAllWidgetDataNotify(this)); + + //Achievements + this.achievements.onLogin(this); + session.send(new PacketWidgetGadgetAllDataNotify()); session.send(new PacketCombineDataNotify(this.unlockedCombines)); session.send(new PacketGetChatEmojiCollectionRsp(this.getChatEmojiIdList())); diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerTakeAchievementGoalRewardReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerTakeAchievementGoalRewardReq.java new file mode 100644 index 000000000..533e6a150 --- /dev/null +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerTakeAchievementGoalRewardReq.java @@ -0,0 +1,16 @@ +package emu.grasscutter.server.packet.recv; + +import emu.grasscutter.net.packet.Opcodes; +import emu.grasscutter.net.packet.PacketHandler; +import emu.grasscutter.net.packet.PacketOpcodes; +import emu.grasscutter.net.proto.TakeAchievementGoalRewardReqOuterClass; +import emu.grasscutter.server.game.GameSession; + +@Opcodes(PacketOpcodes.TakeAchievementGoalRewardReq) +public class HandlerTakeAchievementGoalRewardReq extends PacketHandler { + @Override + public void handle(GameSession session, byte[] header, byte[] payload) throws Exception { + var req = TakeAchievementGoalRewardReqOuterClass.TakeAchievementGoalRewardReq.parseFrom(payload); + session.getPlayer().getAchievements().takeGoalReward(req.getIdListList()); + } +} diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerTakeAchievementRewardReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerTakeAchievementRewardReq.java new file mode 100644 index 000000000..01fda6497 --- /dev/null +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerTakeAchievementRewardReq.java @@ -0,0 +1,16 @@ +package emu.grasscutter.server.packet.recv; + +import emu.grasscutter.net.packet.Opcodes; +import emu.grasscutter.net.packet.PacketHandler; +import emu.grasscutter.net.packet.PacketOpcodes; +import emu.grasscutter.net.proto.TakeAchievementRewardReqOuterClass; +import emu.grasscutter.server.game.GameSession; + +@Opcodes(PacketOpcodes.TakeAchievementRewardReq) +public class HandlerTakeAchievementRewardReq extends PacketHandler { + @Override + public void handle(GameSession session, byte[] header, byte[] payload) throws Exception { + var req = TakeAchievementRewardReqOuterClass.TakeAchievementRewardReq.parseFrom(payload); + session.getPlayer().getAchievements().takeReward(req.getIdListList()); + } +} diff --git a/src/main/java/emu/grasscutter/server/packet/send/PacketAchievementAllDataNotify.java b/src/main/java/emu/grasscutter/server/packet/send/PacketAchievementAllDataNotify.java new file mode 100644 index 000000000..912c03a29 --- /dev/null +++ b/src/main/java/emu/grasscutter/server/packet/send/PacketAchievementAllDataNotify.java @@ -0,0 +1,21 @@ +package emu.grasscutter.server.packet.send; + +import emu.grasscutter.game.achievement.Achievement; +import emu.grasscutter.game.player.Player; +import emu.grasscutter.net.packet.BasePacket; +import emu.grasscutter.net.packet.PacketOpcodes; +import emu.grasscutter.net.proto.AchievementAllDataNotifyOuterClass; + +public class PacketAchievementAllDataNotify extends BasePacket { + public PacketAchievementAllDataNotify(Player player) { + super(PacketOpcodes.AchievementAllDataNotify); + + var achievements = player.getAchievements(); + var notify = AchievementAllDataNotifyOuterClass.AchievementAllDataNotify.newBuilder() + .addAllAchievementList(achievements.getAchievementList().values().stream().map(Achievement::toProto).toList()) + .addAllRewardTakenGoalIdList(achievements.getTakenGoalRewardIdList()) + .build(); + + this.setData(notify); + } +} diff --git a/src/main/java/emu/grasscutter/server/packet/send/PacketAchievementUpdateNotify.java b/src/main/java/emu/grasscutter/server/packet/send/PacketAchievementUpdateNotify.java new file mode 100644 index 000000000..c9bd7196c --- /dev/null +++ b/src/main/java/emu/grasscutter/server/packet/send/PacketAchievementUpdateNotify.java @@ -0,0 +1,20 @@ +package emu.grasscutter.server.packet.send; + +import emu.grasscutter.game.achievement.Achievement; +import emu.grasscutter.net.packet.BasePacket; +import emu.grasscutter.net.packet.PacketOpcodes; +import emu.grasscutter.net.proto.AchievementUpdateNotifyOuterClass; + +import java.util.List; + +public class PacketAchievementUpdateNotify extends BasePacket { + public PacketAchievementUpdateNotify(List achievements) { + super(PacketOpcodes.AchievementUpdateNotify); + + var notify = AchievementUpdateNotifyOuterClass.AchievementUpdateNotify.newBuilder() + .addAllAchievementList(achievements.stream().map(Achievement::toProto).toList()) + .build(); + + this.setData(notify); + } +} diff --git a/src/main/java/emu/grasscutter/server/packet/send/PacketTakeAchievementGoalRewardRsp.java b/src/main/java/emu/grasscutter/server/packet/send/PacketTakeAchievementGoalRewardRsp.java new file mode 100644 index 000000000..f70535b2e --- /dev/null +++ b/src/main/java/emu/grasscutter/server/packet/send/PacketTakeAchievementGoalRewardRsp.java @@ -0,0 +1,29 @@ +package emu.grasscutter.server.packet.send; + +import emu.grasscutter.net.packet.BasePacket; +import emu.grasscutter.net.packet.PacketOpcodes; +import emu.grasscutter.net.proto.ItemParamOuterClass; +import emu.grasscutter.net.proto.RetcodeOuterClass; +import emu.grasscutter.net.proto.TakeAchievementGoalRewardRspOuterClass; + +import java.util.List; + +public class PacketTakeAchievementGoalRewardRsp extends BasePacket { + public PacketTakeAchievementGoalRewardRsp() { + super(PacketOpcodes.TakeAchievementGoalRewardRsp); + this.setData(TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp.newBuilder() + .setRetcode(RetcodeOuterClass.Retcode.RET_REWARD_HAS_TAKEN_VALUE) + .build()); + } + + public PacketTakeAchievementGoalRewardRsp(List ids, List items) { + super(PacketOpcodes.TakeAchievementGoalRewardRsp); + + var rsp = TakeAchievementGoalRewardRspOuterClass.TakeAchievementGoalRewardRsp.newBuilder() + .addAllIdList(ids) + .addAllItemList(items) + .build(); + + this.setData(rsp); + } +} diff --git a/src/main/java/emu/grasscutter/server/packet/send/PacketTakeAchievementRewardRsp.java b/src/main/java/emu/grasscutter/server/packet/send/PacketTakeAchievementRewardRsp.java new file mode 100644 index 000000000..54f9b7664 --- /dev/null +++ b/src/main/java/emu/grasscutter/server/packet/send/PacketTakeAchievementRewardRsp.java @@ -0,0 +1,29 @@ +package emu.grasscutter.server.packet.send; + +import emu.grasscutter.net.packet.BasePacket; +import emu.grasscutter.net.packet.PacketOpcodes; +import emu.grasscutter.net.proto.ItemParamOuterClass; +import emu.grasscutter.net.proto.RetcodeOuterClass; +import emu.grasscutter.net.proto.TakeAchievementRewardRspOuterClass; + +import java.util.List; + +public class PacketTakeAchievementRewardRsp extends BasePacket { + public PacketTakeAchievementRewardRsp() { + super(PacketOpcodes.TakeAchievementRewardRsp); + this.setData(TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp.newBuilder() + .setRetcode(RetcodeOuterClass.Retcode.RET_REWARD_HAS_TAKEN_VALUE) + .build()); + } + + public PacketTakeAchievementRewardRsp(List idList, List items) { + super(PacketOpcodes.TakeAchievementRewardRsp); + + var rsp = TakeAchievementRewardRspOuterClass.TakeAchievementRewardRsp.newBuilder() + .addAllIdList(idList) + .addAllItemList(items) + .build(); + + this.setData(rsp); + } +} diff --git a/src/main/java/emu/grasscutter/tools/Tools.java b/src/main/java/emu/grasscutter/tools/Tools.java index 9f0745ccf..16347d7c7 100644 --- a/src/main/java/emu/grasscutter/tools/Tools.java +++ b/src/main/java/emu/grasscutter/tools/Tools.java @@ -22,6 +22,7 @@ import emu.grasscutter.command.CommandHandler; import emu.grasscutter.command.CommandMap; import emu.grasscutter.data.GameData; import emu.grasscutter.data.ResourceLoader; +import emu.grasscutter.data.excels.AchievementData; import emu.grasscutter.data.excels.AvatarData; import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.utils.Language; @@ -59,6 +60,7 @@ public final class Tools { val monsterDataMap = new Int2ObjectRBTreeMap<>(GameData.getMonsterDataMap()); val sceneDataMap = new Int2ObjectRBTreeMap<>(GameData.getSceneDataMap()); val questDataMap = new Int2ObjectRBTreeMap<>(GameData.getQuestDataMap()); + val achievementDataMap = new Int2ObjectRBTreeMap<>(GameData.getAchievementDataMap()); Function, String> getPad = m -> "%" + m.lastKey().toString().length() + "s : "; @@ -145,6 +147,14 @@ public final class Tools { padQuestId.formatted(id) + "{0} - {1}", mainQuestTitles.get(data.getMainId()), data.getDescTextMapHash())); + // Achievements + h.newSection("Achievements"); + val padAchievementId = getPad.apply(achievementDataMap); + achievementDataMap.values().stream() + .filter(AchievementData::isUsed) + .forEach(data -> { + h.newTranslatedLine(padAchievementId.formatted(data.getId()) + "{0} - {1}", data.getTitleTextMapHash(), data.getDescTextMapHash()); + }); // Write txt files for (int i = 0; i < TextStrings.NUM_LANGUAGES; i++) { diff --git a/src/main/java/emu/grasscutter/utils/Language.java b/src/main/java/emu/grasscutter/utils/Language.java index 8b3ad253a..1354f1ec4 100644 --- a/src/main/java/emu/grasscutter/utils/Language.java +++ b/src/main/java/emu/grasscutter/utils/Language.java @@ -5,6 +5,7 @@ import com.google.gson.JsonObject; import emu.grasscutter.Grasscutter; import emu.grasscutter.data.GameData; import emu.grasscutter.data.ResourceLoader; +import emu.grasscutter.data.excels.AchievementData; import emu.grasscutter.game.player.Player; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; @@ -429,6 +430,12 @@ public final class Language { Grasscutter.getLogger().info("Generating TextMaps cache"); ResourceLoader.loadAll(); IntSet usedHashes = new IntOpenHashSet(); + GameData.getAchievementDataMap().values().stream() + .filter(AchievementData::isUsed) + .forEach(a -> { + usedHashes.add((int) a.getTitleTextMapHash()); + usedHashes.add((int) a.getDescTextMapHash()); + }); GameData.getAvatarDataMap().forEach((k, v) -> usedHashes.add((int) v.getNameTextMapHash())); GameData.getAvatarSkillDataMap().forEach((k, v) -> { usedHashes.add((int) v.getNameTextMapHash()); diff --git a/src/main/resources/languages/en-US.json b/src/main/resources/languages/en-US.json index 6471400e0..6cb8bdfb8 100644 --- a/src/main/resources/languages/en-US.json +++ b/src/main/resources/languages/en-US.json @@ -124,6 +124,21 @@ "no_account": "Account not found.", "description": "Modify user accounts" }, + "achievement": { + "success": { + "grant": "Granted the achievement to %s.", + "revoke": "Revoked the achievement from %s.", + "progress": "Set progress of %s's achievement(id: %s) to %s.", + "grantall": "Granted %s achievement(s) to %s.", + "revokeall": "Revoked %s achievement(s) from %s." + }, + "fail": { + "achievement_not_found": "Achievement not found.", + "already_achieved": "%s has already achieved the achievement.", + "not_yet_achieved": "%s hasn't achieved the achievement yet." + }, + "description": "Grant, Revoke or Progress achievements." + }, "announce": { "send_success": "Send an announcement successfully, you can revoke it by /a revoke %s.", "refresh_success": "Refresh announcement config file successfully. [Total %s]", diff --git a/src/main/resources/languages/es-ES.json b/src/main/resources/languages/es-ES.json index d1b61ce01..54f859541 100644 --- a/src/main/resources/languages/es-ES.json +++ b/src/main/resources/languages/es-ES.json @@ -124,6 +124,21 @@ "no_account": "Cuenta no encontrada.", "description": "Modifica las cuentas de usuarios" }, + "achievement": { + "success": { + "grant": "🇺🇸Granted the achievement to %s.", + "revoke": "🇺🇸Revoked the achievement from %s.", + "progress": "🇺🇸Set progress of %s's achievement(id: %s) to %s.", + "grantall": "🇺🇸Granted %s achievement(s) to %s.", + "revokeall": "🇺🇸Revoked %s achievement(s) from %s." + }, + "fail": { + "achievement_not_found": "🇺🇸Achievement not found.", + "already_achieved": "🇺🇸%s has already achieved the achievement.", + "not_yet_achieved": "🇺🇸%s hasn't achieved the achievement yet." + }, + "description": "🇺🇸Grant, Revoke or Progress achievements." + }, "announce": { "send_success": "Se envió el anuncio correctamente, puedes revocarlo con /a revoke %s.", "refresh_success": "Se actualizó el archivo de configuración de anuncio correctamente. [Total %s]", diff --git a/src/main/resources/languages/fr-FR.json b/src/main/resources/languages/fr-FR.json index 88c017c59..8e2cb9332 100644 --- a/src/main/resources/languages/fr-FR.json +++ b/src/main/resources/languages/fr-FR.json @@ -124,6 +124,21 @@ "no_account": "Compte introuvable.", "description": "Modifie les comptes utilisateurs" }, + "achievement": { + "success": { + "grant": "🇺🇸Granted the achievement to %s.", + "revoke": "🇺🇸Revoked the achievement from %s.", + "progress": "🇺🇸Set progress of %s's achievement(id: %s) to %s.", + "grantall": "🇺🇸Granted %s achievement(s) to %s.", + "revokeall": "🇺🇸Revoked %s achievement(s) from %s." + }, + "fail": { + "achievement_not_found": "🇺🇸Achievement not found.", + "already_achieved": "🇺🇸%s has already achieved the achievement.", + "not_yet_achieved": "🇺🇸%s hasn't achieved the achievement yet." + }, + "description": "🇺🇸Grant, Revoke or Progress achievements." + }, "announce": { "send_success": "L'annonce à bien été envoyée, vous pouvez la révoquer en utilisant /a revoke %s.", "refresh_success": "Le fichier de configuration des annonces à bien été actualisée. [Total : %s]", diff --git a/src/main/resources/languages/it-IT.json b/src/main/resources/languages/it-IT.json index 3075bd9a2..db2af6c09 100644 --- a/src/main/resources/languages/it-IT.json +++ b/src/main/resources/languages/it-IT.json @@ -124,6 +124,21 @@ "no_account": "Account non trovato.", "description": "Modifica account utente" }, + "achievement": { + "success": { + "grant": "🇺🇸Granted the achievement to %s.", + "revoke": "🇺🇸Revoked the achievement from %s.", + "progress": "🇺🇸Set progress of %s's achievement(id: %s) to %s.", + "grantall": "🇺🇸Granted %s achievement(s) to %s.", + "revokeall": "🇺🇸Revoked %s achievement(s) from %s." + }, + "fail": { + "achievement_not_found": "🇺🇸Achievement not found.", + "already_achieved": "🇺🇸%s has already achieved the achievement.", + "not_yet_achieved": "🇺🇸%s hasn't achieved the achievement yet." + }, + "description": "🇺🇸Grant, Revoke or Progress achievements." + }, "announce": { "send_success": "Invia un annuncio con successo, puoi revocarlo /a revoca %s.", "refresh_success": "Aggiorna il file di configurazione dell'annuncio con successo. [Totale %s]", diff --git a/src/main/resources/languages/ja-JP.json b/src/main/resources/languages/ja-JP.json index 9ac2602e4..fd68fc281 100644 --- a/src/main/resources/languages/ja-JP.json +++ b/src/main/resources/languages/ja-JP.json @@ -124,6 +124,21 @@ "no_account": "アカウントが見つかりません。", "description": "アカウントを作成、削除、または変更します。" }, + "achievement": { + "success": { + "grant": "%sにアチーブメントを付与しました。", + "revoke": "%sからアチーブメントを剥奪しました。", + "progress": "%sのアチーブメント(id: %s)の進捗を%sに設定しました。", + "grantall": "%2$sに%1$s個のアチーブメントを付与しました。", + "revokeall": "%2$sから%1$s個のアチーブメントを剥奪しました。" + }, + "fail": { + "achievement_not_found": "アチーブメントが見つかりませんでした。", + "already_achieved": "%sはすでにそのアチーブメントを達成しています。", + "not_yet_achieved": "%sはまだそのアチーブメントを達成していません。" + }, + "description": "アチーブメントを付与、剥奪、またはその進捗を設定します。" + }, "announce": { "send_success": "アナウンスの送信に成功しました。アナウンスは /a revoke %s で取り消すことができます。", "refresh_success": "アナウンス構成ファイルを正常に更新します。 [合計 %s]", diff --git a/src/main/resources/languages/ko-KR.json b/src/main/resources/languages/ko-KR.json index f29687086..7f92260f1 100644 --- a/src/main/resources/languages/ko-KR.json +++ b/src/main/resources/languages/ko-KR.json @@ -124,6 +124,21 @@ "no_account": "계정을 찾을 수 없습니다.", "description": "사용자 계정을 수정합니다" }, + "achievement": { + "success": { + "grant": "🇺🇸Granted the achievement to %s.", + "revoke": "🇺🇸Revoked the achievement from %s.", + "progress": "🇺🇸Set progress of %s's achievement(id: %s) to %s.", + "grantall": "🇺🇸Granted %s achievement(s) to %s.", + "revokeall": "🇺🇸Revoked %s achievement(s) from %s." + }, + "fail": { + "achievement_not_found": "🇺🇸Achievement not found.", + "already_achieved": "🇺🇸%s has already achieved the achievement.", + "not_yet_achieved": "🇺🇸%s hasn't achieved the achievement yet." + }, + "description": "🇺🇸Grant, Revoke or Progress achievements." + }, "announce": { "send_success": "공지 발송에 성공했습니다, 취소하고 싶으면 /a revoke %s를 입력하세요.", "refresh_success": "공지 구성파일을 새로 고쳤습니다. [Total %s]", diff --git a/src/main/resources/languages/pl-PL.json b/src/main/resources/languages/pl-PL.json index d6f8d1383..c33d45b69 100644 --- a/src/main/resources/languages/pl-PL.json +++ b/src/main/resources/languages/pl-PL.json @@ -124,6 +124,21 @@ "no_account": "Nie znaleziono konta.", "description": "Twórz lub usuń konta." }, + "achievement": { + "success": { + "grant": "🇺🇸Granted the achievement to %s.", + "revoke": "🇺🇸Revoked the achievement from %s.", + "progress": "🇺🇸Set progress of %s's achievement(id: %s) to %s.", + "grantall": "🇺🇸Granted %s achievement(s) to %s.", + "revokeall": "🇺🇸Revoked %s achievement(s) from %s." + }, + "fail": { + "achievement_not_found": "🇺🇸Achievement not found.", + "already_achieved": "🇺🇸%s has already achieved the achievement.", + "not_yet_achieved": "🇺🇸%s hasn't achieved the achievement yet." + }, + "description": "🇺🇸Grant, Revoke or Progress achievements." + }, "announce": { "send_success": "Ogłoszenie zostało pomyślnie wysłane. Możesz je odwołać używając \"announce revoke %s\".", "refresh_success": "Odświeżono konfigurację ogłoszeń (w sumie jest ich %s).", diff --git a/src/main/resources/languages/ro-RO.json b/src/main/resources/languages/ro-RO.json index 7726d6df0..c7eb92d93 100644 --- a/src/main/resources/languages/ro-RO.json +++ b/src/main/resources/languages/ro-RO.json @@ -124,6 +124,21 @@ "no_account": "Contul nu a fost găsit.", "description": "Modificați conturile de utilizator" }, + "achievement": { + "success": { + "grant": "🇺🇸Granted the achievement to %s.", + "revoke": "🇺🇸Revoked the achievement from %s.", + "progress": "🇺🇸Set progress of %s's achievement(id: %s) to %s.", + "grantall": "🇺🇸Granted %s achievement(s) to %s.", + "revokeall": "🇺🇸Revoked %s achievement(s) from %s." + }, + "fail": { + "achievement_not_found": "🇺🇸Achievement not found.", + "already_achieved": "🇺🇸%s has already achieved the achievement.", + "not_yet_achieved": "🇺🇸%s hasn't achieved the achievement yet." + }, + "description": "🇺🇸Grant, Revoke or Progress achievements." + }, "announce": { "send_success": "🇺🇸Send an announcement successfully, you can revoke it by /a revoke %s.", "refresh_success": "🇺🇸Refresh announcement config file successfully. [Total %s]", diff --git a/src/main/resources/languages/ru-RU.json b/src/main/resources/languages/ru-RU.json index 5bbffe9b7..33dbd8b06 100644 --- a/src/main/resources/languages/ru-RU.json +++ b/src/main/resources/languages/ru-RU.json @@ -124,6 +124,21 @@ "no_account": "Аккаунт не найден.", "description": "Вносит изменения в аккаунты пользователей" }, + "achievement": { + "success": { + "grant": "🇺🇸Granted the achievement to %s.", + "revoke": "🇺🇸Revoked the achievement from %s.", + "progress": "🇺🇸Set progress of %s's achievement(id: %s) to %s.", + "grantall": "🇺🇸Granted %s achievement(s) to %s.", + "revokeall": "🇺🇸Revoked %s achievement(s) from %s." + }, + "fail": { + "achievement_not_found": "🇺🇸Achievement not found.", + "already_achieved": "🇺🇸%s has already achieved the achievement.", + "not_yet_achieved": "🇺🇸%s hasn't achieved the achievement yet." + }, + "description": "🇺🇸Grant, Revoke or Progress achievements." + }, "announce": { "send_success": "Объявление было отправлено успешно, вы можете отзвать его с помощью команды /a revoke %s.", "refresh_success": "Конфигурационный файл объявления был успешно обновлён. [Всего %s]", diff --git a/src/main/resources/languages/zh-CN.json b/src/main/resources/languages/zh-CN.json index 2475c3780..c55c7bf0c 100644 --- a/src/main/resources/languages/zh-CN.json +++ b/src/main/resources/languages/zh-CN.json @@ -124,6 +124,21 @@ "no_account": "账号不存在。", "description": "创建或删除账号" }, + "achievement": { + "success": { + "grant": "🇺🇸Granted the achievement to %s.", + "revoke": "🇺🇸Revoked the achievement from %s.", + "progress": "🇺🇸Set progress of %s's achievement(id: %s) to %s.", + "grantall": "🇺🇸Granted %s achievement(s) to %s.", + "revokeall": "🇺🇸Revoked %s achievement(s) from %s." + }, + "fail": { + "achievement_not_found": "🇺🇸Achievement not found.", + "already_achieved": "🇺🇸%s has already achieved the achievement.", + "not_yet_achieved": "🇺🇸%s hasn't achieved the achievement yet." + }, + "description": "🇺🇸Grant, Revoke or Progress achievements." + }, "announce": { "send_success": "成功发送了一则公告,你可以通过 /a revoke %s 撤销。", "refresh_success": "成功刷新了公告配置。[共 %s 个]", diff --git a/src/main/resources/languages/zh-TW.json b/src/main/resources/languages/zh-TW.json index 92ac56dda..a341d68fb 100644 --- a/src/main/resources/languages/zh-TW.json +++ b/src/main/resources/languages/zh-TW.json @@ -124,6 +124,21 @@ "no_account": "帳號不存在。", "description": "建立或刪除帳號。" }, + "achievement": { + "success": { + "grant": "🇺🇸Granted the achievement to %s.", + "revoke": "🇺🇸Revoked the achievement from %s.", + "progress": "🇺🇸Set progress of %s's achievement(id: %s) to %s.", + "grantall": "🇺🇸Granted %s achievement(s) to %s.", + "revokeall": "🇺🇸Revoked %s achievement(s) from %s." + }, + "fail": { + "achievement_not_found": "🇺🇸Achievement not found.", + "already_achieved": "🇺🇸%s has already achieved the achievement.", + "not_yet_achieved": "🇺🇸%s hasn't achieved the achievement yet." + }, + "description": "🇺🇸Grant, Revoke or Progress achievements." + }, "announce": { "send_success": "成功發送了一則公告,你可以通過 /a revoke %s 撤銷。", "refresh_success": "已重新整理了%s個公告。",