update Banners.json and attempt to fix GachaCeiling

This commit is contained in:
Hiro 2023-11-28 04:58:10 +02:00
parent cc9a261323
commit 86ab379559
7 changed files with 1238 additions and 66 deletions

View File

@ -1,61 +1,374 @@
[
{
"id": 1001,
"gachaType": "Normal",
"beginTime": 0,
"endTime": 0,
"rateUpItems5": [],
"rateUpItems4": []
},
{
"id": 2014,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [1217],
"rateUpItems4": [1002, 1008, 1103]
},
{
"id": 3014,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"eventChance": 75,
"rateUpItems5": [23017],
"rateUpItems4": [21007, 21016, 21017]
},
{
"id": 2015,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [1302],
"rateUpItems4": [1009, 1110, 1215]
},
{
"id": 3015,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"eventChance": 75,
"rateUpItems5": [23018],
"rateUpItems4": [21000, 21006, 21019]
},
{
"id": 2016,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [1006],
"rateUpItems4": [1009, 1110, 1215]
},
{
"id": 3016,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"eventChance": 75,
"rateUpItems5": [23007],
"rateUpItems4": [21000, 21006, 21019]
}
{
"id": 1001,
"gachaType": "Normal",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [1001,1002,1003,1004,1008,1009,1013,1101,1103,1104,1105,1106,1107,1108,1109,1201,1202,1206,1209,1211,21000,21001,21002,21003,21004,21005,21006,21007,21008,21009,21010,21011,21012,21013,21014,21015,21016,21017,21018,21019,21020,23000,23002,23003,23004,23005,23012,23013],
"rateUpItems4": [23002,1003,1101,1104,23000,23003]
},
{
"id": 2001,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1102
],
"rateUpItems4": [
1105,
1106,
1109
]
},
{
"id": 3001,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23001
],
"rateUpItems4": [
21001,
21005,
21000
]
},
{
"id": 2002,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1204
],
"rateUpItems4": [
1206,
1001,
1103
]
},
{
"id": 3002,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23010
],
"rateUpItems4": [
21003,
21002,
21013
]
},
{
"id": 2005,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1006
],
"rateUpItems4": [
1002,
1009,
1103
]
},
{
"id": 3005,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23007
],
"rateUpItems4": [
21017,
21004,
21013
]
},
{
"id": 2006,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1203
],
"rateUpItems4": [
1106,
1201,
1207
]
},
{
"id": 3006,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23008
],
"rateUpItems4": [
21001,
21018,
21020
]
},
{
"id": 2007,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1205
],
"rateUpItems4": [
1008,
1206,
1105
]
},
{
"id": 3007,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23009
],
"rateUpItems4": [
21012,
21010,
21007
]
},
{
"id": 2008,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1005
],
"rateUpItems4": [
1111,
1108,
1103
]
},
{
"id": 3008,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23006
],
"rateUpItems4": [
21015,
21008,
21006
]
},
{
"id": 2009,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1213
],
"rateUpItems4": [
1207,
1009,
1001
]
},
{
"id": 3009,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23015
],
"rateUpItems4": [
21011,
21018,
21009
]
},
{
"id": 2010,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1208
],
"rateUpItems4": [
1110,
1109,
1106
]
},
{
"id": 3010,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23011
],
"rateUpItems4": [
21016,
21014,
21019
]
},
{
"id": 2011,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1212
],
"rateUpItems4": [
1202,
1201,
1108
]
},
{
"id": 3011,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23014
],
"rateUpItems4": [
21008,
21004,
21013
]
},
{
"id": 2012,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1112
],
"rateUpItems4": [
1210,
1111,
1206
]
},
{
"id": 3012,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23016
],
"rateUpItems4": [
21003,
21018,
21015
]
},
{
"id": 2014,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1217
],
"rateUpItems4": [
1002,
1008,
1103
]
},
{
"id": 3014,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23017
],
"rateUpItems4": [
21007,
21017,
21016
]
},
{
"id": 2015,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1302
],
"rateUpItems4": [
1215,
1110,
1009
]
},
{
"id": 3015,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23018
],
"rateUpItems4": [
21019,
21000,
21006
]
},
{
"id": 2016,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1006
],
"rateUpItems4": [
1215,
1110,
1009
]
},
{
"id": 3016,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23007
],
"rateUpItems4": [
21019,
21000,
21006
]
}
]

View File

@ -19,6 +19,11 @@ public final class GachaCeilingOuterClass {
public static final class GachaCeiling extends ProtoMessage<GachaCeiling> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 ceiling_num = 14;</code>
*/
private int ceilingNum;
/**
* <code>repeated .GachaCeilingAvatar avatar_list = 15;</code>
*/
@ -34,12 +39,49 @@ public final class GachaCeilingOuterClass {
return new GachaCeiling();
}
/**
* <code>optional uint32 ceiling_num = 14;</code>
* @return whether the ceilingNum field is set
*/
public boolean hasCeilingNum() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 ceiling_num = 14;</code>
* @return this
*/
public GachaCeiling clearCeilingNum() {
bitField0_ &= ~0x00000001;
ceilingNum = 0;
return this;
}
/**
* <code>optional uint32 ceiling_num = 14;</code>
* @return the ceilingNum
*/
public int getCeilingNum() {
return ceilingNum;
}
/**
* <code>optional uint32 ceiling_num = 14;</code>
* @param value the ceilingNum to set
* @return this
*/
public GachaCeiling setCeilingNum(final int value) {
bitField0_ |= 0x00000001;
ceilingNum = value;
return this;
}
/**
* <code>repeated .GachaCeilingAvatar avatar_list = 15;</code>
* @return whether the avatarList field is set
*/
public boolean hasAvatarList() {
return (bitField0_ & 0x00000001) != 0;
return (bitField0_ & 0x00000002) != 0;
}
/**
@ -47,7 +89,7 @@ public final class GachaCeilingOuterClass {
* @return this
*/
public GachaCeiling clearAvatarList() {
bitField0_ &= ~0x00000001;
bitField0_ &= ~0x00000002;
avatarList.clear();
return this;
}
@ -76,7 +118,7 @@ public final class GachaCeilingOuterClass {
* @return internal storage object for modifications
*/
public RepeatedMessage<GachaCeilingAvatarOuterClass.GachaCeilingAvatar> getMutableAvatarList() {
bitField0_ |= 0x00000001;
bitField0_ |= 0x00000002;
return avatarList;
}
@ -86,7 +128,7 @@ public final class GachaCeilingOuterClass {
* @return this
*/
public GachaCeiling addAvatarList(final GachaCeilingAvatarOuterClass.GachaCeilingAvatar value) {
bitField0_ |= 0x00000001;
bitField0_ |= 0x00000002;
avatarList.add(value);
return this;
}
@ -98,7 +140,7 @@ public final class GachaCeilingOuterClass {
*/
public GachaCeiling addAllAvatarList(
final GachaCeilingAvatarOuterClass.GachaCeilingAvatar... values) {
bitField0_ |= 0x00000001;
bitField0_ |= 0x00000002;
avatarList.addAll(values);
return this;
}
@ -108,6 +150,7 @@ public final class GachaCeilingOuterClass {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
ceilingNum = other.ceilingNum;
avatarList.copyFrom(other.avatarList);
}
return this;
@ -119,6 +162,9 @@ public final class GachaCeilingOuterClass {
return this;
}
cachedSize = -1;
if (other.hasCeilingNum()) {
setCeilingNum(other.ceilingNum);
}
if (other.hasAvatarList()) {
getMutableAvatarList().addAll(other.avatarList);
}
@ -132,6 +178,7 @@ public final class GachaCeilingOuterClass {
}
cachedSize = -1;
bitField0_ = 0;
ceilingNum = 0;
avatarList.clear();
return this;
}
@ -157,12 +204,17 @@ public final class GachaCeilingOuterClass {
}
GachaCeiling other = (GachaCeiling) o;
return bitField0_ == other.bitField0_
&& (!hasCeilingNum() || ceilingNum == other.ceilingNum)
&& (!hasAvatarList() || avatarList.equals(other.avatarList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 112);
output.writeUInt32NoTag(ceilingNum);
}
if ((bitField0_ & 0x00000002) != 0) {
for (int i = 0; i < avatarList.length(); i++) {
output.writeRawByte((byte) 122);
output.writeMessageNoTag(avatarList.get(i));
@ -174,6 +226,9 @@ public final class GachaCeilingOuterClass {
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(ceilingNum);
}
if ((bitField0_ & 0x00000002) != 0) {
size += (1 * avatarList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(avatarList);
}
return size;
@ -186,10 +241,19 @@ public final class GachaCeilingOuterClass {
int tag = input.readTag();
while (true) {
switch (tag) {
case 112: {
// ceilingNum
ceilingNum = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 122) {
break;
}
}
case 122: {
// avatarList
tag = input.readRepeatedMessage(avatarList, tag);
bitField0_ |= 0x00000001;
bitField0_ |= 0x00000002;
if (tag != 0) {
break;
}
@ -212,6 +276,9 @@ public final class GachaCeilingOuterClass {
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.ceilingNum, ceilingNum);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRepeatedMessage(FieldNames.avatarList, avatarList);
}
output.endObject();
@ -224,12 +291,24 @@ public final class GachaCeilingOuterClass {
}
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 -403402345:
case 397055940: {
if (input.isAtField(FieldNames.avatarList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(avatarList);
bitField0_ |= 0x00000001;
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
@ -288,6 +367,8 @@ public final class GachaCeilingOuterClass {
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName ceilingNum = FieldName.forField("ceilingNum", "ceiling_num");
static final FieldName avatarList = FieldName.forField("avatarList", "avatar_list");
}
}

View File

@ -0,0 +1,259 @@
// 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 GetGachaCeilingCsReqOuterClass {
/**
* Protobuf type {@code GetGachaCeilingCsReq}
*/
public static final class GetGachaCeilingCsReq extends ProtoMessage<GetGachaCeilingCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 unkfield = 4;</code>
*/
private int unkfield;
private GetGachaCeilingCsReq() {
}
/**
* @return a new empty instance of {@code GetGachaCeilingCsReq}
*/
public static GetGachaCeilingCsReq newInstance() {
return new GetGachaCeilingCsReq();
}
/**
* <code>optional uint32 unkfield = 4;</code>
* @return whether the unkfield field is set
*/
public boolean hasUnkfield() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 unkfield = 4;</code>
* @return this
*/
public GetGachaCeilingCsReq clearUnkfield() {
bitField0_ &= ~0x00000001;
unkfield = 0;
return this;
}
/**
* <code>optional uint32 unkfield = 4;</code>
* @return the unkfield
*/
public int getUnkfield() {
return unkfield;
}
/**
* <code>optional uint32 unkfield = 4;</code>
* @param value the unkfield to set
* @return this
*/
public GetGachaCeilingCsReq setUnkfield(final int value) {
bitField0_ |= 0x00000001;
unkfield = value;
return this;
}
@Override
public GetGachaCeilingCsReq copyFrom(final GetGachaCeilingCsReq other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
unkfield = other.unkfield;
}
return this;
}
@Override
public GetGachaCeilingCsReq mergeFrom(final GetGachaCeilingCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasUnkfield()) {
setUnkfield(other.unkfield);
}
return this;
}
@Override
public GetGachaCeilingCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
unkfield = 0;
return this;
}
@Override
public GetGachaCeilingCsReq 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 GetGachaCeilingCsReq)) {
return false;
}
GetGachaCeilingCsReq other = (GetGachaCeilingCsReq) o;
return bitField0_ == other.bitField0_
&& (!hasUnkfield() || unkfield == other.unkfield);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 32);
output.writeUInt32NoTag(unkfield);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(unkfield);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetGachaCeilingCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 32: {
// unkfield
unkfield = input.readUInt32();
bitField0_ |= 0x00000001;
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.unkfield, unkfield);
}
output.endObject();
}
@Override
public GetGachaCeilingCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -247717048: {
if (input.isAtField(FieldNames.unkfield)) {
if (!input.trySkipNullValue()) {
unkfield = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetGachaCeilingCsReq clone() {
return new GetGachaCeilingCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetGachaCeilingCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetGachaCeilingCsReq(), data).checkInitialized();
}
public static GetGachaCeilingCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetGachaCeilingCsReq(), input).checkInitialized();
}
public static GetGachaCeilingCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetGachaCeilingCsReq(), input).checkInitialized();
}
/**
* @return factory for creating GetGachaCeilingCsReq messages
*/
public static MessageFactory<GetGachaCeilingCsReq> getFactory() {
return GetGachaCeilingCsReqFactory.INSTANCE;
}
private enum GetGachaCeilingCsReqFactory implements MessageFactory<GetGachaCeilingCsReq> {
INSTANCE;
@Override
public GetGachaCeilingCsReq create() {
return GetGachaCeilingCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName unkfield = FieldName.forField("unkfield");
}
}
}

View File

@ -0,0 +1,441 @@
// 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 GetGachaCeilingScRspOuterClass {
/**
* Protobuf type {@code GetGachaCeilingScRsp}
*/
public static final class GetGachaCeilingScRsp extends ProtoMessage<GetGachaCeilingScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 unkfield = 14;</code>
*/
private int unkfield;
/**
* <code>optional uint32 retcode = 15;</code>
*/
private int retcode;
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</code>
*/
private final GachaCeilingOuterClass.GachaCeiling gachaCeiling = GachaCeilingOuterClass.GachaCeiling.newInstance();
private GetGachaCeilingScRsp() {
}
/**
* @return a new empty instance of {@code GetGachaCeilingScRsp}
*/
public static GetGachaCeilingScRsp newInstance() {
return new GetGachaCeilingScRsp();
}
/**
* <code>optional uint32 unkfield = 14;</code>
* @return whether the unkfield field is set
*/
public boolean hasUnkfield() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 unkfield = 14;</code>
* @return this
*/
public GetGachaCeilingScRsp clearUnkfield() {
bitField0_ &= ~0x00000001;
unkfield = 0;
return this;
}
/**
* <code>optional uint32 unkfield = 14;</code>
* @return the unkfield
*/
public int getUnkfield() {
return unkfield;
}
/**
* <code>optional uint32 unkfield = 14;</code>
* @param value the unkfield to set
* @return this
*/
public GetGachaCeilingScRsp setUnkfield(final int value) {
bitField0_ |= 0x00000001;
unkfield = value;
return this;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @return this
*/
public GetGachaCeilingScRsp clearRetcode() {
bitField0_ &= ~0x00000002;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @param value the retcode to set
* @return this
*/
public GetGachaCeilingScRsp setRetcode(final int value) {
bitField0_ |= 0x00000002;
retcode = value;
return this;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</code>
* @return whether the gachaCeiling field is set
*/
public boolean hasGachaCeiling() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</code>
* @return this
*/
public GetGachaCeilingScRsp clearGachaCeiling() {
bitField0_ &= ~0x00000004;
gachaCeiling.clear();
return this;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</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 #getMutableGachaCeiling()} if you want to modify it.
*
* @return internal storage object for reading
*/
public GachaCeilingOuterClass.GachaCeiling getGachaCeiling() {
return gachaCeiling;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</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 GachaCeilingOuterClass.GachaCeiling getMutableGachaCeiling() {
bitField0_ |= 0x00000004;
return gachaCeiling;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</code>
* @param value the gachaCeiling to set
* @return this
*/
public GetGachaCeilingScRsp setGachaCeiling(final GachaCeilingOuterClass.GachaCeiling value) {
bitField0_ |= 0x00000004;
gachaCeiling.copyFrom(value);
return this;
}
@Override
public GetGachaCeilingScRsp copyFrom(final GetGachaCeilingScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
unkfield = other.unkfield;
retcode = other.retcode;
gachaCeiling.copyFrom(other.gachaCeiling);
}
return this;
}
@Override
public GetGachaCeilingScRsp mergeFrom(final GetGachaCeilingScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasUnkfield()) {
setUnkfield(other.unkfield);
}
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasGachaCeiling()) {
getMutableGachaCeiling().mergeFrom(other.gachaCeiling);
}
return this;
}
@Override
public GetGachaCeilingScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
unkfield = 0;
retcode = 0;
gachaCeiling.clear();
return this;
}
@Override
public GetGachaCeilingScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
gachaCeiling.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetGachaCeilingScRsp)) {
return false;
}
GetGachaCeilingScRsp other = (GetGachaCeilingScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasUnkfield() || unkfield == other.unkfield)
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasGachaCeiling() || gachaCeiling.equals(other.gachaCeiling));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 112);
output.writeUInt32NoTag(unkfield);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 120);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 50);
output.writeMessageNoTag(gachaCeiling);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(unkfield);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(gachaCeiling);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetGachaCeilingScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 112: {
// unkfield
unkfield = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 120) {
break;
}
}
case 120: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 50) {
break;
}
}
case 50: {
// gachaCeiling
input.readMessage(gachaCeiling);
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.writeUInt32(FieldNames.unkfield, unkfield);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeMessage(FieldNames.gachaCeiling, gachaCeiling);
}
output.endObject();
}
@Override
public GetGachaCeilingScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -247717048: {
if (input.isAtField(FieldNames.unkfield)) {
if (!input.trySkipNullValue()) {
unkfield = 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 507275483:
case -1792489728: {
if (input.isAtField(FieldNames.gachaCeiling)) {
if (!input.trySkipNullValue()) {
input.readMessage(gachaCeiling);
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetGachaCeilingScRsp clone() {
return new GetGachaCeilingScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetGachaCeilingScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetGachaCeilingScRsp(), data).checkInitialized();
}
public static GetGachaCeilingScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetGachaCeilingScRsp(), input).checkInitialized();
}
public static GetGachaCeilingScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetGachaCeilingScRsp(), input).checkInitialized();
}
/**
* @return factory for creating GetGachaCeilingScRsp messages
*/
public static MessageFactory<GetGachaCeilingScRsp> getFactory() {
return GetGachaCeilingScRspFactory.INSTANCE;
}
private enum GetGachaCeilingScRspFactory implements MessageFactory<GetGachaCeilingScRsp> {
INSTANCE;
@Override
public GetGachaCeilingScRsp create() {
return GetGachaCeilingScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName unkfield = FieldName.forField("unkfield");
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName gachaCeiling = FieldName.forField("gachaCeiling", "gacha_ceiling");
}
}
}

View File

@ -1,6 +1,7 @@
package emu.lunarcore.game.gacha;
import emu.lunarcore.proto.GachaCeilingOuterClass.GachaCeiling;
import emu.lunarcore.proto.GachaCeilingAvatarOuterClass.GachaCeilingAvatar;
import emu.lunarcore.proto.GachaInfoOuterClass.GachaInfo;
import lombok.Getter;
@ -13,6 +14,13 @@ public class GachaBanner {
private int[] rateUpItems5;
private int[] rateUpItems4;
private int eventChance = 50;
private GachaCeiling gachaCeiling;
private GachaCeilingAvatar createCeilingAvatarInfo(int avatarId) {
return GachaCeilingAvatar.newInstance()
.setRepeatedCnt(1)
.setAvatarId(avatarId);
}
public GachaInfo toProto() {
var info = GachaInfo.newInstance()
@ -41,6 +49,20 @@ public class GachaBanner {
}
}
if (this.getId() == 1001) {
GachaCeilingAvatar ceilingavatarinfo1 = createCeilingAvatarInfo(1003);
GachaCeilingAvatar ceilingavatarinfo2 = createCeilingAvatarInfo(1107);
GachaCeilingAvatar ceilingavatarinfo3 = createCeilingAvatarInfo(1211);
GachaCeiling ceilinginfo = GachaCeiling.newInstance()
.addAvatarList(ceilingavatarinfo1)
.addAvatarList(ceilingavatarinfo2)
.addAvatarList(ceilingavatarinfo3)
.setCeilingNum(169);
info.setGachaCeiling(ceilinginfo);
}
return info;
}
}

View File

@ -0,0 +1,19 @@
package emu.lunarcore.server.packet.recv;
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.PacketGetGachaCeilingScRsp;
import emu.lunarcore.proto.GetGachaCeilingCsReqOuterClass.GetGachaCeilingCsReq;
@Opcodes(CmdId.GetGachaCeilingCsReq)
public class HandlerGetGachaCeilingCsReq extends PacketHandler {
@Override
public void handle(GameSession session, byte[] data) throws Exception {
var req = GetGachaCeilingCsReq.parseFrom(data);
session.send(new PacketGetGachaCeilingScRsp(req.getUnkfield()));
}
}

View File

@ -0,0 +1,37 @@
package emu.lunarcore.server.packet.send;
import emu.lunarcore.server.packet.CmdId;
import emu.lunarcore.server.game.GameSession;
import emu.lunarcore.server.packet.BasePacket;
import emu.lunarcore.proto.GachaCeilingOuterClass.GachaCeiling;
import emu.lunarcore.proto.GachaCeilingAvatarOuterClass.GachaCeilingAvatar;
import emu.lunarcore.proto.GetGachaCeilingScRspOuterClass.GetGachaCeilingScRsp;
public class PacketGetGachaCeilingScRsp extends BasePacket {
private GachaCeilingAvatar createCeilingAvatarInfo(int avatarId) {
return GachaCeilingAvatar.newInstance()
.setRepeatedCnt(1)
.setAvatarId(avatarId);
}
public PacketGetGachaCeilingScRsp(int unkfield) {
super(CmdId.GetGachaCeilingScRsp);
GachaCeilingAvatar ceilingavatarinfo1 = createCeilingAvatarInfo(1003);
GachaCeilingAvatar ceilingavatarinfo2 = createCeilingAvatarInfo(1107);
GachaCeilingAvatar ceilingavatarinfo3 = createCeilingAvatarInfo(1211);
GachaCeiling gachaceiling = GachaCeiling.newInstance()
.addAvatarList(ceilingavatarinfo1)
.addAvatarList(ceilingavatarinfo2)
.addAvatarList(ceilingavatarinfo3)
.setCeilingNum(169);
var proto = GetGachaCeilingScRsp.newInstance()
.setGachaCeiling(gachaceiling)
.setUnkfield(unkfield);
this.setData(proto);
}
}