mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-18 08:15:05 +01:00
Implement farm stage gacha info handler
This commit is contained in:
@@ -0,0 +1,422 @@
|
|||||||
|
// 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 FarmStageGachaInfoOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code FarmStageGachaInfo}
|
||||||
|
*/
|
||||||
|
public static final class FarmStageGachaInfo extends ProtoMessage<FarmStageGachaInfo> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int64 end_time = 4;</code>
|
||||||
|
*/
|
||||||
|
private long endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int64 begin_time = 5;</code>
|
||||||
|
*/
|
||||||
|
private long beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 gacha_id = 3;</code>
|
||||||
|
*/
|
||||||
|
private int gachaId;
|
||||||
|
|
||||||
|
private FarmStageGachaInfo() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code FarmStageGachaInfo}
|
||||||
|
*/
|
||||||
|
public static FarmStageGachaInfo newInstance() {
|
||||||
|
return new FarmStageGachaInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int64 end_time = 4;</code>
|
||||||
|
* @return whether the endTime field is set
|
||||||
|
*/
|
||||||
|
public boolean hasEndTime() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int64 end_time = 4;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public FarmStageGachaInfo clearEndTime() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
endTime = 0L;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int64 end_time = 4;</code>
|
||||||
|
* @return the endTime
|
||||||
|
*/
|
||||||
|
public long getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int64 end_time = 4;</code>
|
||||||
|
* @param value the endTime to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public FarmStageGachaInfo setEndTime(final long value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
endTime = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int64 begin_time = 5;</code>
|
||||||
|
* @return whether the beginTime field is set
|
||||||
|
*/
|
||||||
|
public boolean hasBeginTime() {
|
||||||
|
return (bitField0_ & 0x00000002) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int64 begin_time = 5;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public FarmStageGachaInfo clearBeginTime() {
|
||||||
|
bitField0_ &= ~0x00000002;
|
||||||
|
beginTime = 0L;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int64 begin_time = 5;</code>
|
||||||
|
* @return the beginTime
|
||||||
|
*/
|
||||||
|
public long getBeginTime() {
|
||||||
|
return beginTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int64 begin_time = 5;</code>
|
||||||
|
* @param value the beginTime to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public FarmStageGachaInfo setBeginTime(final long value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
beginTime = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 gacha_id = 3;</code>
|
||||||
|
* @return whether the gachaId field is set
|
||||||
|
*/
|
||||||
|
public boolean hasGachaId() {
|
||||||
|
return (bitField0_ & 0x00000004) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 gacha_id = 3;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public FarmStageGachaInfo clearGachaId() {
|
||||||
|
bitField0_ &= ~0x00000004;
|
||||||
|
gachaId = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 gacha_id = 3;</code>
|
||||||
|
* @return the gachaId
|
||||||
|
*/
|
||||||
|
public int getGachaId() {
|
||||||
|
return gachaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 gacha_id = 3;</code>
|
||||||
|
* @param value the gachaId to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public FarmStageGachaInfo setGachaId(final int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
gachaId = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FarmStageGachaInfo copyFrom(final FarmStageGachaInfo other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
endTime = other.endTime;
|
||||||
|
beginTime = other.beginTime;
|
||||||
|
gachaId = other.gachaId;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FarmStageGachaInfo mergeFrom(final FarmStageGachaInfo other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasEndTime()) {
|
||||||
|
setEndTime(other.endTime);
|
||||||
|
}
|
||||||
|
if (other.hasBeginTime()) {
|
||||||
|
setBeginTime(other.beginTime);
|
||||||
|
}
|
||||||
|
if (other.hasGachaId()) {
|
||||||
|
setGachaId(other.gachaId);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FarmStageGachaInfo clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
endTime = 0L;
|
||||||
|
beginTime = 0L;
|
||||||
|
gachaId = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FarmStageGachaInfo 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 FarmStageGachaInfo)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
FarmStageGachaInfo other = (FarmStageGachaInfo) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasEndTime() || endTime == other.endTime)
|
||||||
|
&& (!hasBeginTime() || beginTime == other.beginTime)
|
||||||
|
&& (!hasGachaId() || gachaId == other.gachaId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRawByte((byte) 32);
|
||||||
|
output.writeInt64NoTag(endTime);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeRawByte((byte) 40);
|
||||||
|
output.writeInt64NoTag(beginTime);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeRawByte((byte) 24);
|
||||||
|
output.writeUInt32NoTag(gachaId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeInt64SizeNoTag(endTime);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeInt64SizeNoTag(beginTime);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaId);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public FarmStageGachaInfo mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 32: {
|
||||||
|
// endTime
|
||||||
|
endTime = input.readInt64();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 40) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 40: {
|
||||||
|
// beginTime
|
||||||
|
beginTime = input.readInt64();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 24) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 24: {
|
||||||
|
// gachaId
|
||||||
|
gachaId = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
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.writeInt64(FieldNames.endTime, endTime);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeInt64(FieldNames.beginTime, beginTime);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.gachaId, gachaId);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FarmStageGachaInfo mergeFrom(final JsonSource input) throws IOException {
|
||||||
|
if (!input.beginObject()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
while (!input.isAtEnd()) {
|
||||||
|
switch (input.readFieldHash()) {
|
||||||
|
case -1607243192:
|
||||||
|
case 1725551537: {
|
||||||
|
if (input.isAtField(FieldNames.endTime)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
endTime = input.readInt64();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case -1072839914:
|
||||||
|
case 1112183971: {
|
||||||
|
if (input.isAtField(FieldNames.beginTime)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
beginTime = input.readInt64();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case -204751299:
|
||||||
|
case -2052301576: {
|
||||||
|
if (input.isAtField(FieldNames.gachaId)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
gachaId = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FarmStageGachaInfo clone() {
|
||||||
|
return new FarmStageGachaInfo().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FarmStageGachaInfo parseFrom(final byte[] data) throws
|
||||||
|
InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new FarmStageGachaInfo(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FarmStageGachaInfo parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new FarmStageGachaInfo(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FarmStageGachaInfo parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new FarmStageGachaInfo(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating FarmStageGachaInfo messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<FarmStageGachaInfo> getFactory() {
|
||||||
|
return FarmStageGachaInfoFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum FarmStageGachaInfoFactory implements MessageFactory<FarmStageGachaInfo> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FarmStageGachaInfo create() {
|
||||||
|
return FarmStageGachaInfo.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName endTime = FieldName.forField("endTime", "end_time");
|
||||||
|
|
||||||
|
static final FieldName beginTime = FieldName.forField("beginTime", "begin_time");
|
||||||
|
|
||||||
|
static final FieldName gachaId = FieldName.forField("gachaId", "gacha_id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,301 @@
|
|||||||
|
// 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 GetFarmStageGachaInfoCsReqOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code GetFarmStageGachaInfoCsReq}
|
||||||
|
*/
|
||||||
|
public static final class GetFarmStageGachaInfoCsReq extends ProtoMessage<GetFarmStageGachaInfoCsReq> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 farm_stage_gacha_id_list = 11;</code>
|
||||||
|
*/
|
||||||
|
private final RepeatedInt farmStageGachaIdList = RepeatedInt.newEmptyInstance();
|
||||||
|
|
||||||
|
private GetFarmStageGachaInfoCsReq() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code GetFarmStageGachaInfoCsReq}
|
||||||
|
*/
|
||||||
|
public static GetFarmStageGachaInfoCsReq newInstance() {
|
||||||
|
return new GetFarmStageGachaInfoCsReq();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 farm_stage_gacha_id_list = 11;</code>
|
||||||
|
* @return whether the farmStageGachaIdList field is set
|
||||||
|
*/
|
||||||
|
public boolean hasFarmStageGachaIdList() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 farm_stage_gacha_id_list = 11;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public GetFarmStageGachaInfoCsReq clearFarmStageGachaIdList() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
farmStageGachaIdList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 farm_stage_gacha_id_list = 11;</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 #getMutableFarmStageGachaIdList()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public RepeatedInt getFarmStageGachaIdList() {
|
||||||
|
return farmStageGachaIdList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 farm_stage_gacha_id_list = 11;</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 getMutableFarmStageGachaIdList() {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
return farmStageGachaIdList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 farm_stage_gacha_id_list = 11;</code>
|
||||||
|
* @param value the farmStageGachaIdList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public GetFarmStageGachaInfoCsReq addFarmStageGachaIdList(final int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
farmStageGachaIdList.add(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated uint32 farm_stage_gacha_id_list = 11;</code>
|
||||||
|
* @param values the farmStageGachaIdList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public GetFarmStageGachaInfoCsReq addAllFarmStageGachaIdList(final int... values) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
farmStageGachaIdList.addAll(values);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoCsReq copyFrom(final GetFarmStageGachaInfoCsReq other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
farmStageGachaIdList.copyFrom(other.farmStageGachaIdList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoCsReq mergeFrom(final GetFarmStageGachaInfoCsReq other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasFarmStageGachaIdList()) {
|
||||||
|
getMutableFarmStageGachaIdList().addAll(other.farmStageGachaIdList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoCsReq clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
farmStageGachaIdList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoCsReq clearQuick() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
farmStageGachaIdList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(o instanceof GetFarmStageGachaInfoCsReq)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
GetFarmStageGachaInfoCsReq other = (GetFarmStageGachaInfoCsReq) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasFarmStageGachaIdList() || farmStageGachaIdList.equals(other.farmStageGachaIdList));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
for (int i = 0; i < farmStageGachaIdList.length(); i++) {
|
||||||
|
output.writeRawByte((byte) 88);
|
||||||
|
output.writeUInt32NoTag(farmStageGachaIdList.array()[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += (1 * farmStageGachaIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(farmStageGachaIdList);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public GetFarmStageGachaInfoCsReq mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 90: {
|
||||||
|
// farmStageGachaIdList [packed=true]
|
||||||
|
input.readPackedUInt32(farmStageGachaIdList, tag);
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 0: {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (!input.skipField(tag)) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
tag = input.readTag();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 88: {
|
||||||
|
// farmStageGachaIdList [packed=false]
|
||||||
|
tag = input.readRepeatedUInt32(farmStageGachaIdList, tag);
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final JsonSink output) throws IOException {
|
||||||
|
output.beginObject();
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRepeatedUInt32(FieldNames.farmStageGachaIdList, farmStageGachaIdList);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoCsReq mergeFrom(final JsonSource input) throws IOException {
|
||||||
|
if (!input.beginObject()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
while (!input.isAtEnd()) {
|
||||||
|
switch (input.readFieldHash()) {
|
||||||
|
case 2055808755:
|
||||||
|
case -1677519237: {
|
||||||
|
if (input.isAtField(FieldNames.farmStageGachaIdList)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readRepeatedUInt32(farmStageGachaIdList);
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoCsReq clone() {
|
||||||
|
return new GetFarmStageGachaInfoCsReq().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetFarmStageGachaInfoCsReq parseFrom(final byte[] data) throws
|
||||||
|
InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new GetFarmStageGachaInfoCsReq(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetFarmStageGachaInfoCsReq parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new GetFarmStageGachaInfoCsReq(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetFarmStageGachaInfoCsReq parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new GetFarmStageGachaInfoCsReq(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating GetFarmStageGachaInfoCsReq messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<GetFarmStageGachaInfoCsReq> getFactory() {
|
||||||
|
return GetFarmStageGachaInfoCsReqFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum GetFarmStageGachaInfoCsReqFactory implements MessageFactory<GetFarmStageGachaInfoCsReq> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoCsReq create() {
|
||||||
|
return GetFarmStageGachaInfoCsReq.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName farmStageGachaIdList = FieldName.forField("farmStageGachaIdList", "farm_stage_gacha_id_list");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,378 @@
|
|||||||
|
// 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 GetFarmStageGachaInfoScRspOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code GetFarmStageGachaInfoScRsp}
|
||||||
|
*/
|
||||||
|
public static final class GetFarmStageGachaInfoScRsp extends ProtoMessage<GetFarmStageGachaInfoScRsp> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 12;</code>
|
||||||
|
*/
|
||||||
|
private int retcode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .FarmStageGachaInfo farm_stage_gacha_info_list = 10;</code>
|
||||||
|
*/
|
||||||
|
private final RepeatedMessage<FarmStageGachaInfoOuterClass.FarmStageGachaInfo> farmStageGachaInfoList = RepeatedMessage.newEmptyInstance(FarmStageGachaInfoOuterClass.FarmStageGachaInfo.getFactory());
|
||||||
|
|
||||||
|
private GetFarmStageGachaInfoScRsp() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code GetFarmStageGachaInfoScRsp}
|
||||||
|
*/
|
||||||
|
public static GetFarmStageGachaInfoScRsp newInstance() {
|
||||||
|
return new GetFarmStageGachaInfoScRsp();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 12;</code>
|
||||||
|
* @return whether the retcode field is set
|
||||||
|
*/
|
||||||
|
public boolean hasRetcode() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 12;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public GetFarmStageGachaInfoScRsp clearRetcode() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
retcode = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 12;</code>
|
||||||
|
* @return the retcode
|
||||||
|
*/
|
||||||
|
public int getRetcode() {
|
||||||
|
return retcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 retcode = 12;</code>
|
||||||
|
* @param value the retcode to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public GetFarmStageGachaInfoScRsp setRetcode(final int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
retcode = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .FarmStageGachaInfo farm_stage_gacha_info_list = 10;</code>
|
||||||
|
* @return whether the farmStageGachaInfoList field is set
|
||||||
|
*/
|
||||||
|
public boolean hasFarmStageGachaInfoList() {
|
||||||
|
return (bitField0_ & 0x00000002) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .FarmStageGachaInfo farm_stage_gacha_info_list = 10;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public GetFarmStageGachaInfoScRsp clearFarmStageGachaInfoList() {
|
||||||
|
bitField0_ &= ~0x00000002;
|
||||||
|
farmStageGachaInfoList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .FarmStageGachaInfo farm_stage_gacha_info_list = 10;</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 #getMutableFarmStageGachaInfoList()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<FarmStageGachaInfoOuterClass.FarmStageGachaInfo> getFarmStageGachaInfoList(
|
||||||
|
) {
|
||||||
|
return farmStageGachaInfoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .FarmStageGachaInfo farm_stage_gacha_info_list = 10;</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<FarmStageGachaInfoOuterClass.FarmStageGachaInfo> getMutableFarmStageGachaInfoList(
|
||||||
|
) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
return farmStageGachaInfoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .FarmStageGachaInfo farm_stage_gacha_info_list = 10;</code>
|
||||||
|
* @param value the farmStageGachaInfoList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public GetFarmStageGachaInfoScRsp addFarmStageGachaInfoList(
|
||||||
|
final FarmStageGachaInfoOuterClass.FarmStageGachaInfo value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
farmStageGachaInfoList.add(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .FarmStageGachaInfo farm_stage_gacha_info_list = 10;</code>
|
||||||
|
* @param values the farmStageGachaInfoList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public GetFarmStageGachaInfoScRsp addAllFarmStageGachaInfoList(
|
||||||
|
final FarmStageGachaInfoOuterClass.FarmStageGachaInfo... values) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
farmStageGachaInfoList.addAll(values);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoScRsp copyFrom(final GetFarmStageGachaInfoScRsp other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
retcode = other.retcode;
|
||||||
|
farmStageGachaInfoList.copyFrom(other.farmStageGachaInfoList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoScRsp mergeFrom(final GetFarmStageGachaInfoScRsp other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasRetcode()) {
|
||||||
|
setRetcode(other.retcode);
|
||||||
|
}
|
||||||
|
if (other.hasFarmStageGachaInfoList()) {
|
||||||
|
getMutableFarmStageGachaInfoList().addAll(other.farmStageGachaInfoList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoScRsp clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
retcode = 0;
|
||||||
|
farmStageGachaInfoList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoScRsp clearQuick() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
farmStageGachaInfoList.clearQuick();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(o instanceof GetFarmStageGachaInfoScRsp)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
GetFarmStageGachaInfoScRsp other = (GetFarmStageGachaInfoScRsp) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasRetcode() || retcode == other.retcode)
|
||||||
|
&& (!hasFarmStageGachaInfoList() || farmStageGachaInfoList.equals(other.farmStageGachaInfoList));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRawByte((byte) 96);
|
||||||
|
output.writeUInt32NoTag(retcode);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
for (int i = 0; i < farmStageGachaInfoList.length(); i++) {
|
||||||
|
output.writeRawByte((byte) 82);
|
||||||
|
output.writeMessageNoTag(farmStageGachaInfoList.get(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
size += (1 * farmStageGachaInfoList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(farmStageGachaInfoList);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public GetFarmStageGachaInfoScRsp mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 96: {
|
||||||
|
// retcode
|
||||||
|
retcode = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 82) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 82: {
|
||||||
|
// farmStageGachaInfoList
|
||||||
|
tag = input.readRepeatedMessage(farmStageGachaInfoList, 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.farmStageGachaInfoList, farmStageGachaInfoList);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoScRsp 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 981089926:
|
||||||
|
case 758978696: {
|
||||||
|
if (input.isAtField(FieldNames.farmStageGachaInfoList)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readRepeatedMessage(farmStageGachaInfoList);
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoScRsp clone() {
|
||||||
|
return new GetFarmStageGachaInfoScRsp().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetFarmStageGachaInfoScRsp parseFrom(final byte[] data) throws
|
||||||
|
InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new GetFarmStageGachaInfoScRsp(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetFarmStageGachaInfoScRsp parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new GetFarmStageGachaInfoScRsp(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetFarmStageGachaInfoScRsp parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new GetFarmStageGachaInfoScRsp(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating GetFarmStageGachaInfoScRsp messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<GetFarmStageGachaInfoScRsp> getFactory() {
|
||||||
|
return GetFarmStageGachaInfoScRspFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum GetFarmStageGachaInfoScRspFactory implements MessageFactory<GetFarmStageGachaInfoScRsp> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetFarmStageGachaInfoScRsp create() {
|
||||||
|
return GetFarmStageGachaInfoScRsp.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName retcode = FieldName.forField("retcode");
|
||||||
|
|
||||||
|
static final FieldName farmStageGachaInfoList = FieldName.forField("farmStageGachaInfoList", "farm_stage_gacha_info_list");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package emu.lunarcore.server.packet.recv;
|
||||||
|
|
||||||
|
import emu.lunarcore.proto.GetFarmStageGachaInfoCsReqOuterClass.GetFarmStageGachaInfoCsReq;
|
||||||
|
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.PacketGetFarmStageGachaInfoScRsp;
|
||||||
|
|
||||||
|
@Opcodes(CmdId.GetFarmStageGachaInfoCsReq)
|
||||||
|
public class HandlerGetFarmStageGachaInfoCsReq extends PacketHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(GameSession session, byte[] data) throws Exception {
|
||||||
|
var req = GetFarmStageGachaInfoCsReq.parseFrom(data);
|
||||||
|
|
||||||
|
session.send(new PacketGetFarmStageGachaInfoScRsp(req.getFarmStageGachaIdList()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package emu.lunarcore.server.packet.send;
|
||||||
|
|
||||||
|
import emu.lunarcore.proto.FarmStageGachaInfoOuterClass.FarmStageGachaInfo;
|
||||||
|
import emu.lunarcore.proto.GetFarmStageGachaInfoScRspOuterClass.GetFarmStageGachaInfoScRsp;
|
||||||
|
import emu.lunarcore.server.packet.BasePacket;
|
||||||
|
import emu.lunarcore.server.packet.CmdId;
|
||||||
|
import us.hebi.quickbuf.RepeatedInt;
|
||||||
|
|
||||||
|
public class PacketGetFarmStageGachaInfoScRsp extends BasePacket {
|
||||||
|
|
||||||
|
public PacketGetFarmStageGachaInfoScRsp(RepeatedInt idList) {
|
||||||
|
super(CmdId.GetFarmStageGachaInfoScRsp);
|
||||||
|
|
||||||
|
var data = GetFarmStageGachaInfoScRsp.newInstance();
|
||||||
|
|
||||||
|
for (var id : idList) {
|
||||||
|
var info = FarmStageGachaInfo.newInstance()
|
||||||
|
.setGachaId(id)
|
||||||
|
.setEndTime(Integer.MAX_VALUE);
|
||||||
|
|
||||||
|
data.addFarmStageGachaInfoList(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setData(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user