feat: set namecards in profile editing. (#1843)

* add: can set name cards in profile editing.

* some changes

* Update src/main/java/emu/grasscutter/game/player/Player.java

* Update src/main/java/emu/grasscutter/server/packet/recv/HandlerGetFriendShowNameCardInfoReq.java

* Update src/main/java/emu/grasscutter/server/packet/recv/HandlerUpdatePlayerShowNameCardListReq.java

* Update src/main/java/emu/grasscutter/server/packet/send/PacketGetFriendShowNameCardInfoRsp.java

* Update src/main/java/emu/grasscutter/server/packet/send/PacketUpdatePlayerShowNameCardListRsp.java

* Update src/main/java/emu/grasscutter/game/player/Player.java
This commit is contained in:
hamusuke 2022-10-09 10:10:10 +09:00 committed by GitHub
parent e23536e7ba
commit a4f10208de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 2881 additions and 0 deletions

View File

@ -0,0 +1,550 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: GetFriendShowNameCardInfoReq.proto
package emu.grasscutter.net.proto;
public final class GetFriendShowNameCardInfoReqOuterClass {
private GetFriendShowNameCardInfoReqOuterClass() {}
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 GetFriendShowNameCardInfoReqOrBuilder extends
// @@protoc_insertion_point(interface_extends:GetFriendShowNameCardInfoReq)
com.google.protobuf.MessageOrBuilder {
/**
* <code>uint32 uid = 3;</code>
* @return The uid.
*/
int getUid();
}
/**
* <pre>
* CmdId: 4061
* EnetChannelId: 0
* EnetIsReliable: true
* IsAllowClient: true
* </pre>
*
* Protobuf type {@code GetFriendShowNameCardInfoReq}
*/
public static final class GetFriendShowNameCardInfoReq extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:GetFriendShowNameCardInfoReq)
GetFriendShowNameCardInfoReqOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetFriendShowNameCardInfoReq.newBuilder() to construct.
private GetFriendShowNameCardInfoReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private GetFriendShowNameCardInfoReq() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GetFriendShowNameCardInfoReq();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetFriendShowNameCardInfoReq(
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 24: {
uid_ = 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.GetFriendShowNameCardInfoReqOuterClass.internal_static_GetFriendShowNameCardInfoReq_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.internal_static_GetFriendShowNameCardInfoReq_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.class, emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.Builder.class);
}
public static final int UID_FIELD_NUMBER = 3;
private int uid_;
/**
* <code>uint32 uid = 3;</code>
* @return The uid.
*/
@java.lang.Override
public int getUid() {
return uid_;
}
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 (uid_ != 0) {
output.writeUInt32(3, uid_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (uid_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, uid_);
}
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.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq)) {
return super.equals(obj);
}
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq other = (emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq) obj;
if (getUid()
!= other.getUid()) 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) + UID_FIELD_NUMBER;
hash = (53 * hash) + getUid();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq 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.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq 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.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq 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.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq 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.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq 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.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* CmdId: 4061
* EnetChannelId: 0
* EnetIsReliable: true
* IsAllowClient: true
* </pre>
*
* Protobuf type {@code GetFriendShowNameCardInfoReq}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:GetFriendShowNameCardInfoReq)
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReqOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.internal_static_GetFriendShowNameCardInfoReq_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.internal_static_GetFriendShowNameCardInfoReq_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.class, emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.Builder.class);
}
// Construct using emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.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();
uid_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.internal_static_GetFriendShowNameCardInfoReq_descriptor;
}
@java.lang.Override
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq getDefaultInstanceForType() {
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.getDefaultInstance();
}
@java.lang.Override
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq build() {
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq buildPartial() {
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq result = new emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq(this);
result.uid_ = uid_;
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.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq) {
return mergeFrom((emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq other) {
if (other == emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.getDefaultInstance()) return this;
if (other.getUid() != 0) {
setUid(other.getUid());
}
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.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int uid_ ;
/**
* <code>uint32 uid = 3;</code>
* @return The uid.
*/
@java.lang.Override
public int getUid() {
return uid_;
}
/**
* <code>uint32 uid = 3;</code>
* @param value The uid to set.
* @return This builder for chaining.
*/
public Builder setUid(int value) {
uid_ = value;
onChanged();
return this;
}
/**
* <code>uint32 uid = 3;</code>
* @return This builder for chaining.
*/
public Builder clearUid() {
uid_ = 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:GetFriendShowNameCardInfoReq)
}
// @@protoc_insertion_point(class_scope:GetFriendShowNameCardInfoReq)
private static final emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq();
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<GetFriendShowNameCardInfoReq>
PARSER = new com.google.protobuf.AbstractParser<GetFriendShowNameCardInfoReq>() {
@java.lang.Override
public GetFriendShowNameCardInfoReq parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetFriendShowNameCardInfoReq(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<GetFriendShowNameCardInfoReq> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<GetFriendShowNameCardInfoReq> getParserForType() {
return PARSER;
}
@java.lang.Override
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_GetFriendShowNameCardInfoReq_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_GetFriendShowNameCardInfoReq_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\"GetFriendShowNameCardInfoReq.proto\"+\n\034" +
"GetFriendShowNameCardInfoReq\022\013\n\003uid\030\003 \001(" +
"\rB\033\n\031emu.grasscutter.net.protob\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_GetFriendShowNameCardInfoReq_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_GetFriendShowNameCardInfoReq_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_GetFriendShowNameCardInfoReq_descriptor,
new java.lang.String[] { "Uid", });
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,817 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: GetFriendShowNameCardInfoRsp.proto
package emu.grasscutter.net.proto;
public final class GetFriendShowNameCardInfoRspOuterClass {
private GetFriendShowNameCardInfoRspOuterClass() {}
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 GetFriendShowNameCardInfoRspOrBuilder extends
// @@protoc_insertion_point(interface_extends:GetFriendShowNameCardInfoRsp)
com.google.protobuf.MessageOrBuilder {
/**
* <code>int32 retcode = 15;</code>
* @return The retcode.
*/
int getRetcode();
/**
* <code>uint32 uid = 7;</code>
* @return The uid.
*/
int getUid();
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @return A list containing the showNameCardIdList.
*/
java.util.List<java.lang.Integer> getShowNameCardIdListList();
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @return The count of showNameCardIdList.
*/
int getShowNameCardIdListCount();
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @param index The index of the element to return.
* @return The showNameCardIdList at the given index.
*/
int getShowNameCardIdList(int index);
}
/**
* <pre>
* CmdId: 4029
* EnetChannelId: 0
* EnetIsReliable: true
* </pre>
*
* Protobuf type {@code GetFriendShowNameCardInfoRsp}
*/
public static final class GetFriendShowNameCardInfoRsp extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:GetFriendShowNameCardInfoRsp)
GetFriendShowNameCardInfoRspOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetFriendShowNameCardInfoRsp.newBuilder() to construct.
private GetFriendShowNameCardInfoRsp(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private GetFriendShowNameCardInfoRsp() {
showNameCardIdList_ = emptyIntList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GetFriendShowNameCardInfoRsp();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetFriendShowNameCardInfoRsp(
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: {
uid_ = input.readUInt32();
break;
}
case 80: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
showNameCardIdList_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
showNameCardIdList_.addInt(input.readUInt32());
break;
}
case 82: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
showNameCardIdList_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
showNameCardIdList_.addInt(input.readUInt32());
}
input.popLimit(limit);
break;
}
case 120: {
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_ & 0x00000001) != 0)) {
showNameCardIdList_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.internal_static_GetFriendShowNameCardInfoRsp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.internal_static_GetFriendShowNameCardInfoRsp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.class, emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.Builder.class);
}
public static final int RETCODE_FIELD_NUMBER = 15;
private int retcode_;
/**
* <code>int32 retcode = 15;</code>
* @return The retcode.
*/
@java.lang.Override
public int getRetcode() {
return retcode_;
}
public static final int UID_FIELD_NUMBER = 7;
private int uid_;
/**
* <code>uint32 uid = 7;</code>
* @return The uid.
*/
@java.lang.Override
public int getUid() {
return uid_;
}
public static final int SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER = 10;
private com.google.protobuf.Internal.IntList showNameCardIdList_;
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @return A list containing the showNameCardIdList.
*/
@java.lang.Override
public java.util.List<java.lang.Integer>
getShowNameCardIdListList() {
return showNameCardIdList_;
}
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @return The count of showNameCardIdList.
*/
public int getShowNameCardIdListCount() {
return showNameCardIdList_.size();
}
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @param index The index of the element to return.
* @return The showNameCardIdList at the given index.
*/
public int getShowNameCardIdList(int index) {
return showNameCardIdList_.getInt(index);
}
private int showNameCardIdListMemoizedSerializedSize = -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 (uid_ != 0) {
output.writeUInt32(7, uid_);
}
if (getShowNameCardIdListList().size() > 0) {
output.writeUInt32NoTag(82);
output.writeUInt32NoTag(showNameCardIdListMemoizedSerializedSize);
}
for (int i = 0; i < showNameCardIdList_.size(); i++) {
output.writeUInt32NoTag(showNameCardIdList_.getInt(i));
}
if (retcode_ != 0) {
output.writeInt32(15, retcode_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (uid_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(7, uid_);
}
{
int dataSize = 0;
for (int i = 0; i < showNameCardIdList_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(showNameCardIdList_.getInt(i));
}
size += dataSize;
if (!getShowNameCardIdListList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
showNameCardIdListMemoizedSerializedSize = dataSize;
}
if (retcode_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(15, 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.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp)) {
return super.equals(obj);
}
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp other = (emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp) obj;
if (getRetcode()
!= other.getRetcode()) return false;
if (getUid()
!= other.getUid()) return false;
if (!getShowNameCardIdListList()
.equals(other.getShowNameCardIdListList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + RETCODE_FIELD_NUMBER;
hash = (53 * hash) + getRetcode();
hash = (37 * hash) + UID_FIELD_NUMBER;
hash = (53 * hash) + getUid();
if (getShowNameCardIdListCount() > 0) {
hash = (37 * hash) + SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER;
hash = (53 * hash) + getShowNameCardIdListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp 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.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp 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.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp 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.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp 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.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp 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.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* CmdId: 4029
* EnetChannelId: 0
* EnetIsReliable: true
* </pre>
*
* Protobuf type {@code GetFriendShowNameCardInfoRsp}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:GetFriendShowNameCardInfoRsp)
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRspOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.internal_static_GetFriendShowNameCardInfoRsp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.internal_static_GetFriendShowNameCardInfoRsp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.class, emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.Builder.class);
}
// Construct using emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
retcode_ = 0;
uid_ = 0;
showNameCardIdList_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.internal_static_GetFriendShowNameCardInfoRsp_descriptor;
}
@java.lang.Override
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp getDefaultInstanceForType() {
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.getDefaultInstance();
}
@java.lang.Override
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp build() {
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp buildPartial() {
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp result = new emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp(this);
int from_bitField0_ = bitField0_;
result.retcode_ = retcode_;
result.uid_ = uid_;
if (((bitField0_ & 0x00000001) != 0)) {
showNameCardIdList_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.showNameCardIdList_ = showNameCardIdList_;
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.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp) {
return mergeFrom((emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp other) {
if (other == emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.getDefaultInstance()) return this;
if (other.getRetcode() != 0) {
setRetcode(other.getRetcode());
}
if (other.getUid() != 0) {
setUid(other.getUid());
}
if (!other.showNameCardIdList_.isEmpty()) {
if (showNameCardIdList_.isEmpty()) {
showNameCardIdList_ = other.showNameCardIdList_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureShowNameCardIdListIsMutable();
showNameCardIdList_.addAll(other.showNameCardIdList_);
}
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.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int retcode_ ;
/**
* <code>int32 retcode = 15;</code>
* @return The retcode.
*/
@java.lang.Override
public int getRetcode() {
return retcode_;
}
/**
* <code>int32 retcode = 15;</code>
* @param value The retcode to set.
* @return This builder for chaining.
*/
public Builder setRetcode(int value) {
retcode_ = value;
onChanged();
return this;
}
/**
* <code>int32 retcode = 15;</code>
* @return This builder for chaining.
*/
public Builder clearRetcode() {
retcode_ = 0;
onChanged();
return this;
}
private int uid_ ;
/**
* <code>uint32 uid = 7;</code>
* @return The uid.
*/
@java.lang.Override
public int getUid() {
return uid_;
}
/**
* <code>uint32 uid = 7;</code>
* @param value The uid to set.
* @return This builder for chaining.
*/
public Builder setUid(int value) {
uid_ = value;
onChanged();
return this;
}
/**
* <code>uint32 uid = 7;</code>
* @return This builder for chaining.
*/
public Builder clearUid() {
uid_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Internal.IntList showNameCardIdList_ = emptyIntList();
private void ensureShowNameCardIdListIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
showNameCardIdList_ = mutableCopy(showNameCardIdList_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @return A list containing the showNameCardIdList.
*/
public java.util.List<java.lang.Integer>
getShowNameCardIdListList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(showNameCardIdList_) : showNameCardIdList_;
}
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @return The count of showNameCardIdList.
*/
public int getShowNameCardIdListCount() {
return showNameCardIdList_.size();
}
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @param index The index of the element to return.
* @return The showNameCardIdList at the given index.
*/
public int getShowNameCardIdList(int index) {
return showNameCardIdList_.getInt(index);
}
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @param index The index to set the value at.
* @param value The showNameCardIdList to set.
* @return This builder for chaining.
*/
public Builder setShowNameCardIdList(
int index, int value) {
ensureShowNameCardIdListIsMutable();
showNameCardIdList_.setInt(index, value);
onChanged();
return this;
}
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @param value The showNameCardIdList to add.
* @return This builder for chaining.
*/
public Builder addShowNameCardIdList(int value) {
ensureShowNameCardIdListIsMutable();
showNameCardIdList_.addInt(value);
onChanged();
return this;
}
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @param values The showNameCardIdList to add.
* @return This builder for chaining.
*/
public Builder addAllShowNameCardIdList(
java.lang.Iterable<? extends java.lang.Integer> values) {
ensureShowNameCardIdListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, showNameCardIdList_);
onChanged();
return this;
}
/**
* <code>repeated uint32 show_name_card_id_list = 10;</code>
* @return This builder for chaining.
*/
public Builder clearShowNameCardIdList() {
showNameCardIdList_ = 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:GetFriendShowNameCardInfoRsp)
}
// @@protoc_insertion_point(class_scope:GetFriendShowNameCardInfoRsp)
private static final emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp();
}
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<GetFriendShowNameCardInfoRsp>
PARSER = new com.google.protobuf.AbstractParser<GetFriendShowNameCardInfoRsp>() {
@java.lang.Override
public GetFriendShowNameCardInfoRsp parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetFriendShowNameCardInfoRsp(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<GetFriendShowNameCardInfoRsp> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<GetFriendShowNameCardInfoRsp> getParserForType() {
return PARSER;
}
@java.lang.Override
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_GetFriendShowNameCardInfoRsp_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_GetFriendShowNameCardInfoRsp_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\"GetFriendShowNameCardInfoRsp.proto\"\\\n\034" +
"GetFriendShowNameCardInfoRsp\022\017\n\007retcode\030" +
"\017 \001(\005\022\013\n\003uid\030\007 \001(\r\022\036\n\026show_name_card_id_" +
"list\030\n \003(\rB\033\n\031emu.grasscutter.net.protob" +
"\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_GetFriendShowNameCardInfoRsp_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_GetFriendShowNameCardInfoRsp_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_GetFriendShowNameCardInfoRsp_descriptor,
new java.lang.String[] { "Retcode", "Uid", "ShowNameCardIdList", });
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,678 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: UpdatePlayerShowNameCardListReq.proto
package emu.grasscutter.net.proto;
public final class UpdatePlayerShowNameCardListReqOuterClass {
private UpdatePlayerShowNameCardListReqOuterClass() {}
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 UpdatePlayerShowNameCardListReqOrBuilder extends
// @@protoc_insertion_point(interface_extends:UpdatePlayerShowNameCardListReq)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @return A list containing the showNameCardIdList.
*/
java.util.List<java.lang.Integer> getShowNameCardIdListList();
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @return The count of showNameCardIdList.
*/
int getShowNameCardIdListCount();
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @param index The index of the element to return.
* @return The showNameCardIdList at the given index.
*/
int getShowNameCardIdList(int index);
}
/**
* <pre>
* CmdId: 4002
* EnetChannelId: 0
* EnetIsReliable: true
* IsAllowClient: true
* </pre>
*
* Protobuf type {@code UpdatePlayerShowNameCardListReq}
*/
public static final class UpdatePlayerShowNameCardListReq extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:UpdatePlayerShowNameCardListReq)
UpdatePlayerShowNameCardListReqOrBuilder {
private static final long serialVersionUID = 0L;
// Use UpdatePlayerShowNameCardListReq.newBuilder() to construct.
private UpdatePlayerShowNameCardListReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private UpdatePlayerShowNameCardListReq() {
showNameCardIdList_ = emptyIntList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new UpdatePlayerShowNameCardListReq();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private UpdatePlayerShowNameCardListReq(
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 120: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
showNameCardIdList_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
showNameCardIdList_.addInt(input.readUInt32());
break;
}
case 122: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
showNameCardIdList_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
showNameCardIdList_.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)) {
showNameCardIdList_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.internal_static_UpdatePlayerShowNameCardListReq_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.internal_static_UpdatePlayerShowNameCardListReq_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.class, emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.Builder.class);
}
public static final int SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER = 15;
private com.google.protobuf.Internal.IntList showNameCardIdList_;
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @return A list containing the showNameCardIdList.
*/
@java.lang.Override
public java.util.List<java.lang.Integer>
getShowNameCardIdListList() {
return showNameCardIdList_;
}
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @return The count of showNameCardIdList.
*/
public int getShowNameCardIdListCount() {
return showNameCardIdList_.size();
}
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @param index The index of the element to return.
* @return The showNameCardIdList at the given index.
*/
public int getShowNameCardIdList(int index) {
return showNameCardIdList_.getInt(index);
}
private int showNameCardIdListMemoizedSerializedSize = -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 (getShowNameCardIdListList().size() > 0) {
output.writeUInt32NoTag(122);
output.writeUInt32NoTag(showNameCardIdListMemoizedSerializedSize);
}
for (int i = 0; i < showNameCardIdList_.size(); i++) {
output.writeUInt32NoTag(showNameCardIdList_.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 < showNameCardIdList_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(showNameCardIdList_.getInt(i));
}
size += dataSize;
if (!getShowNameCardIdListList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
showNameCardIdListMemoizedSerializedSize = 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.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq)) {
return super.equals(obj);
}
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq other = (emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq) obj;
if (!getShowNameCardIdListList()
.equals(other.getShowNameCardIdListList())) 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 (getShowNameCardIdListCount() > 0) {
hash = (37 * hash) + SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER;
hash = (53 * hash) + getShowNameCardIdListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq 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.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq 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.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq 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.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq 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.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq 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.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* CmdId: 4002
* EnetChannelId: 0
* EnetIsReliable: true
* IsAllowClient: true
* </pre>
*
* Protobuf type {@code UpdatePlayerShowNameCardListReq}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:UpdatePlayerShowNameCardListReq)
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReqOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.internal_static_UpdatePlayerShowNameCardListReq_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.internal_static_UpdatePlayerShowNameCardListReq_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.class, emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.Builder.class);
}
// Construct using emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.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();
showNameCardIdList_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.internal_static_UpdatePlayerShowNameCardListReq_descriptor;
}
@java.lang.Override
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq getDefaultInstanceForType() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.getDefaultInstance();
}
@java.lang.Override
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq build() {
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq buildPartial() {
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq result = new emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
showNameCardIdList_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.showNameCardIdList_ = showNameCardIdList_;
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.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq) {
return mergeFrom((emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq other) {
if (other == emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.getDefaultInstance()) return this;
if (!other.showNameCardIdList_.isEmpty()) {
if (showNameCardIdList_.isEmpty()) {
showNameCardIdList_ = other.showNameCardIdList_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureShowNameCardIdListIsMutable();
showNameCardIdList_.addAll(other.showNameCardIdList_);
}
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.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.Internal.IntList showNameCardIdList_ = emptyIntList();
private void ensureShowNameCardIdListIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
showNameCardIdList_ = mutableCopy(showNameCardIdList_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @return A list containing the showNameCardIdList.
*/
public java.util.List<java.lang.Integer>
getShowNameCardIdListList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(showNameCardIdList_) : showNameCardIdList_;
}
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @return The count of showNameCardIdList.
*/
public int getShowNameCardIdListCount() {
return showNameCardIdList_.size();
}
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @param index The index of the element to return.
* @return The showNameCardIdList at the given index.
*/
public int getShowNameCardIdList(int index) {
return showNameCardIdList_.getInt(index);
}
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @param index The index to set the value at.
* @param value The showNameCardIdList to set.
* @return This builder for chaining.
*/
public Builder setShowNameCardIdList(
int index, int value) {
ensureShowNameCardIdListIsMutable();
showNameCardIdList_.setInt(index, value);
onChanged();
return this;
}
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @param value The showNameCardIdList to add.
* @return This builder for chaining.
*/
public Builder addShowNameCardIdList(int value) {
ensureShowNameCardIdListIsMutable();
showNameCardIdList_.addInt(value);
onChanged();
return this;
}
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @param values The showNameCardIdList to add.
* @return This builder for chaining.
*/
public Builder addAllShowNameCardIdList(
java.lang.Iterable<? extends java.lang.Integer> values) {
ensureShowNameCardIdListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, showNameCardIdList_);
onChanged();
return this;
}
/**
* <code>repeated uint32 show_name_card_id_list = 15;</code>
* @return This builder for chaining.
*/
public Builder clearShowNameCardIdList() {
showNameCardIdList_ = 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:UpdatePlayerShowNameCardListReq)
}
// @@protoc_insertion_point(class_scope:UpdatePlayerShowNameCardListReq)
private static final emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq();
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<UpdatePlayerShowNameCardListReq>
PARSER = new com.google.protobuf.AbstractParser<UpdatePlayerShowNameCardListReq>() {
@java.lang.Override
public UpdatePlayerShowNameCardListReq parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new UpdatePlayerShowNameCardListReq(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<UpdatePlayerShowNameCardListReq> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<UpdatePlayerShowNameCardListReq> getParserForType() {
return PARSER;
}
@java.lang.Override
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_UpdatePlayerShowNameCardListReq_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_UpdatePlayerShowNameCardListReq_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%UpdatePlayerShowNameCardListReq.proto\"" +
"A\n\037UpdatePlayerShowNameCardListReq\022\036\n\026sh" +
"ow_name_card_id_list\030\017 \003(\rB\033\n\031emu.grassc" +
"utter.net.protob\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_UpdatePlayerShowNameCardListReq_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_UpdatePlayerShowNameCardListReq_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_UpdatePlayerShowNameCardListReq_descriptor,
new java.lang.String[] { "ShowNameCardIdList", });
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,746 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: UpdatePlayerShowNameCardListRsp.proto
package emu.grasscutter.net.proto;
public final class UpdatePlayerShowNameCardListRspOuterClass {
private UpdatePlayerShowNameCardListRspOuterClass() {}
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 UpdatePlayerShowNameCardListRspOrBuilder extends
// @@protoc_insertion_point(interface_extends:UpdatePlayerShowNameCardListRsp)
com.google.protobuf.MessageOrBuilder {
/**
* <code>int32 retcode = 13;</code>
* @return The retcode.
*/
int getRetcode();
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @return A list containing the showNameCardIdList.
*/
java.util.List<java.lang.Integer> getShowNameCardIdListList();
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @return The count of showNameCardIdList.
*/
int getShowNameCardIdListCount();
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @param index The index of the element to return.
* @return The showNameCardIdList at the given index.
*/
int getShowNameCardIdList(int index);
}
/**
* <pre>
* CmdId: 4019
* EnetChannelId: 0
* EnetIsReliable: true
* </pre>
*
* Protobuf type {@code UpdatePlayerShowNameCardListRsp}
*/
public static final class UpdatePlayerShowNameCardListRsp extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:UpdatePlayerShowNameCardListRsp)
UpdatePlayerShowNameCardListRspOrBuilder {
private static final long serialVersionUID = 0L;
// Use UpdatePlayerShowNameCardListRsp.newBuilder() to construct.
private UpdatePlayerShowNameCardListRsp(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private UpdatePlayerShowNameCardListRsp() {
showNameCardIdList_ = emptyIntList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new UpdatePlayerShowNameCardListRsp();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private UpdatePlayerShowNameCardListRsp(
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 96: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
showNameCardIdList_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
showNameCardIdList_.addInt(input.readUInt32());
break;
}
case 98: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
showNameCardIdList_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
showNameCardIdList_.addInt(input.readUInt32());
}
input.popLimit(limit);
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_ & 0x00000001) != 0)) {
showNameCardIdList_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.internal_static_UpdatePlayerShowNameCardListRsp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.internal_static_UpdatePlayerShowNameCardListRsp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.class, emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.Builder.class);
}
public static final int RETCODE_FIELD_NUMBER = 13;
private int retcode_;
/**
* <code>int32 retcode = 13;</code>
* @return The retcode.
*/
@java.lang.Override
public int getRetcode() {
return retcode_;
}
public static final int SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER = 12;
private com.google.protobuf.Internal.IntList showNameCardIdList_;
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @return A list containing the showNameCardIdList.
*/
@java.lang.Override
public java.util.List<java.lang.Integer>
getShowNameCardIdListList() {
return showNameCardIdList_;
}
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @return The count of showNameCardIdList.
*/
public int getShowNameCardIdListCount() {
return showNameCardIdList_.size();
}
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @param index The index of the element to return.
* @return The showNameCardIdList at the given index.
*/
public int getShowNameCardIdList(int index) {
return showNameCardIdList_.getInt(index);
}
private int showNameCardIdListMemoizedSerializedSize = -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 (getShowNameCardIdListList().size() > 0) {
output.writeUInt32NoTag(98);
output.writeUInt32NoTag(showNameCardIdListMemoizedSerializedSize);
}
for (int i = 0; i < showNameCardIdList_.size(); i++) {
output.writeUInt32NoTag(showNameCardIdList_.getInt(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 < showNameCardIdList_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(showNameCardIdList_.getInt(i));
}
size += dataSize;
if (!getShowNameCardIdListList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
showNameCardIdListMemoizedSerializedSize = dataSize;
}
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.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp)) {
return super.equals(obj);
}
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp other = (emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp) obj;
if (getRetcode()
!= other.getRetcode()) return false;
if (!getShowNameCardIdListList()
.equals(other.getShowNameCardIdListList())) 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 (getShowNameCardIdListCount() > 0) {
hash = (37 * hash) + SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER;
hash = (53 * hash) + getShowNameCardIdListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp 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.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp 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.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp 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.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp 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.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp 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.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* CmdId: 4019
* EnetChannelId: 0
* EnetIsReliable: true
* </pre>
*
* Protobuf type {@code UpdatePlayerShowNameCardListRsp}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:UpdatePlayerShowNameCardListRsp)
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRspOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.internal_static_UpdatePlayerShowNameCardListRsp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.internal_static_UpdatePlayerShowNameCardListRsp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.class, emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.Builder.class);
}
// Construct using emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
retcode_ = 0;
showNameCardIdList_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.internal_static_UpdatePlayerShowNameCardListRsp_descriptor;
}
@java.lang.Override
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp getDefaultInstanceForType() {
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.getDefaultInstance();
}
@java.lang.Override
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp build() {
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp buildPartial() {
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp result = new emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp(this);
int from_bitField0_ = bitField0_;
result.retcode_ = retcode_;
if (((bitField0_ & 0x00000001) != 0)) {
showNameCardIdList_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.showNameCardIdList_ = showNameCardIdList_;
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.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp) {
return mergeFrom((emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp other) {
if (other == emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.getDefaultInstance()) return this;
if (other.getRetcode() != 0) {
setRetcode(other.getRetcode());
}
if (!other.showNameCardIdList_.isEmpty()) {
if (showNameCardIdList_.isEmpty()) {
showNameCardIdList_ = other.showNameCardIdList_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureShowNameCardIdListIsMutable();
showNameCardIdList_.addAll(other.showNameCardIdList_);
}
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.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int retcode_ ;
/**
* <code>int32 retcode = 13;</code>
* @return The retcode.
*/
@java.lang.Override
public int getRetcode() {
return retcode_;
}
/**
* <code>int32 retcode = 13;</code>
* @param value The retcode to set.
* @return This builder for chaining.
*/
public Builder setRetcode(int value) {
retcode_ = value;
onChanged();
return this;
}
/**
* <code>int32 retcode = 13;</code>
* @return This builder for chaining.
*/
public Builder clearRetcode() {
retcode_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Internal.IntList showNameCardIdList_ = emptyIntList();
private void ensureShowNameCardIdListIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
showNameCardIdList_ = mutableCopy(showNameCardIdList_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @return A list containing the showNameCardIdList.
*/
public java.util.List<java.lang.Integer>
getShowNameCardIdListList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(showNameCardIdList_) : showNameCardIdList_;
}
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @return The count of showNameCardIdList.
*/
public int getShowNameCardIdListCount() {
return showNameCardIdList_.size();
}
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @param index The index of the element to return.
* @return The showNameCardIdList at the given index.
*/
public int getShowNameCardIdList(int index) {
return showNameCardIdList_.getInt(index);
}
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @param index The index to set the value at.
* @param value The showNameCardIdList to set.
* @return This builder for chaining.
*/
public Builder setShowNameCardIdList(
int index, int value) {
ensureShowNameCardIdListIsMutable();
showNameCardIdList_.setInt(index, value);
onChanged();
return this;
}
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @param value The showNameCardIdList to add.
* @return This builder for chaining.
*/
public Builder addShowNameCardIdList(int value) {
ensureShowNameCardIdListIsMutable();
showNameCardIdList_.addInt(value);
onChanged();
return this;
}
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @param values The showNameCardIdList to add.
* @return This builder for chaining.
*/
public Builder addAllShowNameCardIdList(
java.lang.Iterable<? extends java.lang.Integer> values) {
ensureShowNameCardIdListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, showNameCardIdList_);
onChanged();
return this;
}
/**
* <code>repeated uint32 show_name_card_id_list = 12;</code>
* @return This builder for chaining.
*/
public Builder clearShowNameCardIdList() {
showNameCardIdList_ = 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:UpdatePlayerShowNameCardListRsp)
}
// @@protoc_insertion_point(class_scope:UpdatePlayerShowNameCardListRsp)
private static final emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp();
}
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<UpdatePlayerShowNameCardListRsp>
PARSER = new com.google.protobuf.AbstractParser<UpdatePlayerShowNameCardListRsp>() {
@java.lang.Override
public UpdatePlayerShowNameCardListRsp parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new UpdatePlayerShowNameCardListRsp(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<UpdatePlayerShowNameCardListRsp> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<UpdatePlayerShowNameCardListRsp> getParserForType() {
return PARSER;
}
@java.lang.Override
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_UpdatePlayerShowNameCardListRsp_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_UpdatePlayerShowNameCardListRsp_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%UpdatePlayerShowNameCardListRsp.proto\"" +
"R\n\037UpdatePlayerShowNameCardListRsp\022\017\n\007re" +
"tcode\030\r \001(\005\022\036\n\026show_name_card_id_list\030\014 " +
"\003(\rB\033\n\031emu.grasscutter.net.protob\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_UpdatePlayerShowNameCardListRsp_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_UpdatePlayerShowNameCardListRsp_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_UpdatePlayerShowNameCardListRsp_descriptor,
new java.lang.String[] { "Retcode", "ShowNameCardIdList", });
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -100,6 +100,7 @@ public class Player {
@Getter private PlayerCodex codex; @Getter private PlayerCodex codex;
@Getter @Setter private boolean showAvatars; @Getter @Setter private boolean showAvatars;
@Getter @Setter private List<Integer> showAvatarList; @Getter @Setter private List<Integer> showAvatarList;
@Getter @Setter private List<Integer> showNameCardList;
@Getter private Map<Integer, Integer> properties; @Getter private Map<Integer, Integer> properties;
@Getter @Setter private int currentRealmId; @Getter @Setter private int currentRealmId;
@Getter @Setter private int widgetId; @Getter @Setter private int widgetId;
@ -935,6 +936,7 @@ public class Player {
.setNameCardId(this.getNameCardId()) .setNameCardId(this.getNameCardId())
.setIsShowAvatar(this.isShowAvatars()) .setIsShowAvatar(this.isShowAvatars())
.addAllShowAvatarInfoList(socialShowAvatarInfoList) .addAllShowAvatarInfoList(socialShowAvatarInfoList)
.addAllShowNameCardIdList(this.getShowNameCardInfoList())
.setFinishAchievementNum(0); .setFinishAchievementNum(0);
return social; return social;
} }
@ -968,6 +970,11 @@ public class Player {
return showAvatarInfoList; return showAvatarInfoList;
} }
public List<Integer> getShowNameCardInfoList() {
List<Integer> info = this.getShowNameCardList();
return info == null ? new ArrayList<>() : info;
}
public PlayerWorldLocationInfoOuterClass.PlayerWorldLocationInfo getWorldPlayerLocationInfo() { public PlayerWorldLocationInfoOuterClass.PlayerWorldLocationInfo getWorldPlayerLocationInfo() {
return PlayerWorldLocationInfoOuterClass.PlayerWorldLocationInfo.newBuilder() return PlayerWorldLocationInfoOuterClass.PlayerWorldLocationInfo.newBuilder()
.setSceneId(this.getSceneId()) .setSceneId(this.getSceneId())

View File

@ -0,0 +1,22 @@
package emu.grasscutter.server.packet.recv;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.net.packet.Opcodes;
import emu.grasscutter.net.packet.PacketHandler;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass;
import emu.grasscutter.server.game.GameSession;
import emu.grasscutter.server.packet.send.PacketGetFriendShowNameCardInfoRsp;
@Opcodes(PacketOpcodes.GetFriendShowNameCardInfoReq)
public class HandlerGetFriendShowNameCardInfoReq extends PacketHandler {
@Override
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
var req = GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.parseFrom(payload);
int targetUid = req.getUid();
Player target = session.getServer().getPlayerByUid(targetUid, true);
session.send(new PacketGetFriendShowNameCardInfoRsp(targetUid, target.getShowNameCardInfoList()));
}
}

View File

@ -0,0 +1,20 @@
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.UpdatePlayerShowNameCardListReqOuterClass;
import emu.grasscutter.server.game.GameSession;
import emu.grasscutter.server.packet.send.PacketUpdatePlayerShowNameCardListRsp;
@Opcodes(PacketOpcodes.UpdatePlayerShowNameCardListReq)
public class HandlerUpdatePlayerShowNameCardListReq extends PacketHandler {
@Override
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
var req = UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.parseFrom(payload);
session.getPlayer().setShowNameCardList(req.getShowNameCardIdListList());
session.send(new PacketUpdatePlayerShowNameCardListRsp(req.getShowNameCardIdListList()));
}
}

View File

@ -0,0 +1,21 @@
package emu.grasscutter.server.packet.send;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass;
import java.util.List;
public class PacketGetFriendShowNameCardInfoRsp extends BasePacket {
public PacketGetFriendShowNameCardInfoRsp(int uid, List<Integer> cardIds) {
super(PacketOpcodes.GetFriendShowNameCardInfoRsp);
var rsp = GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.newBuilder()
.setUid(uid)
.addAllShowNameCardIdList(cardIds)
.setRetcode(0)
.build();
this.setData(rsp);
}
}

View File

@ -0,0 +1,20 @@
package emu.grasscutter.server.packet.send;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass;
import java.util.List;
public class PacketUpdatePlayerShowNameCardListRsp extends BasePacket {
public PacketUpdatePlayerShowNameCardListRsp(List<Integer> cardIds) {
super(PacketOpcodes.UpdatePlayerShowNameCardListRsp);
var rsp = UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.newBuilder()
.addAllShowNameCardIdList(cardIds)
.setRetcode(0)
.build();
this.setData(rsp);
}
}