mirror of
https://github.com/Anime-Game-Servers/AGSLunarCore.git
synced 2024-11-27 06:10:25 +00:00
implement background music
This commit is contained in:
parent
528d18939c
commit
9f40c17cb6
@ -0,0 +1,174 @@
|
||||
// Code generated by protocol buffer compiler. Do not edit!
|
||||
package emu.lunarcore.proto;
|
||||
|
||||
import java.io.IOException;
|
||||
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 GetJukeboxDataCsReqOuterClass {
|
||||
/**
|
||||
* Protobuf type {@code GetJukeboxDataCsReq}
|
||||
*/
|
||||
public static final class GetJukeboxDataCsReq extends ProtoMessage<GetJukeboxDataCsReq> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
private GetJukeboxDataCsReq() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code GetJukeboxDataCsReq}
|
||||
*/
|
||||
public static GetJukeboxDataCsReq newInstance() {
|
||||
return new GetJukeboxDataCsReq();
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataCsReq copyFrom(final GetJukeboxDataCsReq other) {
|
||||
cachedSize = other.cachedSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataCsReq mergeFrom(final GetJukeboxDataCsReq other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataCsReq clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataCsReq clearQuick() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof GetJukeboxDataCsReq)) {
|
||||
return false;
|
||||
}
|
||||
GetJukeboxDataCsReq other = (GetJukeboxDataCsReq) o;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public GetJukeboxDataCsReq mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
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();
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataCsReq mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataCsReq clone() {
|
||||
return new GetJukeboxDataCsReq().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static GetJukeboxDataCsReq parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new GetJukeboxDataCsReq(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static GetJukeboxDataCsReq parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new GetJukeboxDataCsReq(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static GetJukeboxDataCsReq parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new GetJukeboxDataCsReq(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating GetJukeboxDataCsReq messages
|
||||
*/
|
||||
public static MessageFactory<GetJukeboxDataCsReq> getFactory() {
|
||||
return GetJukeboxDataCsReqFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum GetJukeboxDataCsReqFactory implements MessageFactory<GetJukeboxDataCsReq> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataCsReq create() {
|
||||
return GetJukeboxDataCsReq.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,861 @@
|
||||
// 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 GetJukeboxDataScRspOuterClass {
|
||||
/**
|
||||
* Protobuf type {@code GetJukeboxDataScRsp}
|
||||
*/
|
||||
public static final class GetJukeboxDataScRsp extends ProtoMessage<GetJukeboxDataScRsp> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 playing_id = 3;</code>
|
||||
*/
|
||||
private int playingId;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 14;</code>
|
||||
*/
|
||||
private int retcode;
|
||||
|
||||
/**
|
||||
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
|
||||
*/
|
||||
private final RepeatedMessage<UnlockedMusic> musicList = RepeatedMessage.newEmptyInstance(UnlockedMusic.getFactory());
|
||||
|
||||
private GetJukeboxDataScRsp() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code GetJukeboxDataScRsp}
|
||||
*/
|
||||
public static GetJukeboxDataScRsp newInstance() {
|
||||
return new GetJukeboxDataScRsp();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 playing_id = 3;</code>
|
||||
* @return whether the playingId field is set
|
||||
*/
|
||||
public boolean hasPlayingId() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 playing_id = 3;</code>
|
||||
* @return this
|
||||
*/
|
||||
public GetJukeboxDataScRsp clearPlayingId() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
playingId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 playing_id = 3;</code>
|
||||
* @return the playingId
|
||||
*/
|
||||
public int getPlayingId() {
|
||||
return playingId;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 playing_id = 3;</code>
|
||||
* @param value the playingId to set
|
||||
* @return this
|
||||
*/
|
||||
public GetJukeboxDataScRsp setPlayingId(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
playingId = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 14;</code>
|
||||
* @return whether the retcode field is set
|
||||
*/
|
||||
public boolean hasRetcode() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 14;</code>
|
||||
* @return this
|
||||
*/
|
||||
public GetJukeboxDataScRsp clearRetcode() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
retcode = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 14;</code>
|
||||
* @return the retcode
|
||||
*/
|
||||
public int getRetcode() {
|
||||
return retcode;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 14;</code>
|
||||
* @param value the retcode to set
|
||||
* @return this
|
||||
*/
|
||||
public GetJukeboxDataScRsp setRetcode(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
retcode = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
|
||||
* @return whether the musicList field is set
|
||||
*/
|
||||
public boolean hasMusicList() {
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
|
||||
* @return this
|
||||
*/
|
||||
public GetJukeboxDataScRsp clearMusicList() {
|
||||
bitField0_ &= ~0x00000004;
|
||||
musicList.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</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 #getMutableMusicList()} if you want to modify it.
|
||||
*
|
||||
* @return internal storage object for reading
|
||||
*/
|
||||
public RepeatedMessage<UnlockedMusic> getMusicList() {
|
||||
return musicList;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</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<UnlockedMusic> getMutableMusicList() {
|
||||
bitField0_ |= 0x00000004;
|
||||
return musicList;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
|
||||
* @param value the musicList to add
|
||||
* @return this
|
||||
*/
|
||||
public GetJukeboxDataScRsp addMusicList(final UnlockedMusic value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
musicList.add(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
|
||||
* @param values the musicList to add
|
||||
* @return this
|
||||
*/
|
||||
public GetJukeboxDataScRsp addAllMusicList(final UnlockedMusic... values) {
|
||||
bitField0_ |= 0x00000004;
|
||||
musicList.addAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataScRsp copyFrom(final GetJukeboxDataScRsp other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
playingId = other.playingId;
|
||||
retcode = other.retcode;
|
||||
musicList.copyFrom(other.musicList);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataScRsp mergeFrom(final GetJukeboxDataScRsp other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasPlayingId()) {
|
||||
setPlayingId(other.playingId);
|
||||
}
|
||||
if (other.hasRetcode()) {
|
||||
setRetcode(other.retcode);
|
||||
}
|
||||
if (other.hasMusicList()) {
|
||||
getMutableMusicList().addAll(other.musicList);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataScRsp clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
playingId = 0;
|
||||
retcode = 0;
|
||||
musicList.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataScRsp clearQuick() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
musicList.clearQuick();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof GetJukeboxDataScRsp)) {
|
||||
return false;
|
||||
}
|
||||
GetJukeboxDataScRsp other = (GetJukeboxDataScRsp) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasPlayingId() || playingId == other.playingId)
|
||||
&& (!hasRetcode() || retcode == other.retcode)
|
||||
&& (!hasMusicList() || musicList.equals(other.musicList));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 24);
|
||||
output.writeUInt32NoTag(playingId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 112);
|
||||
output.writeUInt32NoTag(retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
for (int i = 0; i < musicList.length(); i++) {
|
||||
output.writeRawByte((byte) 58);
|
||||
output.writeMessageNoTag(musicList.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(playingId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
size += (1 * musicList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(musicList);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public GetJukeboxDataScRsp mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 24: {
|
||||
// playingId
|
||||
playingId = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 112) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 112: {
|
||||
// retcode
|
||||
retcode = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 58) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 58: {
|
||||
// musicList
|
||||
tag = input.readRepeatedMessage(musicList, tag);
|
||||
bitField0_ |= 0x00000004;
|
||||
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.playingId, playingId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.retcode, retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeRepeatedMessage(FieldNames.musicList, musicList);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataScRsp mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case -1868462615:
|
||||
case -2087744820: {
|
||||
if (input.isAtField(FieldNames.playingId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
playingId = 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 389904483:
|
||||
case -780236168: {
|
||||
if (input.isAtField(FieldNames.musicList)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
input.readRepeatedMessage(musicList);
|
||||
bitField0_ |= 0x00000004;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataScRsp clone() {
|
||||
return new GetJukeboxDataScRsp().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static GetJukeboxDataScRsp parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new GetJukeboxDataScRsp(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static GetJukeboxDataScRsp parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new GetJukeboxDataScRsp(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static GetJukeboxDataScRsp parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new GetJukeboxDataScRsp(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating GetJukeboxDataScRsp messages
|
||||
*/
|
||||
public static MessageFactory<GetJukeboxDataScRsp> getFactory() {
|
||||
return GetJukeboxDataScRspFactory.INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf type {@code UnlockedMusic}
|
||||
*/
|
||||
public static final class UnlockedMusic extends ProtoMessage<UnlockedMusic> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 group_id = 1;</code>
|
||||
*/
|
||||
private int groupId;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 id = 8;</code>
|
||||
*/
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* <code>optional bool unkbool = 7;</code>
|
||||
*/
|
||||
private boolean unkbool;
|
||||
|
||||
private UnlockedMusic() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code UnlockedMusic}
|
||||
*/
|
||||
public static UnlockedMusic newInstance() {
|
||||
return new UnlockedMusic();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 group_id = 1;</code>
|
||||
* @return whether the groupId field is set
|
||||
*/
|
||||
public boolean hasGroupId() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 group_id = 1;</code>
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic clearGroupId() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
groupId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 group_id = 1;</code>
|
||||
* @return the groupId
|
||||
*/
|
||||
public int getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 group_id = 1;</code>
|
||||
* @param value the groupId to set
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic setGroupId(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
groupId = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 id = 8;</code>
|
||||
* @return whether the id field is set
|
||||
*/
|
||||
public boolean hasId() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 id = 8;</code>
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic clearId() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
id = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 id = 8;</code>
|
||||
* @return the id
|
||||
*/
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 id = 8;</code>
|
||||
* @param value the id to set
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic setId(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool unkbool = 7;</code>
|
||||
* @return whether the unkbool field is set
|
||||
*/
|
||||
public boolean hasUnkbool() {
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool unkbool = 7;</code>
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic clearUnkbool() {
|
||||
bitField0_ &= ~0x00000004;
|
||||
unkbool = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool unkbool = 7;</code>
|
||||
* @return the unkbool
|
||||
*/
|
||||
public boolean getUnkbool() {
|
||||
return unkbool;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool unkbool = 7;</code>
|
||||
* @param value the unkbool to set
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic setUnkbool(final boolean value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
unkbool = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic copyFrom(final UnlockedMusic other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
groupId = other.groupId;
|
||||
id = other.id;
|
||||
unkbool = other.unkbool;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic mergeFrom(final UnlockedMusic other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasGroupId()) {
|
||||
setGroupId(other.groupId);
|
||||
}
|
||||
if (other.hasId()) {
|
||||
setId(other.id);
|
||||
}
|
||||
if (other.hasUnkbool()) {
|
||||
setUnkbool(other.unkbool);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
groupId = 0;
|
||||
id = 0;
|
||||
unkbool = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic 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 UnlockedMusic)) {
|
||||
return false;
|
||||
}
|
||||
UnlockedMusic other = (UnlockedMusic) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasGroupId() || groupId == other.groupId)
|
||||
&& (!hasId() || id == other.id)
|
||||
&& (!hasUnkbool() || unkbool == other.unkbool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 8);
|
||||
output.writeUInt32NoTag(groupId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 64);
|
||||
output.writeUInt32NoTag(id);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeRawByte((byte) 56);
|
||||
output.writeBoolNoTag(unkbool);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(id);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
size += 2;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public UnlockedMusic mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 8: {
|
||||
// groupId
|
||||
groupId = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 64) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 64: {
|
||||
// id
|
||||
id = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 56) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 56: {
|
||||
// unkbool
|
||||
unkbool = input.readBool();
|
||||
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.groupId, groupId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.id, id);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeBool(FieldNames.unkbool, unkbool);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case 293428218:
|
||||
case 506361563: {
|
||||
if (input.isAtField(FieldNames.groupId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
groupId = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 3355: {
|
||||
if (input.isAtField(FieldNames.id)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
id = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -285198628: {
|
||||
if (input.isAtField(FieldNames.unkbool)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
unkbool = input.readBool();
|
||||
bitField0_ |= 0x00000004;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic clone() {
|
||||
return new UnlockedMusic().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static UnlockedMusic parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new UnlockedMusic(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static UnlockedMusic parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new UnlockedMusic(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static UnlockedMusic parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new UnlockedMusic(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating UnlockedMusic messages
|
||||
*/
|
||||
public static MessageFactory<UnlockedMusic> getFactory() {
|
||||
return UnlockedMusicFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum UnlockedMusicFactory implements MessageFactory<UnlockedMusic> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public UnlockedMusic create() {
|
||||
return UnlockedMusic.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName groupId = FieldName.forField("groupId", "group_id");
|
||||
|
||||
static final FieldName id = FieldName.forField("id");
|
||||
|
||||
static final FieldName unkbool = FieldName.forField("unkbool");
|
||||
}
|
||||
}
|
||||
|
||||
private enum GetJukeboxDataScRspFactory implements MessageFactory<GetJukeboxDataScRsp> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public GetJukeboxDataScRsp create() {
|
||||
return GetJukeboxDataScRsp.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName playingId = FieldName.forField("playingId", "playing_id");
|
||||
|
||||
static final FieldName retcode = FieldName.forField("retcode");
|
||||
|
||||
static final FieldName musicList = FieldName.forField("musicList", "music_list");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,260 @@
|
||||
// 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 PlayBackGroundMusicCsReqOuterClass {
|
||||
/**
|
||||
* Protobuf type {@code PlayBackGroundMusicCsReq}
|
||||
*/
|
||||
public static final class PlayBackGroundMusicCsReq extends ProtoMessage<PlayBackGroundMusicCsReq> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 play_music_id = 6;</code>
|
||||
*/
|
||||
private int playMusicId;
|
||||
|
||||
private PlayBackGroundMusicCsReq() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code PlayBackGroundMusicCsReq}
|
||||
*/
|
||||
public static PlayBackGroundMusicCsReq newInstance() {
|
||||
return new PlayBackGroundMusicCsReq();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 play_music_id = 6;</code>
|
||||
* @return whether the playMusicId field is set
|
||||
*/
|
||||
public boolean hasPlayMusicId() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 play_music_id = 6;</code>
|
||||
* @return this
|
||||
*/
|
||||
public PlayBackGroundMusicCsReq clearPlayMusicId() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
playMusicId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 play_music_id = 6;</code>
|
||||
* @return the playMusicId
|
||||
*/
|
||||
public int getPlayMusicId() {
|
||||
return playMusicId;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 play_music_id = 6;</code>
|
||||
* @param value the playMusicId to set
|
||||
* @return this
|
||||
*/
|
||||
public PlayBackGroundMusicCsReq setPlayMusicId(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
playMusicId = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicCsReq copyFrom(final PlayBackGroundMusicCsReq other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
playMusicId = other.playMusicId;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicCsReq mergeFrom(final PlayBackGroundMusicCsReq other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasPlayMusicId()) {
|
||||
setPlayMusicId(other.playMusicId);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicCsReq clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
playMusicId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicCsReq 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 PlayBackGroundMusicCsReq)) {
|
||||
return false;
|
||||
}
|
||||
PlayBackGroundMusicCsReq other = (PlayBackGroundMusicCsReq) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasPlayMusicId() || playMusicId == other.playMusicId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 48);
|
||||
output.writeUInt32NoTag(playMusicId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(playMusicId);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public PlayBackGroundMusicCsReq mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 48: {
|
||||
// playMusicId
|
||||
playMusicId = 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.playMusicId, playMusicId);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicCsReq mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case 835898444:
|
||||
case -1319856608: {
|
||||
if (input.isAtField(FieldNames.playMusicId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
playMusicId = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicCsReq clone() {
|
||||
return new PlayBackGroundMusicCsReq().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static PlayBackGroundMusicCsReq parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new PlayBackGroundMusicCsReq(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static PlayBackGroundMusicCsReq parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new PlayBackGroundMusicCsReq(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static PlayBackGroundMusicCsReq parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new PlayBackGroundMusicCsReq(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating PlayBackGroundMusicCsReq messages
|
||||
*/
|
||||
public static MessageFactory<PlayBackGroundMusicCsReq> getFactory() {
|
||||
return PlayBackGroundMusicCsReqFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum PlayBackGroundMusicCsReqFactory implements MessageFactory<PlayBackGroundMusicCsReq> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicCsReq create() {
|
||||
return PlayBackGroundMusicCsReq.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName playMusicId = FieldName.forField("playMusicId", "play_music_id");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,421 @@
|
||||
// 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 PlayBackGroundMusicScRspOuterClass {
|
||||
/**
|
||||
* Protobuf type {@code PlayBackGroundMusicScRsp}
|
||||
*/
|
||||
public static final class PlayBackGroundMusicScRsp extends ProtoMessage<PlayBackGroundMusicScRsp> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 6;</code>
|
||||
*/
|
||||
private int retcode;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 playing_id = 7;</code>
|
||||
*/
|
||||
private int playingId;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 play_music_id = 8;</code>
|
||||
*/
|
||||
private int playMusicId;
|
||||
|
||||
private PlayBackGroundMusicScRsp() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code PlayBackGroundMusicScRsp}
|
||||
*/
|
||||
public static PlayBackGroundMusicScRsp newInstance() {
|
||||
return new PlayBackGroundMusicScRsp();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 6;</code>
|
||||
* @return whether the retcode field is set
|
||||
*/
|
||||
public boolean hasRetcode() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 6;</code>
|
||||
* @return this
|
||||
*/
|
||||
public PlayBackGroundMusicScRsp clearRetcode() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
retcode = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 6;</code>
|
||||
* @return the retcode
|
||||
*/
|
||||
public int getRetcode() {
|
||||
return retcode;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 6;</code>
|
||||
* @param value the retcode to set
|
||||
* @return this
|
||||
*/
|
||||
public PlayBackGroundMusicScRsp setRetcode(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
retcode = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 playing_id = 7;</code>
|
||||
* @return whether the playingId field is set
|
||||
*/
|
||||
public boolean hasPlayingId() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 playing_id = 7;</code>
|
||||
* @return this
|
||||
*/
|
||||
public PlayBackGroundMusicScRsp clearPlayingId() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
playingId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 playing_id = 7;</code>
|
||||
* @return the playingId
|
||||
*/
|
||||
public int getPlayingId() {
|
||||
return playingId;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 playing_id = 7;</code>
|
||||
* @param value the playingId to set
|
||||
* @return this
|
||||
*/
|
||||
public PlayBackGroundMusicScRsp setPlayingId(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
playingId = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 play_music_id = 8;</code>
|
||||
* @return whether the playMusicId field is set
|
||||
*/
|
||||
public boolean hasPlayMusicId() {
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 play_music_id = 8;</code>
|
||||
* @return this
|
||||
*/
|
||||
public PlayBackGroundMusicScRsp clearPlayMusicId() {
|
||||
bitField0_ &= ~0x00000004;
|
||||
playMusicId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 play_music_id = 8;</code>
|
||||
* @return the playMusicId
|
||||
*/
|
||||
public int getPlayMusicId() {
|
||||
return playMusicId;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 play_music_id = 8;</code>
|
||||
* @param value the playMusicId to set
|
||||
* @return this
|
||||
*/
|
||||
public PlayBackGroundMusicScRsp setPlayMusicId(final int value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
playMusicId = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicScRsp copyFrom(final PlayBackGroundMusicScRsp other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
retcode = other.retcode;
|
||||
playingId = other.playingId;
|
||||
playMusicId = other.playMusicId;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicScRsp mergeFrom(final PlayBackGroundMusicScRsp other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasRetcode()) {
|
||||
setRetcode(other.retcode);
|
||||
}
|
||||
if (other.hasPlayingId()) {
|
||||
setPlayingId(other.playingId);
|
||||
}
|
||||
if (other.hasPlayMusicId()) {
|
||||
setPlayMusicId(other.playMusicId);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicScRsp clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
retcode = 0;
|
||||
playingId = 0;
|
||||
playMusicId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicScRsp 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 PlayBackGroundMusicScRsp)) {
|
||||
return false;
|
||||
}
|
||||
PlayBackGroundMusicScRsp other = (PlayBackGroundMusicScRsp) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasRetcode() || retcode == other.retcode)
|
||||
&& (!hasPlayingId() || playingId == other.playingId)
|
||||
&& (!hasPlayMusicId() || playMusicId == other.playMusicId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 48);
|
||||
output.writeUInt32NoTag(retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 56);
|
||||
output.writeUInt32NoTag(playingId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeRawByte((byte) 64);
|
||||
output.writeUInt32NoTag(playMusicId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(playingId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(playMusicId);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public PlayBackGroundMusicScRsp mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 48: {
|
||||
// retcode
|
||||
retcode = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 56) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 56: {
|
||||
// playingId
|
||||
playingId = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 64) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 64: {
|
||||
// playMusicId
|
||||
playMusicId = 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.writeUInt32(FieldNames.retcode, retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.playingId, playingId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeUInt32(FieldNames.playMusicId, playMusicId);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicScRsp 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 -1868462615:
|
||||
case -2087744820: {
|
||||
if (input.isAtField(FieldNames.playingId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
playingId = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 835898444:
|
||||
case -1319856608: {
|
||||
if (input.isAtField(FieldNames.playMusicId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
playMusicId = input.readUInt32();
|
||||
bitField0_ |= 0x00000004;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicScRsp clone() {
|
||||
return new PlayBackGroundMusicScRsp().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static PlayBackGroundMusicScRsp parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new PlayBackGroundMusicScRsp(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static PlayBackGroundMusicScRsp parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new PlayBackGroundMusicScRsp(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static PlayBackGroundMusicScRsp parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new PlayBackGroundMusicScRsp(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating PlayBackGroundMusicScRsp messages
|
||||
*/
|
||||
public static MessageFactory<PlayBackGroundMusicScRsp> getFactory() {
|
||||
return PlayBackGroundMusicScRspFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum PlayBackGroundMusicScRspFactory implements MessageFactory<PlayBackGroundMusicScRsp> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public PlayBackGroundMusicScRsp create() {
|
||||
return PlayBackGroundMusicScRsp.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName retcode = FieldName.forField("retcode");
|
||||
|
||||
static final FieldName playingId = FieldName.forField("playingId", "playing_id");
|
||||
|
||||
static final FieldName playMusicId = FieldName.forField("playMusicId", "play_music_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 UnlockBackGroundMusicCsReqOuterClass {
|
||||
/**
|
||||
* Protobuf type {@code UnlockBackGroundMusicCsReq}
|
||||
*/
|
||||
public static final class UnlockBackGroundMusicCsReq extends ProtoMessage<UnlockBackGroundMusicCsReq> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlock_ids = 11;</code>
|
||||
*/
|
||||
private final RepeatedInt unlockIds = RepeatedInt.newEmptyInstance();
|
||||
|
||||
private UnlockBackGroundMusicCsReq() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code UnlockBackGroundMusicCsReq}
|
||||
*/
|
||||
public static UnlockBackGroundMusicCsReq newInstance() {
|
||||
return new UnlockBackGroundMusicCsReq();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlock_ids = 11;</code>
|
||||
* @return whether the unlockIds field is set
|
||||
*/
|
||||
public boolean hasUnlockIds() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlock_ids = 11;</code>
|
||||
* @return this
|
||||
*/
|
||||
public UnlockBackGroundMusicCsReq clearUnlockIds() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
unlockIds.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlock_ids = 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 #getMutableUnlockIds()} if you want to modify it.
|
||||
*
|
||||
* @return internal storage object for reading
|
||||
*/
|
||||
public RepeatedInt getUnlockIds() {
|
||||
return unlockIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlock_ids = 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 getMutableUnlockIds() {
|
||||
bitField0_ |= 0x00000001;
|
||||
return unlockIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlock_ids = 11;</code>
|
||||
* @param value the unlockIds to add
|
||||
* @return this
|
||||
*/
|
||||
public UnlockBackGroundMusicCsReq addUnlockIds(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
unlockIds.add(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlock_ids = 11;</code>
|
||||
* @param values the unlockIds to add
|
||||
* @return this
|
||||
*/
|
||||
public UnlockBackGroundMusicCsReq addAllUnlockIds(final int... values) {
|
||||
bitField0_ |= 0x00000001;
|
||||
unlockIds.addAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicCsReq copyFrom(final UnlockBackGroundMusicCsReq other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
unlockIds.copyFrom(other.unlockIds);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicCsReq mergeFrom(final UnlockBackGroundMusicCsReq other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasUnlockIds()) {
|
||||
getMutableUnlockIds().addAll(other.unlockIds);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicCsReq clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
unlockIds.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicCsReq clearQuick() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
unlockIds.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof UnlockBackGroundMusicCsReq)) {
|
||||
return false;
|
||||
}
|
||||
UnlockBackGroundMusicCsReq other = (UnlockBackGroundMusicCsReq) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasUnlockIds() || unlockIds.equals(other.unlockIds));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
for (int i = 0; i < unlockIds.length(); i++) {
|
||||
output.writeRawByte((byte) 88);
|
||||
output.writeUInt32NoTag(unlockIds.array()[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += (1 * unlockIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(unlockIds);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public UnlockBackGroundMusicCsReq mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 90: {
|
||||
// unlockIds [packed=true]
|
||||
input.readPackedUInt32(unlockIds, 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: {
|
||||
// unlockIds [packed=false]
|
||||
tag = input.readRepeatedUInt32(unlockIds, tag);
|
||||
bitField0_ |= 0x00000001;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final JsonSink output) throws IOException {
|
||||
output.beginObject();
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRepeatedUInt32(FieldNames.unlockIds, unlockIds);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicCsReq mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case 2050476244:
|
||||
case -859086019: {
|
||||
if (input.isAtField(FieldNames.unlockIds)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
input.readRepeatedUInt32(unlockIds);
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicCsReq clone() {
|
||||
return new UnlockBackGroundMusicCsReq().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static UnlockBackGroundMusicCsReq parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicCsReq(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static UnlockBackGroundMusicCsReq parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicCsReq(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static UnlockBackGroundMusicCsReq parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicCsReq(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating UnlockBackGroundMusicCsReq messages
|
||||
*/
|
||||
public static MessageFactory<UnlockBackGroundMusicCsReq> getFactory() {
|
||||
return UnlockBackGroundMusicCsReqFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum UnlockBackGroundMusicCsReqFactory implements MessageFactory<UnlockBackGroundMusicCsReq> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicCsReq create() {
|
||||
return UnlockBackGroundMusicCsReq.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName unlockIds = FieldName.forField("unlockIds", "unlock_ids");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,902 @@
|
||||
// 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;
|
||||
import us.hebi.quickbuf.RepeatedMessage;
|
||||
|
||||
public final class UnlockBackGroundMusicScRspOuterClass {
|
||||
/**
|
||||
* Protobuf type {@code UnlockBackGroundMusicScRsp}
|
||||
*/
|
||||
public static final class UnlockBackGroundMusicScRsp extends ProtoMessage<UnlockBackGroundMusicScRsp> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 12;</code>
|
||||
*/
|
||||
private int retcode;
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlocked_ids = 3;</code>
|
||||
*/
|
||||
private final RepeatedInt unlockedIds = RepeatedInt.newEmptyInstance();
|
||||
|
||||
/**
|
||||
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
|
||||
*/
|
||||
private final RepeatedMessage<UnlockedMusic> musicList = RepeatedMessage.newEmptyInstance(UnlockedMusic.getFactory());
|
||||
|
||||
private UnlockBackGroundMusicScRsp() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code UnlockBackGroundMusicScRsp}
|
||||
*/
|
||||
public static UnlockBackGroundMusicScRsp newInstance() {
|
||||
return new UnlockBackGroundMusicScRsp();
|
||||
}
|
||||
|
||||
/**
|
||||
* <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 UnlockBackGroundMusicScRsp 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 UnlockBackGroundMusicScRsp setRetcode(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
retcode = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlocked_ids = 3;</code>
|
||||
* @return whether the unlockedIds field is set
|
||||
*/
|
||||
public boolean hasUnlockedIds() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlocked_ids = 3;</code>
|
||||
* @return this
|
||||
*/
|
||||
public UnlockBackGroundMusicScRsp clearUnlockedIds() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
unlockedIds.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlocked_ids = 3;</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 #getMutableUnlockedIds()} if you want to modify it.
|
||||
*
|
||||
* @return internal storage object for reading
|
||||
*/
|
||||
public RepeatedInt getUnlockedIds() {
|
||||
return unlockedIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlocked_ids = 3;</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 getMutableUnlockedIds() {
|
||||
bitField0_ |= 0x00000002;
|
||||
return unlockedIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlocked_ids = 3;</code>
|
||||
* @param value the unlockedIds to add
|
||||
* @return this
|
||||
*/
|
||||
public UnlockBackGroundMusicScRsp addUnlockedIds(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
unlockedIds.add(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 unlocked_ids = 3;</code>
|
||||
* @param values the unlockedIds to add
|
||||
* @return this
|
||||
*/
|
||||
public UnlockBackGroundMusicScRsp addAllUnlockedIds(final int... values) {
|
||||
bitField0_ |= 0x00000002;
|
||||
unlockedIds.addAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
|
||||
* @return whether the musicList field is set
|
||||
*/
|
||||
public boolean hasMusicList() {
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
|
||||
* @return this
|
||||
*/
|
||||
public UnlockBackGroundMusicScRsp clearMusicList() {
|
||||
bitField0_ &= ~0x00000004;
|
||||
musicList.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 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 #getMutableMusicList()} if you want to modify it.
|
||||
*
|
||||
* @return internal storage object for reading
|
||||
*/
|
||||
public RepeatedMessage<UnlockedMusic> getMusicList() {
|
||||
return musicList;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 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 RepeatedMessage<UnlockedMusic> getMutableMusicList() {
|
||||
bitField0_ |= 0x00000004;
|
||||
return musicList;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
|
||||
* @param value the musicList to add
|
||||
* @return this
|
||||
*/
|
||||
public UnlockBackGroundMusicScRsp addMusicList(final UnlockedMusic value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
musicList.add(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
|
||||
* @param values the musicList to add
|
||||
* @return this
|
||||
*/
|
||||
public UnlockBackGroundMusicScRsp addAllMusicList(final UnlockedMusic... values) {
|
||||
bitField0_ |= 0x00000004;
|
||||
musicList.addAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicScRsp copyFrom(final UnlockBackGroundMusicScRsp other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
retcode = other.retcode;
|
||||
unlockedIds.copyFrom(other.unlockedIds);
|
||||
musicList.copyFrom(other.musicList);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicScRsp mergeFrom(final UnlockBackGroundMusicScRsp other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasRetcode()) {
|
||||
setRetcode(other.retcode);
|
||||
}
|
||||
if (other.hasUnlockedIds()) {
|
||||
getMutableUnlockedIds().addAll(other.unlockedIds);
|
||||
}
|
||||
if (other.hasMusicList()) {
|
||||
getMutableMusicList().addAll(other.musicList);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicScRsp clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
retcode = 0;
|
||||
unlockedIds.clear();
|
||||
musicList.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicScRsp clearQuick() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
unlockedIds.clear();
|
||||
musicList.clearQuick();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof UnlockBackGroundMusicScRsp)) {
|
||||
return false;
|
||||
}
|
||||
UnlockBackGroundMusicScRsp other = (UnlockBackGroundMusicScRsp) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasRetcode() || retcode == other.retcode)
|
||||
&& (!hasUnlockedIds() || unlockedIds.equals(other.unlockedIds))
|
||||
&& (!hasMusicList() || musicList.equals(other.musicList));
|
||||
}
|
||||
|
||||
@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 < unlockedIds.length(); i++) {
|
||||
output.writeRawByte((byte) 24);
|
||||
output.writeUInt32NoTag(unlockedIds.array()[i]);
|
||||
}
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
for (int i = 0; i < musicList.length(); i++) {
|
||||
output.writeRawByte((byte) 50);
|
||||
output.writeMessageNoTag(musicList.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += (1 * unlockedIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(unlockedIds);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
size += (1 * musicList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(musicList);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public UnlockBackGroundMusicScRsp 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 != 26) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 26: {
|
||||
// unlockedIds [packed=true]
|
||||
input.readPackedUInt32(unlockedIds, tag);
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 50) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 50: {
|
||||
// musicList
|
||||
tag = input.readRepeatedMessage(musicList, tag);
|
||||
bitField0_ |= 0x00000004;
|
||||
if (tag != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 0: {
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
return this;
|
||||
}
|
||||
tag = input.readTag();
|
||||
break;
|
||||
}
|
||||
case 24: {
|
||||
// unlockedIds [packed=false]
|
||||
tag = input.readRepeatedUInt32(unlockedIds, tag);
|
||||
bitField0_ |= 0x00000002;
|
||||
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.writeRepeatedUInt32(FieldNames.unlockedIds, unlockedIds);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeRepeatedMessage(FieldNames.musicList, musicList);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicScRsp 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 -856496939:
|
||||
case -780941476: {
|
||||
if (input.isAtField(FieldNames.unlockedIds)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
input.readRepeatedUInt32(unlockedIds);
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 389904483:
|
||||
case -780236168: {
|
||||
if (input.isAtField(FieldNames.musicList)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
input.readRepeatedMessage(musicList);
|
||||
bitField0_ |= 0x00000004;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicScRsp clone() {
|
||||
return new UnlockBackGroundMusicScRsp().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static UnlockBackGroundMusicScRsp parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicScRsp(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static UnlockBackGroundMusicScRsp parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicScRsp(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static UnlockBackGroundMusicScRsp parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicScRsp(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating UnlockBackGroundMusicScRsp messages
|
||||
*/
|
||||
public static MessageFactory<UnlockBackGroundMusicScRsp> getFactory() {
|
||||
return UnlockBackGroundMusicScRspFactory.INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf type {@code UnlockedMusic}
|
||||
*/
|
||||
public static final class UnlockedMusic extends ProtoMessage<UnlockedMusic> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 group_id = 1;</code>
|
||||
*/
|
||||
private int groupId;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 id = 8;</code>
|
||||
*/
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* <code>optional bool unkbool = 7;</code>
|
||||
*/
|
||||
private boolean unkbool;
|
||||
|
||||
private UnlockedMusic() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code UnlockedMusic}
|
||||
*/
|
||||
public static UnlockedMusic newInstance() {
|
||||
return new UnlockedMusic();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 group_id = 1;</code>
|
||||
* @return whether the groupId field is set
|
||||
*/
|
||||
public boolean hasGroupId() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 group_id = 1;</code>
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic clearGroupId() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
groupId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 group_id = 1;</code>
|
||||
* @return the groupId
|
||||
*/
|
||||
public int getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 group_id = 1;</code>
|
||||
* @param value the groupId to set
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic setGroupId(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
groupId = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 id = 8;</code>
|
||||
* @return whether the id field is set
|
||||
*/
|
||||
public boolean hasId() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 id = 8;</code>
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic clearId() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
id = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 id = 8;</code>
|
||||
* @return the id
|
||||
*/
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 id = 8;</code>
|
||||
* @param value the id to set
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic setId(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool unkbool = 7;</code>
|
||||
* @return whether the unkbool field is set
|
||||
*/
|
||||
public boolean hasUnkbool() {
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool unkbool = 7;</code>
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic clearUnkbool() {
|
||||
bitField0_ &= ~0x00000004;
|
||||
unkbool = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool unkbool = 7;</code>
|
||||
* @return the unkbool
|
||||
*/
|
||||
public boolean getUnkbool() {
|
||||
return unkbool;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool unkbool = 7;</code>
|
||||
* @param value the unkbool to set
|
||||
* @return this
|
||||
*/
|
||||
public UnlockedMusic setUnkbool(final boolean value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
unkbool = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic copyFrom(final UnlockedMusic other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
groupId = other.groupId;
|
||||
id = other.id;
|
||||
unkbool = other.unkbool;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic mergeFrom(final UnlockedMusic other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasGroupId()) {
|
||||
setGroupId(other.groupId);
|
||||
}
|
||||
if (other.hasId()) {
|
||||
setId(other.id);
|
||||
}
|
||||
if (other.hasUnkbool()) {
|
||||
setUnkbool(other.unkbool);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
groupId = 0;
|
||||
id = 0;
|
||||
unkbool = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic 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 UnlockedMusic)) {
|
||||
return false;
|
||||
}
|
||||
UnlockedMusic other = (UnlockedMusic) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasGroupId() || groupId == other.groupId)
|
||||
&& (!hasId() || id == other.id)
|
||||
&& (!hasUnkbool() || unkbool == other.unkbool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 8);
|
||||
output.writeUInt32NoTag(groupId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 64);
|
||||
output.writeUInt32NoTag(id);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeRawByte((byte) 56);
|
||||
output.writeBoolNoTag(unkbool);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(id);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
size += 2;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public UnlockedMusic mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 8: {
|
||||
// groupId
|
||||
groupId = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 64) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 64: {
|
||||
// id
|
||||
id = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 56) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 56: {
|
||||
// unkbool
|
||||
unkbool = input.readBool();
|
||||
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.groupId, groupId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.id, id);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeBool(FieldNames.unkbool, unkbool);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case 293428218:
|
||||
case 506361563: {
|
||||
if (input.isAtField(FieldNames.groupId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
groupId = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 3355: {
|
||||
if (input.isAtField(FieldNames.id)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
id = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -285198628: {
|
||||
if (input.isAtField(FieldNames.unkbool)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
unkbool = input.readBool();
|
||||
bitField0_ |= 0x00000004;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnlockedMusic clone() {
|
||||
return new UnlockedMusic().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static UnlockedMusic parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new UnlockedMusic(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static UnlockedMusic parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new UnlockedMusic(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static UnlockedMusic parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new UnlockedMusic(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating UnlockedMusic messages
|
||||
*/
|
||||
public static MessageFactory<UnlockedMusic> getFactory() {
|
||||
return UnlockedMusicFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum UnlockedMusicFactory implements MessageFactory<UnlockedMusic> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public UnlockedMusic create() {
|
||||
return UnlockedMusic.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName groupId = FieldName.forField("groupId", "group_id");
|
||||
|
||||
static final FieldName id = FieldName.forField("id");
|
||||
|
||||
static final FieldName unkbool = FieldName.forField("unkbool");
|
||||
}
|
||||
}
|
||||
|
||||
private enum UnlockBackGroundMusicScRspFactory implements MessageFactory<UnlockBackGroundMusicScRsp> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public UnlockBackGroundMusicScRsp create() {
|
||||
return UnlockBackGroundMusicScRsp.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName retcode = FieldName.forField("retcode");
|
||||
|
||||
static final FieldName unlockedIds = FieldName.forField("unlockedIds", "unlocked_ids");
|
||||
|
||||
static final FieldName musicList = FieldName.forField("musicList", "music_list");
|
||||
}
|
||||
}
|
||||
}
|
@ -34,6 +34,7 @@ public class GameData {
|
||||
@Getter private static Int2ObjectMap<PlayerIconExcel> playerIconExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static Int2ObjectMap<ItemComposeExcel> itemComposeExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static Int2ObjectMap<ActivityPanelExcel> activityPanelExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static Int2ObjectMap<BackGroundMusicExcel> backGroundMusicExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
@Getter private static Int2ObjectMap<ChallengeGroupExcel> challengeGroupExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static Int2ObjectMap<ChallengeExcel> challengeExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
@ -97,6 +98,22 @@ public class GameData {
|
||||
return allIds;
|
||||
}
|
||||
|
||||
public static List<Integer> getAllMusicIds() {
|
||||
List<Integer> allIds = new ArrayList<>();
|
||||
|
||||
for (Int2ObjectMap.Entry<BackGroundMusicExcel> entry : backGroundMusicExcelMap.int2ObjectEntrySet()) {
|
||||
BackGroundMusicExcel backGroundMusicExcel = entry.getValue();
|
||||
allIds.add(backGroundMusicExcel.getId());
|
||||
}
|
||||
|
||||
return allIds;
|
||||
}
|
||||
|
||||
public static int getMusicGroupId(int musicId) {
|
||||
var excel = backGroundMusicExcelMap.get(musicId);
|
||||
return excel != null ? excel.getGroupId() : 0;
|
||||
}
|
||||
|
||||
public static List<Integer> getAllPhoneThemes() {
|
||||
List<Integer> allIds = new ArrayList<>();
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
package emu.lunarcore.data.excel;
|
||||
|
||||
import emu.lunarcore.data.GameResource;
|
||||
import emu.lunarcore.data.ResourceType;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@ResourceType(name = {"BackGroundMusic.json"})
|
||||
public class BackGroundMusicExcel extends GameResource {
|
||||
private int ID;
|
||||
private int GroupID;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return ID;
|
||||
}
|
||||
public int getGroupId() {
|
||||
return GroupID;
|
||||
}
|
||||
|
||||
}
|
@ -100,6 +100,8 @@ public class Player {
|
||||
private int planeId;
|
||||
private int floorId;
|
||||
private int entryId;
|
||||
|
||||
private int currentBgm;
|
||||
|
||||
private IntSet unlockedHeadIcons;
|
||||
private long lastActiveTime;
|
||||
@ -161,6 +163,8 @@ public class Player {
|
||||
this.level = 1;
|
||||
this.stamina = GameConstants.MAX_STAMINA;
|
||||
this.nextStaminaRecover = System.currentTimeMillis();
|
||||
|
||||
this.currentBgm = 210000;
|
||||
|
||||
this.unlockedHeadIcons = new IntOpenHashSet();
|
||||
this.lineupManager = new LineupManager(this);
|
||||
@ -254,6 +258,19 @@ public class Player {
|
||||
public int getChatBubble() {
|
||||
return this.chatBubble;
|
||||
}
|
||||
|
||||
public int getCurrentBgm() {
|
||||
if (this.currentBgm == 0) {
|
||||
this.currentBgm = 210000;
|
||||
this.save();
|
||||
}
|
||||
return this.currentBgm;
|
||||
}
|
||||
|
||||
public void setCurrentBgm(int musicId) {
|
||||
this.currentBgm = musicId;
|
||||
this.save();
|
||||
}
|
||||
|
||||
public Set<Integer> getUnlockedHeadIcons() {
|
||||
if (this.unlockedHeadIcons == null) {
|
||||
|
@ -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.proto.GetJukeboxDataCsReqOuterClass.GetJukeboxDataCsReq;
|
||||
import emu.lunarcore.server.packet.send.PacketGetJukeboxDataScRsp;
|
||||
|
||||
@Opcodes(CmdId.GetJukeboxDataCsReq)
|
||||
public class HandlerGetJukeboxDataCsReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] data) throws Exception {
|
||||
// var req = GetJukeboxDataCsReq.parseFrom(data);
|
||||
session.send(new PacketGetJukeboxDataScRsp(session.getPlayer()));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package emu.lunarcore.server.packet.recv;
|
||||
|
||||
import emu.lunarcore.proto.PlayBackGroundMusicCsReqOuterClass.PlayBackGroundMusicCsReq;
|
||||
import emu.lunarcore.server.packet.send.PacketPlayBackGroundMusicScRsp;
|
||||
import emu.lunarcore.server.game.GameSession;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
import emu.lunarcore.server.packet.Opcodes;
|
||||
import emu.lunarcore.server.packet.PacketHandler;
|
||||
|
||||
@Opcodes(CmdId.PlayBackGroundMusicCsReq)
|
||||
public class HandlerPlayBackGroundMusicCsReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] data) throws Exception {
|
||||
var req = PlayBackGroundMusicCsReq.parseFrom(data);
|
||||
|
||||
session.getPlayer().setCurrentBgm(req.getPlayMusicId());
|
||||
session.send(new PacketPlayBackGroundMusicScRsp(req.getPlayMusicId()));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package emu.lunarcore.server.packet.recv;
|
||||
|
||||
import emu.lunarcore.proto.UnlockBackGroundMusicCsReqOuterClass.UnlockBackGroundMusicCsReq;
|
||||
import emu.lunarcore.server.game.GameSession;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import emu.lunarcore.server.packet.Opcodes;
|
||||
import emu.lunarcore.server.packet.PacketHandler;
|
||||
import emu.lunarcore.server.packet.send.PacketUnlockBackGroundMusicScRsp;
|
||||
|
||||
@Opcodes(CmdId.UnlockBackGroundMusicCsReq)
|
||||
public class HandlerUnlockBackGroundMusicCsReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] data) throws Exception {
|
||||
var req = UnlockBackGroundMusicCsReq.parseFrom(data);
|
||||
|
||||
var unlockIds = req.getUnlockIds();
|
||||
List<Integer> unlockIdsList = new ArrayList<>();
|
||||
for (int unlockId : unlockIds) {
|
||||
unlockIdsList.add(unlockId);
|
||||
}
|
||||
if (unlockIdsList.isEmpty()) {
|
||||
session.send(new PacketUnlockBackGroundMusicScRsp());
|
||||
}
|
||||
else {
|
||||
session.send(new PacketUnlockBackGroundMusicScRsp(unlockIdsList));
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package emu.lunarcore.server.packet.send;
|
||||
|
||||
import emu.lunarcore.game.player.Player;
|
||||
import emu.lunarcore.data.GameData;
|
||||
import emu.lunarcore.proto.GetJukeboxDataScRspOuterClass.GetJukeboxDataScRsp;
|
||||
import emu.lunarcore.proto.GetJukeboxDataScRspOuterClass.GetJukeboxDataScRsp.UnlockedMusic;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
|
||||
public class PacketGetJukeboxDataScRsp extends BasePacket {
|
||||
|
||||
public PacketGetJukeboxDataScRsp(Player player) {
|
||||
super(CmdId.GetJukeboxDataScRsp);
|
||||
|
||||
var allmusicids = GameData.getAllMusicIds();
|
||||
|
||||
var data = GetJukeboxDataScRsp.newInstance()
|
||||
.setPlayingId(player.getCurrentBgm());
|
||||
|
||||
for (int musicId : allmusicids) {
|
||||
UnlockedMusic musicListEntry = UnlockedMusic.newInstance()
|
||||
.setId(musicId)
|
||||
.setUnkbool(true)
|
||||
.setGroupId(GameData.getMusicGroupId(musicId));
|
||||
|
||||
data.addMusicList(musicListEntry);
|
||||
}
|
||||
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package emu.lunarcore.server.packet.send;
|
||||
|
||||
import emu.lunarcore.proto.PlayBackGroundMusicScRspOuterClass.PlayBackGroundMusicScRsp;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
|
||||
public class PacketPlayBackGroundMusicScRsp extends BasePacket {
|
||||
|
||||
public PacketPlayBackGroundMusicScRsp(int musicId) {
|
||||
super(CmdId.PlayBackGroundMusicScRsp);
|
||||
|
||||
var data = PlayBackGroundMusicScRsp.newInstance()
|
||||
.setPlayingId(musicId)
|
||||
.setPlayMusicId(musicId);
|
||||
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package emu.lunarcore.server.packet.send;
|
||||
|
||||
import java.util.List;
|
||||
import emu.lunarcore.proto.UnlockBackGroundMusicScRspOuterClass.UnlockBackGroundMusicScRsp.UnlockedMusic;
|
||||
import emu.lunarcore.proto.UnlockBackGroundMusicScRspOuterClass.UnlockBackGroundMusicScRsp;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
import emu.lunarcore.data.GameData;
|
||||
|
||||
public class PacketUnlockBackGroundMusicScRsp extends BasePacket {
|
||||
|
||||
public PacketUnlockBackGroundMusicScRsp(List<Integer> unlockIds) {
|
||||
super(CmdId.UnlockBackGroundMusicScRsp);
|
||||
|
||||
var data = UnlockBackGroundMusicScRsp.newInstance();
|
||||
|
||||
for (int unlockId : unlockIds) {
|
||||
UnlockedMusic music = UnlockedMusic.newInstance()
|
||||
.setGroupId(GameData.getMusicGroupId(unlockId))
|
||||
.setId(unlockId);
|
||||
data.addMusicList(music);
|
||||
}
|
||||
|
||||
this.setData(data);
|
||||
}
|
||||
|
||||
public PacketUnlockBackGroundMusicScRsp() {
|
||||
super(CmdId.UnlockBackGroundMusicScRsp);
|
||||
this.setData(UnlockBackGroundMusicScRsp.newInstance());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user