diff --git a/src/generated/main/emu/lunarcore/proto/AddRogueMiracleScNotifyOuterClass.java b/src/generated/main/emu/lunarcore/proto/AddRogueMiracleScNotifyOuterClass.java new file mode 100644 index 0000000..bc26f10 --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/AddRogueMiracleScNotifyOuterClass.java @@ -0,0 +1,396 @@ +// 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 AddRogueMiracleScNotifyOuterClass { + /** + * Protobuf type {@code AddRogueMiracleScNotify} + */ + public static final class AddRogueMiracleScNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .RogueMiracleSource source = 7; + */ + private int source; + + /** + * optional .RogueMiracle rogue_miracle = 11; + */ + private final RogueMiracleOuterClass.RogueMiracle rogueMiracle = RogueMiracleOuterClass.RogueMiracle.newInstance(); + + private AddRogueMiracleScNotify() { + } + + /** + * @return a new empty instance of {@code AddRogueMiracleScNotify} + */ + public static AddRogueMiracleScNotify newInstance() { + return new AddRogueMiracleScNotify(); + } + + /** + * optional .RogueMiracleSource source = 7; + * @return whether the source field is set + */ + public boolean hasSource() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .RogueMiracleSource source = 7; + * @return this + */ + public AddRogueMiracleScNotify clearSource() { + bitField0_ &= ~0x00000001; + source = 0; + return this; + } + + /** + * optional .RogueMiracleSource source = 7; + * @return the source + */ + public RogueMiracleSourceOuterClass.RogueMiracleSource getSource() { + return RogueMiracleSourceOuterClass.RogueMiracleSource.forNumber(source); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link AddRogueMiracleScNotify#getSource()}.getNumber(). + * + * @return numeric wire representation + */ + public int getSourceValue() { + return source; + } + + /** + * 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 RogueMiracleSourceOuterClass.RogueMiracleSource}. Setting an invalid value + * can cause {@link AddRogueMiracleScNotify#getSource()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public AddRogueMiracleScNotify setSourceValue(final int value) { + bitField0_ |= 0x00000001; + source = value; + return this; + } + + /** + * optional .RogueMiracleSource source = 7; + * @param value the source to set + * @return this + */ + public AddRogueMiracleScNotify setSource( + final RogueMiracleSourceOuterClass.RogueMiracleSource value) { + bitField0_ |= 0x00000001; + source = value.getNumber(); + return this; + } + + /** + * optional .RogueMiracle rogue_miracle = 11; + * @return whether the rogueMiracle field is set + */ + public boolean hasRogueMiracle() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .RogueMiracle rogue_miracle = 11; + * @return this + */ + public AddRogueMiracleScNotify clearRogueMiracle() { + bitField0_ &= ~0x00000002; + rogueMiracle.clear(); + return this; + } + + /** + * optional .RogueMiracle rogue_miracle = 11; + * + * 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 #getMutableRogueMiracle()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RogueMiracleOuterClass.RogueMiracle getRogueMiracle() { + return rogueMiracle; + } + + /** + * optional .RogueMiracle rogue_miracle = 11; + * + * 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 RogueMiracleOuterClass.RogueMiracle getMutableRogueMiracle() { + bitField0_ |= 0x00000002; + return rogueMiracle; + } + + /** + * optional .RogueMiracle rogue_miracle = 11; + * @param value the rogueMiracle to set + * @return this + */ + public AddRogueMiracleScNotify setRogueMiracle( + final RogueMiracleOuterClass.RogueMiracle value) { + bitField0_ |= 0x00000002; + rogueMiracle.copyFrom(value); + return this; + } + + @Override + public AddRogueMiracleScNotify copyFrom(final AddRogueMiracleScNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + source = other.source; + rogueMiracle.copyFrom(other.rogueMiracle); + } + return this; + } + + @Override + public AddRogueMiracleScNotify mergeFrom(final AddRogueMiracleScNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSource()) { + setSourceValue(other.source); + } + if (other.hasRogueMiracle()) { + getMutableRogueMiracle().mergeFrom(other.rogueMiracle); + } + return this; + } + + @Override + public AddRogueMiracleScNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + source = 0; + rogueMiracle.clear(); + return this; + } + + @Override + public AddRogueMiracleScNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + rogueMiracle.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AddRogueMiracleScNotify)) { + return false; + } + AddRogueMiracleScNotify other = (AddRogueMiracleScNotify) o; + return bitField0_ == other.bitField0_ + && (!hasSource() || source == other.source) + && (!hasRogueMiracle() || rogueMiracle.equals(other.rogueMiracle)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 56); + output.writeEnumNoTag(source); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 90); + output.writeMessageNoTag(rogueMiracle); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(source); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(rogueMiracle); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AddRogueMiracleScNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 56: { + // source + final int value = input.readInt32(); + if (RogueMiracleSourceOuterClass.RogueMiracleSource.forNumber(value) != null) { + source = value; + bitField0_ |= 0x00000001; + } + tag = input.readTag(); + if (tag != 90) { + break; + } + } + case 90: { + // rogueMiracle + input.readMessage(rogueMiracle); + 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.writeEnum(FieldNames.source, source, RogueMiracleSourceOuterClass.RogueMiracleSource.converter()); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.rogueMiracle, rogueMiracle); + } + output.endObject(); + } + + @Override + public AddRogueMiracleScNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -896505829: { + if (input.isAtField(FieldNames.source)) { + if (!input.trySkipNullValue()) { + final RogueMiracleSourceOuterClass.RogueMiracleSource value = input.readEnum(RogueMiracleSourceOuterClass.RogueMiracleSource.converter()); + if (value != null) { + source = value.getNumber(); + bitField0_ |= 0x00000001; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case -1479551689: + case 1697369868: { + if (input.isAtField(FieldNames.rogueMiracle)) { + if (!input.trySkipNullValue()) { + input.readMessage(rogueMiracle); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AddRogueMiracleScNotify clone() { + return new AddRogueMiracleScNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AddRogueMiracleScNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AddRogueMiracleScNotify(), data).checkInitialized(); + } + + public static AddRogueMiracleScNotify parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AddRogueMiracleScNotify(), input).checkInitialized(); + } + + public static AddRogueMiracleScNotify parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AddRogueMiracleScNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating AddRogueMiracleScNotify messages + */ + public static MessageFactory getFactory() { + return AddRogueMiracleScNotifyFactory.INSTANCE; + } + + private enum AddRogueMiracleScNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public AddRogueMiracleScNotify create() { + return AddRogueMiracleScNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName source = FieldName.forField("source"); + + static final FieldName rogueMiracle = FieldName.forField("rogueMiracle", "rogue_miracle"); + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/RogueAchivedMiracleInfoOuterClass.java b/src/generated/main/emu/lunarcore/proto/RogueAchivedMiracleInfoOuterClass.java new file mode 100644 index 0000000..c202108 --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/RogueAchivedMiracleInfoOuterClass.java @@ -0,0 +1,536 @@ +// 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 RogueAchivedMiracleInfoOuterClass { + /** + * Protobuf type {@code RogueAchivedMiracleInfo} + */ + public static final class RogueAchivedMiracleInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ELJOPPNAKDB = 5; + */ + private int eLJOPPNAKDB; + + /** + * optional uint32 JPHPAELAOJI = 11; + */ + private int jPHPAELAOJI; + + /** + * optional bool PBKHAECJLNG = 9; + */ + private boolean pBKHAECJLNG; + + /** + * repeated .RogueMiracle rogue_miracle_list = 7; + */ + private final RepeatedMessage rogueMiracleList = RepeatedMessage.newEmptyInstance(RogueMiracleOuterClass.RogueMiracle.getFactory()); + + private RogueAchivedMiracleInfo() { + } + + /** + * @return a new empty instance of {@code RogueAchivedMiracleInfo} + */ + public static RogueAchivedMiracleInfo newInstance() { + return new RogueAchivedMiracleInfo(); + } + + /** + * optional uint32 ELJOPPNAKDB = 5; + * @return whether the eLJOPPNAKDB field is set + */ + public boolean hasELJOPPNAKDB() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ELJOPPNAKDB = 5; + * @return this + */ + public RogueAchivedMiracleInfo clearELJOPPNAKDB() { + bitField0_ &= ~0x00000001; + eLJOPPNAKDB = 0; + return this; + } + + /** + * optional uint32 ELJOPPNAKDB = 5; + * @return the eLJOPPNAKDB + */ + public int getELJOPPNAKDB() { + return eLJOPPNAKDB; + } + + /** + * optional uint32 ELJOPPNAKDB = 5; + * @param value the eLJOPPNAKDB to set + * @return this + */ + public RogueAchivedMiracleInfo setELJOPPNAKDB(final int value) { + bitField0_ |= 0x00000001; + eLJOPPNAKDB = value; + return this; + } + + /** + * optional uint32 JPHPAELAOJI = 11; + * @return whether the jPHPAELAOJI field is set + */ + public boolean hasJPHPAELAOJI() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 JPHPAELAOJI = 11; + * @return this + */ + public RogueAchivedMiracleInfo clearJPHPAELAOJI() { + bitField0_ &= ~0x00000002; + jPHPAELAOJI = 0; + return this; + } + + /** + * optional uint32 JPHPAELAOJI = 11; + * @return the jPHPAELAOJI + */ + public int getJPHPAELAOJI() { + return jPHPAELAOJI; + } + + /** + * optional uint32 JPHPAELAOJI = 11; + * @param value the jPHPAELAOJI to set + * @return this + */ + public RogueAchivedMiracleInfo setJPHPAELAOJI(final int value) { + bitField0_ |= 0x00000002; + jPHPAELAOJI = value; + return this; + } + + /** + * optional bool PBKHAECJLNG = 9; + * @return whether the pBKHAECJLNG field is set + */ + public boolean hasPBKHAECJLNG() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bool PBKHAECJLNG = 9; + * @return this + */ + public RogueAchivedMiracleInfo clearPBKHAECJLNG() { + bitField0_ &= ~0x00000004; + pBKHAECJLNG = false; + return this; + } + + /** + * optional bool PBKHAECJLNG = 9; + * @return the pBKHAECJLNG + */ + public boolean getPBKHAECJLNG() { + return pBKHAECJLNG; + } + + /** + * optional bool PBKHAECJLNG = 9; + * @param value the pBKHAECJLNG to set + * @return this + */ + public RogueAchivedMiracleInfo setPBKHAECJLNG(final boolean value) { + bitField0_ |= 0x00000004; + pBKHAECJLNG = value; + return this; + } + + /** + * repeated .RogueMiracle rogue_miracle_list = 7; + * @return whether the rogueMiracleList field is set + */ + public boolean hasRogueMiracleList() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .RogueMiracle rogue_miracle_list = 7; + * @return this + */ + public RogueAchivedMiracleInfo clearRogueMiracleList() { + bitField0_ &= ~0x00000008; + rogueMiracleList.clear(); + return this; + } + + /** + * repeated .RogueMiracle rogue_miracle_list = 7; + * + * 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 #getMutableRogueMiracleList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRogueMiracleList() { + return rogueMiracleList; + } + + /** + * repeated .RogueMiracle rogue_miracle_list = 7; + * + * 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 getMutableRogueMiracleList() { + bitField0_ |= 0x00000008; + return rogueMiracleList; + } + + /** + * repeated .RogueMiracle rogue_miracle_list = 7; + * @param value the rogueMiracleList to add + * @return this + */ + public RogueAchivedMiracleInfo addRogueMiracleList( + final RogueMiracleOuterClass.RogueMiracle value) { + bitField0_ |= 0x00000008; + rogueMiracleList.add(value); + return this; + } + + /** + * repeated .RogueMiracle rogue_miracle_list = 7; + * @param values the rogueMiracleList to add + * @return this + */ + public RogueAchivedMiracleInfo addAllRogueMiracleList( + final RogueMiracleOuterClass.RogueMiracle... values) { + bitField0_ |= 0x00000008; + rogueMiracleList.addAll(values); + return this; + } + + @Override + public RogueAchivedMiracleInfo copyFrom(final RogueAchivedMiracleInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + eLJOPPNAKDB = other.eLJOPPNAKDB; + jPHPAELAOJI = other.jPHPAELAOJI; + pBKHAECJLNG = other.pBKHAECJLNG; + rogueMiracleList.copyFrom(other.rogueMiracleList); + } + return this; + } + + @Override + public RogueAchivedMiracleInfo mergeFrom(final RogueAchivedMiracleInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasELJOPPNAKDB()) { + setELJOPPNAKDB(other.eLJOPPNAKDB); + } + if (other.hasJPHPAELAOJI()) { + setJPHPAELAOJI(other.jPHPAELAOJI); + } + if (other.hasPBKHAECJLNG()) { + setPBKHAECJLNG(other.pBKHAECJLNG); + } + if (other.hasRogueMiracleList()) { + getMutableRogueMiracleList().addAll(other.rogueMiracleList); + } + return this; + } + + @Override + public RogueAchivedMiracleInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + eLJOPPNAKDB = 0; + jPHPAELAOJI = 0; + pBKHAECJLNG = false; + rogueMiracleList.clear(); + return this; + } + + @Override + public RogueAchivedMiracleInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + rogueMiracleList.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RogueAchivedMiracleInfo)) { + return false; + } + RogueAchivedMiracleInfo other = (RogueAchivedMiracleInfo) o; + return bitField0_ == other.bitField0_ + && (!hasELJOPPNAKDB() || eLJOPPNAKDB == other.eLJOPPNAKDB) + && (!hasJPHPAELAOJI() || jPHPAELAOJI == other.jPHPAELAOJI) + && (!hasPBKHAECJLNG() || pBKHAECJLNG == other.pBKHAECJLNG) + && (!hasRogueMiracleList() || rogueMiracleList.equals(other.rogueMiracleList)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(eLJOPPNAKDB); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 88); + output.writeUInt32NoTag(jPHPAELAOJI); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 72); + output.writeBoolNoTag(pBKHAECJLNG); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < rogueMiracleList.length(); i++) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(rogueMiracleList.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(eLJOPPNAKDB); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(jPHPAELAOJI); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * rogueMiracleList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rogueMiracleList); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RogueAchivedMiracleInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 40: { + // eLJOPPNAKDB + eLJOPPNAKDB = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 88) { + break; + } + } + case 88: { + // jPHPAELAOJI + jPHPAELAOJI = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // pBKHAECJLNG + pBKHAECJLNG = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // rogueMiracleList + tag = input.readRepeatedMessage(rogueMiracleList, tag); + bitField0_ |= 0x00000008; + 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.eLJOPPNAKDB, eLJOPPNAKDB); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.jPHPAELAOJI, jPHPAELAOJI); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.pBKHAECJLNG, pBKHAECJLNG); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.rogueMiracleList, rogueMiracleList); + } + output.endObject(); + } + + @Override + public RogueAchivedMiracleInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1500069942: { + if (input.isAtField(FieldNames.eLJOPPNAKDB)) { + if (!input.trySkipNullValue()) { + eLJOPPNAKDB = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1932356103: { + if (input.isAtField(FieldNames.jPHPAELAOJI)) { + if (!input.trySkipNullValue()) { + jPHPAELAOJI = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 298748395: { + if (input.isAtField(FieldNames.pBKHAECJLNG)) { + if (!input.trySkipNullValue()) { + pBKHAECJLNG = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -452426123: + case 1925521905: { + if (input.isAtField(FieldNames.rogueMiracleList)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rogueMiracleList); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RogueAchivedMiracleInfo clone() { + return new RogueAchivedMiracleInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RogueAchivedMiracleInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RogueAchivedMiracleInfo(), data).checkInitialized(); + } + + public static RogueAchivedMiracleInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RogueAchivedMiracleInfo(), input).checkInitialized(); + } + + public static RogueAchivedMiracleInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RogueAchivedMiracleInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating RogueAchivedMiracleInfo messages + */ + public static MessageFactory getFactory() { + return RogueAchivedMiracleInfoFactory.INSTANCE; + } + + private enum RogueAchivedMiracleInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public RogueAchivedMiracleInfo create() { + return RogueAchivedMiracleInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName eLJOPPNAKDB = FieldName.forField("ELJOPPNAKDB"); + + static final FieldName jPHPAELAOJI = FieldName.forField("JPHPAELAOJI"); + + static final FieldName pBKHAECJLNG = FieldName.forField("PBKHAECJLNG"); + + static final FieldName rogueMiracleList = FieldName.forField("rogueMiracleList", "rogue_miracle_list"); + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/RogueBuffSelectInfoOuterClass.java b/src/generated/main/emu/lunarcore/proto/RogueBuffSelectInfoOuterClass.java index e9e5faf..9b8d719 100644 --- a/src/generated/main/emu/lunarcore/proto/RogueBuffSelectInfoOuterClass.java +++ b/src/generated/main/emu/lunarcore/proto/RogueBuffSelectInfoOuterClass.java @@ -55,9 +55,9 @@ public final class RogueBuffSelectInfoOuterClass { private int selectBuffSourceCurCount; /** - * optional uint32 rogue_coin = 13; + * optional uint32 KMAGFHIIALA = 13; */ - private int rogueCoin; + private int kMAGFHIIALA; /** * optional .RogueCommonBuffSelectSource source = 12; @@ -338,39 +338,39 @@ public final class RogueBuffSelectInfoOuterClass { } /** - * optional uint32 rogue_coin = 13; - * @return whether the rogueCoin field is set + * optional uint32 KMAGFHIIALA = 13; + * @return whether the kMAGFHIIALA field is set */ - public boolean hasRogueCoin() { + public boolean hasKMAGFHIIALA() { return (bitField0_ & 0x00000040) != 0; } /** - * optional uint32 rogue_coin = 13; + * optional uint32 KMAGFHIIALA = 13; * @return this */ - public RogueBuffSelectInfo clearRogueCoin() { + public RogueBuffSelectInfo clearKMAGFHIIALA() { bitField0_ &= ~0x00000040; - rogueCoin = 0; + kMAGFHIIALA = 0; return this; } /** - * optional uint32 rogue_coin = 13; - * @return the rogueCoin + * optional uint32 KMAGFHIIALA = 13; + * @return the kMAGFHIIALA */ - public int getRogueCoin() { - return rogueCoin; + public int getKMAGFHIIALA() { + return kMAGFHIIALA; } /** - * optional uint32 rogue_coin = 13; - * @param value the rogueCoin to set + * optional uint32 KMAGFHIIALA = 13; + * @param value the kMAGFHIIALA to set * @return this */ - public RogueBuffSelectInfo setRogueCoin(final int value) { + public RogueBuffSelectInfo setKMAGFHIIALA(final int value) { bitField0_ |= 0x00000040; - rogueCoin = value; + kMAGFHIIALA = value; return this; } @@ -715,7 +715,7 @@ public final class RogueBuffSelectInfoOuterClass { rollBuffTimes = other.rollBuffTimes; selectBuffSourceHint = other.selectBuffSourceHint; selectBuffSourceCurCount = other.selectBuffSourceCurCount; - rogueCoin = other.rogueCoin; + kMAGFHIIALA = other.kMAGFHIIALA; source = other.source; showHandbookHint = other.showHandbookHint; canRoll = other.canRoll; @@ -750,8 +750,8 @@ public final class RogueBuffSelectInfoOuterClass { if (other.hasSelectBuffSourceCurCount()) { setSelectBuffSourceCurCount(other.selectBuffSourceCurCount); } - if (other.hasRogueCoin()) { - setRogueCoin(other.rogueCoin); + if (other.hasKMAGFHIIALA()) { + setKMAGFHIIALA(other.kMAGFHIIALA); } if (other.hasSource()) { setSourceValue(other.source); @@ -787,7 +787,7 @@ public final class RogueBuffSelectInfoOuterClass { rollBuffTimes = 0; selectBuffSourceHint = 0; selectBuffSourceCurCount = 0; - rogueCoin = 0; + kMAGFHIIALA = 0; source = 0; showHandbookHint = false; canRoll = false; @@ -826,7 +826,7 @@ public final class RogueBuffSelectInfoOuterClass { && (!hasRollBuffTimes() || rollBuffTimes == other.rollBuffTimes) && (!hasSelectBuffSourceHint() || selectBuffSourceHint == other.selectBuffSourceHint) && (!hasSelectBuffSourceCurCount() || selectBuffSourceCurCount == other.selectBuffSourceCurCount) - && (!hasRogueCoin() || rogueCoin == other.rogueCoin) + && (!hasKMAGFHIIALA() || kMAGFHIIALA == other.kMAGFHIIALA) && (!hasSource() || source == other.source) && (!hasShowHandbookHint() || showHandbookHint == other.showHandbookHint) && (!hasCanRoll() || canRoll == other.canRoll) @@ -863,7 +863,7 @@ public final class RogueBuffSelectInfoOuterClass { } if ((bitField0_ & 0x00000040) != 0) { output.writeRawByte((byte) 104); - output.writeUInt32NoTag(rogueCoin); + output.writeUInt32NoTag(kMAGFHIIALA); } if ((bitField0_ & 0x00000080) != 0) { output.writeRawByte((byte) 96); @@ -917,7 +917,7 @@ public final class RogueBuffSelectInfoOuterClass { size += 1 + ProtoSink.computeUInt32SizeNoTag(selectBuffSourceCurCount); } if ((bitField0_ & 0x00000040) != 0) { - size += 1 + ProtoSink.computeUInt32SizeNoTag(rogueCoin); + size += 1 + ProtoSink.computeUInt32SizeNoTag(kMAGFHIIALA); } if ((bitField0_ & 0x00000080) != 0) { size += 1 + ProtoSink.computeEnumSizeNoTag(source); @@ -1002,8 +1002,8 @@ public final class RogueBuffSelectInfoOuterClass { } } case 104: { - // rogueCoin - rogueCoin = input.readUInt32(); + // kMAGFHIIALA + kMAGFHIIALA = input.readUInt32(); bitField0_ |= 0x00000040; tag = input.readTag(); if (tag != 96) { @@ -1108,7 +1108,7 @@ public final class RogueBuffSelectInfoOuterClass { output.writeUInt32(FieldNames.selectBuffSourceCurCount, selectBuffSourceCurCount); } if ((bitField0_ & 0x00000040) != 0) { - output.writeUInt32(FieldNames.rogueCoin, rogueCoin); + output.writeUInt32(FieldNames.kMAGFHIIALA, kMAGFHIIALA); } if ((bitField0_ & 0x00000080) != 0) { output.writeEnum(FieldNames.source, source, RogueCommonBuffSelectSourceOuterClass.RogueCommonBuffSelectSource.converter()); @@ -1209,11 +1209,10 @@ public final class RogueBuffSelectInfoOuterClass { } break; } - case 655631243: - case -1124761130: { - if (input.isAtField(FieldNames.rogueCoin)) { + case -2082273588: { + if (input.isAtField(FieldNames.kMAGFHIIALA)) { if (!input.trySkipNullValue()) { - rogueCoin = input.readUInt32(); + kMAGFHIIALA = input.readUInt32(); bitField0_ |= 0x00000040; } } else { @@ -1362,7 +1361,7 @@ public final class RogueBuffSelectInfoOuterClass { static final FieldName selectBuffSourceCurCount = FieldName.forField("selectBuffSourceCurCount", "select_buff_source_cur_count"); - static final FieldName rogueCoin = FieldName.forField("rogueCoin", "rogue_coin"); + static final FieldName kMAGFHIIALA = FieldName.forField("KMAGFHIIALA"); static final FieldName source = FieldName.forField("source"); diff --git a/src/generated/main/emu/lunarcore/proto/RogueCurrentInfoOuterClass.java b/src/generated/main/emu/lunarcore/proto/RogueCurrentInfoOuterClass.java index 6b8fd5c..3053408 100644 --- a/src/generated/main/emu/lunarcore/proto/RogueCurrentInfoOuterClass.java +++ b/src/generated/main/emu/lunarcore/proto/RogueCurrentInfoOuterClass.java @@ -23,6 +23,11 @@ public final class RogueCurrentInfoOuterClass { */ private int status; + /** + * optional .RogueMiracleInfo rogue_miracle_info = 3; + */ + private final RogueMiracleInfoOuterClass.RogueMiracleInfo rogueMiracleInfo = RogueMiracleInfoOuterClass.RogueMiracleInfo.newInstance(); + /** * optional .RogueMapInfo room_map = 10; */ @@ -105,12 +110,70 @@ public final class RogueCurrentInfoOuterClass { return this; } + /** + * optional .RogueMiracleInfo rogue_miracle_info = 3; + * @return whether the rogueMiracleInfo field is set + */ + public boolean hasRogueMiracleInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .RogueMiracleInfo rogue_miracle_info = 3; + * @return this + */ + public RogueCurrentInfo clearRogueMiracleInfo() { + bitField0_ &= ~0x00000002; + rogueMiracleInfo.clear(); + return this; + } + + /** + * optional .RogueMiracleInfo rogue_miracle_info = 3; + * + * 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 #getMutableRogueMiracleInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RogueMiracleInfoOuterClass.RogueMiracleInfo getRogueMiracleInfo() { + return rogueMiracleInfo; + } + + /** + * optional .RogueMiracleInfo rogue_miracle_info = 3; + * + * 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 RogueMiracleInfoOuterClass.RogueMiracleInfo getMutableRogueMiracleInfo() { + bitField0_ |= 0x00000002; + return rogueMiracleInfo; + } + + /** + * optional .RogueMiracleInfo rogue_miracle_info = 3; + * @param value the rogueMiracleInfo to set + * @return this + */ + public RogueCurrentInfo setRogueMiracleInfo( + final RogueMiracleInfoOuterClass.RogueMiracleInfo value) { + bitField0_ |= 0x00000002; + rogueMiracleInfo.copyFrom(value); + return this; + } + /** * optional .RogueMapInfo room_map = 10; * @return whether the roomMap field is set */ public boolean hasRoomMap() { - return (bitField0_ & 0x00000002) != 0; + return (bitField0_ & 0x00000004) != 0; } /** @@ -118,7 +181,7 @@ public final class RogueCurrentInfoOuterClass { * @return this */ public RogueCurrentInfo clearRoomMap() { - bitField0_ &= ~0x00000002; + bitField0_ &= ~0x00000004; roomMap.clear(); return this; } @@ -147,7 +210,7 @@ public final class RogueCurrentInfoOuterClass { * @return internal storage object for modifications */ public RogueMapInfoOuterClass.RogueMapInfo getMutableRoomMap() { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; return roomMap; } @@ -157,7 +220,7 @@ public final class RogueCurrentInfoOuterClass { * @return this */ public RogueCurrentInfo setRoomMap(final RogueMapInfoOuterClass.RogueMapInfo value) { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; roomMap.copyFrom(value); return this; } @@ -167,7 +230,7 @@ public final class RogueCurrentInfoOuterClass { * @return whether the rogueBuffInfo field is set */ public boolean hasRogueBuffInfo() { - return (bitField0_ & 0x00000004) != 0; + return (bitField0_ & 0x00000008) != 0; } /** @@ -175,7 +238,7 @@ public final class RogueCurrentInfoOuterClass { * @return this */ public RogueCurrentInfo clearRogueBuffInfo() { - bitField0_ &= ~0x00000004; + bitField0_ &= ~0x00000008; rogueBuffInfo.clear(); return this; } @@ -204,7 +267,7 @@ public final class RogueCurrentInfoOuterClass { * @return internal storage object for modifications */ public RogueBuffInfoOuterClass.RogueBuffInfo getMutableRogueBuffInfo() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; return rogueBuffInfo; } @@ -214,7 +277,7 @@ public final class RogueCurrentInfoOuterClass { * @return this */ public RogueCurrentInfo setRogueBuffInfo(final RogueBuffInfoOuterClass.RogueBuffInfo value) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; rogueBuffInfo.copyFrom(value); return this; } @@ -225,6 +288,7 @@ public final class RogueCurrentInfoOuterClass { if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; status = other.status; + rogueMiracleInfo.copyFrom(other.rogueMiracleInfo); roomMap.copyFrom(other.roomMap); rogueBuffInfo.copyFrom(other.rogueBuffInfo); } @@ -240,6 +304,9 @@ public final class RogueCurrentInfoOuterClass { if (other.hasStatus()) { setStatusValue(other.status); } + if (other.hasRogueMiracleInfo()) { + getMutableRogueMiracleInfo().mergeFrom(other.rogueMiracleInfo); + } if (other.hasRoomMap()) { getMutableRoomMap().mergeFrom(other.roomMap); } @@ -257,6 +324,7 @@ public final class RogueCurrentInfoOuterClass { cachedSize = -1; bitField0_ = 0; status = 0; + rogueMiracleInfo.clear(); roomMap.clear(); rogueBuffInfo.clear(); return this; @@ -269,6 +337,7 @@ public final class RogueCurrentInfoOuterClass { } cachedSize = -1; bitField0_ = 0; + rogueMiracleInfo.clearQuick(); roomMap.clearQuick(); rogueBuffInfo.clearQuick(); return this; @@ -285,6 +354,7 @@ public final class RogueCurrentInfoOuterClass { RogueCurrentInfo other = (RogueCurrentInfo) o; return bitField0_ == other.bitField0_ && (!hasStatus() || status == other.status) + && (!hasRogueMiracleInfo() || rogueMiracleInfo.equals(other.rogueMiracleInfo)) && (!hasRoomMap() || roomMap.equals(other.roomMap)) && (!hasRogueBuffInfo() || rogueBuffInfo.equals(other.rogueBuffInfo)); } @@ -296,10 +366,14 @@ public final class RogueCurrentInfoOuterClass { output.writeEnumNoTag(status); } if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(rogueMiracleInfo); + } + if ((bitField0_ & 0x00000004) != 0) { output.writeRawByte((byte) 82); output.writeMessageNoTag(roomMap); } - if ((bitField0_ & 0x00000004) != 0) { + if ((bitField0_ & 0x00000008) != 0) { output.writeRawByte((byte) 114); output.writeMessageNoTag(rogueBuffInfo); } @@ -312,9 +386,12 @@ public final class RogueCurrentInfoOuterClass { size += 1 + ProtoSink.computeEnumSizeNoTag(status); } if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(roomMap); + size += 1 + ProtoSink.computeMessageSizeNoTag(rogueMiracleInfo); } if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(roomMap); + } + if ((bitField0_ & 0x00000008) != 0) { size += 1 + ProtoSink.computeMessageSizeNoTag(rogueBuffInfo); } return size; @@ -335,6 +412,15 @@ public final class RogueCurrentInfoOuterClass { bitField0_ |= 0x00000001; } tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // rogueMiracleInfo + input.readMessage(rogueMiracleInfo); + bitField0_ |= 0x00000002; + tag = input.readTag(); if (tag != 82) { break; } @@ -342,7 +428,7 @@ public final class RogueCurrentInfoOuterClass { case 82: { // roomMap input.readMessage(roomMap); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; tag = input.readTag(); if (tag != 114) { break; @@ -351,7 +437,7 @@ public final class RogueCurrentInfoOuterClass { case 114: { // rogueBuffInfo input.readMessage(rogueBuffInfo); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; tag = input.readTag(); if (tag != 0) { break; @@ -378,9 +464,12 @@ public final class RogueCurrentInfoOuterClass { output.writeEnum(FieldNames.status, status, RogueStatusOuterClass.RogueStatus.converter()); } if ((bitField0_ & 0x00000002) != 0) { - output.writeMessage(FieldNames.roomMap, roomMap); + output.writeMessage(FieldNames.rogueMiracleInfo, rogueMiracleInfo); } if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.roomMap, roomMap); + } + if ((bitField0_ & 0x00000008) != 0) { output.writeMessage(FieldNames.rogueBuffInfo, rogueBuffInfo); } output.endObject(); @@ -409,12 +498,24 @@ public final class RogueCurrentInfoOuterClass { } break; } + case -452511099: + case 1925436929: { + if (input.isAtField(FieldNames.rogueMiracleInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(rogueMiracleInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } case 1379875457: case -172986376: { if (input.isAtField(FieldNames.roomMap)) { if (!input.trySkipNullValue()) { input.readMessage(roomMap); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; } } else { input.skipUnknownField(); @@ -426,7 +527,7 @@ public final class RogueCurrentInfoOuterClass { if (input.isAtField(FieldNames.rogueBuffInfo)) { if (!input.trySkipNullValue()) { input.readMessage(rogueBuffInfo); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } } else { input.skipUnknownField(); @@ -488,6 +589,8 @@ public final class RogueCurrentInfoOuterClass { static class FieldNames { static final FieldName status = FieldName.forField("status"); + static final FieldName rogueMiracleInfo = FieldName.forField("rogueMiracleInfo", "rogue_miracle_info"); + static final FieldName roomMap = FieldName.forField("roomMap", "room_map"); static final FieldName rogueBuffInfo = FieldName.forField("rogueBuffInfo", "rogue_buff_info"); diff --git a/src/generated/main/emu/lunarcore/proto/RogueMiracleInfoOuterClass.java b/src/generated/main/emu/lunarcore/proto/RogueMiracleInfoOuterClass.java new file mode 100644 index 0000000..281fbdd --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/RogueMiracleInfoOuterClass.java @@ -0,0 +1,386 @@ +// 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 RogueMiracleInfoOuterClass { + /** + * Protobuf type {@code RogueMiracleInfo} + */ + public static final class RogueMiracleInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 6; + */ + private final RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo miracleSelectInfo = RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo.newInstance(); + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 10; + */ + private final RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo achivedMiracleInfo = RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo.newInstance(); + + private RogueMiracleInfo() { + } + + /** + * @return a new empty instance of {@code RogueMiracleInfo} + */ + public static RogueMiracleInfo newInstance() { + return new RogueMiracleInfo(); + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 6; + * @return whether the miracleSelectInfo field is set + */ + public boolean hasMiracleSelectInfo() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 6; + * @return this + */ + public RogueMiracleInfo clearMiracleSelectInfo() { + bitField0_ &= ~0x00000001; + miracleSelectInfo.clear(); + return this; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 6; + * + * 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 #getMutableMiracleSelectInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo getMiracleSelectInfo() { + return miracleSelectInfo; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 6; + * + * 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 RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo getMutableMiracleSelectInfo() { + bitField0_ |= 0x00000001; + return miracleSelectInfo; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 6; + * @param value the miracleSelectInfo to set + * @return this + */ + public RogueMiracleInfo setMiracleSelectInfo( + final RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo value) { + bitField0_ |= 0x00000001; + miracleSelectInfo.copyFrom(value); + return this; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 10; + * @return whether the achivedMiracleInfo field is set + */ + public boolean hasAchivedMiracleInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 10; + * @return this + */ + public RogueMiracleInfo clearAchivedMiracleInfo() { + bitField0_ &= ~0x00000002; + achivedMiracleInfo.clear(); + return this; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 10; + * + * 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 #getMutableAchivedMiracleInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo getAchivedMiracleInfo() { + return achivedMiracleInfo; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 10; + * + * 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 RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo getMutableAchivedMiracleInfo( + ) { + bitField0_ |= 0x00000002; + return achivedMiracleInfo; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 10; + * @param value the achivedMiracleInfo to set + * @return this + */ + public RogueMiracleInfo setAchivedMiracleInfo( + final RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo value) { + bitField0_ |= 0x00000002; + achivedMiracleInfo.copyFrom(value); + return this; + } + + @Override + public RogueMiracleInfo copyFrom(final RogueMiracleInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + miracleSelectInfo.copyFrom(other.miracleSelectInfo); + achivedMiracleInfo.copyFrom(other.achivedMiracleInfo); + } + return this; + } + + @Override + public RogueMiracleInfo mergeFrom(final RogueMiracleInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasMiracleSelectInfo()) { + getMutableMiracleSelectInfo().mergeFrom(other.miracleSelectInfo); + } + if (other.hasAchivedMiracleInfo()) { + getMutableAchivedMiracleInfo().mergeFrom(other.achivedMiracleInfo); + } + return this; + } + + @Override + public RogueMiracleInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + miracleSelectInfo.clear(); + achivedMiracleInfo.clear(); + return this; + } + + @Override + public RogueMiracleInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + miracleSelectInfo.clearQuick(); + achivedMiracleInfo.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RogueMiracleInfo)) { + return false; + } + RogueMiracleInfo other = (RogueMiracleInfo) o; + return bitField0_ == other.bitField0_ + && (!hasMiracleSelectInfo() || miracleSelectInfo.equals(other.miracleSelectInfo)) + && (!hasAchivedMiracleInfo() || achivedMiracleInfo.equals(other.achivedMiracleInfo)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(miracleSelectInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(achivedMiracleInfo); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(miracleSelectInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(achivedMiracleInfo); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RogueMiracleInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 50: { + // miracleSelectInfo + input.readMessage(miracleSelectInfo); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // achivedMiracleInfo + input.readMessage(achivedMiracleInfo); + 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.writeMessage(FieldNames.miracleSelectInfo, miracleSelectInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.achivedMiracleInfo, achivedMiracleInfo); + } + output.endObject(); + } + + @Override + public RogueMiracleInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1009314021: + case -1608054973: { + if (input.isAtField(FieldNames.miracleSelectInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(miracleSelectInfo); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -213623475: + case -431790391: { + if (input.isAtField(FieldNames.achivedMiracleInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(achivedMiracleInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RogueMiracleInfo clone() { + return new RogueMiracleInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RogueMiracleInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RogueMiracleInfo(), data).checkInitialized(); + } + + public static RogueMiracleInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RogueMiracleInfo(), input).checkInitialized(); + } + + public static RogueMiracleInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RogueMiracleInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating RogueMiracleInfo messages + */ + public static MessageFactory getFactory() { + return RogueMiracleInfoFactory.INSTANCE; + } + + private enum RogueMiracleInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public RogueMiracleInfo create() { + return RogueMiracleInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName miracleSelectInfo = FieldName.forField("miracleSelectInfo", "miracle_select_info"); + + static final FieldName achivedMiracleInfo = FieldName.forField("achivedMiracleInfo", "achived_miracle_info"); + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/RogueMiracleOuterClass.java b/src/generated/main/emu/lunarcore/proto/RogueMiracleOuterClass.java new file mode 100644 index 0000000..9a1b6bc --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/RogueMiracleOuterClass.java @@ -0,0 +1,941 @@ +// 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 RogueMiracleOuterClass { + /** + * Protobuf type {@code RogueMiracle} + */ + public static final class RogueMiracle extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 total_count = 1; + */ + private int totalCount; + + /** + * optional uint32 use_count = 2; + */ + private int useCount; + + /** + * optional uint32 miracle_id = 9; + */ + private int miracleId; + + /** + * optional uint32 EGBBHFMJLCB = 12; + */ + private int eGBBHFMJLCB; + + /** + * repeated .RogueMiracle.EffectCountEntry effect_count = 14; + */ + private final RepeatedMessage effectCount = RepeatedMessage.newEmptyInstance(EffectCountEntry.getFactory()); + + private RogueMiracle() { + } + + /** + * @return a new empty instance of {@code RogueMiracle} + */ + public static RogueMiracle newInstance() { + return new RogueMiracle(); + } + + /** + * optional uint32 total_count = 1; + * @return whether the totalCount field is set + */ + public boolean hasTotalCount() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 total_count = 1; + * @return this + */ + public RogueMiracle clearTotalCount() { + bitField0_ &= ~0x00000001; + totalCount = 0; + return this; + } + + /** + * optional uint32 total_count = 1; + * @return the totalCount + */ + public int getTotalCount() { + return totalCount; + } + + /** + * optional uint32 total_count = 1; + * @param value the totalCount to set + * @return this + */ + public RogueMiracle setTotalCount(final int value) { + bitField0_ |= 0x00000001; + totalCount = value; + return this; + } + + /** + * optional uint32 use_count = 2; + * @return whether the useCount field is set + */ + public boolean hasUseCount() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 use_count = 2; + * @return this + */ + public RogueMiracle clearUseCount() { + bitField0_ &= ~0x00000002; + useCount = 0; + return this; + } + + /** + * optional uint32 use_count = 2; + * @return the useCount + */ + public int getUseCount() { + return useCount; + } + + /** + * optional uint32 use_count = 2; + * @param value the useCount to set + * @return this + */ + public RogueMiracle setUseCount(final int value) { + bitField0_ |= 0x00000002; + useCount = value; + return this; + } + + /** + * optional uint32 miracle_id = 9; + * @return whether the miracleId field is set + */ + public boolean hasMiracleId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 miracle_id = 9; + * @return this + */ + public RogueMiracle clearMiracleId() { + bitField0_ &= ~0x00000004; + miracleId = 0; + return this; + } + + /** + * optional uint32 miracle_id = 9; + * @return the miracleId + */ + public int getMiracleId() { + return miracleId; + } + + /** + * optional uint32 miracle_id = 9; + * @param value the miracleId to set + * @return this + */ + public RogueMiracle setMiracleId(final int value) { + bitField0_ |= 0x00000004; + miracleId = value; + return this; + } + + /** + * optional uint32 EGBBHFMJLCB = 12; + * @return whether the eGBBHFMJLCB field is set + */ + public boolean hasEGBBHFMJLCB() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 EGBBHFMJLCB = 12; + * @return this + */ + public RogueMiracle clearEGBBHFMJLCB() { + bitField0_ &= ~0x00000008; + eGBBHFMJLCB = 0; + return this; + } + + /** + * optional uint32 EGBBHFMJLCB = 12; + * @return the eGBBHFMJLCB + */ + public int getEGBBHFMJLCB() { + return eGBBHFMJLCB; + } + + /** + * optional uint32 EGBBHFMJLCB = 12; + * @param value the eGBBHFMJLCB to set + * @return this + */ + public RogueMiracle setEGBBHFMJLCB(final int value) { + bitField0_ |= 0x00000008; + eGBBHFMJLCB = value; + return this; + } + + /** + * repeated .RogueMiracle.EffectCountEntry effect_count = 14; + * @return whether the effectCount field is set + */ + public boolean hasEffectCount() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated .RogueMiracle.EffectCountEntry effect_count = 14; + * @return this + */ + public RogueMiracle clearEffectCount() { + bitField0_ &= ~0x00000010; + effectCount.clear(); + return this; + } + + /** + * repeated .RogueMiracle.EffectCountEntry effect_count = 14; + * + * 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 #getMutableEffectCount()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getEffectCount() { + return effectCount; + } + + /** + * repeated .RogueMiracle.EffectCountEntry effect_count = 14; + * + * 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 getMutableEffectCount() { + bitField0_ |= 0x00000010; + return effectCount; + } + + /** + * repeated .RogueMiracle.EffectCountEntry effect_count = 14; + * @param value the effectCount to add + * @return this + */ + public RogueMiracle addEffectCount(final EffectCountEntry value) { + bitField0_ |= 0x00000010; + effectCount.add(value); + return this; + } + + /** + * repeated .RogueMiracle.EffectCountEntry effect_count = 14; + * @param values the effectCount to add + * @return this + */ + public RogueMiracle addAllEffectCount(final EffectCountEntry... values) { + bitField0_ |= 0x00000010; + effectCount.addAll(values); + return this; + } + + @Override + public RogueMiracle copyFrom(final RogueMiracle other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + totalCount = other.totalCount; + useCount = other.useCount; + miracleId = other.miracleId; + eGBBHFMJLCB = other.eGBBHFMJLCB; + effectCount.copyFrom(other.effectCount); + } + return this; + } + + @Override + public RogueMiracle mergeFrom(final RogueMiracle other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTotalCount()) { + setTotalCount(other.totalCount); + } + if (other.hasUseCount()) { + setUseCount(other.useCount); + } + if (other.hasMiracleId()) { + setMiracleId(other.miracleId); + } + if (other.hasEGBBHFMJLCB()) { + setEGBBHFMJLCB(other.eGBBHFMJLCB); + } + if (other.hasEffectCount()) { + getMutableEffectCount().addAll(other.effectCount); + } + return this; + } + + @Override + public RogueMiracle clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + totalCount = 0; + useCount = 0; + miracleId = 0; + eGBBHFMJLCB = 0; + effectCount.clear(); + return this; + } + + @Override + public RogueMiracle clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + effectCount.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RogueMiracle)) { + return false; + } + RogueMiracle other = (RogueMiracle) o; + return bitField0_ == other.bitField0_ + && (!hasTotalCount() || totalCount == other.totalCount) + && (!hasUseCount() || useCount == other.useCount) + && (!hasMiracleId() || miracleId == other.miracleId) + && (!hasEGBBHFMJLCB() || eGBBHFMJLCB == other.eGBBHFMJLCB) + && (!hasEffectCount() || effectCount.equals(other.effectCount)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(totalCount); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(useCount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 72); + output.writeUInt32NoTag(miracleId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 96); + output.writeUInt32NoTag(eGBBHFMJLCB); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < effectCount.length(); i++) { + output.writeRawByte((byte) 114); + output.writeMessageNoTag(effectCount.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(totalCount); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(useCount); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(miracleId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(eGBBHFMJLCB); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * effectCount.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(effectCount); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RogueMiracle mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // totalCount + totalCount = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // useCount + useCount = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // miracleId + miracleId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 96) { + break; + } + } + case 96: { + // eGBBHFMJLCB + eGBBHFMJLCB = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 114) { + break; + } + } + case 114: { + // effectCount + tag = input.readRepeatedMessage(effectCount, tag); + bitField0_ |= 0x00000010; + 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.totalCount, totalCount); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.useCount, useCount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.miracleId, miracleId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.eGBBHFMJLCB, eGBBHFMJLCB); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.effectCount, effectCount); + } + output.endObject(); + } + + @Override + public RogueMiracle mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -731385813: + case -407761836: { + if (input.isAtField(FieldNames.totalCount)) { + if (!input.trySkipNullValue()) { + totalCount = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -309069880: + case -200869801: { + if (input.isAtField(FieldNames.useCount)) { + if (!input.trySkipNullValue()) { + useCount = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -164571796: + case -806736983: { + if (input.isAtField(FieldNames.miracleId)) { + if (!input.trySkipNullValue()) { + miracleId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1078492686: { + if (input.isAtField(FieldNames.eGBBHFMJLCB)) { + if (!input.trySkipNullValue()) { + eGBBHFMJLCB = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1635252734: + case -56410911: { + if (input.isAtField(FieldNames.effectCount)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(effectCount); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RogueMiracle clone() { + return new RogueMiracle().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RogueMiracle parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RogueMiracle(), data).checkInitialized(); + } + + public static RogueMiracle parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RogueMiracle(), input).checkInitialized(); + } + + public static RogueMiracle parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RogueMiracle(), input).checkInitialized(); + } + + /** + * @return factory for creating RogueMiracle messages + */ + public static MessageFactory getFactory() { + return RogueMiracleFactory.INSTANCE; + } + + /** + * Protobuf type {@code EffectCountEntry} + */ + public static final class EffectCountEntry extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 key = 1; + */ + private int key; + + /** + * optional uint32 value = 2; + */ + private int value_; + + private EffectCountEntry() { + } + + /** + * @return a new empty instance of {@code EffectCountEntry} + */ + public static EffectCountEntry newInstance() { + return new EffectCountEntry(); + } + + /** + * optional uint32 key = 1; + * @return whether the key field is set + */ + public boolean hasKey() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 key = 1; + * @return this + */ + public EffectCountEntry clearKey() { + bitField0_ &= ~0x00000001; + key = 0; + return this; + } + + /** + * optional uint32 key = 1; + * @return the key + */ + public int getKey() { + return key; + } + + /** + * optional uint32 key = 1; + * @param value the key to set + * @return this + */ + public EffectCountEntry setKey(final int value) { + bitField0_ |= 0x00000001; + key = value; + return this; + } + + /** + * optional uint32 value = 2; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 value = 2; + * @return this + */ + public EffectCountEntry clearValue() { + bitField0_ &= ~0x00000002; + value_ = 0; + return this; + } + + /** + * optional uint32 value = 2; + * @return the value_ + */ + public int getValue() { + return value_; + } + + /** + * optional uint32 value = 2; + * @param value the value_ to set + * @return this + */ + public EffectCountEntry setValue(final int value) { + bitField0_ |= 0x00000002; + value_ = value; + return this; + } + + @Override + public EffectCountEntry copyFrom(final EffectCountEntry other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + key = other.key; + value_ = other.value_; + } + return this; + } + + @Override + public EffectCountEntry mergeFrom(final EffectCountEntry other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasKey()) { + setKey(other.key); + } + if (other.hasValue()) { + setValue(other.value_); + } + return this; + } + + @Override + public EffectCountEntry clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + key = 0; + value_ = 0; + return this; + } + + @Override + public EffectCountEntry 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 EffectCountEntry)) { + return false; + } + EffectCountEntry other = (EffectCountEntry) o; + return bitField0_ == other.bitField0_ + && (!hasKey() || key == other.key) + && (!hasValue() || value_ == other.value_); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(key); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(value_); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(key); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(value_); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public EffectCountEntry mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // key + key = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // value_ + value_ = input.readUInt32(); + 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.key, key); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.value_, value_); + } + output.endObject(); + } + + @Override + public EffectCountEntry mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 106079: { + if (input.isAtField(FieldNames.key)) { + if (!input.trySkipNullValue()) { + key = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 111972721: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public EffectCountEntry clone() { + return new EffectCountEntry().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static EffectCountEntry parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new EffectCountEntry(), data).checkInitialized(); + } + + public static EffectCountEntry parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new EffectCountEntry(), input).checkInitialized(); + } + + public static EffectCountEntry parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new EffectCountEntry(), input).checkInitialized(); + } + + /** + * @return factory for creating EffectCountEntry messages + */ + public static MessageFactory getFactory() { + return EffectCountEntryFactory.INSTANCE; + } + + private enum EffectCountEntryFactory implements MessageFactory { + INSTANCE; + + @Override + public EffectCountEntry create() { + return EffectCountEntry.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName key = FieldName.forField("key"); + + static final FieldName value_ = FieldName.forField("value"); + } + } + + private enum RogueMiracleFactory implements MessageFactory { + INSTANCE; + + @Override + public RogueMiracle create() { + return RogueMiracle.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName totalCount = FieldName.forField("totalCount", "total_count"); + + static final FieldName useCount = FieldName.forField("useCount", "use_count"); + + static final FieldName miracleId = FieldName.forField("miracleId", "miracle_id"); + + static final FieldName eGBBHFMJLCB = FieldName.forField("EGBBHFMJLCB"); + + static final FieldName effectCount = FieldName.forField("effectCount", "effect_count"); + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/RogueMiracleSelectInfoOuterClass.java b/src/generated/main/emu/lunarcore/proto/RogueMiracleSelectInfoOuterClass.java new file mode 100644 index 0000000..dc7507c --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/RogueMiracleSelectInfoOuterClass.java @@ -0,0 +1,606 @@ +// 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 RogueMiracleSelectInfoOuterClass { + /** + * Protobuf type {@code RogueMiracleSelectInfo} + */ + public static final class RogueMiracleSelectInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bool show_handbook_hint = 15; + */ + private boolean showHandbookHint; + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 7; + */ + private final RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo achivedMiracleInfo = RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo.newInstance(); + + /** + * repeated uint32 miracle_id_list = 8; + */ + private final RepeatedInt miracleIdList = RepeatedInt.newEmptyInstance(); + + /** + * repeated uint32 FBCFOBKNEJB = 12; + */ + private final RepeatedInt fBCFOBKNEJB = RepeatedInt.newEmptyInstance(); + + private RogueMiracleSelectInfo() { + } + + /** + * @return a new empty instance of {@code RogueMiracleSelectInfo} + */ + public static RogueMiracleSelectInfo newInstance() { + return new RogueMiracleSelectInfo(); + } + + /** + * optional bool show_handbook_hint = 15; + * @return whether the showHandbookHint field is set + */ + public boolean hasShowHandbookHint() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bool show_handbook_hint = 15; + * @return this + */ + public RogueMiracleSelectInfo clearShowHandbookHint() { + bitField0_ &= ~0x00000001; + showHandbookHint = false; + return this; + } + + /** + * optional bool show_handbook_hint = 15; + * @return the showHandbookHint + */ + public boolean getShowHandbookHint() { + return showHandbookHint; + } + + /** + * optional bool show_handbook_hint = 15; + * @param value the showHandbookHint to set + * @return this + */ + public RogueMiracleSelectInfo setShowHandbookHint(final boolean value) { + bitField0_ |= 0x00000001; + showHandbookHint = value; + return this; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 7; + * @return whether the achivedMiracleInfo field is set + */ + public boolean hasAchivedMiracleInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 7; + * @return this + */ + public RogueMiracleSelectInfo clearAchivedMiracleInfo() { + bitField0_ &= ~0x00000002; + achivedMiracleInfo.clear(); + return this; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 7; + * + * 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 #getMutableAchivedMiracleInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo getAchivedMiracleInfo() { + return achivedMiracleInfo; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 7; + * + * 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 RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo getMutableAchivedMiracleInfo( + ) { + bitField0_ |= 0x00000002; + return achivedMiracleInfo; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 7; + * @param value the achivedMiracleInfo to set + * @return this + */ + public RogueMiracleSelectInfo setAchivedMiracleInfo( + final RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo value) { + bitField0_ |= 0x00000002; + achivedMiracleInfo.copyFrom(value); + return this; + } + + /** + * repeated uint32 miracle_id_list = 8; + * @return whether the miracleIdList field is set + */ + public boolean hasMiracleIdList() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint32 miracle_id_list = 8; + * @return this + */ + public RogueMiracleSelectInfo clearMiracleIdList() { + bitField0_ &= ~0x00000004; + miracleIdList.clear(); + return this; + } + + /** + * repeated uint32 miracle_id_list = 8; + * + * 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 #getMutableMiracleIdList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getMiracleIdList() { + return miracleIdList; + } + + /** + * repeated uint32 miracle_id_list = 8; + * + * 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 getMutableMiracleIdList() { + bitField0_ |= 0x00000004; + return miracleIdList; + } + + /** + * repeated uint32 miracle_id_list = 8; + * @param value the miracleIdList to add + * @return this + */ + public RogueMiracleSelectInfo addMiracleIdList(final int value) { + bitField0_ |= 0x00000004; + miracleIdList.add(value); + return this; + } + + /** + * repeated uint32 miracle_id_list = 8; + * @param values the miracleIdList to add + * @return this + */ + public RogueMiracleSelectInfo addAllMiracleIdList(final int... values) { + bitField0_ |= 0x00000004; + miracleIdList.addAll(values); + return this; + } + + /** + * repeated uint32 FBCFOBKNEJB = 12; + * @return whether the fBCFOBKNEJB field is set + */ + public boolean hasFBCFOBKNEJB() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated uint32 FBCFOBKNEJB = 12; + * @return this + */ + public RogueMiracleSelectInfo clearFBCFOBKNEJB() { + bitField0_ &= ~0x00000008; + fBCFOBKNEJB.clear(); + return this; + } + + /** + * repeated uint32 FBCFOBKNEJB = 12; + * + * 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 #getMutableFBCFOBKNEJB()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getFBCFOBKNEJB() { + return fBCFOBKNEJB; + } + + /** + * repeated uint32 FBCFOBKNEJB = 12; + * + * 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 getMutableFBCFOBKNEJB() { + bitField0_ |= 0x00000008; + return fBCFOBKNEJB; + } + + /** + * repeated uint32 FBCFOBKNEJB = 12; + * @param value the fBCFOBKNEJB to add + * @return this + */ + public RogueMiracleSelectInfo addFBCFOBKNEJB(final int value) { + bitField0_ |= 0x00000008; + fBCFOBKNEJB.add(value); + return this; + } + + /** + * repeated uint32 FBCFOBKNEJB = 12; + * @param values the fBCFOBKNEJB to add + * @return this + */ + public RogueMiracleSelectInfo addAllFBCFOBKNEJB(final int... values) { + bitField0_ |= 0x00000008; + fBCFOBKNEJB.addAll(values); + return this; + } + + @Override + public RogueMiracleSelectInfo copyFrom(final RogueMiracleSelectInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + showHandbookHint = other.showHandbookHint; + achivedMiracleInfo.copyFrom(other.achivedMiracleInfo); + miracleIdList.copyFrom(other.miracleIdList); + fBCFOBKNEJB.copyFrom(other.fBCFOBKNEJB); + } + return this; + } + + @Override + public RogueMiracleSelectInfo mergeFrom(final RogueMiracleSelectInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasShowHandbookHint()) { + setShowHandbookHint(other.showHandbookHint); + } + if (other.hasAchivedMiracleInfo()) { + getMutableAchivedMiracleInfo().mergeFrom(other.achivedMiracleInfo); + } + if (other.hasMiracleIdList()) { + getMutableMiracleIdList().addAll(other.miracleIdList); + } + if (other.hasFBCFOBKNEJB()) { + getMutableFBCFOBKNEJB().addAll(other.fBCFOBKNEJB); + } + return this; + } + + @Override + public RogueMiracleSelectInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + showHandbookHint = false; + achivedMiracleInfo.clear(); + miracleIdList.clear(); + fBCFOBKNEJB.clear(); + return this; + } + + @Override + public RogueMiracleSelectInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + achivedMiracleInfo.clearQuick(); + miracleIdList.clear(); + fBCFOBKNEJB.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RogueMiracleSelectInfo)) { + return false; + } + RogueMiracleSelectInfo other = (RogueMiracleSelectInfo) o; + return bitField0_ == other.bitField0_ + && (!hasShowHandbookHint() || showHandbookHint == other.showHandbookHint) + && (!hasAchivedMiracleInfo() || achivedMiracleInfo.equals(other.achivedMiracleInfo)) + && (!hasMiracleIdList() || miracleIdList.equals(other.miracleIdList)) + && (!hasFBCFOBKNEJB() || fBCFOBKNEJB.equals(other.fBCFOBKNEJB)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 120); + output.writeBoolNoTag(showHandbookHint); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(achivedMiracleInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < miracleIdList.length(); i++) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(miracleIdList.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < fBCFOBKNEJB.length(); i++) { + output.writeRawByte((byte) 96); + output.writeUInt32NoTag(fBCFOBKNEJB.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(achivedMiracleInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * miracleIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(miracleIdList); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * fBCFOBKNEJB.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(fBCFOBKNEJB); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RogueMiracleSelectInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 120: { + // showHandbookHint + showHandbookHint = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // achivedMiracleInfo + input.readMessage(achivedMiracleInfo); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 66) { + break; + } + } + case 66: { + // miracleIdList [packed=true] + input.readPackedUInt32(miracleIdList, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 98) { + break; + } + } + case 98: { + // fBCFOBKNEJB [packed=true] + input.readPackedUInt32(fBCFOBKNEJB, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 64: { + // miracleIdList [packed=false] + tag = input.readRepeatedUInt32(miracleIdList, tag); + bitField0_ |= 0x00000004; + break; + } + case 96: { + // fBCFOBKNEJB [packed=false] + tag = input.readRepeatedUInt32(fBCFOBKNEJB, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.showHandbookHint, showHandbookHint); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.achivedMiracleInfo, achivedMiracleInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.miracleIdList, miracleIdList); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.fBCFOBKNEJB, fBCFOBKNEJB); + } + output.endObject(); + } + + @Override + public RogueMiracleSelectInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1843696100: + case 641745100: { + if (input.isAtField(FieldNames.showHandbookHint)) { + if (!input.trySkipNullValue()) { + showHandbookHint = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -213623475: + case -431790391: { + if (input.isAtField(FieldNames.achivedMiracleInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(achivedMiracleInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 500458538: + case 411639668: { + if (input.isAtField(FieldNames.miracleIdList)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(miracleIdList); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1360731384: { + if (input.isAtField(FieldNames.fBCFOBKNEJB)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(fBCFOBKNEJB); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RogueMiracleSelectInfo clone() { + return new RogueMiracleSelectInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RogueMiracleSelectInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RogueMiracleSelectInfo(), data).checkInitialized(); + } + + public static RogueMiracleSelectInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RogueMiracleSelectInfo(), input).checkInitialized(); + } + + public static RogueMiracleSelectInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RogueMiracleSelectInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating RogueMiracleSelectInfo messages + */ + public static MessageFactory getFactory() { + return RogueMiracleSelectInfoFactory.INSTANCE; + } + + private enum RogueMiracleSelectInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public RogueMiracleSelectInfo create() { + return RogueMiracleSelectInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName showHandbookHint = FieldName.forField("showHandbookHint", "show_handbook_hint"); + + static final FieldName achivedMiracleInfo = FieldName.forField("achivedMiracleInfo", "achived_miracle_info"); + + static final FieldName miracleIdList = FieldName.forField("miracleIdList", "miracle_id_list"); + + static final FieldName fBCFOBKNEJB = FieldName.forField("FBCFOBKNEJB"); + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/RogueMiracleSourceOuterClass.java b/src/generated/main/emu/lunarcore/proto/RogueMiracleSourceOuterClass.java new file mode 100644 index 0000000..5cadec1 --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/RogueMiracleSourceOuterClass.java @@ -0,0 +1,295 @@ +// 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 RogueMiracleSourceOuterClass { + /** + * Protobuf enum {@code RogueMiracleSource} + */ + public enum RogueMiracleSource implements ProtoEnum { + /** + * ROGUE_MIRACLE_SOURCE_TYPE_NONE = 0; + */ + ROGUE_MIRACLE_SOURCE_TYPE_NONE("ROGUE_MIRACLE_SOURCE_TYPE_NONE", 0), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_SELECT = 1; + */ + ROGUE_MIRACLE_SOURCE_TYPE_SELECT("ROGUE_MIRACLE_SOURCE_TYPE_SELECT", 1), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_DIALOGUE = 2; + */ + ROGUE_MIRACLE_SOURCE_TYPE_DIALOGUE("ROGUE_MIRACLE_SOURCE_TYPE_DIALOGUE", 2), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_BONUS = 3; + */ + ROGUE_MIRACLE_SOURCE_TYPE_BONUS("ROGUE_MIRACLE_SOURCE_TYPE_BONUS", 3), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_USE = 4; + */ + ROGUE_MIRACLE_SOURCE_TYPE_USE("ROGUE_MIRACLE_SOURCE_TYPE_USE", 4), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_RESET = 5; + */ + ROGUE_MIRACLE_SOURCE_TYPE_RESET("ROGUE_MIRACLE_SOURCE_TYPE_RESET", 5), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_REPLACE = 6; + */ + ROGUE_MIRACLE_SOURCE_TYPE_REPLACE("ROGUE_MIRACLE_SOURCE_TYPE_REPLACE", 6), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_TRADE = 7; + */ + ROGUE_MIRACLE_SOURCE_TYPE_TRADE("ROGUE_MIRACLE_SOURCE_TYPE_TRADE", 7), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_GET = 8; + */ + ROGUE_MIRACLE_SOURCE_TYPE_GET("ROGUE_MIRACLE_SOURCE_TYPE_GET", 8), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_SHOP = 9; + */ + ROGUE_MIRACLE_SOURCE_TYPE_SHOP("ROGUE_MIRACLE_SOURCE_TYPE_SHOP", 9), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_MAZE_SKILL = 10; + */ + ROGUE_MIRACLE_SOURCE_TYPE_MAZE_SKILL("ROGUE_MIRACLE_SOURCE_TYPE_MAZE_SKILL", 10), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_LEVEL_MECHANISM = 11; + */ + ROGUE_MIRACLE_SOURCE_TYPE_LEVEL_MECHANISM("ROGUE_MIRACLE_SOURCE_TYPE_LEVEL_MECHANISM", 11), + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_ENDLESS_LEVEL_START = 12; + */ + ROGUE_MIRACLE_SOURCE_TYPE_ENDLESS_LEVEL_START("ROGUE_MIRACLE_SOURCE_TYPE_ENDLESS_LEVEL_START", 12); + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_NONE = 0; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_NONE_VALUE = 0; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_SELECT = 1; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_SELECT_VALUE = 1; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_DIALOGUE = 2; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_DIALOGUE_VALUE = 2; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_BONUS = 3; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_BONUS_VALUE = 3; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_USE = 4; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_USE_VALUE = 4; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_RESET = 5; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_RESET_VALUE = 5; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_REPLACE = 6; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_REPLACE_VALUE = 6; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_TRADE = 7; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_TRADE_VALUE = 7; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_GET = 8; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_GET_VALUE = 8; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_SHOP = 9; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_SHOP_VALUE = 9; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_MAZE_SKILL = 10; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_MAZE_SKILL_VALUE = 10; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_LEVEL_MECHANISM = 11; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_LEVEL_MECHANISM_VALUE = 11; + + /** + * ROGUE_MIRACLE_SOURCE_TYPE_ENDLESS_LEVEL_START = 12; + */ + public static final int ROGUE_MIRACLE_SOURCE_TYPE_ENDLESS_LEVEL_START_VALUE = 12; + + private final String name; + + private final int number; + + private RogueMiracleSource(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 converter() { + return RogueMiracleSourceConverter.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 RogueMiracleSource forNumber(int value) { + return RogueMiracleSourceConverter.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 RogueMiracleSource forNumberOr(int number, RogueMiracleSource other) { + RogueMiracleSource value = forNumber(number); + return value == null ? other : value; + } + + enum RogueMiracleSourceConverter implements ProtoEnum.EnumConverter { + INSTANCE; + + private static final RogueMiracleSource[] lookup = new RogueMiracleSource[13]; + + static { + lookup[0] = ROGUE_MIRACLE_SOURCE_TYPE_NONE; + lookup[1] = ROGUE_MIRACLE_SOURCE_TYPE_SELECT; + lookup[2] = ROGUE_MIRACLE_SOURCE_TYPE_DIALOGUE; + lookup[3] = ROGUE_MIRACLE_SOURCE_TYPE_BONUS; + lookup[4] = ROGUE_MIRACLE_SOURCE_TYPE_USE; + lookup[5] = ROGUE_MIRACLE_SOURCE_TYPE_RESET; + lookup[6] = ROGUE_MIRACLE_SOURCE_TYPE_REPLACE; + lookup[7] = ROGUE_MIRACLE_SOURCE_TYPE_TRADE; + lookup[8] = ROGUE_MIRACLE_SOURCE_TYPE_GET; + lookup[9] = ROGUE_MIRACLE_SOURCE_TYPE_SHOP; + lookup[10] = ROGUE_MIRACLE_SOURCE_TYPE_MAZE_SKILL; + lookup[11] = ROGUE_MIRACLE_SOURCE_TYPE_LEVEL_MECHANISM; + lookup[12] = ROGUE_MIRACLE_SOURCE_TYPE_ENDLESS_LEVEL_START; + } + + @Override + public final RogueMiracleSource forNumber(final int value) { + if (value >= 0 && value < lookup.length) { + return lookup[value]; + } + return null; + } + + @Override + public final RogueMiracleSource forName(final CharSequence value) { + switch (value.length()) { + case 29: { + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_USE", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_USE; + } + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_GET", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_GET; + } + break; + } + case 30: { + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_NONE", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_NONE; + } + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_SHOP", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_SHOP; + } + break; + } + case 31: { + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_BONUS", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_BONUS; + } + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_RESET", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_RESET; + } + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_TRADE", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_TRADE; + } + break; + } + case 32: { + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_SELECT", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_SELECT; + } + break; + } + case 33: { + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_REPLACE", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_REPLACE; + } + break; + } + case 34: { + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_DIALOGUE", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_DIALOGUE; + } + break; + } + case 36: { + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_MAZE_SKILL", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_MAZE_SKILL; + } + break; + } + case 41: { + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_LEVEL_MECHANISM", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_LEVEL_MECHANISM; + } + break; + } + case 45: { + if (ProtoUtil.isEqual("ROGUE_MIRACLE_SOURCE_TYPE_ENDLESS_LEVEL_START", value)) { + return ROGUE_MIRACLE_SOURCE_TYPE_ENDLESS_LEVEL_START; + } + break; + } + } + return null; + } + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/SelectRogueMiracleCsReqOuterClass.java b/src/generated/main/emu/lunarcore/proto/SelectRogueMiracleCsReqOuterClass.java new file mode 100644 index 0000000..7b9b8cc --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/SelectRogueMiracleCsReqOuterClass.java @@ -0,0 +1,340 @@ +// 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 SelectRogueMiracleCsReqOuterClass { + /** + * Protobuf type {@code SelectRogueMiracleCsReq} + */ + public static final class SelectRogueMiracleCsReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 miracle_id = 2; + */ + private int miracleId; + + /** + * optional uint32 EGBBHFMJLCB = 5; + */ + private int eGBBHFMJLCB; + + private SelectRogueMiracleCsReq() { + } + + /** + * @return a new empty instance of {@code SelectRogueMiracleCsReq} + */ + public static SelectRogueMiracleCsReq newInstance() { + return new SelectRogueMiracleCsReq(); + } + + /** + * optional uint32 miracle_id = 2; + * @return whether the miracleId field is set + */ + public boolean hasMiracleId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 miracle_id = 2; + * @return this + */ + public SelectRogueMiracleCsReq clearMiracleId() { + bitField0_ &= ~0x00000001; + miracleId = 0; + return this; + } + + /** + * optional uint32 miracle_id = 2; + * @return the miracleId + */ + public int getMiracleId() { + return miracleId; + } + + /** + * optional uint32 miracle_id = 2; + * @param value the miracleId to set + * @return this + */ + public SelectRogueMiracleCsReq setMiracleId(final int value) { + bitField0_ |= 0x00000001; + miracleId = value; + return this; + } + + /** + * optional uint32 EGBBHFMJLCB = 5; + * @return whether the eGBBHFMJLCB field is set + */ + public boolean hasEGBBHFMJLCB() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 EGBBHFMJLCB = 5; + * @return this + */ + public SelectRogueMiracleCsReq clearEGBBHFMJLCB() { + bitField0_ &= ~0x00000002; + eGBBHFMJLCB = 0; + return this; + } + + /** + * optional uint32 EGBBHFMJLCB = 5; + * @return the eGBBHFMJLCB + */ + public int getEGBBHFMJLCB() { + return eGBBHFMJLCB; + } + + /** + * optional uint32 EGBBHFMJLCB = 5; + * @param value the eGBBHFMJLCB to set + * @return this + */ + public SelectRogueMiracleCsReq setEGBBHFMJLCB(final int value) { + bitField0_ |= 0x00000002; + eGBBHFMJLCB = value; + return this; + } + + @Override + public SelectRogueMiracleCsReq copyFrom(final SelectRogueMiracleCsReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + miracleId = other.miracleId; + eGBBHFMJLCB = other.eGBBHFMJLCB; + } + return this; + } + + @Override + public SelectRogueMiracleCsReq mergeFrom(final SelectRogueMiracleCsReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasMiracleId()) { + setMiracleId(other.miracleId); + } + if (other.hasEGBBHFMJLCB()) { + setEGBBHFMJLCB(other.eGBBHFMJLCB); + } + return this; + } + + @Override + public SelectRogueMiracleCsReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + miracleId = 0; + eGBBHFMJLCB = 0; + return this; + } + + @Override + public SelectRogueMiracleCsReq 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 SelectRogueMiracleCsReq)) { + return false; + } + SelectRogueMiracleCsReq other = (SelectRogueMiracleCsReq) o; + return bitField0_ == other.bitField0_ + && (!hasMiracleId() || miracleId == other.miracleId) + && (!hasEGBBHFMJLCB() || eGBBHFMJLCB == other.eGBBHFMJLCB); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(miracleId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(eGBBHFMJLCB); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(miracleId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(eGBBHFMJLCB); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SelectRogueMiracleCsReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // miracleId + miracleId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // eGBBHFMJLCB + eGBBHFMJLCB = input.readUInt32(); + 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.miracleId, miracleId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.eGBBHFMJLCB, eGBBHFMJLCB); + } + output.endObject(); + } + + @Override + public SelectRogueMiracleCsReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -164571796: + case -806736983: { + if (input.isAtField(FieldNames.miracleId)) { + if (!input.trySkipNullValue()) { + miracleId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1078492686: { + if (input.isAtField(FieldNames.eGBBHFMJLCB)) { + if (!input.trySkipNullValue()) { + eGBBHFMJLCB = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SelectRogueMiracleCsReq clone() { + return new SelectRogueMiracleCsReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SelectRogueMiracleCsReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SelectRogueMiracleCsReq(), data).checkInitialized(); + } + + public static SelectRogueMiracleCsReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SelectRogueMiracleCsReq(), input).checkInitialized(); + } + + public static SelectRogueMiracleCsReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SelectRogueMiracleCsReq(), input).checkInitialized(); + } + + /** + * @return factory for creating SelectRogueMiracleCsReq messages + */ + public static MessageFactory getFactory() { + return SelectRogueMiracleCsReqFactory.INSTANCE; + } + + private enum SelectRogueMiracleCsReqFactory implements MessageFactory { + INSTANCE; + + @Override + public SelectRogueMiracleCsReq create() { + return SelectRogueMiracleCsReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName miracleId = FieldName.forField("miracleId", "miracle_id"); + + static final FieldName eGBBHFMJLCB = FieldName.forField("EGBBHFMJLCB"); + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/SelectRogueMiracleScRspOuterClass.java b/src/generated/main/emu/lunarcore/proto/SelectRogueMiracleScRspOuterClass.java new file mode 100644 index 0000000..76fe8f0 --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/SelectRogueMiracleScRspOuterClass.java @@ -0,0 +1,466 @@ +// 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 SelectRogueMiracleScRspOuterClass { + /** + * Protobuf type {@code SelectRogueMiracleScRsp} + */ + public static final class SelectRogueMiracleScRsp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 retcode = 3; + */ + private int retcode; + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 2; + */ + private final RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo miracleSelectInfo = RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo.newInstance(); + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 6; + */ + private final RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo achivedMiracleInfo = RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo.newInstance(); + + private SelectRogueMiracleScRsp() { + } + + /** + * @return a new empty instance of {@code SelectRogueMiracleScRsp} + */ + public static SelectRogueMiracleScRsp newInstance() { + return new SelectRogueMiracleScRsp(); + } + + /** + * optional uint32 retcode = 3; + * @return whether the retcode field is set + */ + public boolean hasRetcode() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 retcode = 3; + * @return this + */ + public SelectRogueMiracleScRsp clearRetcode() { + bitField0_ &= ~0x00000001; + retcode = 0; + return this; + } + + /** + * optional uint32 retcode = 3; + * @return the retcode + */ + public int getRetcode() { + return retcode; + } + + /** + * optional uint32 retcode = 3; + * @param value the retcode to set + * @return this + */ + public SelectRogueMiracleScRsp setRetcode(final int value) { + bitField0_ |= 0x00000001; + retcode = value; + return this; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 2; + * @return whether the miracleSelectInfo field is set + */ + public boolean hasMiracleSelectInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 2; + * @return this + */ + public SelectRogueMiracleScRsp clearMiracleSelectInfo() { + bitField0_ &= ~0x00000002; + miracleSelectInfo.clear(); + return this; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 2; + * + * 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 #getMutableMiracleSelectInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo getMiracleSelectInfo() { + return miracleSelectInfo; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 2; + * + * 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 RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo getMutableMiracleSelectInfo() { + bitField0_ |= 0x00000002; + return miracleSelectInfo; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 2; + * @param value the miracleSelectInfo to set + * @return this + */ + public SelectRogueMiracleScRsp setMiracleSelectInfo( + final RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo value) { + bitField0_ |= 0x00000002; + miracleSelectInfo.copyFrom(value); + return this; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 6; + * @return whether the achivedMiracleInfo field is set + */ + public boolean hasAchivedMiracleInfo() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 6; + * @return this + */ + public SelectRogueMiracleScRsp clearAchivedMiracleInfo() { + bitField0_ &= ~0x00000004; + achivedMiracleInfo.clear(); + return this; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 6; + * + * 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 #getMutableAchivedMiracleInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo getAchivedMiracleInfo() { + return achivedMiracleInfo; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 6; + * + * 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 RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo getMutableAchivedMiracleInfo( + ) { + bitField0_ |= 0x00000004; + return achivedMiracleInfo; + } + + /** + * optional .RogueAchivedMiracleInfo achived_miracle_info = 6; + * @param value the achivedMiracleInfo to set + * @return this + */ + public SelectRogueMiracleScRsp setAchivedMiracleInfo( + final RogueAchivedMiracleInfoOuterClass.RogueAchivedMiracleInfo value) { + bitField0_ |= 0x00000004; + achivedMiracleInfo.copyFrom(value); + return this; + } + + @Override + public SelectRogueMiracleScRsp copyFrom(final SelectRogueMiracleScRsp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + retcode = other.retcode; + miracleSelectInfo.copyFrom(other.miracleSelectInfo); + achivedMiracleInfo.copyFrom(other.achivedMiracleInfo); + } + return this; + } + + @Override + public SelectRogueMiracleScRsp mergeFrom(final SelectRogueMiracleScRsp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRetcode()) { + setRetcode(other.retcode); + } + if (other.hasMiracleSelectInfo()) { + getMutableMiracleSelectInfo().mergeFrom(other.miracleSelectInfo); + } + if (other.hasAchivedMiracleInfo()) { + getMutableAchivedMiracleInfo().mergeFrom(other.achivedMiracleInfo); + } + return this; + } + + @Override + public SelectRogueMiracleScRsp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + retcode = 0; + miracleSelectInfo.clear(); + achivedMiracleInfo.clear(); + return this; + } + + @Override + public SelectRogueMiracleScRsp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + miracleSelectInfo.clearQuick(); + achivedMiracleInfo.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SelectRogueMiracleScRsp)) { + return false; + } + SelectRogueMiracleScRsp other = (SelectRogueMiracleScRsp) o; + return bitField0_ == other.bitField0_ + && (!hasRetcode() || retcode == other.retcode) + && (!hasMiracleSelectInfo() || miracleSelectInfo.equals(other.miracleSelectInfo)) + && (!hasAchivedMiracleInfo() || achivedMiracleInfo.equals(other.achivedMiracleInfo)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(retcode); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(miracleSelectInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(achivedMiracleInfo); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(miracleSelectInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(achivedMiracleInfo); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SelectRogueMiracleScRsp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // retcode + retcode = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // miracleSelectInfo + input.readMessage(miracleSelectInfo); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // achivedMiracleInfo + input.readMessage(achivedMiracleInfo); + 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.writeMessage(FieldNames.miracleSelectInfo, miracleSelectInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.achivedMiracleInfo, achivedMiracleInfo); + } + output.endObject(); + } + + @Override + public SelectRogueMiracleScRsp 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 -1009314021: + case -1608054973: { + if (input.isAtField(FieldNames.miracleSelectInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(miracleSelectInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -213623475: + case -431790391: { + if (input.isAtField(FieldNames.achivedMiracleInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(achivedMiracleInfo); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SelectRogueMiracleScRsp clone() { + return new SelectRogueMiracleScRsp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SelectRogueMiracleScRsp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SelectRogueMiracleScRsp(), data).checkInitialized(); + } + + public static SelectRogueMiracleScRsp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SelectRogueMiracleScRsp(), input).checkInitialized(); + } + + public static SelectRogueMiracleScRsp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SelectRogueMiracleScRsp(), input).checkInitialized(); + } + + /** + * @return factory for creating SelectRogueMiracleScRsp messages + */ + public static MessageFactory getFactory() { + return SelectRogueMiracleScRspFactory.INSTANCE; + } + + private enum SelectRogueMiracleScRspFactory implements MessageFactory { + INSTANCE; + + @Override + public SelectRogueMiracleScRsp create() { + return SelectRogueMiracleScRsp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName retcode = FieldName.forField("retcode"); + + static final FieldName miracleSelectInfo = FieldName.forField("miracleSelectInfo", "miracle_select_info"); + + static final FieldName achivedMiracleInfo = FieldName.forField("achivedMiracleInfo", "achived_miracle_info"); + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/SyncRogueMiracleSelectInfoScNotifyOuterClass.java b/src/generated/main/emu/lunarcore/proto/SyncRogueMiracleSelectInfoScNotifyOuterClass.java new file mode 100644 index 0000000..570a49a --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/SyncRogueMiracleSelectInfoScNotifyOuterClass.java @@ -0,0 +1,287 @@ +// 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 SyncRogueMiracleSelectInfoScNotifyOuterClass { + /** + * Protobuf type {@code SyncRogueMiracleSelectInfoScNotify} + */ + public static final class SyncRogueMiracleSelectInfoScNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 4; + */ + private final RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo miracleSelectInfo = RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo.newInstance(); + + private SyncRogueMiracleSelectInfoScNotify() { + } + + /** + * @return a new empty instance of {@code SyncRogueMiracleSelectInfoScNotify} + */ + public static SyncRogueMiracleSelectInfoScNotify newInstance() { + return new SyncRogueMiracleSelectInfoScNotify(); + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 4; + * @return whether the miracleSelectInfo field is set + */ + public boolean hasMiracleSelectInfo() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 4; + * @return this + */ + public SyncRogueMiracleSelectInfoScNotify clearMiracleSelectInfo() { + bitField0_ &= ~0x00000001; + miracleSelectInfo.clear(); + return this; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 4; + * + * 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 #getMutableMiracleSelectInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo getMiracleSelectInfo() { + return miracleSelectInfo; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 4; + * + * 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 RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo getMutableMiracleSelectInfo() { + bitField0_ |= 0x00000001; + return miracleSelectInfo; + } + + /** + * optional .RogueMiracleSelectInfo miracle_select_info = 4; + * @param value the miracleSelectInfo to set + * @return this + */ + public SyncRogueMiracleSelectInfoScNotify setMiracleSelectInfo( + final RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo value) { + bitField0_ |= 0x00000001; + miracleSelectInfo.copyFrom(value); + return this; + } + + @Override + public SyncRogueMiracleSelectInfoScNotify copyFrom( + final SyncRogueMiracleSelectInfoScNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + miracleSelectInfo.copyFrom(other.miracleSelectInfo); + } + return this; + } + + @Override + public SyncRogueMiracleSelectInfoScNotify mergeFrom( + final SyncRogueMiracleSelectInfoScNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasMiracleSelectInfo()) { + getMutableMiracleSelectInfo().mergeFrom(other.miracleSelectInfo); + } + return this; + } + + @Override + public SyncRogueMiracleSelectInfoScNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + miracleSelectInfo.clear(); + return this; + } + + @Override + public SyncRogueMiracleSelectInfoScNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + miracleSelectInfo.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SyncRogueMiracleSelectInfoScNotify)) { + return false; + } + SyncRogueMiracleSelectInfoScNotify other = (SyncRogueMiracleSelectInfoScNotify) o; + return bitField0_ == other.bitField0_ + && (!hasMiracleSelectInfo() || miracleSelectInfo.equals(other.miracleSelectInfo)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(miracleSelectInfo); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(miracleSelectInfo); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SyncRogueMiracleSelectInfoScNotify mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 34: { + // miracleSelectInfo + input.readMessage(miracleSelectInfo); + 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.writeMessage(FieldNames.miracleSelectInfo, miracleSelectInfo); + } + output.endObject(); + } + + @Override + public SyncRogueMiracleSelectInfoScNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1009314021: + case -1608054973: { + if (input.isAtField(FieldNames.miracleSelectInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(miracleSelectInfo); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SyncRogueMiracleSelectInfoScNotify clone() { + return new SyncRogueMiracleSelectInfoScNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SyncRogueMiracleSelectInfoScNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SyncRogueMiracleSelectInfoScNotify(), data).checkInitialized(); + } + + public static SyncRogueMiracleSelectInfoScNotify parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new SyncRogueMiracleSelectInfoScNotify(), input).checkInitialized(); + } + + public static SyncRogueMiracleSelectInfoScNotify parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new SyncRogueMiracleSelectInfoScNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating SyncRogueMiracleSelectInfoScNotify messages + */ + public static MessageFactory getFactory() { + return SyncRogueMiracleSelectInfoScNotifyFactory.INSTANCE; + } + + private enum SyncRogueMiracleSelectInfoScNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public SyncRogueMiracleSelectInfoScNotify create() { + return SyncRogueMiracleSelectInfoScNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName miracleSelectInfo = FieldName.forField("miracleSelectInfo", "miracle_select_info"); + } + } +} diff --git a/src/main/java/emu/lunarcore/data/GameDepot.java b/src/main/java/emu/lunarcore/data/GameDepot.java index 3a2b3d1..ca18aeb 100644 --- a/src/main/java/emu/lunarcore/data/GameDepot.java +++ b/src/main/java/emu/lunarcore/data/GameDepot.java @@ -18,7 +18,8 @@ public class GameDepot { // Rogue @Getter private static Int2ObjectMap rogueMapGen = new Int2ObjectOpenHashMap<>(); - @Getter private static List rogueBuffsList = new ArrayList<>(); + @Getter private static List rogueRandomBuffList = new ArrayList<>(); + @Getter private static List rogueRandomMiracleList = new ArrayList<>(); private static Int2ObjectMap> rogueMapDepot = new Int2ObjectOpenHashMap<>(); public static void addRelicMainAffix(RelicMainAffixExcel affix) { diff --git a/src/main/java/emu/lunarcore/data/excel/RogueBuffExcel.java b/src/main/java/emu/lunarcore/data/excel/RogueBuffExcel.java index 0f48455..0b9e5a8 100644 --- a/src/main/java/emu/lunarcore/data/excel/RogueBuffExcel.java +++ b/src/main/java/emu/lunarcore/data/excel/RogueBuffExcel.java @@ -23,7 +23,7 @@ public class RogueBuffExcel extends GameResource { @Override public void onLoad() { if (RogueBuffType >= 120 && RogueBuffType <= 126 && RogueBuffRarity >= 1 && RogueBuffRarity <= 3 && MazeBuffLevel == 1 && AeonID == 0) { - GameDepot.getRogueBuffsList().add(this); + GameDepot.getRogueRandomBuffList().add(this); } } } diff --git a/src/main/java/emu/lunarcore/data/excel/RogueMiracleExcel.java b/src/main/java/emu/lunarcore/data/excel/RogueMiracleExcel.java new file mode 100644 index 0000000..3d38b4e --- /dev/null +++ b/src/main/java/emu/lunarcore/data/excel/RogueMiracleExcel.java @@ -0,0 +1,27 @@ +package emu.lunarcore.data.excel; + +import emu.lunarcore.data.GameDepot; +import emu.lunarcore.data.GameResource; +import emu.lunarcore.data.ResourceType; + +import lombok.Getter; + +@Getter +@ResourceType(name = {"RogueMiracle.json"}) +public class RogueMiracleExcel extends GameResource { + private int MiracleID; + private boolean IsShow; + private int MiracleReward; + + @Override + public int getId() { + return MiracleID; + } + + @Override + public void onLoad() { + if (IsShow && MiracleReward > 0) { + GameDepot.getRogueRandomMiracleList().add(this); + } + } +} diff --git a/src/main/java/emu/lunarcore/game/rogue/RogueBuffData.java b/src/main/java/emu/lunarcore/game/rogue/RogueBuffData.java index 0dc37a0..995423a 100644 --- a/src/main/java/emu/lunarcore/game/rogue/RogueBuffData.java +++ b/src/main/java/emu/lunarcore/game/rogue/RogueBuffData.java @@ -6,21 +6,21 @@ import lombok.Getter; @Getter public class RogueBuffData { - private int buffId; + private int id; private int level; public RogueBuffData(int buffId, int level) { - this.buffId = buffId; + this.id = buffId; this.level = level; } public MazeBuff toMazeBuff() { - return new MazeBuff(buffId, level, 0, 0xffffffff); + return new MazeBuff(id, level, 0, 0xffffffff); } public RogueBuff toProto() { var proto = RogueBuff.newInstance() - .setBuffId(this.getBuffId()) + .setBuffId(this.getId()) .setLevel(this.getLevel()); return proto; diff --git a/src/main/java/emu/lunarcore/game/rogue/RogueBuffSelectMenu.java b/src/main/java/emu/lunarcore/game/rogue/RogueBuffSelectMenu.java index bd2e4a7..a77b076 100644 --- a/src/main/java/emu/lunarcore/game/rogue/RogueBuffSelectMenu.java +++ b/src/main/java/emu/lunarcore/game/rogue/RogueBuffSelectMenu.java @@ -36,7 +36,7 @@ public class RogueBuffSelectMenu { if (this.randomBuffs == null) { this.randomBuffs = new WeightedList<>(); - for (RogueBuffExcel excel : GameDepot.getRogueBuffsList()) { + for (var excel : GameDepot.getRogueRandomBuffList()) { if (rogue.getBuffs().containsKey(excel.getMazeBuffID())) { continue; } @@ -48,7 +48,7 @@ public class RogueBuffSelectMenu { this.getBuffs().clear(); while (this.getBuffs().size() < this.getMaxBuffs()) { - RogueBuffExcel excel = this.randomBuffs.next(); + var excel = this.randomBuffs.next(); this.getBuffs().add(new RogueBuffData(excel.getMazeBuffID(), 1)); } } diff --git a/src/main/java/emu/lunarcore/game/rogue/RogueInstance.java b/src/main/java/emu/lunarcore/game/rogue/RogueInstance.java index 1fa9659..bd5d601 100644 --- a/src/main/java/emu/lunarcore/game/rogue/RogueInstance.java +++ b/src/main/java/emu/lunarcore/game/rogue/RogueInstance.java @@ -13,11 +13,11 @@ import emu.lunarcore.proto.RogueBuffInfoOuterClass.RogueBuffInfo; import emu.lunarcore.proto.RogueBuffSourceOuterClass.RogueBuffSource; import emu.lunarcore.proto.RogueCurrentInfoOuterClass.RogueCurrentInfo; import emu.lunarcore.proto.RogueMapInfoOuterClass.RogueMapInfo; +import emu.lunarcore.proto.RogueMiracleInfoOuterClass.RogueMiracleInfo; +import emu.lunarcore.proto.RogueMiracleSourceOuterClass.RogueMiracleSource; import emu.lunarcore.proto.RogueRoomStatusOuterClass.RogueRoomStatus; import emu.lunarcore.proto.RogueStatusOuterClass.RogueStatus; -import emu.lunarcore.server.packet.send.PacketAddRogueBuffScNotify; -import emu.lunarcore.server.packet.send.PacketSyncRogueBuffSelectInfoScNotify; -import emu.lunarcore.server.packet.send.PacketSyncRogueMapRoomScNotify; +import emu.lunarcore.server.packet.send.*; import emu.lunarcore.util.Utils; import lombok.Getter; @@ -34,9 +34,12 @@ public class RogueInstance { private Set baseAvatarIds; private Map buffs; + private Map miracles; - private RogueBuffSelectMenu buffSelect; private int pendingBuffSelects; + private RogueBuffSelectMenu buffSelect; + private int pendingMiracleSelects; + private RogueMiracleSelectMenu miracleSelect; @Deprecated // Morphia only! public RogueInstance() {} @@ -48,6 +51,7 @@ public class RogueInstance { this.currentRoomProgress = 0; this.baseAvatarIds = new HashSet<>(); this.buffs = new HashMap<>(); + this.miracles = new HashMap<>(); this.initRooms(); } @@ -103,19 +107,56 @@ public class RogueInstance { RogueBuffData buff = this.getBuffSelect().getBuffs() .stream() - .filter(b -> b.getBuffId() == buffId) + .filter(b -> b.getId() == buffId) .findFirst() .orElse(null); if (buff == null) return null; this.buffSelect = null; - this.getBuffs().put(buff.getBuffId(), buff); + this.getBuffs().put(buff.getId(), buff); getPlayer().sendPacket(new PacketAddRogueBuffScNotify(buff, RogueBuffSource.ROGUE_BUFF_SOURCE_TYPE_SELECT)); return buff; } + public synchronized void createMiracleSelect(int amount) { + this.pendingMiracleSelects += amount; + + RogueMiracleSelectMenu miracleSelect = this.updateMiracleSelect(); + if (miracleSelect != null) { + getPlayer().sendPacket(new PacketSyncRogueMiracleSelectInfoScNotify(miracleSelect)); + } + } + + public synchronized RogueMiracleSelectMenu updateMiracleSelect() { + if (this.pendingMiracleSelects > 0 && this.getMiracleSelect() == null) { + this.miracleSelect = new RogueMiracleSelectMenu(this); + this.pendingMiracleSelects--; + return this.miracleSelect; + } + + return null; + } + + public synchronized RogueMiracleData selectMiracle(int miracleId) { + if (this.getMiracleSelect() == null) return null; + + RogueMiracleData miracle = this.getMiracleSelect().getMiracles() + .stream() + .filter(b -> b.getId() == miracleId) + .findFirst() + .orElse(null); + + if (miracle == null) return null; + + this.miracleSelect = null; + this.getMiracles().put(miracle.getId(), miracle); + getPlayer().sendPacket(new PacketAddRogueMiracleScNotify(miracle, RogueMiracleSource.ROGUE_MIRACLE_SOURCE_TYPE_SELECT)); + + return miracle; + } + public synchronized RogueRoomData enterRoom(int siteId) { // Set status on previous room RogueRoomData prevRoom = getCurrentRoom(); @@ -184,6 +225,9 @@ public class RogueInstance { if (this.getBuffSelect() != null) { this.getBuffSelect().onLoad(this); } + if (this.getMiracleSelect() != null) { + this.getMiracleSelect().onLoad(this); + } } // Serialization @@ -191,13 +235,13 @@ public class RogueInstance { public RogueCurrentInfo toProto() { var proto = RogueCurrentInfo.newInstance() .setStatus(this.getStatus()) - .setRoomMap(this.toMapProto()) - .setRogueBuffInfo(this.toBuffProto()); + .setRoomMap(this.toMapInfoProto()) + .setRogueBuffInfo(this.toBuffInfoProto()); return proto; } - public RogueMapInfo toMapProto() { + public RogueMapInfo toMapInfoProto() { var room = this.getCurrentRoom(); var proto = RogueMapInfo.newInstance() @@ -213,7 +257,7 @@ public class RogueInstance { return proto; } - public RogueBuffInfo toBuffProto() { + public RogueBuffInfo toBuffInfoProto() { var proto = RogueBuffInfo.newInstance(); if (this.getBuffSelect() != null) { @@ -229,4 +273,23 @@ public class RogueInstance { return proto; } + public RogueMiracleInfo toMiracleInfoProto() { + var proto = RogueMiracleInfo.newInstance(); + + if (this.getMiracleSelect() != null) { + proto.setMiracleSelectInfo(this.getMiracleSelect().toProto()); + } else { + proto.getMutableMiracleSelectInfo(); + } + + // Set flag for this so it gets serialized + proto.getMutableAchivedMiracleInfo(); + + for (var miracle : this.getMiracles().values()) { + proto.getMutableAchivedMiracleInfo().addRogueMiracleList(miracle.toProto()); + } + + return proto; + } + } \ No newline at end of file diff --git a/src/main/java/emu/lunarcore/game/rogue/RogueMiracleData.java b/src/main/java/emu/lunarcore/game/rogue/RogueMiracleData.java new file mode 100644 index 0000000..70ccc77 --- /dev/null +++ b/src/main/java/emu/lunarcore/game/rogue/RogueMiracleData.java @@ -0,0 +1,22 @@ +package emu.lunarcore.game.rogue; + +import emu.lunarcore.proto.RogueMiracleOuterClass.RogueMiracle; +import lombok.Getter; + +@Getter +public class RogueMiracleData { + private int id; + private boolean active; + + public RogueMiracleData(int miracleId) { + this.id = miracleId; + this.active = true; + } + + public RogueMiracle toProto() { + var proto = RogueMiracle.newInstance() + .setMiracleId(this.getId()); + + return proto; + } +} diff --git a/src/main/java/emu/lunarcore/game/rogue/RogueMiracleSelectMenu.java b/src/main/java/emu/lunarcore/game/rogue/RogueMiracleSelectMenu.java new file mode 100644 index 0000000..65c4834 --- /dev/null +++ b/src/main/java/emu/lunarcore/game/rogue/RogueMiracleSelectMenu.java @@ -0,0 +1,67 @@ +package emu.lunarcore.game.rogue; + +import java.util.ArrayList; +import java.util.List; + +import emu.lunarcore.data.GameDepot; +import emu.lunarcore.data.excel.RogueMiracleExcel; +import emu.lunarcore.proto.RogueMiracleSelectInfoOuterClass.RogueMiracleSelectInfo; +import emu.lunarcore.util.WeightedList; +import lombok.Getter; + +@Getter +public class RogueMiracleSelectMenu { + private transient RogueInstance rogue; + + private int maxMiracles; + private List miracles; + + // Cache + private transient WeightedList randomMiracles; + + @Deprecated // Morphia only! + public RogueMiracleSelectMenu() {} + + public RogueMiracleSelectMenu(RogueInstance rogue) { + this.rogue = rogue; + this.maxMiracles = 3; + this.miracles = new ArrayList<>(); + + this.generateRandomBuffs(); + } + + public void generateRandomBuffs() { + if (this.randomMiracles == null) { + this.randomMiracles = new WeightedList<>(); + + for (var excel : GameDepot.getRogueRandomMiracleList()) { + if (rogue.getBuffs().containsKey(excel.getMiracleID())) { + continue; + } + + this.randomMiracles.add(1.0, excel); + }; + } + + this.getMiracles().clear(); + + while (this.getMiracles().size() < this.getMaxMiracles()) { + var excel = this.randomMiracles.next(); + this.getMiracles().add(new RogueMiracleData(excel.getMiracleID())); + } + } + + protected void onLoad(RogueInstance rogue) { + this.rogue = rogue; + } + + public RogueMiracleSelectInfo toProto() { + var proto = RogueMiracleSelectInfo.newInstance(); + + for (var miracle : this.getMiracles()) { + proto.addAllMiracleIdList(miracle.getId()); + } + + return proto; + } +} diff --git a/src/main/java/emu/lunarcore/server/packet/recv/HandlerSelectRogueMiracleCsReq.java b/src/main/java/emu/lunarcore/server/packet/recv/HandlerSelectRogueMiracleCsReq.java new file mode 100644 index 0000000..63aa605 --- /dev/null +++ b/src/main/java/emu/lunarcore/server/packet/recv/HandlerSelectRogueMiracleCsReq.java @@ -0,0 +1,30 @@ +package emu.lunarcore.server.packet.recv; + +import emu.lunarcore.game.rogue.RogueMiracleData; +import emu.lunarcore.game.rogue.RogueMiracleSelectMenu; +import emu.lunarcore.proto.SelectRogueMiracleCsReqOuterClass.SelectRogueMiracleCsReq; +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.PacketSelectRogueMiracleScRsp; + +@Opcodes(CmdId.SelectRogueMiracleCsReq) +public class HandlerSelectRogueMiracleCsReq extends PacketHandler { + + @Override + public void handle(GameSession session, byte[] header, byte[] data) throws Exception { + var req = SelectRogueMiracleCsReq.parseFrom(data); + + if (session.getPlayer().getRogueInstance() != null) { + RogueMiracleData miracle = session.getPlayer().getRogueInstance().selectMiracle(req.getMiracleId()); + if (miracle != null) { + RogueMiracleSelectMenu miracleSelect = session.getPlayer().getRogueInstance().updateMiracleSelect(); + session.send(new PacketSelectRogueMiracleScRsp(miracle, miracleSelect)); + } + } + + session.send(CmdId.SelectRogueBuffScRsp); + } + +} diff --git a/src/main/java/emu/lunarcore/server/packet/send/PacketAddRogueMiracleScNotify.java b/src/main/java/emu/lunarcore/server/packet/send/PacketAddRogueMiracleScNotify.java new file mode 100644 index 0000000..c2fdc45 --- /dev/null +++ b/src/main/java/emu/lunarcore/server/packet/send/PacketAddRogueMiracleScNotify.java @@ -0,0 +1,20 @@ +package emu.lunarcore.server.packet.send; + +import emu.lunarcore.game.rogue.RogueMiracleData; +import emu.lunarcore.proto.AddRogueMiracleScNotifyOuterClass.AddRogueMiracleScNotify; +import emu.lunarcore.proto.RogueMiracleSourceOuterClass.RogueMiracleSource; +import emu.lunarcore.server.packet.BasePacket; +import emu.lunarcore.server.packet.CmdId; + +public class PacketAddRogueMiracleScNotify extends BasePacket { + + public PacketAddRogueMiracleScNotify(RogueMiracleData miracle, RogueMiracleSource rogueMiracleSource) { + super(CmdId.AddRogueMiracleScNotify); + + var data = AddRogueMiracleScNotify.newInstance() + .setRogueMiracle(miracle.toProto()) + .setSource(rogueMiracleSource); + + this.setData(data); + } +} diff --git a/src/main/java/emu/lunarcore/server/packet/send/PacketSelectRogueBuffScRsp.java b/src/main/java/emu/lunarcore/server/packet/send/PacketSelectRogueBuffScRsp.java index 8476a11..ce339af 100644 --- a/src/main/java/emu/lunarcore/server/packet/send/PacketSelectRogueBuffScRsp.java +++ b/src/main/java/emu/lunarcore/server/packet/send/PacketSelectRogueBuffScRsp.java @@ -12,7 +12,7 @@ public class PacketSelectRogueBuffScRsp extends BasePacket { super(CmdId.SelectRogueBuffScRsp); var data = SelectRogueBuffScRsp.newInstance() - .setMazeBuffId(buff.getBuffId()) + .setMazeBuffId(buff.getId()) .setMazeBuffLevel(buff.getLevel()); if (buffSelect != null) { diff --git a/src/main/java/emu/lunarcore/server/packet/send/PacketSelectRogueMiracleScRsp.java b/src/main/java/emu/lunarcore/server/packet/send/PacketSelectRogueMiracleScRsp.java new file mode 100644 index 0000000..3251437 --- /dev/null +++ b/src/main/java/emu/lunarcore/server/packet/send/PacketSelectRogueMiracleScRsp.java @@ -0,0 +1,24 @@ +package emu.lunarcore.server.packet.send; + +import emu.lunarcore.game.rogue.RogueMiracleData; +import emu.lunarcore.game.rogue.RogueMiracleSelectMenu; +import emu.lunarcore.proto.SelectRogueMiracleScRspOuterClass.SelectRogueMiracleScRsp; +import emu.lunarcore.server.packet.BasePacket; +import emu.lunarcore.server.packet.CmdId; + +public class PacketSelectRogueMiracleScRsp extends BasePacket { + + public PacketSelectRogueMiracleScRsp(RogueMiracleData miracle, RogueMiracleSelectMenu miracleSelect) { + super(CmdId.SelectRogueMiracleScRsp); + + var data = SelectRogueMiracleScRsp.newInstance(); + + if (miracleSelect != null) { + data.setMiracleSelectInfo(miracleSelect.toProto()); + } else { + data.getMutableMiracleSelectInfo(); + } + + this.setData(data); + } +} diff --git a/src/main/java/emu/lunarcore/server/packet/send/PacketSyncRogueMiracleSelectInfoScNotify.java b/src/main/java/emu/lunarcore/server/packet/send/PacketSyncRogueMiracleSelectInfoScNotify.java new file mode 100644 index 0000000..646b2b4 --- /dev/null +++ b/src/main/java/emu/lunarcore/server/packet/send/PacketSyncRogueMiracleSelectInfoScNotify.java @@ -0,0 +1,18 @@ +package emu.lunarcore.server.packet.send; + +import emu.lunarcore.game.rogue.RogueMiracleSelectMenu; +import emu.lunarcore.proto.SyncRogueMiracleSelectInfoScNotifyOuterClass.SyncRogueMiracleSelectInfoScNotify; +import emu.lunarcore.server.packet.BasePacket; +import emu.lunarcore.server.packet.CmdId; + +public class PacketSyncRogueMiracleSelectInfoScNotify extends BasePacket { + + public PacketSyncRogueMiracleSelectInfoScNotify(RogueMiracleSelectMenu miracleSelect) { + super(CmdId.SyncRogueMiracleSelectInfoScNotify); + + var data = SyncRogueMiracleSelectInfoScNotify.newInstance() + .setMiracleSelectInfo(miracleSelect.toProto()); + + this.setData(data); + } +}