diff --git a/src/generated/main/emu/lunarcore/proto/NpcExtraInfoOuterClass.java b/src/generated/main/emu/lunarcore/proto/NpcExtraInfoOuterClass.java new file mode 100644 index 0000000..e86c9e4 --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/NpcExtraInfoOuterClass.java @@ -0,0 +1,173 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.lunarcore.proto; + +import java.io.IOException; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; + +public final class NpcExtraInfoOuterClass { + /** + * Protobuf type {@code NpcExtraInfo} + */ + public static final class NpcExtraInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + private NpcExtraInfo() { + } + + /** + * @return a new empty instance of {@code NpcExtraInfo} + */ + public static NpcExtraInfo newInstance() { + return new NpcExtraInfo(); + } + + @Override + public NpcExtraInfo copyFrom(final NpcExtraInfo other) { + cachedSize = other.cachedSize; + return this; + } + + @Override + public NpcExtraInfo mergeFrom(final NpcExtraInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + return this; + } + + @Override + public NpcExtraInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + return this; + } + + @Override + public NpcExtraInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NpcExtraInfo)) { + return false; + } + NpcExtraInfo other = (NpcExtraInfo) o; + return true; + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + } + + @Override + protected int computeSerializedSize() { + int size = 0; + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NpcExtraInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + output.endObject(); + } + + @Override + public NpcExtraInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NpcExtraInfo clone() { + return new NpcExtraInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NpcExtraInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NpcExtraInfo(), data).checkInitialized(); + } + + public static NpcExtraInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NpcExtraInfo(), input).checkInitialized(); + } + + public static NpcExtraInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NpcExtraInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating NpcExtraInfo messages + */ + public static MessageFactory getFactory() { + return NpcExtraInfoFactory.INSTANCE; + } + + private enum NpcExtraInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public NpcExtraInfo create() { + return NpcExtraInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/SceneMonsterWaveOuterClass.java b/src/generated/main/emu/lunarcore/proto/SceneMonsterWaveOuterClass.java index a60696a..23f7803 100644 --- a/src/generated/main/emu/lunarcore/proto/SceneMonsterWaveOuterClass.java +++ b/src/generated/main/emu/lunarcore/proto/SceneMonsterWaveOuterClass.java @@ -29,6 +29,11 @@ public final class SceneMonsterWaveOuterClass { */ private int waveId; + /** + * optional .SceneMonsterWaveParam wave_param = 9; + */ + private final SceneMonsterWaveParamOuterClass.SceneMonsterWaveParam waveParam = SceneMonsterWaveParamOuterClass.SceneMonsterWaveParam.newInstance(); + /** * repeated .SceneMonster monster_list = 1; */ @@ -123,12 +128,70 @@ public final class SceneMonsterWaveOuterClass { return this; } + /** + * optional .SceneMonsterWaveParam wave_param = 9; + * @return whether the waveParam field is set + */ + public boolean hasWaveParam() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .SceneMonsterWaveParam wave_param = 9; + * @return this + */ + public SceneMonsterWave clearWaveParam() { + bitField0_ &= ~0x00000004; + waveParam.clear(); + return this; + } + + /** + * optional .SceneMonsterWaveParam wave_param = 9; + * + * 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 #getMutableWaveParam()} if you want to modify it. + * + * @return internal storage object for reading + */ + public SceneMonsterWaveParamOuterClass.SceneMonsterWaveParam getWaveParam() { + return waveParam; + } + + /** + * optional .SceneMonsterWaveParam wave_param = 9; + * + * 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 SceneMonsterWaveParamOuterClass.SceneMonsterWaveParam getMutableWaveParam() { + bitField0_ |= 0x00000004; + return waveParam; + } + + /** + * optional .SceneMonsterWaveParam wave_param = 9; + * @param value the waveParam to set + * @return this + */ + public SceneMonsterWave setWaveParam( + final SceneMonsterWaveParamOuterClass.SceneMonsterWaveParam value) { + bitField0_ |= 0x00000004; + waveParam.copyFrom(value); + return this; + } + /** * repeated .SceneMonster monster_list = 1; * @return whether the monsterList field is set */ public boolean hasMonsterList() { - return (bitField0_ & 0x00000004) != 0; + return (bitField0_ & 0x00000008) != 0; } /** @@ -136,7 +199,7 @@ public final class SceneMonsterWaveOuterClass { * @return this */ public SceneMonsterWave clearMonsterList() { - bitField0_ &= ~0x00000004; + bitField0_ &= ~0x00000008; monsterList.clear(); return this; } @@ -165,7 +228,7 @@ public final class SceneMonsterWaveOuterClass { * @return internal storage object for modifications */ public RepeatedMessage getMutableMonsterList() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; return monsterList; } @@ -175,7 +238,7 @@ public final class SceneMonsterWaveOuterClass { * @return this */ public SceneMonsterWave addMonsterList(final SceneMonsterOuterClass.SceneMonster value) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; monsterList.add(value); return this; } @@ -186,7 +249,7 @@ public final class SceneMonsterWaveOuterClass { * @return this */ public SceneMonsterWave addAllMonsterList(final SceneMonsterOuterClass.SceneMonster... values) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; monsterList.addAll(values); return this; } @@ -196,7 +259,7 @@ public final class SceneMonsterWaveOuterClass { * @return whether the dropList field is set */ public boolean hasDropList() { - return (bitField0_ & 0x00000008) != 0; + return (bitField0_ & 0x00000010) != 0; } /** @@ -204,7 +267,7 @@ public final class SceneMonsterWaveOuterClass { * @return this */ public SceneMonsterWave clearDropList() { - bitField0_ &= ~0x00000008; + bitField0_ &= ~0x00000010; dropList.clear(); return this; } @@ -233,7 +296,7 @@ public final class SceneMonsterWaveOuterClass { * @return internal storage object for modifications */ public RepeatedMessage getMutableDropList() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return dropList; } @@ -243,7 +306,7 @@ public final class SceneMonsterWaveOuterClass { * @return this */ public SceneMonsterWave addDropList(final ItemListOuterClass.ItemList value) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; dropList.add(value); return this; } @@ -254,7 +317,7 @@ public final class SceneMonsterWaveOuterClass { * @return this */ public SceneMonsterWave addAllDropList(final ItemListOuterClass.ItemList... values) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; dropList.addAll(values); return this; } @@ -266,6 +329,7 @@ public final class SceneMonsterWaveOuterClass { bitField0_ = other.bitField0_; stageId = other.stageId; waveId = other.waveId; + waveParam.copyFrom(other.waveParam); monsterList.copyFrom(other.monsterList); dropList.copyFrom(other.dropList); } @@ -284,6 +348,9 @@ public final class SceneMonsterWaveOuterClass { if (other.hasWaveId()) { setWaveId(other.waveId); } + if (other.hasWaveParam()) { + getMutableWaveParam().mergeFrom(other.waveParam); + } if (other.hasMonsterList()) { getMutableMonsterList().addAll(other.monsterList); } @@ -302,6 +369,7 @@ public final class SceneMonsterWaveOuterClass { bitField0_ = 0; stageId = 0; waveId = 0; + waveParam.clear(); monsterList.clear(); dropList.clear(); return this; @@ -314,6 +382,7 @@ public final class SceneMonsterWaveOuterClass { } cachedSize = -1; bitField0_ = 0; + waveParam.clearQuick(); monsterList.clearQuick(); dropList.clearQuick(); return this; @@ -331,6 +400,7 @@ public final class SceneMonsterWaveOuterClass { return bitField0_ == other.bitField0_ && (!hasStageId() || stageId == other.stageId) && (!hasWaveId() || waveId == other.waveId) + && (!hasWaveParam() || waveParam.equals(other.waveParam)) && (!hasMonsterList() || monsterList.equals(other.monsterList)) && (!hasDropList() || dropList.equals(other.dropList)); } @@ -346,12 +416,16 @@ public final class SceneMonsterWaveOuterClass { output.writeUInt32NoTag(waveId); } if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 74); + output.writeMessageNoTag(waveParam); + } + if ((bitField0_ & 0x00000008) != 0) { for (int i = 0; i < monsterList.length(); i++) { output.writeRawByte((byte) 10); output.writeMessageNoTag(monsterList.get(i)); } } - if ((bitField0_ & 0x00000008) != 0) { + if ((bitField0_ & 0x00000010) != 0) { for (int i = 0; i < dropList.length(); i++) { output.writeRawByte((byte) 82); output.writeMessageNoTag(dropList.get(i)); @@ -369,9 +443,12 @@ public final class SceneMonsterWaveOuterClass { size += 1 + ProtoSink.computeUInt32SizeNoTag(waveId); } if ((bitField0_ & 0x00000004) != 0) { - size += (1 * monsterList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(monsterList); + size += 1 + ProtoSink.computeMessageSizeNoTag(waveParam); } if ((bitField0_ & 0x00000008) != 0) { + size += (1 * monsterList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(monsterList); + } + if ((bitField0_ & 0x00000010) != 0) { size += (1 * dropList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(dropList); } return size; @@ -398,6 +475,15 @@ public final class SceneMonsterWaveOuterClass { waveId = input.readUInt32(); bitField0_ |= 0x00000002; tag = input.readTag(); + if (tag != 74) { + break; + } + } + case 74: { + // waveParam + input.readMessage(waveParam); + bitField0_ |= 0x00000004; + tag = input.readTag(); if (tag != 10) { break; } @@ -405,7 +491,7 @@ public final class SceneMonsterWaveOuterClass { case 10: { // monsterList tag = input.readRepeatedMessage(monsterList, tag); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; if (tag != 82) { break; } @@ -413,7 +499,7 @@ public final class SceneMonsterWaveOuterClass { case 82: { // dropList tag = input.readRepeatedMessage(dropList, tag); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; if (tag != 0) { break; } @@ -442,9 +528,12 @@ public final class SceneMonsterWaveOuterClass { output.writeUInt32(FieldNames.waveId, waveId); } if ((bitField0_ & 0x00000004) != 0) { - output.writeRepeatedMessage(FieldNames.monsterList, monsterList); + output.writeMessage(FieldNames.waveParam, waveParam); } if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.monsterList, monsterList); + } + if ((bitField0_ & 0x00000010) != 0) { output.writeRepeatedMessage(FieldNames.dropList, dropList); } output.endObject(); @@ -481,12 +570,24 @@ public final class SceneMonsterWaveOuterClass { } break; } + case 1529841940: + case 623259591: { + if (input.isAtField(FieldNames.waveParam)) { + if (!input.trySkipNullValue()) { + input.readMessage(waveParam); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } case 1541271448: case 552401379: { if (input.isAtField(FieldNames.monsterList)) { if (!input.trySkipNullValue()) { input.readRepeatedMessage(monsterList); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } } else { input.skipUnknownField(); @@ -498,7 +599,7 @@ public final class SceneMonsterWaveOuterClass { if (input.isAtField(FieldNames.dropList)) { if (!input.trySkipNullValue()) { input.readRepeatedMessage(dropList); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; } } else { input.skipUnknownField(); @@ -562,6 +663,8 @@ public final class SceneMonsterWaveOuterClass { static final FieldName waveId = FieldName.forField("waveId", "wave_id"); + static final FieldName waveParam = FieldName.forField("waveParam", "wave_param"); + static final FieldName monsterList = FieldName.forField("monsterList", "monster_list"); static final FieldName dropList = FieldName.forField("dropList", "drop_list"); diff --git a/src/generated/main/emu/lunarcore/proto/SceneMonsterWaveParamOuterClass.java b/src/generated/main/emu/lunarcore/proto/SceneMonsterWaveParamOuterClass.java new file mode 100644 index 0000000..3b8d066 --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/SceneMonsterWaveParamOuterClass.java @@ -0,0 +1,259 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.lunarcore.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; + +public final class SceneMonsterWaveParamOuterClass { + /** + * Protobuf type {@code SceneMonsterWaveParam} + */ + public static final class SceneMonsterWaveParam extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 level = 11; + */ + private int level; + + private SceneMonsterWaveParam() { + } + + /** + * @return a new empty instance of {@code SceneMonsterWaveParam} + */ + public static SceneMonsterWaveParam newInstance() { + return new SceneMonsterWaveParam(); + } + + /** + * optional uint32 level = 11; + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 level = 11; + * @return this + */ + public SceneMonsterWaveParam clearLevel() { + bitField0_ &= ~0x00000001; + level = 0; + return this; + } + + /** + * optional uint32 level = 11; + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * optional uint32 level = 11; + * @param value the level to set + * @return this + */ + public SceneMonsterWaveParam setLevel(final int value) { + bitField0_ |= 0x00000001; + level = value; + return this; + } + + @Override + public SceneMonsterWaveParam copyFrom(final SceneMonsterWaveParam other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + level = other.level; + } + return this; + } + + @Override + public SceneMonsterWaveParam mergeFrom(final SceneMonsterWaveParam other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevel()) { + setLevel(other.level); + } + return this; + } + + @Override + public SceneMonsterWaveParam clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + level = 0; + return this; + } + + @Override + public SceneMonsterWaveParam 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 SceneMonsterWaveParam)) { + return false; + } + SceneMonsterWaveParam other = (SceneMonsterWaveParam) o; + return bitField0_ == other.bitField0_ + && (!hasLevel() || level == other.level); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 88); + output.writeUInt32NoTag(level); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SceneMonsterWaveParam mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 88: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.level, level); + } + output.endObject(); + } + + @Override + public SceneMonsterWaveParam mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 102865796: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SceneMonsterWaveParam clone() { + return new SceneMonsterWaveParam().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SceneMonsterWaveParam parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SceneMonsterWaveParam(), data).checkInitialized(); + } + + public static SceneMonsterWaveParam parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SceneMonsterWaveParam(), input).checkInitialized(); + } + + public static SceneMonsterWaveParam parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SceneMonsterWaveParam(), input).checkInitialized(); + } + + /** + * @return factory for creating SceneMonsterWaveParam messages + */ + public static MessageFactory getFactory() { + return SceneMonsterWaveParamFactory.INSTANCE; + } + + private enum SceneMonsterWaveParamFactory implements MessageFactory { + INSTANCE; + + @Override + public SceneMonsterWaveParam create() { + return SceneMonsterWaveParam.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName level = FieldName.forField("level"); + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/SceneNpcInfoOuterClass.java b/src/generated/main/emu/lunarcore/proto/SceneNpcInfoOuterClass.java index 38de604..6cd690d 100644 --- a/src/generated/main/emu/lunarcore/proto/SceneNpcInfoOuterClass.java +++ b/src/generated/main/emu/lunarcore/proto/SceneNpcInfoOuterClass.java @@ -23,6 +23,11 @@ public final class SceneNpcInfoOuterClass { */ private int npcId; + /** + * optional .NpcExtraInfo extra_info = 10; + */ + private final NpcExtraInfoOuterClass.NpcExtraInfo extraInfo = NpcExtraInfoOuterClass.NpcExtraInfo.newInstance(); + private SceneNpcInfo() { } @@ -70,12 +75,70 @@ public final class SceneNpcInfoOuterClass { return this; } + /** + * optional .NpcExtraInfo extra_info = 10; + * @return whether the extraInfo field is set + */ + public boolean hasExtraInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .NpcExtraInfo extra_info = 10; + * @return this + */ + public SceneNpcInfo clearExtraInfo() { + bitField0_ &= ~0x00000002; + extraInfo.clear(); + return this; + } + + /** + * optional .NpcExtraInfo extra_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 #getMutableExtraInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public NpcExtraInfoOuterClass.NpcExtraInfo getExtraInfo() { + return extraInfo; + } + + /** + * optional .NpcExtraInfo extra_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 NpcExtraInfoOuterClass.NpcExtraInfo getMutableExtraInfo() { + bitField0_ |= 0x00000002; + return extraInfo; + } + + /** + * optional .NpcExtraInfo extra_info = 10; + * @param value the extraInfo to set + * @return this + */ + public SceneNpcInfo setExtraInfo(final NpcExtraInfoOuterClass.NpcExtraInfo value) { + bitField0_ |= 0x00000002; + extraInfo.copyFrom(value); + return this; + } + @Override public SceneNpcInfo copyFrom(final SceneNpcInfo other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; npcId = other.npcId; + extraInfo.copyFrom(other.extraInfo); } return this; } @@ -89,6 +152,9 @@ public final class SceneNpcInfoOuterClass { if (other.hasNpcId()) { setNpcId(other.npcId); } + if (other.hasExtraInfo()) { + getMutableExtraInfo().mergeFrom(other.extraInfo); + } return this; } @@ -100,6 +166,7 @@ public final class SceneNpcInfoOuterClass { cachedSize = -1; bitField0_ = 0; npcId = 0; + extraInfo.clear(); return this; } @@ -110,6 +177,7 @@ public final class SceneNpcInfoOuterClass { } cachedSize = -1; bitField0_ = 0; + extraInfo.clearQuick(); return this; } @@ -123,7 +191,8 @@ public final class SceneNpcInfoOuterClass { } SceneNpcInfo other = (SceneNpcInfo) o; return bitField0_ == other.bitField0_ - && (!hasNpcId() || npcId == other.npcId); + && (!hasNpcId() || npcId == other.npcId) + && (!hasExtraInfo() || extraInfo.equals(other.extraInfo)); } @Override @@ -132,6 +201,10 @@ public final class SceneNpcInfoOuterClass { output.writeRawByte((byte) 32); output.writeUInt32NoTag(npcId); } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(extraInfo); + } } @Override @@ -140,6 +213,9 @@ public final class SceneNpcInfoOuterClass { if ((bitField0_ & 0x00000001) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(npcId); } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(extraInfo); + } return size; } @@ -155,6 +231,15 @@ public final class SceneNpcInfoOuterClass { npcId = input.readUInt32(); bitField0_ |= 0x00000001; tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // extraInfo + input.readMessage(extraInfo); + bitField0_ |= 0x00000002; + tag = input.readTag(); if (tag != 0) { break; } @@ -179,6 +264,9 @@ public final class SceneNpcInfoOuterClass { if ((bitField0_ & 0x00000001) != 0) { output.writeUInt32(FieldNames.npcId, npcId); } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.extraInfo, extraInfo); + } output.endObject(); } @@ -201,6 +289,18 @@ public final class SceneNpcInfoOuterClass { } break; } + case -253631266: + case 747541373: { + if (input.isAtField(FieldNames.extraInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(extraInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } default: { input.skipUnknownField(); break; @@ -254,6 +354,8 @@ public final class SceneNpcInfoOuterClass { */ static class FieldNames { static final FieldName npcId = FieldName.forField("npcId", "npc_id"); + + static final FieldName extraInfo = FieldName.forField("extraInfo", "extra_info"); } } } diff --git a/src/main/java/emu/lunarcore/game/battle/Battle.java b/src/main/java/emu/lunarcore/game/battle/Battle.java index 3976307..13bb1ba 100644 --- a/src/main/java/emu/lunarcore/game/battle/Battle.java +++ b/src/main/java/emu/lunarcore/game/battle/Battle.java @@ -35,6 +35,7 @@ public class Battle { private final List drops; private final long timestamp; + @Setter private int levelOverride; @Setter private int roundsLimit; private Battle(Player player, PlayerLineup lineup) { @@ -176,6 +177,10 @@ public class Battle { .setWaveId(1) // Probably not named correctly .setStageId(stage.getId()); + if (this.levelOverride > 0) { + wave.getMutableWaveParam().setLevel(this.levelOverride); + } + for (int monsterId : sceneMonsterWave) { var monster = SceneMonster.newInstance().setMonsterId(monsterId); wave.addMonsterList(monster);