mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-12 21:34:35 +01:00
Update Gacha (#81)
* Update README * Update README_vi-VI.md * Update Gacha --------- Co-authored-by: Haruko-kun <78084997+Haruko-kun@users.noreply.github.com>
This commit is contained in:
@@ -19,11 +19,6 @@ public final class DoGachaScRspOuterClass {
|
||||
public static final class DoGachaScRsp extends ProtoMessage<DoGachaScRsp> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 ceiling_num = 4;</code>
|
||||
*/
|
||||
private int ceilingNum;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 8;</code>
|
||||
*/
|
||||
@@ -39,6 +34,15 @@ public final class DoGachaScRspOuterClass {
|
||||
*/
|
||||
private int gachaNum;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* TODO (possible value: 13, 3, 6, 4, 7)
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 ceiling_num = 13;</code>
|
||||
*/
|
||||
private int ceilingNum;
|
||||
|
||||
/**
|
||||
* <code>repeated .GachaItem gacha_item_list = 1;</code>
|
||||
*/
|
||||
@@ -54,49 +58,12 @@ public final class DoGachaScRspOuterClass {
|
||||
return new DoGachaScRsp();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 ceiling_num = 4;</code>
|
||||
* @return whether the ceilingNum field is set
|
||||
*/
|
||||
public boolean hasCeilingNum() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 ceiling_num = 4;</code>
|
||||
* @return this
|
||||
*/
|
||||
public DoGachaScRsp clearCeilingNum() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
ceilingNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 ceiling_num = 4;</code>
|
||||
* @return the ceilingNum
|
||||
*/
|
||||
public int getCeilingNum() {
|
||||
return ceilingNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 ceiling_num = 4;</code>
|
||||
* @param value the ceilingNum to set
|
||||
* @return this
|
||||
*/
|
||||
public DoGachaScRsp setCeilingNum(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
ceilingNum = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 8;</code>
|
||||
* @return whether the retcode field is set
|
||||
*/
|
||||
public boolean hasRetcode() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -104,7 +71,7 @@ public final class DoGachaScRspOuterClass {
|
||||
* @return this
|
||||
*/
|
||||
public DoGachaScRsp clearRetcode() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
bitField0_ &= ~0x00000001;
|
||||
retcode = 0;
|
||||
return this;
|
||||
}
|
||||
@@ -123,7 +90,7 @@ public final class DoGachaScRspOuterClass {
|
||||
* @return this
|
||||
*/
|
||||
public DoGachaScRsp setRetcode(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
bitField0_ |= 0x00000001;
|
||||
retcode = value;
|
||||
return this;
|
||||
}
|
||||
@@ -133,7 +100,7 @@ public final class DoGachaScRspOuterClass {
|
||||
* @return whether the gachaId field is set
|
||||
*/
|
||||
public boolean hasGachaId() {
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,7 +108,7 @@ public final class DoGachaScRspOuterClass {
|
||||
* @return this
|
||||
*/
|
||||
public DoGachaScRsp clearGachaId() {
|
||||
bitField0_ &= ~0x00000004;
|
||||
bitField0_ &= ~0x00000002;
|
||||
gachaId = 0;
|
||||
return this;
|
||||
}
|
||||
@@ -160,7 +127,7 @@ public final class DoGachaScRspOuterClass {
|
||||
* @return this
|
||||
*/
|
||||
public DoGachaScRsp setGachaId(final int value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
bitField0_ |= 0x00000002;
|
||||
gachaId = value;
|
||||
return this;
|
||||
}
|
||||
@@ -170,7 +137,7 @@ public final class DoGachaScRspOuterClass {
|
||||
* @return whether the gachaNum field is set
|
||||
*/
|
||||
public boolean hasGachaNum() {
|
||||
return (bitField0_ & 0x00000008) != 0;
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -178,7 +145,7 @@ public final class DoGachaScRspOuterClass {
|
||||
* @return this
|
||||
*/
|
||||
public DoGachaScRsp clearGachaNum() {
|
||||
bitField0_ &= ~0x00000008;
|
||||
bitField0_ &= ~0x00000004;
|
||||
gachaNum = 0;
|
||||
return this;
|
||||
}
|
||||
@@ -197,11 +164,64 @@ public final class DoGachaScRspOuterClass {
|
||||
* @return this
|
||||
*/
|
||||
public DoGachaScRsp setGachaNum(final int value) {
|
||||
bitField0_ |= 0x00000008;
|
||||
bitField0_ |= 0x00000004;
|
||||
gachaNum = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* TODO (possible value: 13, 3, 6, 4, 7)
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 ceiling_num = 13;</code>
|
||||
* @return whether the ceilingNum field is set
|
||||
*/
|
||||
public boolean hasCeilingNum() {
|
||||
return (bitField0_ & 0x00000008) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* TODO (possible value: 13, 3, 6, 4, 7)
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 ceiling_num = 13;</code>
|
||||
* @return this
|
||||
*/
|
||||
public DoGachaScRsp clearCeilingNum() {
|
||||
bitField0_ &= ~0x00000008;
|
||||
ceilingNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* TODO (possible value: 13, 3, 6, 4, 7)
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 ceiling_num = 13;</code>
|
||||
* @return the ceilingNum
|
||||
*/
|
||||
public int getCeilingNum() {
|
||||
return ceilingNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* TODO (possible value: 13, 3, 6, 4, 7)
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 ceiling_num = 13;</code>
|
||||
* @param value the ceilingNum to set
|
||||
* @return this
|
||||
*/
|
||||
public DoGachaScRsp setCeilingNum(final int value) {
|
||||
bitField0_ |= 0x00000008;
|
||||
ceilingNum = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .GachaItem gacha_item_list = 1;</code>
|
||||
* @return whether the gachaItemList field is set
|
||||
@@ -275,10 +295,10 @@ public final class DoGachaScRspOuterClass {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
ceilingNum = other.ceilingNum;
|
||||
retcode = other.retcode;
|
||||
gachaId = other.gachaId;
|
||||
gachaNum = other.gachaNum;
|
||||
ceilingNum = other.ceilingNum;
|
||||
gachaItemList.copyFrom(other.gachaItemList);
|
||||
}
|
||||
return this;
|
||||
@@ -290,9 +310,6 @@ public final class DoGachaScRspOuterClass {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasCeilingNum()) {
|
||||
setCeilingNum(other.ceilingNum);
|
||||
}
|
||||
if (other.hasRetcode()) {
|
||||
setRetcode(other.retcode);
|
||||
}
|
||||
@@ -302,6 +319,9 @@ public final class DoGachaScRspOuterClass {
|
||||
if (other.hasGachaNum()) {
|
||||
setGachaNum(other.gachaNum);
|
||||
}
|
||||
if (other.hasCeilingNum()) {
|
||||
setCeilingNum(other.ceilingNum);
|
||||
}
|
||||
if (other.hasGachaItemList()) {
|
||||
getMutableGachaItemList().addAll(other.gachaItemList);
|
||||
}
|
||||
@@ -315,10 +335,10 @@ public final class DoGachaScRspOuterClass {
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
ceilingNum = 0;
|
||||
retcode = 0;
|
||||
gachaId = 0;
|
||||
gachaNum = 0;
|
||||
ceilingNum = 0;
|
||||
gachaItemList.clear();
|
||||
return this;
|
||||
}
|
||||
@@ -344,31 +364,31 @@ public final class DoGachaScRspOuterClass {
|
||||
}
|
||||
DoGachaScRsp other = (DoGachaScRsp) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasCeilingNum() || ceilingNum == other.ceilingNum)
|
||||
&& (!hasRetcode() || retcode == other.retcode)
|
||||
&& (!hasGachaId() || gachaId == other.gachaId)
|
||||
&& (!hasGachaNum() || gachaNum == other.gachaNum)
|
||||
&& (!hasCeilingNum() || ceilingNum == other.ceilingNum)
|
||||
&& (!hasGachaItemList() || gachaItemList.equals(other.gachaItemList));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 32);
|
||||
output.writeUInt32NoTag(ceilingNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 64);
|
||||
output.writeUInt32NoTag(retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 80);
|
||||
output.writeUInt32NoTag(gachaId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000008) != 0) {
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeRawByte((byte) 96);
|
||||
output.writeUInt32NoTag(gachaNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000008) != 0) {
|
||||
output.writeRawByte((byte) 104);
|
||||
output.writeUInt32NoTag(ceilingNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000010) != 0) {
|
||||
for (int i = 0; i < gachaItemList.length(); i++) {
|
||||
output.writeRawByte((byte) 10);
|
||||
@@ -381,17 +401,17 @@ public final class DoGachaScRspOuterClass {
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(ceilingNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000008) != 0) {
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000008) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(ceilingNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000010) != 0) {
|
||||
size += (1 * gachaItemList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(gachaItemList);
|
||||
}
|
||||
@@ -405,19 +425,10 @@ public final class DoGachaScRspOuterClass {
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 32: {
|
||||
// ceilingNum
|
||||
ceilingNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 64) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 64: {
|
||||
// retcode
|
||||
retcode = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 80) {
|
||||
break;
|
||||
@@ -426,7 +437,7 @@ public final class DoGachaScRspOuterClass {
|
||||
case 80: {
|
||||
// gachaId
|
||||
gachaId = input.readUInt32();
|
||||
bitField0_ |= 0x00000004;
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 96) {
|
||||
break;
|
||||
@@ -435,6 +446,15 @@ public final class DoGachaScRspOuterClass {
|
||||
case 96: {
|
||||
// gachaNum
|
||||
gachaNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000004;
|
||||
tag = input.readTag();
|
||||
if (tag != 104) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 104: {
|
||||
// ceilingNum
|
||||
ceilingNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000008;
|
||||
tag = input.readTag();
|
||||
if (tag != 10) {
|
||||
@@ -467,17 +487,17 @@ public final class DoGachaScRspOuterClass {
|
||||
public void writeTo(final JsonSink output) throws IOException {
|
||||
output.beginObject();
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeUInt32(FieldNames.ceilingNum, ceilingNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.retcode, retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.gachaId, gachaId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000008) != 0) {
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeUInt32(FieldNames.gachaNum, gachaNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000008) != 0) {
|
||||
output.writeUInt32(FieldNames.ceilingNum, ceilingNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000010) != 0) {
|
||||
output.writeRepeatedMessage(FieldNames.gachaItemList, gachaItemList);
|
||||
}
|
||||
@@ -491,23 +511,11 @@ public final class DoGachaScRspOuterClass {
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case -1655838327:
|
||||
case 209119492: {
|
||||
if (input.isAtField(FieldNames.ceilingNum)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
ceilingNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1097936398: {
|
||||
if (input.isAtField(FieldNames.retcode)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
retcode = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
@@ -519,7 +527,7 @@ public final class DoGachaScRspOuterClass {
|
||||
if (input.isAtField(FieldNames.gachaId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
gachaId = input.readUInt32();
|
||||
bitField0_ |= 0x00000004;
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
@@ -531,6 +539,18 @@ public final class DoGachaScRspOuterClass {
|
||||
if (input.isAtField(FieldNames.gachaNum)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
gachaNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000004;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -1655838327:
|
||||
case 209119492: {
|
||||
if (input.isAtField(FieldNames.ceilingNum)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
ceilingNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000008;
|
||||
}
|
||||
} else {
|
||||
@@ -602,14 +622,14 @@ public final class DoGachaScRspOuterClass {
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName ceilingNum = FieldName.forField("ceilingNum", "ceiling_num");
|
||||
|
||||
static final FieldName retcode = FieldName.forField("retcode");
|
||||
|
||||
static final FieldName gachaId = FieldName.forField("gachaId", "gacha_id");
|
||||
|
||||
static final FieldName gachaNum = FieldName.forField("gachaNum", "gacha_num");
|
||||
|
||||
static final FieldName ceilingNum = FieldName.forField("ceilingNum", "ceiling_num");
|
||||
|
||||
static final FieldName gachaItemList = FieldName.forField("gachaItemList", "gacha_item_list");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user