mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-12 21:34:35 +01:00
Implement assist and display avatars
Support list is not implemented yet
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,579 @@
|
|||||||
|
// Code generated by protocol buffer compiler. Do not edit!
|
||||||
|
package emu.lunarcore.proto;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import us.hebi.quickbuf.FieldName;
|
||||||
|
import us.hebi.quickbuf.InvalidProtocolBufferException;
|
||||||
|
import us.hebi.quickbuf.JsonSink;
|
||||||
|
import us.hebi.quickbuf.JsonSource;
|
||||||
|
import us.hebi.quickbuf.MessageFactory;
|
||||||
|
import us.hebi.quickbuf.ProtoMessage;
|
||||||
|
import us.hebi.quickbuf.ProtoSink;
|
||||||
|
import us.hebi.quickbuf.ProtoSource;
|
||||||
|
|
||||||
|
public final class DisplayEquipmentInfoOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code DisplayEquipmentInfo}
|
||||||
|
*/
|
||||||
|
public static final class DisplayEquipmentInfo extends ProtoMessage<DisplayEquipmentInfo> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 promotion = 1;</code>
|
||||||
|
*/
|
||||||
|
private int promotion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 rank = 2;</code>
|
||||||
|
*/
|
||||||
|
private int rank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 tid = 8;</code>
|
||||||
|
*/
|
||||||
|
private int tid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 level = 12;</code>
|
||||||
|
*/
|
||||||
|
private int level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 exp = 13;</code>
|
||||||
|
*/
|
||||||
|
private int exp;
|
||||||
|
|
||||||
|
private DisplayEquipmentInfo() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code DisplayEquipmentInfo}
|
||||||
|
*/
|
||||||
|
public static DisplayEquipmentInfo newInstance() {
|
||||||
|
return new DisplayEquipmentInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 promotion = 1;</code>
|
||||||
|
* @return whether the promotion field is set
|
||||||
|
*/
|
||||||
|
public boolean hasPromotion() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 promotion = 1;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayEquipmentInfo clearPromotion() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
promotion = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 promotion = 1;</code>
|
||||||
|
* @return the promotion
|
||||||
|
*/
|
||||||
|
public int getPromotion() {
|
||||||
|
return promotion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 promotion = 1;</code>
|
||||||
|
* @param value the promotion to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayEquipmentInfo setPromotion(final int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
promotion = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 rank = 2;</code>
|
||||||
|
* @return whether the rank field is set
|
||||||
|
*/
|
||||||
|
public boolean hasRank() {
|
||||||
|
return (bitField0_ & 0x00000002) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 rank = 2;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayEquipmentInfo clearRank() {
|
||||||
|
bitField0_ &= ~0x00000002;
|
||||||
|
rank = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 rank = 2;</code>
|
||||||
|
* @return the rank
|
||||||
|
*/
|
||||||
|
public int getRank() {
|
||||||
|
return rank;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 rank = 2;</code>
|
||||||
|
* @param value the rank to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayEquipmentInfo setRank(final int value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
rank = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 tid = 8;</code>
|
||||||
|
* @return whether the tid field is set
|
||||||
|
*/
|
||||||
|
public boolean hasTid() {
|
||||||
|
return (bitField0_ & 0x00000004) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 tid = 8;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayEquipmentInfo clearTid() {
|
||||||
|
bitField0_ &= ~0x00000004;
|
||||||
|
tid = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 tid = 8;</code>
|
||||||
|
* @return the tid
|
||||||
|
*/
|
||||||
|
public int getTid() {
|
||||||
|
return tid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 tid = 8;</code>
|
||||||
|
* @param value the tid to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayEquipmentInfo setTid(final int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
tid = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 level = 12;</code>
|
||||||
|
* @return whether the level field is set
|
||||||
|
*/
|
||||||
|
public boolean hasLevel() {
|
||||||
|
return (bitField0_ & 0x00000008) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 level = 12;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayEquipmentInfo clearLevel() {
|
||||||
|
bitField0_ &= ~0x00000008;
|
||||||
|
level = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 level = 12;</code>
|
||||||
|
* @return the level
|
||||||
|
*/
|
||||||
|
public int getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 level = 12;</code>
|
||||||
|
* @param value the level to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayEquipmentInfo setLevel(final int value) {
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
level = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 exp = 13;</code>
|
||||||
|
* @return whether the exp field is set
|
||||||
|
*/
|
||||||
|
public boolean hasExp() {
|
||||||
|
return (bitField0_ & 0x00000010) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 exp = 13;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayEquipmentInfo clearExp() {
|
||||||
|
bitField0_ &= ~0x00000010;
|
||||||
|
exp = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 exp = 13;</code>
|
||||||
|
* @return the exp
|
||||||
|
*/
|
||||||
|
public int getExp() {
|
||||||
|
return exp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 exp = 13;</code>
|
||||||
|
* @param value the exp to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayEquipmentInfo setExp(final int value) {
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
exp = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayEquipmentInfo copyFrom(final DisplayEquipmentInfo other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
promotion = other.promotion;
|
||||||
|
rank = other.rank;
|
||||||
|
tid = other.tid;
|
||||||
|
level = other.level;
|
||||||
|
exp = other.exp;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayEquipmentInfo mergeFrom(final DisplayEquipmentInfo other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasPromotion()) {
|
||||||
|
setPromotion(other.promotion);
|
||||||
|
}
|
||||||
|
if (other.hasRank()) {
|
||||||
|
setRank(other.rank);
|
||||||
|
}
|
||||||
|
if (other.hasTid()) {
|
||||||
|
setTid(other.tid);
|
||||||
|
}
|
||||||
|
if (other.hasLevel()) {
|
||||||
|
setLevel(other.level);
|
||||||
|
}
|
||||||
|
if (other.hasExp()) {
|
||||||
|
setExp(other.exp);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayEquipmentInfo clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
promotion = 0;
|
||||||
|
rank = 0;
|
||||||
|
tid = 0;
|
||||||
|
level = 0;
|
||||||
|
exp = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayEquipmentInfo clearQuick() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(o instanceof DisplayEquipmentInfo)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
DisplayEquipmentInfo other = (DisplayEquipmentInfo) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasPromotion() || promotion == other.promotion)
|
||||||
|
&& (!hasRank() || rank == other.rank)
|
||||||
|
&& (!hasTid() || tid == other.tid)
|
||||||
|
&& (!hasLevel() || level == other.level)
|
||||||
|
&& (!hasExp() || exp == other.exp);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRawByte((byte) 8);
|
||||||
|
output.writeUInt32NoTag(promotion);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeRawByte((byte) 16);
|
||||||
|
output.writeUInt32NoTag(rank);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeRawByte((byte) 64);
|
||||||
|
output.writeUInt32NoTag(tid);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
|
output.writeRawByte((byte) 96);
|
||||||
|
output.writeUInt32NoTag(level);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
output.writeRawByte((byte) 104);
|
||||||
|
output.writeUInt32NoTag(exp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(promotion);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(rank);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(tid);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(level);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(exp);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public DisplayEquipmentInfo mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 8: {
|
||||||
|
// promotion
|
||||||
|
promotion = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 16) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 16: {
|
||||||
|
// rank
|
||||||
|
rank = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 64) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 64: {
|
||||||
|
// tid
|
||||||
|
tid = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 96) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 96: {
|
||||||
|
// level
|
||||||
|
level = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 104) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 104: {
|
||||||
|
// exp
|
||||||
|
exp = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 0: {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!input.skipField(tag)) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
tag = input.readTag();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final JsonSink output) throws IOException {
|
||||||
|
output.beginObject();
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.promotion, promotion);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.rank, rank);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.tid, tid);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.level, level);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.exp, exp);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayEquipmentInfo mergeFrom(final JsonSource input) throws IOException {
|
||||||
|
if (!input.beginObject()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
while (!input.isAtEnd()) {
|
||||||
|
switch (input.readFieldHash()) {
|
||||||
|
case -799212381: {
|
||||||
|
if (input.isAtField(FieldNames.promotion)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
promotion = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3492908: {
|
||||||
|
if (input.isAtField(FieldNames.rank)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
rank = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 114831: {
|
||||||
|
if (input.isAtField(FieldNames.tid)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
tid = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 102865796: {
|
||||||
|
if (input.isAtField(FieldNames.level)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
level = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 100893: {
|
||||||
|
if (input.isAtField(FieldNames.exp)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
exp = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayEquipmentInfo clone() {
|
||||||
|
return new DisplayEquipmentInfo().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DisplayEquipmentInfo parseFrom(final byte[] data) throws
|
||||||
|
InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new DisplayEquipmentInfo(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DisplayEquipmentInfo parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new DisplayEquipmentInfo(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DisplayEquipmentInfo parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new DisplayEquipmentInfo(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating DisplayEquipmentInfo messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<DisplayEquipmentInfo> getFactory() {
|
||||||
|
return DisplayEquipmentInfoFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum DisplayEquipmentInfoFactory implements MessageFactory<DisplayEquipmentInfo> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayEquipmentInfo create() {
|
||||||
|
return DisplayEquipmentInfo.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName promotion = FieldName.forField("promotion");
|
||||||
|
|
||||||
|
static final FieldName rank = FieldName.forField("rank");
|
||||||
|
|
||||||
|
static final FieldName tid = FieldName.forField("tid");
|
||||||
|
|
||||||
|
static final FieldName level = FieldName.forField("level");
|
||||||
|
|
||||||
|
static final FieldName exp = FieldName.forField("exp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,695 @@
|
|||||||
|
// Code generated by protocol buffer compiler. Do not edit!
|
||||||
|
package emu.lunarcore.proto;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import us.hebi.quickbuf.FieldName;
|
||||||
|
import us.hebi.quickbuf.InvalidProtocolBufferException;
|
||||||
|
import us.hebi.quickbuf.JsonSink;
|
||||||
|
import us.hebi.quickbuf.JsonSource;
|
||||||
|
import us.hebi.quickbuf.MessageFactory;
|
||||||
|
import us.hebi.quickbuf.ProtoMessage;
|
||||||
|
import us.hebi.quickbuf.ProtoSink;
|
||||||
|
import us.hebi.quickbuf.ProtoSource;
|
||||||
|
import us.hebi.quickbuf.RepeatedMessage;
|
||||||
|
|
||||||
|
public final class DisplayRelicInfoOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code DisplayRelicInfo}
|
||||||
|
*/
|
||||||
|
public static final class DisplayRelicInfo extends ProtoMessage<DisplayRelicInfo> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 exp = 1;</code>
|
||||||
|
*/
|
||||||
|
private int exp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 slot = 2;</code>
|
||||||
|
*/
|
||||||
|
private int slot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 main_affix_id = 6;</code>
|
||||||
|
*/
|
||||||
|
private int mainAffixId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 tid = 8;</code>
|
||||||
|
*/
|
||||||
|
private int tid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 level = 15;</code>
|
||||||
|
*/
|
||||||
|
private int level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .RelicAffix sub_affix_list = 14;</code>
|
||||||
|
*/
|
||||||
|
private final RepeatedMessage<RelicAffixOuterClass.RelicAffix> subAffixList = RepeatedMessage.newEmptyInstance(RelicAffixOuterClass.RelicAffix.getFactory());
|
||||||
|
|
||||||
|
private DisplayRelicInfo() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code DisplayRelicInfo}
|
||||||
|
*/
|
||||||
|
public static DisplayRelicInfo newInstance() {
|
||||||
|
return new DisplayRelicInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 exp = 1;</code>
|
||||||
|
* @return whether the exp field is set
|
||||||
|
*/
|
||||||
|
public boolean hasExp() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 exp = 1;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo clearExp() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
exp = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 exp = 1;</code>
|
||||||
|
* @return the exp
|
||||||
|
*/
|
||||||
|
public int getExp() {
|
||||||
|
return exp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 exp = 1;</code>
|
||||||
|
* @param value the exp to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo setExp(final int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
exp = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 slot = 2;</code>
|
||||||
|
* @return whether the slot field is set
|
||||||
|
*/
|
||||||
|
public boolean hasSlot() {
|
||||||
|
return (bitField0_ & 0x00000002) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 slot = 2;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo clearSlot() {
|
||||||
|
bitField0_ &= ~0x00000002;
|
||||||
|
slot = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 slot = 2;</code>
|
||||||
|
* @return the slot
|
||||||
|
*/
|
||||||
|
public int getSlot() {
|
||||||
|
return slot;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 slot = 2;</code>
|
||||||
|
* @param value the slot to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo setSlot(final int value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
slot = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 main_affix_id = 6;</code>
|
||||||
|
* @return whether the mainAffixId field is set
|
||||||
|
*/
|
||||||
|
public boolean hasMainAffixId() {
|
||||||
|
return (bitField0_ & 0x00000004) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 main_affix_id = 6;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo clearMainAffixId() {
|
||||||
|
bitField0_ &= ~0x00000004;
|
||||||
|
mainAffixId = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 main_affix_id = 6;</code>
|
||||||
|
* @return the mainAffixId
|
||||||
|
*/
|
||||||
|
public int getMainAffixId() {
|
||||||
|
return mainAffixId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 main_affix_id = 6;</code>
|
||||||
|
* @param value the mainAffixId to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo setMainAffixId(final int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
mainAffixId = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 tid = 8;</code>
|
||||||
|
* @return whether the tid field is set
|
||||||
|
*/
|
||||||
|
public boolean hasTid() {
|
||||||
|
return (bitField0_ & 0x00000008) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 tid = 8;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo clearTid() {
|
||||||
|
bitField0_ &= ~0x00000008;
|
||||||
|
tid = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 tid = 8;</code>
|
||||||
|
* @return the tid
|
||||||
|
*/
|
||||||
|
public int getTid() {
|
||||||
|
return tid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 tid = 8;</code>
|
||||||
|
* @param value the tid to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo setTid(final int value) {
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
tid = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 level = 15;</code>
|
||||||
|
* @return whether the level field is set
|
||||||
|
*/
|
||||||
|
public boolean hasLevel() {
|
||||||
|
return (bitField0_ & 0x00000010) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 level = 15;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo clearLevel() {
|
||||||
|
bitField0_ &= ~0x00000010;
|
||||||
|
level = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 level = 15;</code>
|
||||||
|
* @return the level
|
||||||
|
*/
|
||||||
|
public int getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 level = 15;</code>
|
||||||
|
* @param value the level to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo setLevel(final int value) {
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
level = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .RelicAffix sub_affix_list = 14;</code>
|
||||||
|
* @return whether the subAffixList field is set
|
||||||
|
*/
|
||||||
|
public boolean hasSubAffixList() {
|
||||||
|
return (bitField0_ & 0x00000020) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .RelicAffix sub_affix_list = 14;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo clearSubAffixList() {
|
||||||
|
bitField0_ &= ~0x00000020;
|
||||||
|
subAffixList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .RelicAffix sub_affix_list = 14;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object without modifying any has state.
|
||||||
|
* The returned object should not be modified and be treated as read-only.
|
||||||
|
*
|
||||||
|
* Use {@link #getMutableSubAffixList()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<RelicAffixOuterClass.RelicAffix> getSubAffixList() {
|
||||||
|
return subAffixList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .RelicAffix sub_affix_list = 14;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object and sets the corresponding
|
||||||
|
* has state. The returned object will become part of this message and its
|
||||||
|
* contents may be modified as long as the has state is not cleared.
|
||||||
|
*
|
||||||
|
* @return internal storage object for modifications
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<RelicAffixOuterClass.RelicAffix> getMutableSubAffixList() {
|
||||||
|
bitField0_ |= 0x00000020;
|
||||||
|
return subAffixList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .RelicAffix sub_affix_list = 14;</code>
|
||||||
|
* @param value the subAffixList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo addSubAffixList(final RelicAffixOuterClass.RelicAffix value) {
|
||||||
|
bitField0_ |= 0x00000020;
|
||||||
|
subAffixList.add(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .RelicAffix sub_affix_list = 14;</code>
|
||||||
|
* @param values the subAffixList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public DisplayRelicInfo addAllSubAffixList(final RelicAffixOuterClass.RelicAffix... values) {
|
||||||
|
bitField0_ |= 0x00000020;
|
||||||
|
subAffixList.addAll(values);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayRelicInfo copyFrom(final DisplayRelicInfo other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
exp = other.exp;
|
||||||
|
slot = other.slot;
|
||||||
|
mainAffixId = other.mainAffixId;
|
||||||
|
tid = other.tid;
|
||||||
|
level = other.level;
|
||||||
|
subAffixList.copyFrom(other.subAffixList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayRelicInfo mergeFrom(final DisplayRelicInfo other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasExp()) {
|
||||||
|
setExp(other.exp);
|
||||||
|
}
|
||||||
|
if (other.hasSlot()) {
|
||||||
|
setSlot(other.slot);
|
||||||
|
}
|
||||||
|
if (other.hasMainAffixId()) {
|
||||||
|
setMainAffixId(other.mainAffixId);
|
||||||
|
}
|
||||||
|
if (other.hasTid()) {
|
||||||
|
setTid(other.tid);
|
||||||
|
}
|
||||||
|
if (other.hasLevel()) {
|
||||||
|
setLevel(other.level);
|
||||||
|
}
|
||||||
|
if (other.hasSubAffixList()) {
|
||||||
|
getMutableSubAffixList().addAll(other.subAffixList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayRelicInfo clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
exp = 0;
|
||||||
|
slot = 0;
|
||||||
|
mainAffixId = 0;
|
||||||
|
tid = 0;
|
||||||
|
level = 0;
|
||||||
|
subAffixList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayRelicInfo clearQuick() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
subAffixList.clearQuick();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(o instanceof DisplayRelicInfo)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
DisplayRelicInfo other = (DisplayRelicInfo) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasExp() || exp == other.exp)
|
||||||
|
&& (!hasSlot() || slot == other.slot)
|
||||||
|
&& (!hasMainAffixId() || mainAffixId == other.mainAffixId)
|
||||||
|
&& (!hasTid() || tid == other.tid)
|
||||||
|
&& (!hasLevel() || level == other.level)
|
||||||
|
&& (!hasSubAffixList() || subAffixList.equals(other.subAffixList));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRawByte((byte) 8);
|
||||||
|
output.writeUInt32NoTag(exp);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeRawByte((byte) 16);
|
||||||
|
output.writeUInt32NoTag(slot);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeRawByte((byte) 48);
|
||||||
|
output.writeUInt32NoTag(mainAffixId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
|
output.writeRawByte((byte) 64);
|
||||||
|
output.writeUInt32NoTag(tid);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
output.writeRawByte((byte) 120);
|
||||||
|
output.writeUInt32NoTag(level);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
|
for (int i = 0; i < subAffixList.length(); i++) {
|
||||||
|
output.writeRawByte((byte) 114);
|
||||||
|
output.writeMessageNoTag(subAffixList.get(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(exp);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(slot);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(mainAffixId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(tid);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(level);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
|
size += (1 * subAffixList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(subAffixList);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public DisplayRelicInfo mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 8: {
|
||||||
|
// exp
|
||||||
|
exp = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 16) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 16: {
|
||||||
|
// slot
|
||||||
|
slot = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 48) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 48: {
|
||||||
|
// mainAffixId
|
||||||
|
mainAffixId = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 64) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 64: {
|
||||||
|
// tid
|
||||||
|
tid = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 120) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 120: {
|
||||||
|
// level
|
||||||
|
level = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 114) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 114: {
|
||||||
|
// subAffixList
|
||||||
|
tag = input.readRepeatedMessage(subAffixList, tag);
|
||||||
|
bitField0_ |= 0x00000020;
|
||||||
|
if (tag != 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 0: {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!input.skipField(tag)) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
tag = input.readTag();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final JsonSink output) throws IOException {
|
||||||
|
output.beginObject();
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.exp, exp);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.slot, slot);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.mainAffixId, mainAffixId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.tid, tid);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.level, level);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
|
output.writeRepeatedMessage(FieldNames.subAffixList, subAffixList);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayRelicInfo mergeFrom(final JsonSource input) throws IOException {
|
||||||
|
if (!input.beginObject()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
while (!input.isAtEnd()) {
|
||||||
|
switch (input.readFieldHash()) {
|
||||||
|
case 100893: {
|
||||||
|
if (input.isAtField(FieldNames.exp)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
exp = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3533310: {
|
||||||
|
if (input.isAtField(FieldNames.slot)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
slot = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case -1973876974:
|
||||||
|
case -1426712144: {
|
||||||
|
if (input.isAtField(FieldNames.mainAffixId)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
mainAffixId = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 114831: {
|
||||||
|
if (input.isAtField(FieldNames.tid)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
tid = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 102865796: {
|
||||||
|
if (input.isAtField(FieldNames.level)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
level = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case -600836050:
|
||||||
|
case 919890188: {
|
||||||
|
if (input.isAtField(FieldNames.subAffixList)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readRepeatedMessage(subAffixList);
|
||||||
|
bitField0_ |= 0x00000020;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayRelicInfo clone() {
|
||||||
|
return new DisplayRelicInfo().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DisplayRelicInfo parseFrom(final byte[] data) throws
|
||||||
|
InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new DisplayRelicInfo(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DisplayRelicInfo parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new DisplayRelicInfo(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DisplayRelicInfo parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new DisplayRelicInfo(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating DisplayRelicInfo messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<DisplayRelicInfo> getFactory() {
|
||||||
|
return DisplayRelicInfoFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum DisplayRelicInfoFactory implements MessageFactory<DisplayRelicInfo> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DisplayRelicInfo create() {
|
||||||
|
return DisplayRelicInfo.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName exp = FieldName.forField("exp");
|
||||||
|
|
||||||
|
static final FieldName slot = FieldName.forField("slot");
|
||||||
|
|
||||||
|
static final FieldName mainAffixId = FieldName.forField("mainAffixId", "main_affix_id");
|
||||||
|
|
||||||
|
static final FieldName tid = FieldName.forField("tid");
|
||||||
|
|
||||||
|
static final FieldName level = FieldName.forField("level");
|
||||||
|
|
||||||
|
static final FieldName subAffixList = FieldName.forField("subAffixList", "sub_affix_list");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ import us.hebi.quickbuf.MessageFactory;
|
|||||||
import us.hebi.quickbuf.ProtoMessage;
|
import us.hebi.quickbuf.ProtoMessage;
|
||||||
import us.hebi.quickbuf.ProtoSink;
|
import us.hebi.quickbuf.ProtoSink;
|
||||||
import us.hebi.quickbuf.ProtoSource;
|
import us.hebi.quickbuf.ProtoSource;
|
||||||
|
import us.hebi.quickbuf.RepeatedMessage;
|
||||||
import us.hebi.quickbuf.Utf8String;
|
import us.hebi.quickbuf.Utf8String;
|
||||||
|
|
||||||
public final class PlayerDetailInfoOuterClass {
|
public final class PlayerDetailInfoOuterClass {
|
||||||
@@ -44,6 +45,11 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
*/
|
*/
|
||||||
private int platformType;
|
private int platformType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional bool show_display_avatars = 14;</code>
|
||||||
|
*/
|
||||||
|
private boolean showDisplayAvatars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional .PlayerRecordInfo record_info = 7;</code>
|
* <code>optional .PlayerRecordInfo record_info = 7;</code>
|
||||||
*/
|
*/
|
||||||
@@ -64,6 +70,16 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
*/
|
*/
|
||||||
private final Utf8String nickname = Utf8String.newEmptyInstance();
|
private final Utf8String nickname = Utf8String.newEmptyInstance();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo display_avatar_list = 13;</code>
|
||||||
|
*/
|
||||||
|
private final RepeatedMessage<DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo> displayAvatarList = RepeatedMessage.newEmptyInstance(DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo.getFactory());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo assist_avatar_list = 425;</code>
|
||||||
|
*/
|
||||||
|
private final RepeatedMessage<DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo> assistAvatarList = RepeatedMessage.newEmptyInstance(DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo.getFactory());
|
||||||
|
|
||||||
private PlayerDetailInfo() {
|
private PlayerDetailInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -284,12 +300,49 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional bool show_display_avatars = 14;</code>
|
||||||
|
* @return whether the showDisplayAvatars field is set
|
||||||
|
*/
|
||||||
|
public boolean hasShowDisplayAvatars() {
|
||||||
|
return (bitField0_ & 0x00000020) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional bool show_display_avatars = 14;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public PlayerDetailInfo clearShowDisplayAvatars() {
|
||||||
|
bitField0_ &= ~0x00000020;
|
||||||
|
showDisplayAvatars = false;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional bool show_display_avatars = 14;</code>
|
||||||
|
* @return the showDisplayAvatars
|
||||||
|
*/
|
||||||
|
public boolean getShowDisplayAvatars() {
|
||||||
|
return showDisplayAvatars;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional bool show_display_avatars = 14;</code>
|
||||||
|
* @param value the showDisplayAvatars to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public PlayerDetailInfo setShowDisplayAvatars(final boolean value) {
|
||||||
|
bitField0_ |= 0x00000020;
|
||||||
|
showDisplayAvatars = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional .PlayerRecordInfo record_info = 7;</code>
|
* <code>optional .PlayerRecordInfo record_info = 7;</code>
|
||||||
* @return whether the recordInfo field is set
|
* @return whether the recordInfo field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasRecordInfo() {
|
public boolean hasRecordInfo() {
|
||||||
return (bitField0_ & 0x00000020) != 0;
|
return (bitField0_ & 0x00000040) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -297,7 +350,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public PlayerDetailInfo clearRecordInfo() {
|
public PlayerDetailInfo clearRecordInfo() {
|
||||||
bitField0_ &= ~0x00000020;
|
bitField0_ &= ~0x00000040;
|
||||||
recordInfo.clear();
|
recordInfo.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -326,7 +379,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return internal storage object for modifications
|
* @return internal storage object for modifications
|
||||||
*/
|
*/
|
||||||
public PlayerRecordInfoOuterClass.PlayerRecordInfo getMutableRecordInfo() {
|
public PlayerRecordInfoOuterClass.PlayerRecordInfo getMutableRecordInfo() {
|
||||||
bitField0_ |= 0x00000020;
|
bitField0_ |= 0x00000040;
|
||||||
return recordInfo;
|
return recordInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,7 +389,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public PlayerDetailInfo setRecordInfo(final PlayerRecordInfoOuterClass.PlayerRecordInfo value) {
|
public PlayerDetailInfo setRecordInfo(final PlayerRecordInfoOuterClass.PlayerRecordInfo value) {
|
||||||
bitField0_ |= 0x00000020;
|
bitField0_ |= 0x00000040;
|
||||||
recordInfo.copyFrom(value);
|
recordInfo.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -346,7 +399,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return whether the displaySettings field is set
|
* @return whether the displaySettings field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasDisplaySettings() {
|
public boolean hasDisplaySettings() {
|
||||||
return (bitField0_ & 0x00000040) != 0;
|
return (bitField0_ & 0x00000080) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -354,7 +407,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public PlayerDetailInfo clearDisplaySettings() {
|
public PlayerDetailInfo clearDisplaySettings() {
|
||||||
bitField0_ &= ~0x00000040;
|
bitField0_ &= ~0x00000080;
|
||||||
displaySettings.clear();
|
displaySettings.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -383,7 +436,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return internal storage object for modifications
|
* @return internal storage object for modifications
|
||||||
*/
|
*/
|
||||||
public PlayerDisplaySettingsOuterClass.PlayerDisplaySettings getMutableDisplaySettings() {
|
public PlayerDisplaySettingsOuterClass.PlayerDisplaySettings getMutableDisplaySettings() {
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000080;
|
||||||
return displaySettings;
|
return displaySettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,7 +447,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
*/
|
*/
|
||||||
public PlayerDetailInfo setDisplaySettings(
|
public PlayerDetailInfo setDisplaySettings(
|
||||||
final PlayerDisplaySettingsOuterClass.PlayerDisplaySettings value) {
|
final PlayerDisplaySettingsOuterClass.PlayerDisplaySettings value) {
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000080;
|
||||||
displaySettings.copyFrom(value);
|
displaySettings.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -404,7 +457,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return whether the signature field is set
|
* @return whether the signature field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasSignature() {
|
public boolean hasSignature() {
|
||||||
return (bitField0_ & 0x00000080) != 0;
|
return (bitField0_ & 0x00000100) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -412,7 +465,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public PlayerDetailInfo clearSignature() {
|
public PlayerDetailInfo clearSignature() {
|
||||||
bitField0_ &= ~0x00000080;
|
bitField0_ &= ~0x00000100;
|
||||||
signature.clear();
|
signature.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -438,7 +491,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return internal {@code Utf8String} representation of signature for modifications
|
* @return internal {@code Utf8String} representation of signature for modifications
|
||||||
*/
|
*/
|
||||||
public Utf8String getMutableSignatureBytes() {
|
public Utf8String getMutableSignatureBytes() {
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000100;
|
||||||
return this.signature;
|
return this.signature;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,7 +501,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public PlayerDetailInfo setSignature(final CharSequence value) {
|
public PlayerDetailInfo setSignature(final CharSequence value) {
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000100;
|
||||||
signature.copyFrom(value);
|
signature.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -459,7 +512,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public PlayerDetailInfo setSignature(final Utf8String value) {
|
public PlayerDetailInfo setSignature(final Utf8String value) {
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000100;
|
||||||
signature.copyFrom(value);
|
signature.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -469,7 +522,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return whether the nickname field is set
|
* @return whether the nickname field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasNickname() {
|
public boolean hasNickname() {
|
||||||
return (bitField0_ & 0x00000100) != 0;
|
return (bitField0_ & 0x00000200) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -477,7 +530,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public PlayerDetailInfo clearNickname() {
|
public PlayerDetailInfo clearNickname() {
|
||||||
bitField0_ &= ~0x00000100;
|
bitField0_ &= ~0x00000200;
|
||||||
nickname.clear();
|
nickname.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -503,7 +556,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return internal {@code Utf8String} representation of nickname for modifications
|
* @return internal {@code Utf8String} representation of nickname for modifications
|
||||||
*/
|
*/
|
||||||
public Utf8String getMutableNicknameBytes() {
|
public Utf8String getMutableNicknameBytes() {
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000200;
|
||||||
return this.nickname;
|
return this.nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -513,7 +566,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public PlayerDetailInfo setNickname(final CharSequence value) {
|
public PlayerDetailInfo setNickname(final CharSequence value) {
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000200;
|
||||||
nickname.copyFrom(value);
|
nickname.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -524,11 +577,155 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public PlayerDetailInfo setNickname(final Utf8String value) {
|
public PlayerDetailInfo setNickname(final Utf8String value) {
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000200;
|
||||||
nickname.copyFrom(value);
|
nickname.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo display_avatar_list = 13;</code>
|
||||||
|
* @return whether the displayAvatarList field is set
|
||||||
|
*/
|
||||||
|
public boolean hasDisplayAvatarList() {
|
||||||
|
return (bitField0_ & 0x00000400) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo display_avatar_list = 13;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public PlayerDetailInfo clearDisplayAvatarList() {
|
||||||
|
bitField0_ &= ~0x00000400;
|
||||||
|
displayAvatarList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo display_avatar_list = 13;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object without modifying any has state.
|
||||||
|
* The returned object should not be modified and be treated as read-only.
|
||||||
|
*
|
||||||
|
* Use {@link #getMutableDisplayAvatarList()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo> getDisplayAvatarList(
|
||||||
|
) {
|
||||||
|
return displayAvatarList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo display_avatar_list = 13;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object and sets the corresponding
|
||||||
|
* has state. The returned object will become part of this message and its
|
||||||
|
* contents may be modified as long as the has state is not cleared.
|
||||||
|
*
|
||||||
|
* @return internal storage object for modifications
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo> getMutableDisplayAvatarList(
|
||||||
|
) {
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
return displayAvatarList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo display_avatar_list = 13;</code>
|
||||||
|
* @param value the displayAvatarList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public PlayerDetailInfo addDisplayAvatarList(
|
||||||
|
final DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo value) {
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
displayAvatarList.add(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo display_avatar_list = 13;</code>
|
||||||
|
* @param values the displayAvatarList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public PlayerDetailInfo addAllDisplayAvatarList(
|
||||||
|
final DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo... values) {
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
displayAvatarList.addAll(values);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo assist_avatar_list = 425;</code>
|
||||||
|
* @return whether the assistAvatarList field is set
|
||||||
|
*/
|
||||||
|
public boolean hasAssistAvatarList() {
|
||||||
|
return (bitField0_ & 0x00000800) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo assist_avatar_list = 425;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public PlayerDetailInfo clearAssistAvatarList() {
|
||||||
|
bitField0_ &= ~0x00000800;
|
||||||
|
assistAvatarList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo assist_avatar_list = 425;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object without modifying any has state.
|
||||||
|
* The returned object should not be modified and be treated as read-only.
|
||||||
|
*
|
||||||
|
* Use {@link #getMutableAssistAvatarList()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo> getAssistAvatarList(
|
||||||
|
) {
|
||||||
|
return assistAvatarList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo assist_avatar_list = 425;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object and sets the corresponding
|
||||||
|
* has state. The returned object will become part of this message and its
|
||||||
|
* contents may be modified as long as the has state is not cleared.
|
||||||
|
*
|
||||||
|
* @return internal storage object for modifications
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo> getMutableAssistAvatarList(
|
||||||
|
) {
|
||||||
|
bitField0_ |= 0x00000800;
|
||||||
|
return assistAvatarList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo assist_avatar_list = 425;</code>
|
||||||
|
* @param value the assistAvatarList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public PlayerDetailInfo addAssistAvatarList(
|
||||||
|
final DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo value) {
|
||||||
|
bitField0_ |= 0x00000800;
|
||||||
|
assistAvatarList.add(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatarDetailInfo assist_avatar_list = 425;</code>
|
||||||
|
* @param values the assistAvatarList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public PlayerDetailInfo addAllAssistAvatarList(
|
||||||
|
final DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo... values) {
|
||||||
|
bitField0_ |= 0x00000800;
|
||||||
|
assistAvatarList.addAll(values);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayerDetailInfo copyFrom(final PlayerDetailInfo other) {
|
public PlayerDetailInfo copyFrom(final PlayerDetailInfo other) {
|
||||||
cachedSize = other.cachedSize;
|
cachedSize = other.cachedSize;
|
||||||
@@ -539,10 +736,13 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
worldLevel = other.worldLevel;
|
worldLevel = other.worldLevel;
|
||||||
level = other.level;
|
level = other.level;
|
||||||
platformType = other.platformType;
|
platformType = other.platformType;
|
||||||
|
showDisplayAvatars = other.showDisplayAvatars;
|
||||||
recordInfo.copyFrom(other.recordInfo);
|
recordInfo.copyFrom(other.recordInfo);
|
||||||
displaySettings.copyFrom(other.displaySettings);
|
displaySettings.copyFrom(other.displaySettings);
|
||||||
signature.copyFrom(other.signature);
|
signature.copyFrom(other.signature);
|
||||||
nickname.copyFrom(other.nickname);
|
nickname.copyFrom(other.nickname);
|
||||||
|
displayAvatarList.copyFrom(other.displayAvatarList);
|
||||||
|
assistAvatarList.copyFrom(other.assistAvatarList);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -568,6 +768,9 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
if (other.hasPlatformType()) {
|
if (other.hasPlatformType()) {
|
||||||
setPlatformTypeValue(other.platformType);
|
setPlatformTypeValue(other.platformType);
|
||||||
}
|
}
|
||||||
|
if (other.hasShowDisplayAvatars()) {
|
||||||
|
setShowDisplayAvatars(other.showDisplayAvatars);
|
||||||
|
}
|
||||||
if (other.hasRecordInfo()) {
|
if (other.hasRecordInfo()) {
|
||||||
getMutableRecordInfo().mergeFrom(other.recordInfo);
|
getMutableRecordInfo().mergeFrom(other.recordInfo);
|
||||||
}
|
}
|
||||||
@@ -580,6 +783,12 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
if (other.hasNickname()) {
|
if (other.hasNickname()) {
|
||||||
getMutableNicknameBytes().copyFrom(other.nickname);
|
getMutableNicknameBytes().copyFrom(other.nickname);
|
||||||
}
|
}
|
||||||
|
if (other.hasDisplayAvatarList()) {
|
||||||
|
getMutableDisplayAvatarList().addAll(other.displayAvatarList);
|
||||||
|
}
|
||||||
|
if (other.hasAssistAvatarList()) {
|
||||||
|
getMutableAssistAvatarList().addAll(other.assistAvatarList);
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -595,10 +804,13 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
worldLevel = 0;
|
worldLevel = 0;
|
||||||
level = 0;
|
level = 0;
|
||||||
platformType = 0;
|
platformType = 0;
|
||||||
|
showDisplayAvatars = false;
|
||||||
recordInfo.clear();
|
recordInfo.clear();
|
||||||
displaySettings.clear();
|
displaySettings.clear();
|
||||||
signature.clear();
|
signature.clear();
|
||||||
nickname.clear();
|
nickname.clear();
|
||||||
|
displayAvatarList.clear();
|
||||||
|
assistAvatarList.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -613,6 +825,8 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
displaySettings.clearQuick();
|
displaySettings.clearQuick();
|
||||||
signature.clear();
|
signature.clear();
|
||||||
nickname.clear();
|
nickname.clear();
|
||||||
|
displayAvatarList.clearQuick();
|
||||||
|
assistAvatarList.clearQuick();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -631,10 +845,13 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
&& (!hasWorldLevel() || worldLevel == other.worldLevel)
|
&& (!hasWorldLevel() || worldLevel == other.worldLevel)
|
||||||
&& (!hasLevel() || level == other.level)
|
&& (!hasLevel() || level == other.level)
|
||||||
&& (!hasPlatformType() || platformType == other.platformType)
|
&& (!hasPlatformType() || platformType == other.platformType)
|
||||||
|
&& (!hasShowDisplayAvatars() || showDisplayAvatars == other.showDisplayAvatars)
|
||||||
&& (!hasRecordInfo() || recordInfo.equals(other.recordInfo))
|
&& (!hasRecordInfo() || recordInfo.equals(other.recordInfo))
|
||||||
&& (!hasDisplaySettings() || displaySettings.equals(other.displaySettings))
|
&& (!hasDisplaySettings() || displaySettings.equals(other.displaySettings))
|
||||||
&& (!hasSignature() || signature.equals(other.signature))
|
&& (!hasSignature() || signature.equals(other.signature))
|
||||||
&& (!hasNickname() || nickname.equals(other.nickname));
|
&& (!hasNickname() || nickname.equals(other.nickname))
|
||||||
|
&& (!hasDisplayAvatarList() || displayAvatarList.equals(other.displayAvatarList))
|
||||||
|
&& (!hasAssistAvatarList() || assistAvatarList.equals(other.assistAvatarList));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -660,21 +877,37 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
output.writeEnumNoTag(platformType);
|
output.writeEnumNoTag(platformType);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000020) != 0) {
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
|
output.writeRawByte((byte) 112);
|
||||||
|
output.writeBoolNoTag(showDisplayAvatars);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000040) != 0) {
|
||||||
output.writeRawByte((byte) 58);
|
output.writeRawByte((byte) 58);
|
||||||
output.writeMessageNoTag(recordInfo);
|
output.writeMessageNoTag(recordInfo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000040) != 0) {
|
if ((bitField0_ & 0x00000080) != 0) {
|
||||||
output.writeRawLittleEndian16((short) 12202);
|
output.writeRawLittleEndian16((short) 12202);
|
||||||
output.writeMessageNoTag(displaySettings);
|
output.writeMessageNoTag(displaySettings);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000080) != 0) {
|
if ((bitField0_ & 0x00000100) != 0) {
|
||||||
output.writeRawByte((byte) 26);
|
output.writeRawByte((byte) 26);
|
||||||
output.writeStringNoTag(signature);
|
output.writeStringNoTag(signature);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000100) != 0) {
|
if ((bitField0_ & 0x00000200) != 0) {
|
||||||
output.writeRawByte((byte) 34);
|
output.writeRawByte((byte) 34);
|
||||||
output.writeStringNoTag(nickname);
|
output.writeStringNoTag(nickname);
|
||||||
}
|
}
|
||||||
|
if ((bitField0_ & 0x00000400) != 0) {
|
||||||
|
for (int i = 0; i < displayAvatarList.length(); i++) {
|
||||||
|
output.writeRawByte((byte) 106);
|
||||||
|
output.writeMessageNoTag(displayAvatarList.get(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000800) != 0) {
|
||||||
|
for (int i = 0; i < assistAvatarList.length(); i++) {
|
||||||
|
output.writeRawLittleEndian16((short) 6858);
|
||||||
|
output.writeMessageNoTag(assistAvatarList.get(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -696,17 +929,26 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
size += 1 + ProtoSink.computeEnumSizeNoTag(platformType);
|
size += 1 + ProtoSink.computeEnumSizeNoTag(platformType);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000020) != 0) {
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
size += 1 + ProtoSink.computeMessageSizeNoTag(recordInfo);
|
size += 2;
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000040) != 0) {
|
if ((bitField0_ & 0x00000040) != 0) {
|
||||||
size += 2 + ProtoSink.computeMessageSizeNoTag(displaySettings);
|
size += 1 + ProtoSink.computeMessageSizeNoTag(recordInfo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000080) != 0) {
|
if ((bitField0_ & 0x00000080) != 0) {
|
||||||
size += 1 + ProtoSink.computeStringSizeNoTag(signature);
|
size += 2 + ProtoSink.computeMessageSizeNoTag(displaySettings);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000100) != 0) {
|
if ((bitField0_ & 0x00000100) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeStringSizeNoTag(signature);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000200) != 0) {
|
||||||
size += 1 + ProtoSink.computeStringSizeNoTag(nickname);
|
size += 1 + ProtoSink.computeStringSizeNoTag(nickname);
|
||||||
}
|
}
|
||||||
|
if ((bitField0_ & 0x00000400) != 0) {
|
||||||
|
size += (1 * displayAvatarList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(displayAvatarList);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000800) != 0) {
|
||||||
|
size += (2 * assistAvatarList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(assistAvatarList);
|
||||||
|
}
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -761,6 +1003,15 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000010;
|
||||||
}
|
}
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
|
if (tag != 112) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 112: {
|
||||||
|
// showDisplayAvatars
|
||||||
|
showDisplayAvatars = input.readBool();
|
||||||
|
bitField0_ |= 0x00000020;
|
||||||
|
tag = input.readTag();
|
||||||
if (tag != 58) {
|
if (tag != 58) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -768,7 +1019,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
case 58: {
|
case 58: {
|
||||||
// recordInfo
|
// recordInfo
|
||||||
input.readMessage(recordInfo);
|
input.readMessage(recordInfo);
|
||||||
bitField0_ |= 0x00000020;
|
bitField0_ |= 0x00000040;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 6058) {
|
if (tag != 6058) {
|
||||||
break;
|
break;
|
||||||
@@ -777,7 +1028,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
case 6058: {
|
case 6058: {
|
||||||
// displaySettings
|
// displaySettings
|
||||||
input.readMessage(displaySettings);
|
input.readMessage(displaySettings);
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000080;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 26) {
|
if (tag != 26) {
|
||||||
break;
|
break;
|
||||||
@@ -786,7 +1037,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
case 26: {
|
case 26: {
|
||||||
// signature
|
// signature
|
||||||
input.readString(signature);
|
input.readString(signature);
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000100;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 34) {
|
if (tag != 34) {
|
||||||
break;
|
break;
|
||||||
@@ -795,8 +1046,24 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
case 34: {
|
case 34: {
|
||||||
// nickname
|
// nickname
|
||||||
input.readString(nickname);
|
input.readString(nickname);
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000200;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
|
if (tag != 106) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 106: {
|
||||||
|
// displayAvatarList
|
||||||
|
tag = input.readRepeatedMessage(displayAvatarList, tag);
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
if (tag != 3402) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 3402: {
|
||||||
|
// assistAvatarList
|
||||||
|
tag = input.readRepeatedMessage(assistAvatarList, tag);
|
||||||
|
bitField0_ |= 0x00000800;
|
||||||
if (tag != 0) {
|
if (tag != 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -834,17 +1101,26 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
output.writeEnum(FieldNames.platformType, platformType, PlatformTypeOuterClass.PlatformType.converter());
|
output.writeEnum(FieldNames.platformType, platformType, PlatformTypeOuterClass.PlatformType.converter());
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000020) != 0) {
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
output.writeMessage(FieldNames.recordInfo, recordInfo);
|
output.writeBool(FieldNames.showDisplayAvatars, showDisplayAvatars);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000040) != 0) {
|
if ((bitField0_ & 0x00000040) != 0) {
|
||||||
output.writeMessage(FieldNames.displaySettings, displaySettings);
|
output.writeMessage(FieldNames.recordInfo, recordInfo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000080) != 0) {
|
if ((bitField0_ & 0x00000080) != 0) {
|
||||||
output.writeString(FieldNames.signature, signature);
|
output.writeMessage(FieldNames.displaySettings, displaySettings);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000100) != 0) {
|
if ((bitField0_ & 0x00000100) != 0) {
|
||||||
|
output.writeString(FieldNames.signature, signature);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000200) != 0) {
|
||||||
output.writeString(FieldNames.nickname, nickname);
|
output.writeString(FieldNames.nickname, nickname);
|
||||||
}
|
}
|
||||||
|
if ((bitField0_ & 0x00000400) != 0) {
|
||||||
|
output.writeRepeatedMessage(FieldNames.displayAvatarList, displayAvatarList);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000800) != 0) {
|
||||||
|
output.writeRepeatedMessage(FieldNames.assistAvatarList, assistAvatarList);
|
||||||
|
}
|
||||||
output.endObject();
|
output.endObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -918,12 +1194,24 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case -1526656139:
|
||||||
|
case 635559547: {
|
||||||
|
if (input.isAtField(FieldNames.showDisplayAvatars)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
showDisplayAvatars = input.readBool();
|
||||||
|
bitField0_ |= 0x00000020;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 734573727:
|
case 734573727:
|
||||||
case 1317125084: {
|
case 1317125084: {
|
||||||
if (input.isAtField(FieldNames.recordInfo)) {
|
if (input.isAtField(FieldNames.recordInfo)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readMessage(recordInfo);
|
input.readMessage(recordInfo);
|
||||||
bitField0_ |= 0x00000020;
|
bitField0_ |= 0x00000040;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -935,7 +1223,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
if (input.isAtField(FieldNames.displaySettings)) {
|
if (input.isAtField(FieldNames.displaySettings)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readMessage(displaySettings);
|
input.readMessage(displaySettings);
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000080;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -946,7 +1234,7 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
if (input.isAtField(FieldNames.signature)) {
|
if (input.isAtField(FieldNames.signature)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readString(signature);
|
input.readString(signature);
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000100;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -957,7 +1245,31 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
if (input.isAtField(FieldNames.nickname)) {
|
if (input.isAtField(FieldNames.nickname)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readString(nickname);
|
input.readString(nickname);
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000200;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2117925881:
|
||||||
|
case 245562311: {
|
||||||
|
if (input.isAtField(FieldNames.displayAvatarList)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readRepeatedMessage(displayAvatarList);
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1802092768:
|
||||||
|
case 1672618734: {
|
||||||
|
if (input.isAtField(FieldNames.assistAvatarList)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readRepeatedMessage(assistAvatarList);
|
||||||
|
bitField0_ |= 0x00000800;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -1027,6 +1339,8 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
|
|
||||||
static final FieldName platformType = FieldName.forField("platformType", "platform_type");
|
static final FieldName platformType = FieldName.forField("platformType", "platform_type");
|
||||||
|
|
||||||
|
static final FieldName showDisplayAvatars = FieldName.forField("showDisplayAvatars", "show_display_avatars");
|
||||||
|
|
||||||
static final FieldName recordInfo = FieldName.forField("recordInfo", "record_info");
|
static final FieldName recordInfo = FieldName.forField("recordInfo", "record_info");
|
||||||
|
|
||||||
static final FieldName displaySettings = FieldName.forField("displaySettings", "display_settings");
|
static final FieldName displaySettings = FieldName.forField("displaySettings", "display_settings");
|
||||||
@@ -1034,6 +1348,10 @@ public final class PlayerDetailInfoOuterClass {
|
|||||||
static final FieldName signature = FieldName.forField("signature");
|
static final FieldName signature = FieldName.forField("signature");
|
||||||
|
|
||||||
static final FieldName nickname = FieldName.forField("nickname");
|
static final FieldName nickname = FieldName.forField("nickname");
|
||||||
|
|
||||||
|
static final FieldName displayAvatarList = FieldName.forField("displayAvatarList", "display_avatar_list");
|
||||||
|
|
||||||
|
static final FieldName assistAvatarList = FieldName.forField("assistAvatarList", "assist_avatar_list");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,382 @@
|
|||||||
|
// Code generated by protocol buffer compiler. Do not edit!
|
||||||
|
package emu.lunarcore.proto;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import us.hebi.quickbuf.FieldName;
|
||||||
|
import us.hebi.quickbuf.InvalidProtocolBufferException;
|
||||||
|
import us.hebi.quickbuf.JsonSink;
|
||||||
|
import us.hebi.quickbuf.JsonSource;
|
||||||
|
import us.hebi.quickbuf.MessageFactory;
|
||||||
|
import us.hebi.quickbuf.ProtoMessage;
|
||||||
|
import us.hebi.quickbuf.ProtoSink;
|
||||||
|
import us.hebi.quickbuf.ProtoSource;
|
||||||
|
import us.hebi.quickbuf.RepeatedInt;
|
||||||
|
|
||||||
|
public final class SetAssistAvatarCsReqOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code SetAssistAvatarCsReq}
|
||||||
|
*/
|
||||||
|
public static final class SetAssistAvatarCsReq extends ProtoMessage<SetAssistAvatarCsReq> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 avatar_id = 1;</code>
|
||||||
|
*/
|
||||||
|
private int avatarId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 13;</code>
|
||||||
|
*/
|
||||||
|
private final RepeatedInt avatarIdList = RepeatedInt.newEmptyInstance();
|
||||||
|
|
||||||
|
private SetAssistAvatarCsReq() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code SetAssistAvatarCsReq}
|
||||||
|
*/
|
||||||
|
public static SetAssistAvatarCsReq newInstance() {
|
||||||
|
return new SetAssistAvatarCsReq();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 avatar_id = 1;</code>
|
||||||
|
* @return whether the avatarId field is set
|
||||||
|
*/
|
||||||
|
public boolean hasAvatarId() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 avatar_id = 1;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarCsReq clearAvatarId() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
avatarId = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 avatar_id = 1;</code>
|
||||||
|
* @return the avatarId
|
||||||
|
*/
|
||||||
|
public int getAvatarId() {
|
||||||
|
return avatarId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 avatar_id = 1;</code>
|
||||||
|
* @param value the avatarId to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarCsReq setAvatarId(final int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
avatarId = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 13;</code>
|
||||||
|
* @return whether the avatarIdList field is set
|
||||||
|
*/
|
||||||
|
public boolean hasAvatarIdList() {
|
||||||
|
return (bitField0_ & 0x00000002) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 13;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarCsReq clearAvatarIdList() {
|
||||||
|
bitField0_ &= ~0x00000002;
|
||||||
|
avatarIdList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 13;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object without modifying any has state.
|
||||||
|
* The returned object should not be modified and be treated as read-only.
|
||||||
|
*
|
||||||
|
* Use {@link #getMutableAvatarIdList()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public RepeatedInt getAvatarIdList() {
|
||||||
|
return avatarIdList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 13;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object and sets the corresponding
|
||||||
|
* has state. The returned object will become part of this message and its
|
||||||
|
* contents may be modified as long as the has state is not cleared.
|
||||||
|
*
|
||||||
|
* @return internal storage object for modifications
|
||||||
|
*/
|
||||||
|
public RepeatedInt getMutableAvatarIdList() {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
return avatarIdList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 13;</code>
|
||||||
|
* @param value the avatarIdList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarCsReq addAvatarIdList(final int value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
avatarIdList.add(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 13;</code>
|
||||||
|
* @param values the avatarIdList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarCsReq addAllAvatarIdList(final int... values) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
avatarIdList.addAll(values);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarCsReq copyFrom(final SetAssistAvatarCsReq other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
avatarId = other.avatarId;
|
||||||
|
avatarIdList.copyFrom(other.avatarIdList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarCsReq mergeFrom(final SetAssistAvatarCsReq other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasAvatarId()) {
|
||||||
|
setAvatarId(other.avatarId);
|
||||||
|
}
|
||||||
|
if (other.hasAvatarIdList()) {
|
||||||
|
getMutableAvatarIdList().addAll(other.avatarIdList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarCsReq clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
avatarId = 0;
|
||||||
|
avatarIdList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarCsReq clearQuick() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
avatarIdList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(o instanceof SetAssistAvatarCsReq)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
SetAssistAvatarCsReq other = (SetAssistAvatarCsReq) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasAvatarId() || avatarId == other.avatarId)
|
||||||
|
&& (!hasAvatarIdList() || avatarIdList.equals(other.avatarIdList));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRawByte((byte) 8);
|
||||||
|
output.writeUInt32NoTag(avatarId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
for (int i = 0; i < avatarIdList.length(); i++) {
|
||||||
|
output.writeRawByte((byte) 104);
|
||||||
|
output.writeUInt32NoTag(avatarIdList.array()[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(avatarId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
size += (1 * avatarIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(avatarIdList);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public SetAssistAvatarCsReq mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 8: {
|
||||||
|
// avatarId
|
||||||
|
avatarId = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 106) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 106: {
|
||||||
|
// avatarIdList [packed=true]
|
||||||
|
input.readPackedUInt32(avatarIdList, tag);
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 0: {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!input.skipField(tag)) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
tag = input.readTag();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 104: {
|
||||||
|
// avatarIdList [packed=false]
|
||||||
|
tag = input.readRepeatedUInt32(avatarIdList, tag);
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final JsonSink output) throws IOException {
|
||||||
|
output.beginObject();
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.avatarId, avatarId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeRepeatedUInt32(FieldNames.avatarIdList, avatarIdList);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarCsReq mergeFrom(final JsonSource input) throws IOException {
|
||||||
|
if (!input.beginObject()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
while (!input.isAtEnd()) {
|
||||||
|
switch (input.readFieldHash()) {
|
||||||
|
case 1787287636:
|
||||||
|
case -428636735: {
|
||||||
|
if (input.isAtField(FieldNames.avatarId)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
avatarId = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case -1214270702:
|
||||||
|
case 1824281692: {
|
||||||
|
if (input.isAtField(FieldNames.avatarIdList)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readRepeatedUInt32(avatarIdList);
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarCsReq clone() {
|
||||||
|
return new SetAssistAvatarCsReq().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetAssistAvatarCsReq parseFrom(final byte[] data) throws
|
||||||
|
InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetAssistAvatarCsReq(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetAssistAvatarCsReq parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetAssistAvatarCsReq(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetAssistAvatarCsReq parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetAssistAvatarCsReq(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating SetAssistAvatarCsReq messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<SetAssistAvatarCsReq> getFactory() {
|
||||||
|
return SetAssistAvatarCsReqFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum SetAssistAvatarCsReqFactory implements MessageFactory<SetAssistAvatarCsReq> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarCsReq create() {
|
||||||
|
return SetAssistAvatarCsReq.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName avatarId = FieldName.forField("avatarId", "avatar_id");
|
||||||
|
|
||||||
|
static final FieldName avatarIdList = FieldName.forField("avatarIdList", "avatar_id_list");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,462 @@
|
|||||||
|
// Code generated by protocol buffer compiler. Do not edit!
|
||||||
|
package emu.lunarcore.proto;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import us.hebi.quickbuf.FieldName;
|
||||||
|
import us.hebi.quickbuf.InvalidProtocolBufferException;
|
||||||
|
import us.hebi.quickbuf.JsonSink;
|
||||||
|
import us.hebi.quickbuf.JsonSource;
|
||||||
|
import us.hebi.quickbuf.MessageFactory;
|
||||||
|
import us.hebi.quickbuf.ProtoMessage;
|
||||||
|
import us.hebi.quickbuf.ProtoSink;
|
||||||
|
import us.hebi.quickbuf.ProtoSource;
|
||||||
|
import us.hebi.quickbuf.RepeatedInt;
|
||||||
|
|
||||||
|
public final class SetAssistAvatarScRspOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code SetAssistAvatarScRsp}
|
||||||
|
*/
|
||||||
|
public static final class SetAssistAvatarScRsp extends ProtoMessage<SetAssistAvatarScRsp> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 avatar_id = 4;</code>
|
||||||
|
*/
|
||||||
|
private int avatarId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 10;</code>
|
||||||
|
*/
|
||||||
|
private int retcode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 5;</code>
|
||||||
|
*/
|
||||||
|
private final RepeatedInt avatarIdList = RepeatedInt.newEmptyInstance();
|
||||||
|
|
||||||
|
private SetAssistAvatarScRsp() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code SetAssistAvatarScRsp}
|
||||||
|
*/
|
||||||
|
public static SetAssistAvatarScRsp newInstance() {
|
||||||
|
return new SetAssistAvatarScRsp();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 avatar_id = 4;</code>
|
||||||
|
* @return whether the avatarId field is set
|
||||||
|
*/
|
||||||
|
public boolean hasAvatarId() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 avatar_id = 4;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarScRsp clearAvatarId() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
avatarId = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 avatar_id = 4;</code>
|
||||||
|
* @return the avatarId
|
||||||
|
*/
|
||||||
|
public int getAvatarId() {
|
||||||
|
return avatarId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 avatar_id = 4;</code>
|
||||||
|
* @param value the avatarId to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarScRsp setAvatarId(final int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
avatarId = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 10;</code>
|
||||||
|
* @return whether the retcode field is set
|
||||||
|
*/
|
||||||
|
public boolean hasRetcode() {
|
||||||
|
return (bitField0_ & 0x00000002) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 10;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarScRsp clearRetcode() {
|
||||||
|
bitField0_ &= ~0x00000002;
|
||||||
|
retcode = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 10;</code>
|
||||||
|
* @return the retcode
|
||||||
|
*/
|
||||||
|
public int getRetcode() {
|
||||||
|
return retcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 10;</code>
|
||||||
|
* @param value the retcode to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarScRsp setRetcode(final int value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
retcode = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 5;</code>
|
||||||
|
* @return whether the avatarIdList field is set
|
||||||
|
*/
|
||||||
|
public boolean hasAvatarIdList() {
|
||||||
|
return (bitField0_ & 0x00000004) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 5;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarScRsp clearAvatarIdList() {
|
||||||
|
bitField0_ &= ~0x00000004;
|
||||||
|
avatarIdList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 5;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object without modifying any has state.
|
||||||
|
* The returned object should not be modified and be treated as read-only.
|
||||||
|
*
|
||||||
|
* Use {@link #getMutableAvatarIdList()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public RepeatedInt getAvatarIdList() {
|
||||||
|
return avatarIdList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 5;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object and sets the corresponding
|
||||||
|
* has state. The returned object will become part of this message and its
|
||||||
|
* contents may be modified as long as the has state is not cleared.
|
||||||
|
*
|
||||||
|
* @return internal storage object for modifications
|
||||||
|
*/
|
||||||
|
public RepeatedInt getMutableAvatarIdList() {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
return avatarIdList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 5;</code>
|
||||||
|
* @param value the avatarIdList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarScRsp addAvatarIdList(final int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
avatarIdList.add(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 avatar_id_list = 5;</code>
|
||||||
|
* @param values the avatarIdList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetAssistAvatarScRsp addAllAvatarIdList(final int... values) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
avatarIdList.addAll(values);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarScRsp copyFrom(final SetAssistAvatarScRsp other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
avatarId = other.avatarId;
|
||||||
|
retcode = other.retcode;
|
||||||
|
avatarIdList.copyFrom(other.avatarIdList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarScRsp mergeFrom(final SetAssistAvatarScRsp other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasAvatarId()) {
|
||||||
|
setAvatarId(other.avatarId);
|
||||||
|
}
|
||||||
|
if (other.hasRetcode()) {
|
||||||
|
setRetcode(other.retcode);
|
||||||
|
}
|
||||||
|
if (other.hasAvatarIdList()) {
|
||||||
|
getMutableAvatarIdList().addAll(other.avatarIdList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarScRsp clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
avatarId = 0;
|
||||||
|
retcode = 0;
|
||||||
|
avatarIdList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarScRsp clearQuick() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
avatarIdList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(o instanceof SetAssistAvatarScRsp)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
SetAssistAvatarScRsp other = (SetAssistAvatarScRsp) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasAvatarId() || avatarId == other.avatarId)
|
||||||
|
&& (!hasRetcode() || retcode == other.retcode)
|
||||||
|
&& (!hasAvatarIdList() || avatarIdList.equals(other.avatarIdList));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRawByte((byte) 32);
|
||||||
|
output.writeUInt32NoTag(avatarId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeRawByte((byte) 80);
|
||||||
|
output.writeUInt32NoTag(retcode);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
for (int i = 0; i < avatarIdList.length(); i++) {
|
||||||
|
output.writeRawByte((byte) 40);
|
||||||
|
output.writeUInt32NoTag(avatarIdList.array()[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(avatarId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
size += (1 * avatarIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(avatarIdList);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public SetAssistAvatarScRsp mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 32: {
|
||||||
|
// avatarId
|
||||||
|
avatarId = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 80) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 80: {
|
||||||
|
// retcode
|
||||||
|
retcode = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 42) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 42: {
|
||||||
|
// avatarIdList [packed=true]
|
||||||
|
input.readPackedUInt32(avatarIdList, tag);
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 0: {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!input.skipField(tag)) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
tag = input.readTag();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 40: {
|
||||||
|
// avatarIdList [packed=false]
|
||||||
|
tag = input.readRepeatedUInt32(avatarIdList, tag);
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final JsonSink output) throws IOException {
|
||||||
|
output.beginObject();
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.avatarId, avatarId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.retcode, retcode);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeRepeatedUInt32(FieldNames.avatarIdList, avatarIdList);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarScRsp mergeFrom(final JsonSource input) throws IOException {
|
||||||
|
if (!input.beginObject()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
while (!input.isAtEnd()) {
|
||||||
|
switch (input.readFieldHash()) {
|
||||||
|
case 1787287636:
|
||||||
|
case -428636735: {
|
||||||
|
if (input.isAtField(FieldNames.avatarId)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
avatarId = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1097936398: {
|
||||||
|
if (input.isAtField(FieldNames.retcode)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
retcode = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case -1214270702:
|
||||||
|
case 1824281692: {
|
||||||
|
if (input.isAtField(FieldNames.avatarIdList)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readRepeatedUInt32(avatarIdList);
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarScRsp clone() {
|
||||||
|
return new SetAssistAvatarScRsp().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetAssistAvatarScRsp parseFrom(final byte[] data) throws
|
||||||
|
InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetAssistAvatarScRsp(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetAssistAvatarScRsp parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetAssistAvatarScRsp(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetAssistAvatarScRsp parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetAssistAvatarScRsp(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating SetAssistAvatarScRsp messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<SetAssistAvatarScRsp> getFactory() {
|
||||||
|
return SetAssistAvatarScRspFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum SetAssistAvatarScRspFactory implements MessageFactory<SetAssistAvatarScRsp> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetAssistAvatarScRsp create() {
|
||||||
|
return SetAssistAvatarScRsp.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName avatarId = FieldName.forField("avatarId", "avatar_id");
|
||||||
|
|
||||||
|
static final FieldName retcode = FieldName.forField("retcode");
|
||||||
|
|
||||||
|
static final FieldName avatarIdList = FieldName.forField("avatarIdList", "avatar_id_list");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,296 @@
|
|||||||
|
// Code generated by protocol buffer compiler. Do not edit!
|
||||||
|
package emu.lunarcore.proto;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import us.hebi.quickbuf.FieldName;
|
||||||
|
import us.hebi.quickbuf.InvalidProtocolBufferException;
|
||||||
|
import us.hebi.quickbuf.JsonSink;
|
||||||
|
import us.hebi.quickbuf.JsonSource;
|
||||||
|
import us.hebi.quickbuf.MessageFactory;
|
||||||
|
import us.hebi.quickbuf.ProtoMessage;
|
||||||
|
import us.hebi.quickbuf.ProtoSink;
|
||||||
|
import us.hebi.quickbuf.ProtoSource;
|
||||||
|
import us.hebi.quickbuf.RepeatedMessage;
|
||||||
|
|
||||||
|
public final class SetDisplayAvatarCsReqOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code SetDisplayAvatarCsReq}
|
||||||
|
*/
|
||||||
|
public static final class SetDisplayAvatarCsReq extends ProtoMessage<SetDisplayAvatarCsReq> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
*/
|
||||||
|
private final RepeatedMessage<DisplayAvatarOuterClass.DisplayAvatar> displayAvatarList = RepeatedMessage.newEmptyInstance(DisplayAvatarOuterClass.DisplayAvatar.getFactory());
|
||||||
|
|
||||||
|
private SetDisplayAvatarCsReq() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code SetDisplayAvatarCsReq}
|
||||||
|
*/
|
||||||
|
public static SetDisplayAvatarCsReq newInstance() {
|
||||||
|
return new SetDisplayAvatarCsReq();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
* @return whether the displayAvatarList field is set
|
||||||
|
*/
|
||||||
|
public boolean hasDisplayAvatarList() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetDisplayAvatarCsReq clearDisplayAvatarList() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
displayAvatarList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object without modifying any has state.
|
||||||
|
* The returned object should not be modified and be treated as read-only.
|
||||||
|
*
|
||||||
|
* Use {@link #getMutableDisplayAvatarList()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<DisplayAvatarOuterClass.DisplayAvatar> getDisplayAvatarList() {
|
||||||
|
return displayAvatarList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object and sets the corresponding
|
||||||
|
* has state. The returned object will become part of this message and its
|
||||||
|
* contents may be modified as long as the has state is not cleared.
|
||||||
|
*
|
||||||
|
* @return internal storage object for modifications
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<DisplayAvatarOuterClass.DisplayAvatar> getMutableDisplayAvatarList() {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
return displayAvatarList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
* @param value the displayAvatarList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetDisplayAvatarCsReq addDisplayAvatarList(
|
||||||
|
final DisplayAvatarOuterClass.DisplayAvatar value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
displayAvatarList.add(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
* @param values the displayAvatarList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetDisplayAvatarCsReq addAllDisplayAvatarList(
|
||||||
|
final DisplayAvatarOuterClass.DisplayAvatar... values) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
displayAvatarList.addAll(values);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarCsReq copyFrom(final SetDisplayAvatarCsReq other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
displayAvatarList.copyFrom(other.displayAvatarList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarCsReq mergeFrom(final SetDisplayAvatarCsReq other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasDisplayAvatarList()) {
|
||||||
|
getMutableDisplayAvatarList().addAll(other.displayAvatarList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarCsReq clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
displayAvatarList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarCsReq clearQuick() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
displayAvatarList.clearQuick();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(o instanceof SetDisplayAvatarCsReq)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
SetDisplayAvatarCsReq other = (SetDisplayAvatarCsReq) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasDisplayAvatarList() || displayAvatarList.equals(other.displayAvatarList));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
for (int i = 0; i < displayAvatarList.length(); i++) {
|
||||||
|
output.writeRawByte((byte) 42);
|
||||||
|
output.writeMessageNoTag(displayAvatarList.get(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += (1 * displayAvatarList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(displayAvatarList);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public SetDisplayAvatarCsReq mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 42: {
|
||||||
|
// displayAvatarList
|
||||||
|
tag = input.readRepeatedMessage(displayAvatarList, tag);
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
if (tag != 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 0: {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!input.skipField(tag)) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
tag = input.readTag();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final JsonSink output) throws IOException {
|
||||||
|
output.beginObject();
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRepeatedMessage(FieldNames.displayAvatarList, displayAvatarList);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarCsReq mergeFrom(final JsonSource input) throws IOException {
|
||||||
|
if (!input.beginObject()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
while (!input.isAtEnd()) {
|
||||||
|
switch (input.readFieldHash()) {
|
||||||
|
case 2117925881:
|
||||||
|
case 245562311: {
|
||||||
|
if (input.isAtField(FieldNames.displayAvatarList)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readRepeatedMessage(displayAvatarList);
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarCsReq clone() {
|
||||||
|
return new SetDisplayAvatarCsReq().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetDisplayAvatarCsReq parseFrom(final byte[] data) throws
|
||||||
|
InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetDisplayAvatarCsReq(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetDisplayAvatarCsReq parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetDisplayAvatarCsReq(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetDisplayAvatarCsReq parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetDisplayAvatarCsReq(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating SetDisplayAvatarCsReq messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<SetDisplayAvatarCsReq> getFactory() {
|
||||||
|
return SetDisplayAvatarCsReqFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum SetDisplayAvatarCsReqFactory implements MessageFactory<SetDisplayAvatarCsReq> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarCsReq create() {
|
||||||
|
return SetDisplayAvatarCsReq.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName displayAvatarList = FieldName.forField("displayAvatarList", "display_avatar_list");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,376 @@
|
|||||||
|
// Code generated by protocol buffer compiler. Do not edit!
|
||||||
|
package emu.lunarcore.proto;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import us.hebi.quickbuf.FieldName;
|
||||||
|
import us.hebi.quickbuf.InvalidProtocolBufferException;
|
||||||
|
import us.hebi.quickbuf.JsonSink;
|
||||||
|
import us.hebi.quickbuf.JsonSource;
|
||||||
|
import us.hebi.quickbuf.MessageFactory;
|
||||||
|
import us.hebi.quickbuf.ProtoMessage;
|
||||||
|
import us.hebi.quickbuf.ProtoSink;
|
||||||
|
import us.hebi.quickbuf.ProtoSource;
|
||||||
|
import us.hebi.quickbuf.RepeatedMessage;
|
||||||
|
|
||||||
|
public final class SetDisplayAvatarScRspOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code SetDisplayAvatarScRsp}
|
||||||
|
*/
|
||||||
|
public static final class SetDisplayAvatarScRsp extends ProtoMessage<SetDisplayAvatarScRsp> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 1;</code>
|
||||||
|
*/
|
||||||
|
private int retcode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
*/
|
||||||
|
private final RepeatedMessage<DisplayAvatarOuterClass.DisplayAvatar> displayAvatarList = RepeatedMessage.newEmptyInstance(DisplayAvatarOuterClass.DisplayAvatar.getFactory());
|
||||||
|
|
||||||
|
private SetDisplayAvatarScRsp() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code SetDisplayAvatarScRsp}
|
||||||
|
*/
|
||||||
|
public static SetDisplayAvatarScRsp newInstance() {
|
||||||
|
return new SetDisplayAvatarScRsp();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 1;</code>
|
||||||
|
* @return whether the retcode field is set
|
||||||
|
*/
|
||||||
|
public boolean hasRetcode() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 1;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetDisplayAvatarScRsp clearRetcode() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
retcode = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 1;</code>
|
||||||
|
* @return the retcode
|
||||||
|
*/
|
||||||
|
public int getRetcode() {
|
||||||
|
return retcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 1;</code>
|
||||||
|
* @param value the retcode to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetDisplayAvatarScRsp setRetcode(final int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
retcode = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
* @return whether the displayAvatarList field is set
|
||||||
|
*/
|
||||||
|
public boolean hasDisplayAvatarList() {
|
||||||
|
return (bitField0_ & 0x00000002) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetDisplayAvatarScRsp clearDisplayAvatarList() {
|
||||||
|
bitField0_ &= ~0x00000002;
|
||||||
|
displayAvatarList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object without modifying any has state.
|
||||||
|
* The returned object should not be modified and be treated as read-only.
|
||||||
|
*
|
||||||
|
* Use {@link #getMutableDisplayAvatarList()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<DisplayAvatarOuterClass.DisplayAvatar> getDisplayAvatarList() {
|
||||||
|
return displayAvatarList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
*
|
||||||
|
* This method returns the internal storage object and sets the corresponding
|
||||||
|
* has state. The returned object will become part of this message and its
|
||||||
|
* contents may be modified as long as the has state is not cleared.
|
||||||
|
*
|
||||||
|
* @return internal storage object for modifications
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<DisplayAvatarOuterClass.DisplayAvatar> getMutableDisplayAvatarList() {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
return displayAvatarList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
* @param value the displayAvatarList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetDisplayAvatarScRsp addDisplayAvatarList(
|
||||||
|
final DisplayAvatarOuterClass.DisplayAvatar value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
displayAvatarList.add(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .DisplayAvatar display_avatar_list = 5;</code>
|
||||||
|
* @param values the displayAvatarList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SetDisplayAvatarScRsp addAllDisplayAvatarList(
|
||||||
|
final DisplayAvatarOuterClass.DisplayAvatar... values) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
displayAvatarList.addAll(values);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarScRsp copyFrom(final SetDisplayAvatarScRsp other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
retcode = other.retcode;
|
||||||
|
displayAvatarList.copyFrom(other.displayAvatarList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarScRsp mergeFrom(final SetDisplayAvatarScRsp other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasRetcode()) {
|
||||||
|
setRetcode(other.retcode);
|
||||||
|
}
|
||||||
|
if (other.hasDisplayAvatarList()) {
|
||||||
|
getMutableDisplayAvatarList().addAll(other.displayAvatarList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarScRsp clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
retcode = 0;
|
||||||
|
displayAvatarList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarScRsp clearQuick() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
displayAvatarList.clearQuick();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(o instanceof SetDisplayAvatarScRsp)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
SetDisplayAvatarScRsp other = (SetDisplayAvatarScRsp) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasRetcode() || retcode == other.retcode)
|
||||||
|
&& (!hasDisplayAvatarList() || displayAvatarList.equals(other.displayAvatarList));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRawByte((byte) 8);
|
||||||
|
output.writeUInt32NoTag(retcode);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
for (int i = 0; i < displayAvatarList.length(); i++) {
|
||||||
|
output.writeRawByte((byte) 42);
|
||||||
|
output.writeMessageNoTag(displayAvatarList.get(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
size += (1 * displayAvatarList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(displayAvatarList);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public SetDisplayAvatarScRsp mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 8: {
|
||||||
|
// retcode
|
||||||
|
retcode = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 42) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 42: {
|
||||||
|
// displayAvatarList
|
||||||
|
tag = input.readRepeatedMessage(displayAvatarList, tag);
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
if (tag != 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 0: {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!input.skipField(tag)) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
tag = input.readTag();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final JsonSink output) throws IOException {
|
||||||
|
output.beginObject();
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.retcode, retcode);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeRepeatedMessage(FieldNames.displayAvatarList, displayAvatarList);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarScRsp mergeFrom(final JsonSource input) throws IOException {
|
||||||
|
if (!input.beginObject()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
while (!input.isAtEnd()) {
|
||||||
|
switch (input.readFieldHash()) {
|
||||||
|
case 1097936398: {
|
||||||
|
if (input.isAtField(FieldNames.retcode)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
retcode = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2117925881:
|
||||||
|
case 245562311: {
|
||||||
|
if (input.isAtField(FieldNames.displayAvatarList)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readRepeatedMessage(displayAvatarList);
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarScRsp clone() {
|
||||||
|
return new SetDisplayAvatarScRsp().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetDisplayAvatarScRsp parseFrom(final byte[] data) throws
|
||||||
|
InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetDisplayAvatarScRsp(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetDisplayAvatarScRsp parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetDisplayAvatarScRsp(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SetDisplayAvatarScRsp parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new SetDisplayAvatarScRsp(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating SetDisplayAvatarScRsp messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<SetDisplayAvatarScRsp> getFactory() {
|
||||||
|
return SetDisplayAvatarScRspFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum SetDisplayAvatarScRspFactory implements MessageFactory<SetDisplayAvatarScRsp> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SetDisplayAvatarScRsp create() {
|
||||||
|
return SetDisplayAvatarScRsp.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName retcode = FieldName.forField("retcode");
|
||||||
|
|
||||||
|
static final FieldName displayAvatarList = FieldName.forField("displayAvatarList", "display_avatar_list");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -135,13 +135,17 @@ public final class DatabaseManager {
|
|||||||
return getDatastore().find(cls).filter(Filters.eq("_id", uid)).first();
|
return getDatastore().find(cls).filter(Filters.eq("_id", uid)).first();
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> T getObjectByField(Class<T> cls, String filter, String value) {
|
public <T> T getObjectByField(Class<T> cls, String filter, Object value) {
|
||||||
return getDatastore().find(cls).filter(Filters.eq(filter, value)).first();
|
return getDatastore().find(cls).filter(Filters.eq(filter, value)).first();
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> T getObjectByField(Class<T> cls, String filter, long value) {
|
public <T> T getObjectByField(Class<T> cls, String filter, long value) {
|
||||||
return getDatastore().find(cls).filter(Filters.eq(filter, value)).first();
|
return getDatastore().find(cls).filter(Filters.eq(filter, value)).first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public <T> Stream<T> getObjects(Class<T> cls, String filter, Object value) {
|
||||||
|
return getDatastore().find(cls).filter(Filters.eq(filter, value)).stream();
|
||||||
|
}
|
||||||
|
|
||||||
public <T> Stream<T> getObjects(Class<T> cls, String filter, long value) {
|
public <T> Stream<T> getObjects(Class<T> cls, String filter, long value) {
|
||||||
return getDatastore().find(cls).filter(Filters.eq(filter, value)).stream();
|
return getDatastore().find(cls).filter(Filters.eq(filter, value)).stream();
|
||||||
|
|||||||
@@ -3,27 +3,35 @@ package emu.lunarcore.game.avatar;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import org.bson.types.ObjectId;
|
||||||
|
|
||||||
import emu.lunarcore.GameConstants;
|
import emu.lunarcore.GameConstants;
|
||||||
import emu.lunarcore.LunarCore;
|
import emu.lunarcore.LunarCore;
|
||||||
import emu.lunarcore.data.GameData;
|
import emu.lunarcore.data.GameData;
|
||||||
import emu.lunarcore.data.excel.AvatarExcel;
|
import emu.lunarcore.data.excel.AvatarExcel;
|
||||||
import emu.lunarcore.data.excel.HeroExcel;
|
import emu.lunarcore.data.excel.HeroExcel;
|
||||||
|
import emu.lunarcore.game.inventory.GameItem;
|
||||||
import emu.lunarcore.game.player.BasePlayerManager;
|
import emu.lunarcore.game.player.BasePlayerManager;
|
||||||
import emu.lunarcore.game.player.Player;
|
import emu.lunarcore.game.player.Player;
|
||||||
import emu.lunarcore.server.packet.send.PacketPlayerSyncScNotify;
|
import emu.lunarcore.server.packet.send.PacketPlayerSyncScNotify;
|
||||||
|
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||||
|
import it.unimi.dsi.fastutil.objects.Object2ObjectMap;
|
||||||
|
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public class AvatarStorage extends BasePlayerManager implements Iterable<GameAvatar> {
|
public class AvatarStorage extends BasePlayerManager implements Iterable<GameAvatar> {
|
||||||
private final Int2ObjectMap<GameAvatar> avatars;
|
private final Int2ObjectMap<GameAvatar> avatars;
|
||||||
|
private final Object2ObjectMap<ObjectId, GameAvatar> avatarObjectIdMap;
|
||||||
|
|
||||||
private final Int2ObjectMap<AvatarHeroPath> heroPaths;
|
private final Int2ObjectMap<AvatarHeroPath> heroPaths;
|
||||||
|
|
||||||
public AvatarStorage(Player player) {
|
public AvatarStorage(Player player) {
|
||||||
super(player);
|
super(player);
|
||||||
this.avatars = new Int2ObjectOpenHashMap<>();
|
this.avatars = new Int2ObjectOpenHashMap<>();
|
||||||
|
this.avatarObjectIdMap = new Object2ObjectOpenHashMap<>();
|
||||||
this.heroPaths = new Int2ObjectOpenHashMap<>();
|
this.heroPaths = new Int2ObjectOpenHashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,11 +40,15 @@ public class AvatarStorage extends BasePlayerManager implements Iterable<GameAva
|
|||||||
}
|
}
|
||||||
|
|
||||||
public GameAvatar getAvatarById(int id) {
|
public GameAvatar getAvatarById(int id) {
|
||||||
if (this.getHeroPaths().containsKey(id)) {
|
return getAvatars().get(id);
|
||||||
id = GameConstants.TRAILBLAZER_AVATAR_ID;
|
}
|
||||||
|
|
||||||
|
public GameAvatar getAvatarById(ObjectId id) {
|
||||||
|
if (id == null) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return getAvatars().get(id);
|
return getAvatarObjectIdMap().get(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasAvatar(int id) {
|
public boolean hasAvatar(int id) {
|
||||||
@@ -56,12 +68,15 @@ public class AvatarStorage extends BasePlayerManager implements Iterable<GameAva
|
|||||||
|
|
||||||
// Set owner first
|
// Set owner first
|
||||||
avatar.setOwner(getPlayer());
|
avatar.setOwner(getPlayer());
|
||||||
|
|
||||||
|
// Save avatar
|
||||||
|
avatar.save();
|
||||||
|
|
||||||
// Put into avatar map
|
// Put into avatar map
|
||||||
this.avatars.put(avatar.getAvatarId(), avatar);
|
this.avatars.put(avatar.getAvatarId(), avatar);
|
||||||
|
this.avatarObjectIdMap.put(avatar.getId(), avatar);
|
||||||
|
|
||||||
// Save to database and send packet
|
// Send packet
|
||||||
avatar.save();
|
|
||||||
getPlayer().sendPacket(new PacketPlayerSyncScNotify(avatar));
|
getPlayer().sendPacket(new PacketPlayerSyncScNotify(avatar));
|
||||||
|
|
||||||
// Add head icon
|
// Add head icon
|
||||||
@@ -99,7 +114,16 @@ public class AvatarStorage extends BasePlayerManager implements Iterable<GameAva
|
|||||||
// Database
|
// Database
|
||||||
|
|
||||||
public void loadFromDatabase() {
|
public void loadFromDatabase() {
|
||||||
// Load hero paths
|
// Load hero paths first (Important)
|
||||||
|
loadHeroPathsFromDatabase();
|
||||||
|
|
||||||
|
// Load avatars
|
||||||
|
Stream<GameAvatar> stream = LunarCore.getGameDatabase().getObjects(GameAvatar.class, "ownerUid", this.getPlayer().getUid());
|
||||||
|
stream.forEach(this::loadAvatar);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadHeroPathsFromDatabase() {
|
||||||
|
// Get stream from database
|
||||||
Stream<AvatarHeroPath> heroStream = LunarCore.getGameDatabase().getObjects(AvatarHeroPath.class, "ownerUid", this.getPlayer().getUid());
|
Stream<AvatarHeroPath> heroStream = LunarCore.getGameDatabase().getObjects(AvatarHeroPath.class, "ownerUid", this.getPlayer().getUid());
|
||||||
|
|
||||||
heroStream.forEach(heroPath -> {
|
heroStream.forEach(heroPath -> {
|
||||||
@@ -116,35 +140,59 @@ public class AvatarStorage extends BasePlayerManager implements Iterable<GameAva
|
|||||||
|
|
||||||
// Setup hero paths if they dont exist
|
// Setup hero paths if they dont exist
|
||||||
this.validateHeroPaths();
|
this.validateHeroPaths();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean loadAvatar(GameAvatar avatar) {
|
||||||
|
// Should never happen
|
||||||
|
if (avatar.getId() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Load avatars
|
// Check avatar owner
|
||||||
Stream<GameAvatar> stream = LunarCore.getGameDatabase().getObjects(GameAvatar.class, "ownerUid", this.getPlayer().getUid());
|
if (avatar.getOwnerUid() != this.getPlayer().getUid()) {
|
||||||
|
return false;
|
||||||
stream.forEach(avatar -> {
|
}
|
||||||
// Should never happen
|
|
||||||
if (avatar.getId() == null) {
|
// Set hero path
|
||||||
return;
|
if (avatar.isHero()) {
|
||||||
|
avatar.setHeroPath(getPlayer().getCurHeroPath());
|
||||||
|
} else {
|
||||||
|
// Load avatar excel data
|
||||||
|
AvatarExcel excel = GameData.getAvatarExcelMap().get(avatar.getAvatarId());
|
||||||
|
if (excel == null) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set hero path
|
// Set ownerships
|
||||||
if (avatar.isHero()) {
|
avatar.setExcel(excel);
|
||||||
avatar.setHeroPath(getPlayer().getCurHeroPath());
|
}
|
||||||
} else {
|
|
||||||
// Load avatar excel data
|
// Set ownership
|
||||||
AvatarExcel excel = GameData.getAvatarExcelMap().get(avatar.getAvatarId());
|
avatar.setOwner(getPlayer());
|
||||||
if (excel == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set ownerships
|
|
||||||
avatar.setExcel(excel);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set ownership
|
|
||||||
avatar.setOwner(getPlayer());
|
|
||||||
|
|
||||||
// Add to avatar storage
|
// Add to avatar storage
|
||||||
this.avatars.put(avatar.getAvatarId(), avatar);
|
this.avatars.put(avatar.getAvatarId(), avatar);
|
||||||
});
|
this.avatarObjectIdMap.put(avatar.getId(), avatar);
|
||||||
|
|
||||||
|
// Done
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GameAvatar loadAvatarByObjectId(ObjectId id) {
|
||||||
|
// Load hero paths first
|
||||||
|
if (this.getHeroPaths().size() == 0) {
|
||||||
|
this.loadHeroPathsFromDatabase();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load avatar
|
||||||
|
GameAvatar avatar = LunarCore.getGameDatabase().getObjectByField(GameAvatar.class, "_id", id);
|
||||||
|
|
||||||
|
if (this.loadAvatar(avatar)) {
|
||||||
|
// Load items
|
||||||
|
var stream = LunarCore.getGameDatabase().getObjects(GameItem.class, "equipAvatarId", id);
|
||||||
|
stream.forEach(this.getPlayer().getInventory()::loadItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
return avatar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,12 +16,16 @@ import emu.lunarcore.game.player.Player;
|
|||||||
import emu.lunarcore.game.player.lineup.PlayerLineup;
|
import emu.lunarcore.game.player.lineup.PlayerLineup;
|
||||||
import emu.lunarcore.game.scene.Scene;
|
import emu.lunarcore.game.scene.Scene;
|
||||||
import emu.lunarcore.game.scene.entity.GameEntity;
|
import emu.lunarcore.game.scene.entity.GameEntity;
|
||||||
|
import emu.lunarcore.proto.AssistSimpleInfoOuterClass.AssistSimpleInfo;
|
||||||
import emu.lunarcore.proto.AvatarOuterClass.Avatar;
|
import emu.lunarcore.proto.AvatarOuterClass.Avatar;
|
||||||
import emu.lunarcore.proto.AvatarSkillTreeOuterClass.AvatarSkillTree;
|
import emu.lunarcore.proto.AvatarSkillTreeOuterClass.AvatarSkillTree;
|
||||||
import emu.lunarcore.proto.AvatarTypeOuterClass.AvatarType;
|
import emu.lunarcore.proto.AvatarTypeOuterClass.AvatarType;
|
||||||
import emu.lunarcore.proto.BattleAvatarOuterClass.BattleAvatar;
|
import emu.lunarcore.proto.BattleAvatarOuterClass.BattleAvatar;
|
||||||
import emu.lunarcore.proto.BattleEquipmentOuterClass.BattleEquipment;
|
import emu.lunarcore.proto.BattleEquipmentOuterClass.BattleEquipment;
|
||||||
import emu.lunarcore.proto.BattleRelicOuterClass.BattleRelic;
|
import emu.lunarcore.proto.BattleRelicOuterClass.BattleRelic;
|
||||||
|
import emu.lunarcore.proto.DisplayAvatarDetailInfoOuterClass.DisplayAvatarDetailInfo;
|
||||||
|
import emu.lunarcore.proto.DisplayEquipmentInfoOuterClass.DisplayEquipmentInfo;
|
||||||
|
import emu.lunarcore.proto.DisplayRelicInfoOuterClass.DisplayRelicInfo;
|
||||||
import emu.lunarcore.proto.EquipRelicOuterClass.EquipRelic;
|
import emu.lunarcore.proto.EquipRelicOuterClass.EquipRelic;
|
||||||
import emu.lunarcore.proto.LineupAvatarOuterClass.LineupAvatar;
|
import emu.lunarcore.proto.LineupAvatarOuterClass.LineupAvatar;
|
||||||
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
|
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
|
||||||
@@ -237,7 +241,7 @@ public class GameAvatar implements GameEntity {
|
|||||||
if (slot == 0) return false;
|
if (slot == 0) return false;
|
||||||
|
|
||||||
// Check if other avatars have this item equipped
|
// Check if other avatars have this item equipped
|
||||||
GameAvatar otherAvatar = getOwner().getAvatarById(item.getEquipAvatar());
|
GameAvatar otherAvatar = getOwner().getAvatarById(item.getEquipAvatarId());
|
||||||
if (otherAvatar != null) {
|
if (otherAvatar != null) {
|
||||||
// Unequip this item from the other avatar
|
// Unequip this item from the other avatar
|
||||||
if (otherAvatar.unequipItem(slot) != null) {
|
if (otherAvatar.unequipItem(slot) != null) {
|
||||||
@@ -260,7 +264,7 @@ public class GameAvatar implements GameEntity {
|
|||||||
getEquips().put(slot, item);
|
getEquips().put(slot, item);
|
||||||
|
|
||||||
// Save equip if equipped avatar was changed
|
// Save equip if equipped avatar was changed
|
||||||
if (item.setEquipAvatar(this.getAvatarId())) {
|
if (item.setEquipAvatar(this)) {
|
||||||
item.save();
|
item.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,7 +278,7 @@ public class GameAvatar implements GameEntity {
|
|||||||
GameItem item = getEquips().remove(slot);
|
GameItem item = getEquips().remove(slot);
|
||||||
|
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
item.setEquipAvatar(0);
|
item.setEquipAvatar(null);
|
||||||
item.save();
|
item.save();
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
@@ -385,6 +389,61 @@ public class GameAvatar implements GameEntity {
|
|||||||
return proto;
|
return proto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DisplayAvatarDetailInfo toDisplayAvatarProto() {
|
||||||
|
var proto = DisplayAvatarDetailInfo.newInstance()
|
||||||
|
.setAvatarId(this.getExcel().getAvatarID())
|
||||||
|
.setLevel(this.getLevel())
|
||||||
|
.setExp(this.getExp())
|
||||||
|
.setPromotion(this.getPromotion())
|
||||||
|
.setRank(this.getRank());
|
||||||
|
|
||||||
|
// Skills
|
||||||
|
for (var skill : getSkills().entrySet()) {
|
||||||
|
proto.addSkilltreeList(AvatarSkillTree.newInstance().setPointId(skill.getKey()).setLevel(skill.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build equips
|
||||||
|
for (var equip : this.getEquips().values()) {
|
||||||
|
if (equip.getItemMainType() == ItemMainType.Relic) {
|
||||||
|
// Build display relic proto
|
||||||
|
var relic = DisplayRelicInfo.newInstance()
|
||||||
|
.setTid(equip.getItemId())
|
||||||
|
.setLevel(equip.getLevel())
|
||||||
|
.setExp(equip.getExp())
|
||||||
|
.setSlot(equip.getEquipSlot())
|
||||||
|
.setMainAffixId(equip.getMainAffix());
|
||||||
|
|
||||||
|
if (equip.getSubAffixes() != null) {
|
||||||
|
for (var subAffix : equip.getSubAffixes()) {
|
||||||
|
relic.addSubAffixList(subAffix.toProto());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
proto.addRelicList(relic);
|
||||||
|
} else if (equip.getItemMainType() == ItemMainType.Equipment) {
|
||||||
|
// Build display equipment proto
|
||||||
|
var equipment = DisplayEquipmentInfo.newInstance()
|
||||||
|
.setTid(equip.getItemId())
|
||||||
|
.setLevel(equip.getLevel())
|
||||||
|
.setExp(equip.getExp())
|
||||||
|
.setPromotion(equip.getPromotion())
|
||||||
|
.setRank(equip.getRank());
|
||||||
|
|
||||||
|
proto.setEquipment(equipment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return proto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AssistSimpleInfo toAssistSimpleProto() {
|
||||||
|
var proto = AssistSimpleInfo.newInstance()
|
||||||
|
.setAvatarId(this.getAvatarId())
|
||||||
|
.setLevel(this.getLevel());
|
||||||
|
|
||||||
|
return proto;
|
||||||
|
}
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
|
|
||||||
public void save() {
|
public void save() {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import emu.lunarcore.data.GameDepot;
|
|||||||
import emu.lunarcore.data.excel.ItemExcel;
|
import emu.lunarcore.data.excel.ItemExcel;
|
||||||
import emu.lunarcore.data.excel.RelicMainAffixExcel;
|
import emu.lunarcore.data.excel.RelicMainAffixExcel;
|
||||||
import emu.lunarcore.data.excel.RelicSubAffixExcel;
|
import emu.lunarcore.data.excel.RelicSubAffixExcel;
|
||||||
|
import emu.lunarcore.game.avatar.GameAvatar;
|
||||||
import emu.lunarcore.game.enums.AvatarPropertyType;
|
import emu.lunarcore.game.enums.AvatarPropertyType;
|
||||||
import emu.lunarcore.game.enums.ItemMainType;
|
import emu.lunarcore.game.enums.ItemMainType;
|
||||||
import emu.lunarcore.game.player.Player;
|
import emu.lunarcore.game.player.Player;
|
||||||
@@ -54,6 +55,7 @@ public class GameItem {
|
|||||||
private List<GameItemSubAffix> subAffixes;
|
private List<GameItemSubAffix> subAffixes;
|
||||||
|
|
||||||
private int equipAvatar;
|
private int equipAvatar;
|
||||||
|
@Indexed private ObjectId equipAvatarId;
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public GameItem() {
|
public GameItem() {
|
||||||
@@ -132,7 +134,7 @@ public class GameItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEquipped() {
|
public boolean isEquipped() {
|
||||||
return this.getEquipAvatar() > 0;
|
return this.getEquipAvatarId() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDestroyable() {
|
public boolean isDestroyable() {
|
||||||
@@ -148,14 +150,20 @@ public class GameItem {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setEquipAvatar(int newEquipAvatar) {
|
public boolean setEquipAvatar(GameAvatar avatar) {
|
||||||
if (this.equipAvatar != newEquipAvatar) {
|
if (avatar == null && this.isEquipped()) {
|
||||||
this.equipAvatar = newEquipAvatar;
|
this.equipAvatarId = null;
|
||||||
|
this.equipAvatar = 0;
|
||||||
|
return true;
|
||||||
|
} else if (this.equipAvatarId != avatar.getId()) {
|
||||||
|
this.equipAvatarId = avatar.getId();
|
||||||
|
this.equipAvatar = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sub affixes
|
// Sub affixes
|
||||||
|
|
||||||
public void resetSubAffixes() {
|
public void resetSubAffixes() {
|
||||||
|
|||||||
@@ -560,44 +560,63 @@ public class Inventory extends BasePlayerManager {
|
|||||||
|
|
||||||
public void loadFromDatabase() {
|
public void loadFromDatabase() {
|
||||||
Stream<GameItem> stream = LunarCore.getGameDatabase().getObjects(GameItem.class, "ownerUid", this.getPlayer().getUid());
|
Stream<GameItem> stream = LunarCore.getGameDatabase().getObjects(GameItem.class, "ownerUid", this.getPlayer().getUid());
|
||||||
|
stream.forEach(this::loadItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean loadItem(GameItem item) {
|
||||||
|
// Should never happen
|
||||||
|
if (item.getId() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check item owner
|
||||||
|
if (item.getOwnerUid() != this.getPlayer().getUid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
stream.forEach(item -> {
|
// Load item excel data
|
||||||
// Should never happen
|
ItemExcel excel = GameData.getItemExcelMap().get(item.getItemId());
|
||||||
if (item.getId() == null) {
|
if (excel == null) {
|
||||||
return;
|
// Delete item if it has no excel data
|
||||||
}
|
item.setCount(0);
|
||||||
|
item.save();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Load item excel data
|
// Set ownerships
|
||||||
ItemExcel excel = GameData.getItemExcelMap().get(item.getItemId());
|
item.setExcel(excel);
|
||||||
if (excel == null) {
|
|
||||||
// Delete item if it has no excel data
|
// Put in inventory
|
||||||
item.setCount(0);
|
InventoryTab tab = getTabByItemType(item.getExcel().getItemMainType());
|
||||||
|
putItem(item, tab);
|
||||||
|
|
||||||
|
// Equip to a character if possible
|
||||||
|
if (item.isEquipped() || item.getEquipAvatar() > 0) {
|
||||||
|
GameAvatar avatar = null;
|
||||||
|
boolean hasEquipped = false;
|
||||||
|
|
||||||
|
if (item.getEquipAvatar() > 0) {
|
||||||
|
// Legacy equip handler
|
||||||
|
avatar = getPlayer().getAvatars().getAvatarById(item.getEquipAvatar());
|
||||||
|
item.setEquipAvatar(avatar);
|
||||||
item.save();
|
item.save();
|
||||||
return;
|
} else {
|
||||||
|
avatar = getPlayer().getAvatars().getAvatarById(item.getEquipAvatarId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set ownerships
|
// Make sure the avatar that we equipped this item to actually exists
|
||||||
item.setExcel(excel);
|
if (avatar != null) {
|
||||||
|
hasEquipped = avatar.equipItem(item);
|
||||||
// Put in inventory
|
|
||||||
InventoryTab tab = getTabByItemType(item.getExcel().getItemMainType());
|
|
||||||
putItem(item, tab);
|
|
||||||
|
|
||||||
// Equip to a character if possible
|
|
||||||
if (item.isEquipped()) {
|
|
||||||
GameAvatar avatar = getPlayer().getAvatarById(item.getEquipAvatar());
|
|
||||||
boolean hasEquipped = false;
|
|
||||||
|
|
||||||
if (avatar != null) {
|
|
||||||
hasEquipped = avatar.equipItem(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!hasEquipped) {
|
|
||||||
// Unset equipped flag on item since we couldnt find an avatar to equip it to
|
|
||||||
item.setEquipAvatar(0);
|
|
||||||
item.save();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
// Unset equipped flag on item since we couldnt find an avatar to equip it to
|
||||||
|
if (!hasEquipped) {
|
||||||
|
item.setEquipAvatar(null);
|
||||||
|
item.save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Done
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package emu.lunarcore.game.player;
|
package emu.lunarcore.game.player;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bson.types.ObjectId;
|
||||||
|
|
||||||
import com.mongodb.client.model.Filters;
|
import com.mongodb.client.model.Filters;
|
||||||
|
|
||||||
import dev.morphia.annotations.Entity;
|
import dev.morphia.annotations.Entity;
|
||||||
@@ -48,6 +53,7 @@ import emu.lunarcore.game.scene.SceneBuff;
|
|||||||
import emu.lunarcore.game.scene.entity.EntityProp;
|
import emu.lunarcore.game.scene.entity.EntityProp;
|
||||||
import emu.lunarcore.game.scene.entity.GameEntity;
|
import emu.lunarcore.game.scene.entity.GameEntity;
|
||||||
import emu.lunarcore.proto.BoardDataSyncOuterClass.BoardDataSync;
|
import emu.lunarcore.proto.BoardDataSyncOuterClass.BoardDataSync;
|
||||||
|
import emu.lunarcore.proto.DisplayAvatarOuterClass.DisplayAvatar;
|
||||||
import emu.lunarcore.proto.FriendOnlineStatusOuterClass.FriendOnlineStatus;
|
import emu.lunarcore.proto.FriendOnlineStatusOuterClass.FriendOnlineStatus;
|
||||||
import emu.lunarcore.proto.HeadIconOuterClass.HeadIcon;
|
import emu.lunarcore.proto.HeadIconOuterClass.HeadIcon;
|
||||||
import emu.lunarcore.proto.PlatformTypeOuterClass.PlatformType;
|
import emu.lunarcore.proto.PlatformTypeOuterClass.PlatformType;
|
||||||
@@ -67,6 +73,8 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
|||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import us.hebi.quickbuf.RepeatedInt;
|
||||||
|
import us.hebi.quickbuf.RepeatedMessage;
|
||||||
|
|
||||||
@Entity(value = "players", useDiscriminator = false)
|
@Entity(value = "players", useDiscriminator = false)
|
||||||
@Getter
|
@Getter
|
||||||
@@ -118,6 +126,8 @@ public class Player implements Tickable {
|
|||||||
// Database persistent data
|
// Database persistent data
|
||||||
private LineupManager lineupManager;
|
private LineupManager lineupManager;
|
||||||
private PlayerGachaInfo gachaInfo;
|
private PlayerGachaInfo gachaInfo;
|
||||||
|
private List<ObjectId> assistAvatars;
|
||||||
|
private List<ObjectId> displayAvatars;
|
||||||
|
|
||||||
// Instances
|
// Instances
|
||||||
@Setter private ChallengeInstance challengeInstance;
|
@Setter private ChallengeInstance challengeInstance;
|
||||||
@@ -138,6 +148,8 @@ public class Player implements Tickable {
|
|||||||
this.curBasicType = GameConstants.TRAILBLAZER_AVATAR_ID;
|
this.curBasicType = GameConstants.TRAILBLAZER_AVATAR_ID;
|
||||||
this.gender = PlayerGender.GENDER_MAN;
|
this.gender = PlayerGender.GENDER_MAN;
|
||||||
this.foodBuffs = new Int2ObjectOpenHashMap<>();
|
this.foodBuffs = new Int2ObjectOpenHashMap<>();
|
||||||
|
this.assistAvatars = new ArrayList<>();
|
||||||
|
this.displayAvatars = new ArrayList<>();
|
||||||
|
|
||||||
this.avatars = new AvatarStorage(this);
|
this.avatars = new AvatarStorage(this);
|
||||||
this.inventory = new Inventory(this);
|
this.inventory = new Inventory(this);
|
||||||
@@ -324,6 +336,10 @@ public class Player implements Tickable {
|
|||||||
return getAvatars().getAvatarById(avatarId);
|
return getAvatars().getAvatarById(avatarId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GameAvatar getAvatarById(ObjectId id) {
|
||||||
|
return getAvatars().getAvatarById(id);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean setHeadIcon(int id) {
|
public boolean setHeadIcon(int id) {
|
||||||
if (this.getUnlocks().getHeadIcons().contains(id)) {
|
if (this.getUnlocks().getHeadIcons().contains(id)) {
|
||||||
this.headIcon = id;
|
this.headIcon = id;
|
||||||
@@ -777,6 +793,54 @@ public class Player implements Tickable {
|
|||||||
// Done, return success
|
// Done, return success
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAssistAvatars(RepeatedInt avatars) {
|
||||||
|
// Check size
|
||||||
|
if (avatars.length() > 3) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear
|
||||||
|
this.getAssistAvatars().clear();
|
||||||
|
|
||||||
|
// Parse list from proto
|
||||||
|
for (int id : avatars) {
|
||||||
|
GameAvatar avatar = this.getAvatarById(id);
|
||||||
|
if (avatar == null) continue;
|
||||||
|
|
||||||
|
this.getAssistAvatars().add(avatar.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Save player
|
||||||
|
this.save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDisplayAvatars(RepeatedMessage<DisplayAvatar> avatars) {
|
||||||
|
// Check size
|
||||||
|
if (avatars.length() > 5) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear
|
||||||
|
this.getDisplayAvatars().clear();
|
||||||
|
|
||||||
|
// Parse list from proto
|
||||||
|
for (int i = 0; i < avatars.length(); i++) {
|
||||||
|
var info = avatars.get(i);
|
||||||
|
|
||||||
|
if (info.getAvatarId() > 0) {
|
||||||
|
GameAvatar avatar = this.getAvatarById(info.getAvatarId());
|
||||||
|
if (avatar == null) continue;
|
||||||
|
|
||||||
|
this.getDisplayAvatars().add(avatar.getId());
|
||||||
|
} else {
|
||||||
|
this.getDisplayAvatars().add(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Save player
|
||||||
|
this.save();
|
||||||
|
}
|
||||||
|
|
||||||
public void sendMessage(String message) {
|
public void sendMessage(String message) {
|
||||||
var msg = new ChatMessage(GameConstants.SERVER_CONSOLE_UID, this.getUid(), message);
|
var msg = new ChatMessage(GameConstants.SERVER_CONSOLE_UID, this.getUid(), message);
|
||||||
@@ -933,11 +997,45 @@ public class Player implements Tickable {
|
|||||||
.setLevel(this.getLevel())
|
.setLevel(this.getLevel())
|
||||||
.setWorldLevel(this.getWorldLevel())
|
.setWorldLevel(this.getWorldLevel())
|
||||||
.setPlatformType(PlatformType.PC)
|
.setPlatformType(PlatformType.PC)
|
||||||
|
.setShowDisplayAvatars(true)
|
||||||
.setHeadIcon(this.getHeadIcon());
|
.setHeadIcon(this.getHeadIcon());
|
||||||
|
|
||||||
proto.getMutableRecordInfo().getMutableCollectionInfo();
|
proto.getMutableRecordInfo().getMutableCollectionInfo();
|
||||||
proto.getMutableDisplaySettings();
|
proto.getMutableDisplaySettings();
|
||||||
|
|
||||||
|
for (int i = 0; i < this.getAssistAvatars().size(); i++) {
|
||||||
|
ObjectId objectId = this.getAssistAvatars().get(i);
|
||||||
|
|
||||||
|
GameAvatar avatar = this.getAvatarById(objectId);
|
||||||
|
if (avatar == null && this.getSession() == null) {
|
||||||
|
avatar = this.getAvatars().loadAvatarByObjectId(objectId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (avatar == null) continue;
|
||||||
|
|
||||||
|
var info = avatar.toDisplayAvatarProto();
|
||||||
|
info.setPos(i);
|
||||||
|
|
||||||
|
proto.addAssistAvatarList(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < this.getDisplayAvatars().size(); i++) {
|
||||||
|
ObjectId objectId = this.getDisplayAvatars().get(i);
|
||||||
|
if (objectId == null) continue;
|
||||||
|
|
||||||
|
GameAvatar avatar = this.getAvatarById(objectId);
|
||||||
|
if (avatar == null && this.getSession() == null) {
|
||||||
|
avatar = this.getAvatars().loadAvatarByObjectId(objectId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (avatar == null) continue;
|
||||||
|
|
||||||
|
var info = avatar.toDisplayAvatarProto();
|
||||||
|
info.setPos(i);
|
||||||
|
|
||||||
|
proto.addDisplayAvatarList(info);
|
||||||
|
}
|
||||||
|
|
||||||
return proto;
|
return proto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -953,6 +1051,22 @@ public class Player implements Tickable {
|
|||||||
.setLastActiveTime(this.getLastActiveTime())
|
.setLastActiveTime(this.getLastActiveTime())
|
||||||
.setHeadIcon(this.getHeadIcon());
|
.setHeadIcon(this.getHeadIcon());
|
||||||
|
|
||||||
|
for (int i = 0; i < this.getAssistAvatars().size(); i++) {
|
||||||
|
ObjectId objectId = this.getAssistAvatars().get(i);
|
||||||
|
|
||||||
|
GameAvatar avatar = this.getAvatarById(objectId);
|
||||||
|
if (avatar == null && this.getSession() == null) {
|
||||||
|
avatar = this.getAvatars().loadAvatarByObjectId(objectId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (avatar == null) continue;
|
||||||
|
|
||||||
|
var info = avatar.toAssistSimpleProto();
|
||||||
|
info.setPos(i);
|
||||||
|
|
||||||
|
proto.addAssistSimpleInfo(info);
|
||||||
|
}
|
||||||
|
|
||||||
return proto;
|
return proto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package emu.lunarcore.server.packet.recv;
|
||||||
|
|
||||||
|
import emu.lunarcore.proto.SetAssistAvatarCsReqOuterClass.SetAssistAvatarCsReq;
|
||||||
|
import emu.lunarcore.server.game.GameSession;
|
||||||
|
import emu.lunarcore.server.packet.CmdId;
|
||||||
|
import emu.lunarcore.server.packet.Opcodes;
|
||||||
|
import emu.lunarcore.server.packet.PacketHandler;
|
||||||
|
import emu.lunarcore.server.packet.send.PacketSetAssistAvatarScRsp;
|
||||||
|
|
||||||
|
@Opcodes(CmdId.SetAssistAvatarCsReq)
|
||||||
|
public class HandlerSetAssistAvatarCsReq extends PacketHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(GameSession session, byte[] data) throws Exception {
|
||||||
|
var req = SetAssistAvatarCsReq.parseFrom(data);
|
||||||
|
|
||||||
|
session.getPlayer().setAssistAvatars(req.getAvatarIdList());
|
||||||
|
session.send(new PacketSetAssistAvatarScRsp(session.getPlayer()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package emu.lunarcore.server.packet.recv;
|
||||||
|
|
||||||
|
import emu.lunarcore.proto.SetDisplayAvatarCsReqOuterClass.SetDisplayAvatarCsReq;
|
||||||
|
import emu.lunarcore.server.game.GameSession;
|
||||||
|
import emu.lunarcore.server.packet.CmdId;
|
||||||
|
import emu.lunarcore.server.packet.Opcodes;
|
||||||
|
import emu.lunarcore.server.packet.PacketHandler;
|
||||||
|
import emu.lunarcore.server.packet.send.PacketSetDisplayAvatarScRsp;
|
||||||
|
|
||||||
|
@Opcodes(CmdId.SetDisplayAvatarCsReq)
|
||||||
|
public class HandlerSetDisplayAvatarCsReq extends PacketHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(GameSession session, byte[] data) throws Exception {
|
||||||
|
var req = SetDisplayAvatarCsReq.parseFrom(data);
|
||||||
|
|
||||||
|
session.getPlayer().setDisplayAvatars(req.getDisplayAvatarList());
|
||||||
|
session.send(new PacketSetDisplayAvatarScRsp(session.getPlayer()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package emu.lunarcore.server.packet.send;
|
package emu.lunarcore.server.packet.send;
|
||||||
|
|
||||||
import emu.lunarcore.game.player.Player;
|
import emu.lunarcore.game.player.Player;
|
||||||
|
import emu.lunarcore.proto.DisplayAvatarOuterClass.DisplayAvatar;
|
||||||
import emu.lunarcore.proto.GetPlayerBoardDataScRspOuterClass.GetPlayerBoardDataScRsp;
|
import emu.lunarcore.proto.GetPlayerBoardDataScRspOuterClass.GetPlayerBoardDataScRsp;
|
||||||
import emu.lunarcore.proto.HeadIconOuterClass.HeadIcon;
|
import emu.lunarcore.proto.HeadIconOuterClass.HeadIcon;
|
||||||
import emu.lunarcore.server.packet.BasePacket;
|
import emu.lunarcore.server.packet.BasePacket;
|
||||||
@@ -15,13 +16,37 @@ public class PacketGetPlayerBoardDataScRsp extends BasePacket {
|
|||||||
.setCurrentHeadIconId(player.getHeadIcon())
|
.setCurrentHeadIconId(player.getHeadIcon())
|
||||||
.setSignature(player.getSignature());
|
.setSignature(player.getSignature());
|
||||||
|
|
||||||
// Set empty display avatars
|
// Create display avatar object
|
||||||
data.getMutableDisplayAvatarVec();
|
data.getMutableDisplayAvatarVec();
|
||||||
|
|
||||||
|
// Head icons, aka profile pictures
|
||||||
for (int id : player.getUnlocks().getHeadIcons()) {
|
for (int id : player.getUnlocks().getHeadIcons()) {
|
||||||
data.addUnlockedHeadIconList(HeadIcon.newInstance().setId(id));
|
data.addUnlockedHeadIconList(HeadIcon.newInstance().setId(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Assist avatars
|
||||||
|
for (var objectId : player.getAssistAvatars()) {
|
||||||
|
var avatar = player.getAvatarById(objectId);
|
||||||
|
if (avatar == null) continue;
|
||||||
|
|
||||||
|
data.addDisplaySupportAvatarVec(avatar.getAvatarId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display avatars
|
||||||
|
for (int i = 0; i < player.getDisplayAvatars().size(); i++) {
|
||||||
|
var objectId = player.getDisplayAvatars().get(i);
|
||||||
|
if (objectId == null) continue;
|
||||||
|
|
||||||
|
var avatar = player.getAvatarById(objectId);
|
||||||
|
if (avatar == null) continue;
|
||||||
|
|
||||||
|
var info = DisplayAvatar.newInstance()
|
||||||
|
.setAvatarId(avatar.getAvatarId())
|
||||||
|
.setPos(i);
|
||||||
|
|
||||||
|
data.getMutableDisplayAvatarVec().addDisplayAvatarList(info);
|
||||||
|
}
|
||||||
|
|
||||||
this.setData(data);
|
this.setData(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package emu.lunarcore.server.packet.send;
|
||||||
|
|
||||||
|
import emu.lunarcore.game.player.Player;
|
||||||
|
import emu.lunarcore.proto.SetAssistAvatarScRspOuterClass.SetAssistAvatarScRsp;
|
||||||
|
import emu.lunarcore.server.packet.BasePacket;
|
||||||
|
import emu.lunarcore.server.packet.CmdId;
|
||||||
|
|
||||||
|
public class PacketSetAssistAvatarScRsp extends BasePacket {
|
||||||
|
|
||||||
|
public PacketSetAssistAvatarScRsp(Player player) {
|
||||||
|
super(CmdId.SetAssistAvatarScRsp);
|
||||||
|
|
||||||
|
var data = SetAssistAvatarScRsp.newInstance();
|
||||||
|
|
||||||
|
for (var objectId : player.getAssistAvatars()) {
|
||||||
|
var avatar = player.getAvatarById(objectId);
|
||||||
|
if (avatar == null) continue;
|
||||||
|
|
||||||
|
data.addAvatarIdList(avatar.getAvatarId());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setData(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package emu.lunarcore.server.packet.send;
|
||||||
|
|
||||||
|
import emu.lunarcore.game.player.Player;
|
||||||
|
import emu.lunarcore.proto.DisplayAvatarOuterClass.DisplayAvatar;
|
||||||
|
import emu.lunarcore.proto.SetDisplayAvatarScRspOuterClass.SetDisplayAvatarScRsp;
|
||||||
|
import emu.lunarcore.server.packet.BasePacket;
|
||||||
|
import emu.lunarcore.server.packet.CmdId;
|
||||||
|
|
||||||
|
public class PacketSetDisplayAvatarScRsp extends BasePacket {
|
||||||
|
|
||||||
|
public PacketSetDisplayAvatarScRsp(Player player) {
|
||||||
|
super(CmdId.SetDisplayAvatarScRsp);
|
||||||
|
|
||||||
|
var data = SetDisplayAvatarScRsp.newInstance();
|
||||||
|
|
||||||
|
for (int i = 0; i < player.getDisplayAvatars().size(); i++) {
|
||||||
|
var objectId = player.getDisplayAvatars().get(i);
|
||||||
|
if (objectId == null) continue;
|
||||||
|
|
||||||
|
var avatar = player.getAvatarById(objectId);
|
||||||
|
if (avatar == null) continue;
|
||||||
|
|
||||||
|
var info = DisplayAvatar.newInstance()
|
||||||
|
.setAvatarId(avatar.getAvatarId())
|
||||||
|
.setPos(i);
|
||||||
|
|
||||||
|
data.addDisplayAvatarList(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setData(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user