mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-14 14:24:37 +01:00
Properly show rogue talent screen
This commit is contained in:
@@ -0,0 +1,362 @@
|
||||
// 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 GetRogueTalentInfoScRspOuterClass {
|
||||
/**
|
||||
* Protobuf type {@code GetRogueTalentInfoScRsp}
|
||||
*/
|
||||
public static final class GetRogueTalentInfoScRsp extends ProtoMessage<GetRogueTalentInfoScRsp> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 4;</code>
|
||||
*/
|
||||
private int retcode;
|
||||
|
||||
/**
|
||||
* <code>optional .RogueTalentInfo talent_info = 2;</code>
|
||||
*/
|
||||
private final RogueTalentInfoOuterClass.RogueTalentInfo talentInfo = RogueTalentInfoOuterClass.RogueTalentInfo.newInstance();
|
||||
|
||||
private GetRogueTalentInfoScRsp() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code GetRogueTalentInfoScRsp}
|
||||
*/
|
||||
public static GetRogueTalentInfoScRsp newInstance() {
|
||||
return new GetRogueTalentInfoScRsp();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 4;</code>
|
||||
* @return whether the retcode field is set
|
||||
*/
|
||||
public boolean hasRetcode() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 4;</code>
|
||||
* @return this
|
||||
*/
|
||||
public GetRogueTalentInfoScRsp clearRetcode() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
retcode = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 4;</code>
|
||||
* @return the retcode
|
||||
*/
|
||||
public int getRetcode() {
|
||||
return retcode;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 retcode = 4;</code>
|
||||
* @param value the retcode to set
|
||||
* @return this
|
||||
*/
|
||||
public GetRogueTalentInfoScRsp setRetcode(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
retcode = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .RogueTalentInfo talent_info = 2;</code>
|
||||
* @return whether the talentInfo field is set
|
||||
*/
|
||||
public boolean hasTalentInfo() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .RogueTalentInfo talent_info = 2;</code>
|
||||
* @return this
|
||||
*/
|
||||
public GetRogueTalentInfoScRsp clearTalentInfo() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
talentInfo.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .RogueTalentInfo talent_info = 2;</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 #getMutableTalentInfo()} if you want to modify it.
|
||||
*
|
||||
* @return internal storage object for reading
|
||||
*/
|
||||
public RogueTalentInfoOuterClass.RogueTalentInfo getTalentInfo() {
|
||||
return talentInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .RogueTalentInfo talent_info = 2;</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 RogueTalentInfoOuterClass.RogueTalentInfo getMutableTalentInfo() {
|
||||
bitField0_ |= 0x00000002;
|
||||
return talentInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .RogueTalentInfo talent_info = 2;</code>
|
||||
* @param value the talentInfo to set
|
||||
* @return this
|
||||
*/
|
||||
public GetRogueTalentInfoScRsp setTalentInfo(
|
||||
final RogueTalentInfoOuterClass.RogueTalentInfo value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
talentInfo.copyFrom(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetRogueTalentInfoScRsp copyFrom(final GetRogueTalentInfoScRsp other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
retcode = other.retcode;
|
||||
talentInfo.copyFrom(other.talentInfo);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetRogueTalentInfoScRsp mergeFrom(final GetRogueTalentInfoScRsp other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasRetcode()) {
|
||||
setRetcode(other.retcode);
|
||||
}
|
||||
if (other.hasTalentInfo()) {
|
||||
getMutableTalentInfo().mergeFrom(other.talentInfo);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetRogueTalentInfoScRsp clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
retcode = 0;
|
||||
talentInfo.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetRogueTalentInfoScRsp clearQuick() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
talentInfo.clearQuick();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof GetRogueTalentInfoScRsp)) {
|
||||
return false;
|
||||
}
|
||||
GetRogueTalentInfoScRsp other = (GetRogueTalentInfoScRsp) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasRetcode() || retcode == other.retcode)
|
||||
&& (!hasTalentInfo() || talentInfo.equals(other.talentInfo));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 32);
|
||||
output.writeUInt32NoTag(retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 18);
|
||||
output.writeMessageNoTag(talentInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeMessageSizeNoTag(talentInfo);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public GetRogueTalentInfoScRsp mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 32: {
|
||||
// retcode
|
||||
retcode = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 18) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 18: {
|
||||
// talentInfo
|
||||
input.readMessage(talentInfo);
|
||||
bitField0_ |= 0x00000002;
|
||||
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.writeMessage(FieldNames.talentInfo, talentInfo);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetRogueTalentInfoScRsp 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 1396978618:
|
||||
case 376840225: {
|
||||
if (input.isAtField(FieldNames.talentInfo)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
input.readMessage(talentInfo);
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetRogueTalentInfoScRsp clone() {
|
||||
return new GetRogueTalentInfoScRsp().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static GetRogueTalentInfoScRsp parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new GetRogueTalentInfoScRsp(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static GetRogueTalentInfoScRsp parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new GetRogueTalentInfoScRsp(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static GetRogueTalentInfoScRsp parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new GetRogueTalentInfoScRsp(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating GetRogueTalentInfoScRsp messages
|
||||
*/
|
||||
public static MessageFactory<GetRogueTalentInfoScRsp> getFactory() {
|
||||
return GetRogueTalentInfoScRspFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum GetRogueTalentInfoScRspFactory implements MessageFactory<GetRogueTalentInfoScRsp> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public GetRogueTalentInfoScRsp create() {
|
||||
return GetRogueTalentInfoScRsp.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName retcode = FieldName.forField("retcode");
|
||||
|
||||
static final FieldName talentInfo = FieldName.forField("talentInfo", "talent_info");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,294 @@
|
||||
// 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 RogueTalentInfoOuterClass {
|
||||
/**
|
||||
* Protobuf type {@code RogueTalentInfo}
|
||||
*/
|
||||
public static final class RogueTalentInfo extends ProtoMessage<RogueTalentInfo> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueTalent rogue_talent = 10;</code>
|
||||
*/
|
||||
private final RepeatedMessage<RogueTalentOuterClass.RogueTalent> rogueTalent = RepeatedMessage.newEmptyInstance(RogueTalentOuterClass.RogueTalent.getFactory());
|
||||
|
||||
private RogueTalentInfo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code RogueTalentInfo}
|
||||
*/
|
||||
public static RogueTalentInfo newInstance() {
|
||||
return new RogueTalentInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueTalent rogue_talent = 10;</code>
|
||||
* @return whether the rogueTalent field is set
|
||||
*/
|
||||
public boolean hasRogueTalent() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueTalent rogue_talent = 10;</code>
|
||||
* @return this
|
||||
*/
|
||||
public RogueTalentInfo clearRogueTalent() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
rogueTalent.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueTalent rogue_talent = 10;</code>
|
||||
*
|
||||
* This method returns the internal storage object without modifying any has state.
|
||||
* The returned object should not be modified and be treated as read-only.
|
||||
*
|
||||
* Use {@link #getMutableRogueTalent()} if you want to modify it.
|
||||
*
|
||||
* @return internal storage object for reading
|
||||
*/
|
||||
public RepeatedMessage<RogueTalentOuterClass.RogueTalent> getRogueTalent() {
|
||||
return rogueTalent;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueTalent rogue_talent = 10;</code>
|
||||
*
|
||||
* This method returns the internal storage object and sets the corresponding
|
||||
* has state. The returned object will become part of this message and its
|
||||
* contents may be modified as long as the has state is not cleared.
|
||||
*
|
||||
* @return internal storage object for modifications
|
||||
*/
|
||||
public RepeatedMessage<RogueTalentOuterClass.RogueTalent> getMutableRogueTalent() {
|
||||
bitField0_ |= 0x00000001;
|
||||
return rogueTalent;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueTalent rogue_talent = 10;</code>
|
||||
* @param value the rogueTalent to add
|
||||
* @return this
|
||||
*/
|
||||
public RogueTalentInfo addRogueTalent(final RogueTalentOuterClass.RogueTalent value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
rogueTalent.add(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueTalent rogue_talent = 10;</code>
|
||||
* @param values the rogueTalent to add
|
||||
* @return this
|
||||
*/
|
||||
public RogueTalentInfo addAllRogueTalent(final RogueTalentOuterClass.RogueTalent... values) {
|
||||
bitField0_ |= 0x00000001;
|
||||
rogueTalent.addAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalentInfo copyFrom(final RogueTalentInfo other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
rogueTalent.copyFrom(other.rogueTalent);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalentInfo mergeFrom(final RogueTalentInfo other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasRogueTalent()) {
|
||||
getMutableRogueTalent().addAll(other.rogueTalent);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalentInfo clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
rogueTalent.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalentInfo clearQuick() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
rogueTalent.clearQuick();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof RogueTalentInfo)) {
|
||||
return false;
|
||||
}
|
||||
RogueTalentInfo other = (RogueTalentInfo) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasRogueTalent() || rogueTalent.equals(other.rogueTalent));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
for (int i = 0; i < rogueTalent.length(); i++) {
|
||||
output.writeRawByte((byte) 82);
|
||||
output.writeMessageNoTag(rogueTalent.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += (1 * rogueTalent.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rogueTalent);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public RogueTalentInfo mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 82: {
|
||||
// rogueTalent
|
||||
tag = input.readRepeatedMessage(rogueTalent, tag);
|
||||
bitField0_ |= 0x00000001;
|
||||
if (tag != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 0: {
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
return this;
|
||||
}
|
||||
tag = input.readTag();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final JsonSink output) throws IOException {
|
||||
output.beginObject();
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRepeatedMessage(FieldNames.rogueTalent, rogueTalent);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalentInfo mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case -824717466:
|
||||
case 1910163185: {
|
||||
if (input.isAtField(FieldNames.rogueTalent)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
input.readRepeatedMessage(rogueTalent);
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalentInfo clone() {
|
||||
return new RogueTalentInfo().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static RogueTalentInfo parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new RogueTalentInfo(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static RogueTalentInfo parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new RogueTalentInfo(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static RogueTalentInfo parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new RogueTalentInfo(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating RogueTalentInfo messages
|
||||
*/
|
||||
public static MessageFactory<RogueTalentInfo> getFactory() {
|
||||
return RogueTalentInfoFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum RogueTalentInfoFactory implements MessageFactory<RogueTalentInfo> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public RogueTalentInfo create() {
|
||||
return RogueTalentInfo.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName rogueTalent = FieldName.forField("rogueTalent", "rogue_talent");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,491 @@
|
||||
// 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 RogueTalentOuterClass {
|
||||
/**
|
||||
* Protobuf type {@code RogueTalent}
|
||||
*/
|
||||
public static final class RogueTalent extends ProtoMessage<RogueTalent> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 talent_id = 6;</code>
|
||||
*/
|
||||
private int talentId;
|
||||
|
||||
/**
|
||||
* <code>optional .RogueTalentStatus status = 7;</code>
|
||||
*/
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueUnlockProgress unlock_progress_list = 8;</code>
|
||||
*/
|
||||
private final RepeatedMessage<RogueUnlockProgressOuterClass.RogueUnlockProgress> unlockProgressList = RepeatedMessage.newEmptyInstance(RogueUnlockProgressOuterClass.RogueUnlockProgress.getFactory());
|
||||
|
||||
private RogueTalent() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code RogueTalent}
|
||||
*/
|
||||
public static RogueTalent newInstance() {
|
||||
return new RogueTalent();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 talent_id = 6;</code>
|
||||
* @return whether the talentId field is set
|
||||
*/
|
||||
public boolean hasTalentId() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 talent_id = 6;</code>
|
||||
* @return this
|
||||
*/
|
||||
public RogueTalent clearTalentId() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
talentId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 talent_id = 6;</code>
|
||||
* @return the talentId
|
||||
*/
|
||||
public int getTalentId() {
|
||||
return talentId;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 talent_id = 6;</code>
|
||||
* @param value the talentId to set
|
||||
* @return this
|
||||
*/
|
||||
public RogueTalent setTalentId(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
talentId = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .RogueTalentStatus status = 7;</code>
|
||||
* @return whether the status field is set
|
||||
*/
|
||||
public boolean hasStatus() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .RogueTalentStatus status = 7;</code>
|
||||
* @return this
|
||||
*/
|
||||
public RogueTalent clearStatus() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
status = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .RogueTalentStatus status = 7;</code>
|
||||
* @return the status
|
||||
*/
|
||||
public RogueTalentStatusOuterClass.RogueTalentStatus getStatus() {
|
||||
return RogueTalentStatusOuterClass.RogueTalentStatus.forNumber(status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the internal enum store. The result is
|
||||
* equivalent to {@link RogueTalent#getStatus()}.getNumber().
|
||||
*
|
||||
* @return numeric wire representation
|
||||
*/
|
||||
public int getStatusValue() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the internal enum store. This does not
|
||||
* do any validity checks, so be sure to use appropriate value
|
||||
* constants from {@link RogueTalentStatusOuterClass.RogueTalentStatus}. Setting an invalid value
|
||||
* can cause {@link RogueTalent#getStatus()} to return null
|
||||
*
|
||||
* @param value the numeric wire value to set
|
||||
* @return this
|
||||
*/
|
||||
public RogueTalent setStatusValue(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
status = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .RogueTalentStatus status = 7;</code>
|
||||
* @param value the status to set
|
||||
* @return this
|
||||
*/
|
||||
public RogueTalent setStatus(final RogueTalentStatusOuterClass.RogueTalentStatus value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
status = value.getNumber();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueUnlockProgress unlock_progress_list = 8;</code>
|
||||
* @return whether the unlockProgressList field is set
|
||||
*/
|
||||
public boolean hasUnlockProgressList() {
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueUnlockProgress unlock_progress_list = 8;</code>
|
||||
* @return this
|
||||
*/
|
||||
public RogueTalent clearUnlockProgressList() {
|
||||
bitField0_ &= ~0x00000004;
|
||||
unlockProgressList.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueUnlockProgress unlock_progress_list = 8;</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 #getMutableUnlockProgressList()} if you want to modify it.
|
||||
*
|
||||
* @return internal storage object for reading
|
||||
*/
|
||||
public RepeatedMessage<RogueUnlockProgressOuterClass.RogueUnlockProgress> getUnlockProgressList(
|
||||
) {
|
||||
return unlockProgressList;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueUnlockProgress unlock_progress_list = 8;</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<RogueUnlockProgressOuterClass.RogueUnlockProgress> getMutableUnlockProgressList(
|
||||
) {
|
||||
bitField0_ |= 0x00000004;
|
||||
return unlockProgressList;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueUnlockProgress unlock_progress_list = 8;</code>
|
||||
* @param value the unlockProgressList to add
|
||||
* @return this
|
||||
*/
|
||||
public RogueTalent addUnlockProgressList(
|
||||
final RogueUnlockProgressOuterClass.RogueUnlockProgress value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
unlockProgressList.add(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .RogueUnlockProgress unlock_progress_list = 8;</code>
|
||||
* @param values the unlockProgressList to add
|
||||
* @return this
|
||||
*/
|
||||
public RogueTalent addAllUnlockProgressList(
|
||||
final RogueUnlockProgressOuterClass.RogueUnlockProgress... values) {
|
||||
bitField0_ |= 0x00000004;
|
||||
unlockProgressList.addAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalent copyFrom(final RogueTalent other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
talentId = other.talentId;
|
||||
status = other.status;
|
||||
unlockProgressList.copyFrom(other.unlockProgressList);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalent mergeFrom(final RogueTalent other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasTalentId()) {
|
||||
setTalentId(other.talentId);
|
||||
}
|
||||
if (other.hasStatus()) {
|
||||
setStatusValue(other.status);
|
||||
}
|
||||
if (other.hasUnlockProgressList()) {
|
||||
getMutableUnlockProgressList().addAll(other.unlockProgressList);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalent clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
talentId = 0;
|
||||
status = 0;
|
||||
unlockProgressList.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalent clearQuick() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
unlockProgressList.clearQuick();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof RogueTalent)) {
|
||||
return false;
|
||||
}
|
||||
RogueTalent other = (RogueTalent) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasTalentId() || talentId == other.talentId)
|
||||
&& (!hasStatus() || status == other.status)
|
||||
&& (!hasUnlockProgressList() || unlockProgressList.equals(other.unlockProgressList));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 48);
|
||||
output.writeUInt32NoTag(talentId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 56);
|
||||
output.writeEnumNoTag(status);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
for (int i = 0; i < unlockProgressList.length(); i++) {
|
||||
output.writeRawByte((byte) 66);
|
||||
output.writeMessageNoTag(unlockProgressList.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(talentId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeEnumSizeNoTag(status);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
size += (1 * unlockProgressList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(unlockProgressList);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public RogueTalent mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 48: {
|
||||
// talentId
|
||||
talentId = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 56) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 56: {
|
||||
// status
|
||||
final int value = input.readInt32();
|
||||
if (RogueTalentStatusOuterClass.RogueTalentStatus.forNumber(value) != null) {
|
||||
status = value;
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
tag = input.readTag();
|
||||
if (tag != 66) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 66: {
|
||||
// unlockProgressList
|
||||
tag = input.readRepeatedMessage(unlockProgressList, 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.talentId, talentId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeEnum(FieldNames.status, status, RogueTalentStatusOuterClass.RogueTalentStatus.converter());
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeRepeatedMessage(FieldNames.unlockProgressList, unlockProgressList);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalent mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case -615305433:
|
||||
case -1894577842: {
|
||||
if (input.isAtField(FieldNames.talentId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
talentId = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -892481550: {
|
||||
if (input.isAtField(FieldNames.status)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
final RogueTalentStatusOuterClass.RogueTalentStatus value = input.readEnum(RogueTalentStatusOuterClass.RogueTalentStatus.converter());
|
||||
if (value != null) {
|
||||
status = value.getNumber();
|
||||
bitField0_ |= 0x00000002;
|
||||
} else {
|
||||
input.skipUnknownEnumValue();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -580094513:
|
||||
case -313023051: {
|
||||
if (input.isAtField(FieldNames.unlockProgressList)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
input.readRepeatedMessage(unlockProgressList);
|
||||
bitField0_ |= 0x00000004;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueTalent clone() {
|
||||
return new RogueTalent().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static RogueTalent parseFrom(final byte[] data) throws InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new RogueTalent(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static RogueTalent parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new RogueTalent(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static RogueTalent parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new RogueTalent(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating RogueTalent messages
|
||||
*/
|
||||
public static MessageFactory<RogueTalent> getFactory() {
|
||||
return RogueTalentFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum RogueTalentFactory implements MessageFactory<RogueTalent> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public RogueTalent create() {
|
||||
return RogueTalent.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName talentId = FieldName.forField("talentId", "talent_id");
|
||||
|
||||
static final FieldName status = FieldName.forField("status");
|
||||
|
||||
static final FieldName unlockProgressList = FieldName.forField("unlockProgressList", "unlock_progress_list");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
// Code generated by protocol buffer compiler. Do not edit!
|
||||
package emu.lunarcore.proto;
|
||||
|
||||
import us.hebi.quickbuf.ProtoEnum;
|
||||
import us.hebi.quickbuf.ProtoUtil;
|
||||
|
||||
public final class RogueTalentStatusOuterClass {
|
||||
/**
|
||||
* Protobuf enum {@code RogueTalentStatus}
|
||||
*/
|
||||
public enum RogueTalentStatus implements ProtoEnum<RogueTalentStatus> {
|
||||
/**
|
||||
* <code>ROGUE_TALENT_STATUS_LOCK = 0;</code>
|
||||
*/
|
||||
ROGUE_TALENT_STATUS_LOCK("ROGUE_TALENT_STATUS_LOCK", 0),
|
||||
|
||||
/**
|
||||
* <code>ROGUE_TALENT_STATUS_UNLOCK = 1;</code>
|
||||
*/
|
||||
ROGUE_TALENT_STATUS_UNLOCK("ROGUE_TALENT_STATUS_UNLOCK", 1),
|
||||
|
||||
/**
|
||||
* <code>ROGUE_TALENT_STATUS_ENABLE = 2;</code>
|
||||
*/
|
||||
ROGUE_TALENT_STATUS_ENABLE("ROGUE_TALENT_STATUS_ENABLE", 2);
|
||||
|
||||
/**
|
||||
* <code>ROGUE_TALENT_STATUS_LOCK = 0;</code>
|
||||
*/
|
||||
public static final int ROGUE_TALENT_STATUS_LOCK_VALUE = 0;
|
||||
|
||||
/**
|
||||
* <code>ROGUE_TALENT_STATUS_UNLOCK = 1;</code>
|
||||
*/
|
||||
public static final int ROGUE_TALENT_STATUS_UNLOCK_VALUE = 1;
|
||||
|
||||
/**
|
||||
* <code>ROGUE_TALENT_STATUS_ENABLE = 2;</code>
|
||||
*/
|
||||
public static final int ROGUE_TALENT_STATUS_ENABLE_VALUE = 2;
|
||||
|
||||
private final String name;
|
||||
|
||||
private final int number;
|
||||
|
||||
private RogueTalentStatus(String name, int number) {
|
||||
this.name = name;
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the string representation of enum entry
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the numeric wire value of this enum entry
|
||||
*/
|
||||
@Override
|
||||
public int getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a converter that maps between this enum's numeric and text representations
|
||||
*/
|
||||
public static ProtoEnum.EnumConverter<RogueTalentStatus> converter() {
|
||||
return RogueTalentStatusConverter.INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param value The numeric wire value of the corresponding enum entry.
|
||||
* @return The enum associated with the given numeric wire value, or null if unknown.
|
||||
*/
|
||||
public static RogueTalentStatus forNumber(int value) {
|
||||
return RogueTalentStatusConverter.INSTANCE.forNumber(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param value The numeric wire value of the corresponding enum entry.
|
||||
* @param other Fallback value in case the value is not known.
|
||||
* @return The enum associated with the given numeric wire value, or the fallback value if unknown.
|
||||
*/
|
||||
public static RogueTalentStatus forNumberOr(int number, RogueTalentStatus other) {
|
||||
RogueTalentStatus value = forNumber(number);
|
||||
return value == null ? other : value;
|
||||
}
|
||||
|
||||
enum RogueTalentStatusConverter implements ProtoEnum.EnumConverter<RogueTalentStatus> {
|
||||
INSTANCE;
|
||||
|
||||
private static final RogueTalentStatus[] lookup = new RogueTalentStatus[3];
|
||||
|
||||
static {
|
||||
lookup[0] = ROGUE_TALENT_STATUS_LOCK;
|
||||
lookup[1] = ROGUE_TALENT_STATUS_UNLOCK;
|
||||
lookup[2] = ROGUE_TALENT_STATUS_ENABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final RogueTalentStatus forNumber(final int value) {
|
||||
if (value >= 0 && value < lookup.length) {
|
||||
return lookup[value];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final RogueTalentStatus forName(final CharSequence value) {
|
||||
if (value.length() == 24) {
|
||||
if (ProtoUtil.isEqual("ROGUE_TALENT_STATUS_LOCK", value)) {
|
||||
return ROGUE_TALENT_STATUS_LOCK;
|
||||
}
|
||||
}
|
||||
if (value.length() == 26) {
|
||||
if (ProtoUtil.isEqual("ROGUE_TALENT_STATUS_UNLOCK", value)) {
|
||||
return ROGUE_TALENT_STATUS_UNLOCK;
|
||||
}
|
||||
if (ProtoUtil.isEqual("ROGUE_TALENT_STATUS_ENABLE", value)) {
|
||||
return ROGUE_TALENT_STATUS_ENABLE;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,420 @@
|
||||
// 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 RogueUnlockProgressOuterClass {
|
||||
/**
|
||||
* Protobuf type {@code RogueUnlockProgress}
|
||||
*/
|
||||
public static final class RogueUnlockProgress extends ProtoMessage<RogueUnlockProgress> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 unlock_id = 3;</code>
|
||||
*/
|
||||
private int unlockId;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 progress = 4;</code>
|
||||
*/
|
||||
private int progress;
|
||||
|
||||
/**
|
||||
* <code>optional bool finish = 10;</code>
|
||||
*/
|
||||
private boolean finish;
|
||||
|
||||
private RogueUnlockProgress() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code RogueUnlockProgress}
|
||||
*/
|
||||
public static RogueUnlockProgress newInstance() {
|
||||
return new RogueUnlockProgress();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 unlock_id = 3;</code>
|
||||
* @return whether the unlockId field is set
|
||||
*/
|
||||
public boolean hasUnlockId() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 unlock_id = 3;</code>
|
||||
* @return this
|
||||
*/
|
||||
public RogueUnlockProgress clearUnlockId() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
unlockId = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 unlock_id = 3;</code>
|
||||
* @return the unlockId
|
||||
*/
|
||||
public int getUnlockId() {
|
||||
return unlockId;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 unlock_id = 3;</code>
|
||||
* @param value the unlockId to set
|
||||
* @return this
|
||||
*/
|
||||
public RogueUnlockProgress setUnlockId(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
unlockId = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 progress = 4;</code>
|
||||
* @return whether the progress field is set
|
||||
*/
|
||||
public boolean hasProgress() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 progress = 4;</code>
|
||||
* @return this
|
||||
*/
|
||||
public RogueUnlockProgress clearProgress() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
progress = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 progress = 4;</code>
|
||||
* @return the progress
|
||||
*/
|
||||
public int getProgress() {
|
||||
return progress;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 progress = 4;</code>
|
||||
* @param value the progress to set
|
||||
* @return this
|
||||
*/
|
||||
public RogueUnlockProgress setProgress(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
progress = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool finish = 10;</code>
|
||||
* @return whether the finish field is set
|
||||
*/
|
||||
public boolean hasFinish() {
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool finish = 10;</code>
|
||||
* @return this
|
||||
*/
|
||||
public RogueUnlockProgress clearFinish() {
|
||||
bitField0_ &= ~0x00000004;
|
||||
finish = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool finish = 10;</code>
|
||||
* @return the finish
|
||||
*/
|
||||
public boolean getFinish() {
|
||||
return finish;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional bool finish = 10;</code>
|
||||
* @param value the finish to set
|
||||
* @return this
|
||||
*/
|
||||
public RogueUnlockProgress setFinish(final boolean value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
finish = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueUnlockProgress copyFrom(final RogueUnlockProgress other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
unlockId = other.unlockId;
|
||||
progress = other.progress;
|
||||
finish = other.finish;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueUnlockProgress mergeFrom(final RogueUnlockProgress other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasUnlockId()) {
|
||||
setUnlockId(other.unlockId);
|
||||
}
|
||||
if (other.hasProgress()) {
|
||||
setProgress(other.progress);
|
||||
}
|
||||
if (other.hasFinish()) {
|
||||
setFinish(other.finish);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueUnlockProgress clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
unlockId = 0;
|
||||
progress = 0;
|
||||
finish = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueUnlockProgress 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 RogueUnlockProgress)) {
|
||||
return false;
|
||||
}
|
||||
RogueUnlockProgress other = (RogueUnlockProgress) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasUnlockId() || unlockId == other.unlockId)
|
||||
&& (!hasProgress() || progress == other.progress)
|
||||
&& (!hasFinish() || finish == other.finish);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 24);
|
||||
output.writeUInt32NoTag(unlockId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 32);
|
||||
output.writeUInt32NoTag(progress);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeRawByte((byte) 80);
|
||||
output.writeBoolNoTag(finish);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(unlockId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(progress);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
size += 2;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public RogueUnlockProgress mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 24: {
|
||||
// unlockId
|
||||
unlockId = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 32) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 32: {
|
||||
// progress
|
||||
progress = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 80) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 80: {
|
||||
// finish
|
||||
finish = 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.unlockId, unlockId);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.progress, progress);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeBool(FieldNames.finish, finish);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueUnlockProgress mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case -210950273:
|
||||
case 2050497526: {
|
||||
if (input.isAtField(FieldNames.unlockId)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
unlockId = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -1001078227: {
|
||||
if (input.isAtField(FieldNames.progress)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
progress = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -1274442605: {
|
||||
if (input.isAtField(FieldNames.finish)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
finish = input.readBool();
|
||||
bitField0_ |= 0x00000004;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RogueUnlockProgress clone() {
|
||||
return new RogueUnlockProgress().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static RogueUnlockProgress parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new RogueUnlockProgress(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static RogueUnlockProgress parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new RogueUnlockProgress(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static RogueUnlockProgress parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new RogueUnlockProgress(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating RogueUnlockProgress messages
|
||||
*/
|
||||
public static MessageFactory<RogueUnlockProgress> getFactory() {
|
||||
return RogueUnlockProgressFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum RogueUnlockProgressFactory implements MessageFactory<RogueUnlockProgress> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public RogueUnlockProgress create() {
|
||||
return RogueUnlockProgress.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName unlockId = FieldName.forField("unlockId", "unlock_id");
|
||||
|
||||
static final FieldName progress = FieldName.forField("progress");
|
||||
|
||||
static final FieldName finish = FieldName.forField("finish");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,7 @@ public class GameConstants {
|
||||
|
||||
// Rogue
|
||||
public static final int ROGUE_ENTRANCE = 801120102;
|
||||
public static final int ROGUE_TALENT_POINT_ITEM_ID = 32;
|
||||
|
||||
// Custom
|
||||
public static final int SERVER_CONSOLE_UID = 99;
|
||||
|
||||
@@ -34,8 +34,9 @@ public class GameData {
|
||||
@Getter private static Int2ObjectMap<ChallengeExcel> challengeExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static Int2ObjectMap<ChallengeTargetExcel> challengeTargetExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
@Getter private static Int2ObjectMap<RogueAreaExcel> rogueAreaExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static Int2ObjectMap<RogueManagerExcel> rogueManagerExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static Int2ObjectMap<RogueTalentExcel> rogueTalentExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static Int2ObjectMap<RogueAreaExcel> rogueAreaExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static Int2ObjectMap<RogueRoomExcel> rogueRoomExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static Int2ObjectMap<RogueMonsterExcel> rogueMonsterExcelMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
|
||||
21
src/main/java/emu/lunarcore/data/excel/RogueTalentExcel.java
Normal file
21
src/main/java/emu/lunarcore/data/excel/RogueTalentExcel.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package emu.lunarcore.data.excel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import emu.lunarcore.data.GameResource;
|
||||
import emu.lunarcore.data.ResourceType;
|
||||
import emu.lunarcore.data.common.ItemParam;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@ResourceType(name = {"RogueTalent.json"})
|
||||
public class RogueTalentExcel extends GameResource {
|
||||
private int TalentID;
|
||||
private List<ItemParam> Cost;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return TalentID;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,13 +4,14 @@ import emu.lunarcore.server.game.GameSession;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
import emu.lunarcore.server.packet.Opcodes;
|
||||
import emu.lunarcore.server.packet.PacketHandler;
|
||||
import emu.lunarcore.server.packet.send.PacketGetRogueTalentInfoScRsp;
|
||||
|
||||
@Opcodes(CmdId.GetRogueTalentInfoCsReq)
|
||||
public class HandlerGetRogueTalentInfoCsReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] data) throws Exception {
|
||||
session.send(CmdId.GetRogueTalentInfoScRsp);
|
||||
session.send(new PacketGetRogueTalentInfoScRsp(session.getPlayer().getRogueManager()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package emu.lunarcore.server.packet.send;
|
||||
|
||||
import emu.lunarcore.data.GameData;
|
||||
import emu.lunarcore.data.excel.RogueTalentExcel;
|
||||
import emu.lunarcore.game.rogue.RogueManager;
|
||||
import emu.lunarcore.proto.GetRogueTalentInfoScRspOuterClass.GetRogueTalentInfoScRsp;
|
||||
import emu.lunarcore.proto.RogueTalentOuterClass.RogueTalent;
|
||||
import emu.lunarcore.proto.RogueTalentStatusOuterClass.RogueTalentStatus;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
|
||||
public class PacketGetRogueTalentInfoScRsp extends BasePacket {
|
||||
|
||||
public PacketGetRogueTalentInfoScRsp(RogueManager rogueManager) {
|
||||
super(CmdId.GetRogueTalentInfoScRsp);
|
||||
|
||||
var data = GetRogueTalentInfoScRsp.newInstance();
|
||||
|
||||
for (RogueTalentExcel excel : GameData.getRogueTalentExcelMap().values()) {
|
||||
var talent = RogueTalent.newInstance()
|
||||
.setTalentId(excel.getTalentID())
|
||||
.setStatus(RogueTalentStatus.ROGUE_TALENT_STATUS_UNLOCK);
|
||||
|
||||
data.getMutableTalentInfo().addRogueTalent(talent);
|
||||
}
|
||||
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user