From 52ca89d6c91360ea01fae35ebe12c135bfb381d4 Mon Sep 17 00:00:00 2001 From: Somebody Date: Thu, 1 Feb 2024 14:26:02 +0800 Subject: [PATCH] upload some missing packets --- .../proto/BattleMechanismBarOuterClass.java | 339 +++++++++++ .../proto/BattleSkillInfoOuterClass.java | 542 ++++++++++++++++++ .../proto/SceneEnterStageCsReqOuterClass.java | 260 +++++++++ .../proto/SceneEnterStageScRspOuterClass.java | 362 ++++++++++++ .../game/rogue/RogueEntityLoader.java | 2 +- 5 files changed, 1504 insertions(+), 1 deletion(-) create mode 100644 src/generated/main/emu/lunarcore/proto/BattleMechanismBarOuterClass.java create mode 100644 src/generated/main/emu/lunarcore/proto/BattleSkillInfoOuterClass.java create mode 100644 src/generated/main/emu/lunarcore/proto/SceneEnterStageCsReqOuterClass.java create mode 100644 src/generated/main/emu/lunarcore/proto/SceneEnterStageScRspOuterClass.java diff --git a/src/generated/main/emu/lunarcore/proto/BattleMechanismBarOuterClass.java b/src/generated/main/emu/lunarcore/proto/BattleMechanismBarOuterClass.java new file mode 100644 index 0000000..82c94ed --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/BattleMechanismBarOuterClass.java @@ -0,0 +1,339 @@ +// 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 BattleMechanismBarOuterClass { + /** + * Protobuf type {@code BattleMechanismBar} + */ + public static final class BattleMechanismBar extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 OMMELBCMNNM = 1; + */ + private int oMMELBCMNNM; + + /** + * optional uint32 AMMAAKPAKAA = 2; + */ + private int aMMAAKPAKAA; + + private BattleMechanismBar() { + } + + /** + * @return a new empty instance of {@code BattleMechanismBar} + */ + public static BattleMechanismBar newInstance() { + return new BattleMechanismBar(); + } + + /** + * optional uint32 OMMELBCMNNM = 1; + * @return whether the oMMELBCMNNM field is set + */ + public boolean hasOMMELBCMNNM() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 OMMELBCMNNM = 1; + * @return this + */ + public BattleMechanismBar clearOMMELBCMNNM() { + bitField0_ &= ~0x00000001; + oMMELBCMNNM = 0; + return this; + } + + /** + * optional uint32 OMMELBCMNNM = 1; + * @return the oMMELBCMNNM + */ + public int getOMMELBCMNNM() { + return oMMELBCMNNM; + } + + /** + * optional uint32 OMMELBCMNNM = 1; + * @param value the oMMELBCMNNM to set + * @return this + */ + public BattleMechanismBar setOMMELBCMNNM(final int value) { + bitField0_ |= 0x00000001; + oMMELBCMNNM = value; + return this; + } + + /** + * optional uint32 AMMAAKPAKAA = 2; + * @return whether the aMMAAKPAKAA field is set + */ + public boolean hasAMMAAKPAKAA() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 AMMAAKPAKAA = 2; + * @return this + */ + public BattleMechanismBar clearAMMAAKPAKAA() { + bitField0_ &= ~0x00000002; + aMMAAKPAKAA = 0; + return this; + } + + /** + * optional uint32 AMMAAKPAKAA = 2; + * @return the aMMAAKPAKAA + */ + public int getAMMAAKPAKAA() { + return aMMAAKPAKAA; + } + + /** + * optional uint32 AMMAAKPAKAA = 2; + * @param value the aMMAAKPAKAA to set + * @return this + */ + public BattleMechanismBar setAMMAAKPAKAA(final int value) { + bitField0_ |= 0x00000002; + aMMAAKPAKAA = value; + return this; + } + + @Override + public BattleMechanismBar copyFrom(final BattleMechanismBar other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + oMMELBCMNNM = other.oMMELBCMNNM; + aMMAAKPAKAA = other.aMMAAKPAKAA; + } + return this; + } + + @Override + public BattleMechanismBar mergeFrom(final BattleMechanismBar other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasOMMELBCMNNM()) { + setOMMELBCMNNM(other.oMMELBCMNNM); + } + if (other.hasAMMAAKPAKAA()) { + setAMMAAKPAKAA(other.aMMAAKPAKAA); + } + return this; + } + + @Override + public BattleMechanismBar clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + oMMELBCMNNM = 0; + aMMAAKPAKAA = 0; + return this; + } + + @Override + public BattleMechanismBar 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 BattleMechanismBar)) { + return false; + } + BattleMechanismBar other = (BattleMechanismBar) o; + return bitField0_ == other.bitField0_ + && (!hasOMMELBCMNNM() || oMMELBCMNNM == other.oMMELBCMNNM) + && (!hasAMMAAKPAKAA() || aMMAAKPAKAA == other.aMMAAKPAKAA); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(oMMELBCMNNM); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(aMMAAKPAKAA); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(oMMELBCMNNM); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(aMMAAKPAKAA); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BattleMechanismBar mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // oMMELBCMNNM + oMMELBCMNNM = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // aMMAAKPAKAA + aMMAAKPAKAA = 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.oMMELBCMNNM, oMMELBCMNNM); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.aMMAAKPAKAA, aMMAAKPAKAA); + } + output.endObject(); + } + + @Override + public BattleMechanismBar mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 767455607: { + if (input.isAtField(FieldNames.oMMELBCMNNM)) { + if (!input.trySkipNullValue()) { + oMMELBCMNNM = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 870365552: { + if (input.isAtField(FieldNames.aMMAAKPAKAA)) { + if (!input.trySkipNullValue()) { + aMMAAKPAKAA = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BattleMechanismBar clone() { + return new BattleMechanismBar().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BattleMechanismBar parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BattleMechanismBar(), data).checkInitialized(); + } + + public static BattleMechanismBar parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattleMechanismBar(), input).checkInitialized(); + } + + public static BattleMechanismBar parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattleMechanismBar(), input).checkInitialized(); + } + + /** + * @return factory for creating BattleMechanismBar messages + */ + public static MessageFactory getFactory() { + return BattleMechanismBarFactory.INSTANCE; + } + + private enum BattleMechanismBarFactory implements MessageFactory { + INSTANCE; + + @Override + public BattleMechanismBar create() { + return BattleMechanismBar.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName oMMELBCMNNM = FieldName.forField("OMMELBCMNNM"); + + static final FieldName aMMAAKPAKAA = FieldName.forField("AMMAAKPAKAA"); + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/BattleSkillInfoOuterClass.java b/src/generated/main/emu/lunarcore/proto/BattleSkillInfoOuterClass.java new file mode 100644 index 0000000..385a36a --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/BattleSkillInfoOuterClass.java @@ -0,0 +1,542 @@ +// 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.ProtoUtil; +import us.hebi.quickbuf.RepeatedInt; + +public final class BattleSkillInfoOuterClass { + /** + * Protobuf type {@code BattleSkillInfo} + */ + public static final class BattleSkillInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double ECLKNMPFOOF = 2; + */ + private double eCLKNMPFOOF; + + /** + * optional double damage = 4; + */ + private double damage; + + /** + * optional uint32 skill_id = 1; + */ + private int skillId; + + /** + * repeated uint32 HEOGMIOCDIC = 3; + */ + private final RepeatedInt hEOGMIOCDIC = RepeatedInt.newEmptyInstance(); + + private BattleSkillInfo() { + } + + /** + * @return a new empty instance of {@code BattleSkillInfo} + */ + public static BattleSkillInfo newInstance() { + return new BattleSkillInfo(); + } + + /** + * optional double ECLKNMPFOOF = 2; + * @return whether the eCLKNMPFOOF field is set + */ + public boolean hasECLKNMPFOOF() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double ECLKNMPFOOF = 2; + * @return this + */ + public BattleSkillInfo clearECLKNMPFOOF() { + bitField0_ &= ~0x00000001; + eCLKNMPFOOF = 0D; + return this; + } + + /** + * optional double ECLKNMPFOOF = 2; + * @return the eCLKNMPFOOF + */ + public double getECLKNMPFOOF() { + return eCLKNMPFOOF; + } + + /** + * optional double ECLKNMPFOOF = 2; + * @param value the eCLKNMPFOOF to set + * @return this + */ + public BattleSkillInfo setECLKNMPFOOF(final double value) { + bitField0_ |= 0x00000001; + eCLKNMPFOOF = value; + return this; + } + + /** + * optional double damage = 4; + * @return whether the damage field is set + */ + public boolean hasDamage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double damage = 4; + * @return this + */ + public BattleSkillInfo clearDamage() { + bitField0_ &= ~0x00000002; + damage = 0D; + return this; + } + + /** + * optional double damage = 4; + * @return the damage + */ + public double getDamage() { + return damage; + } + + /** + * optional double damage = 4; + * @param value the damage to set + * @return this + */ + public BattleSkillInfo setDamage(final double value) { + bitField0_ |= 0x00000002; + damage = value; + return this; + } + + /** + * optional uint32 skill_id = 1; + * @return whether the skillId field is set + */ + public boolean hasSkillId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 skill_id = 1; + * @return this + */ + public BattleSkillInfo clearSkillId() { + bitField0_ &= ~0x00000004; + skillId = 0; + return this; + } + + /** + * optional uint32 skill_id = 1; + * @return the skillId + */ + public int getSkillId() { + return skillId; + } + + /** + * optional uint32 skill_id = 1; + * @param value the skillId to set + * @return this + */ + public BattleSkillInfo setSkillId(final int value) { + bitField0_ |= 0x00000004; + skillId = value; + return this; + } + + /** + * repeated uint32 HEOGMIOCDIC = 3; + * @return whether the hEOGMIOCDIC field is set + */ + public boolean hasHEOGMIOCDIC() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated uint32 HEOGMIOCDIC = 3; + * @return this + */ + public BattleSkillInfo clearHEOGMIOCDIC() { + bitField0_ &= ~0x00000008; + hEOGMIOCDIC.clear(); + return this; + } + + /** + * repeated uint32 HEOGMIOCDIC = 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 #getMutableHEOGMIOCDIC()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getHEOGMIOCDIC() { + return hEOGMIOCDIC; + } + + /** + * repeated uint32 HEOGMIOCDIC = 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 RepeatedInt getMutableHEOGMIOCDIC() { + bitField0_ |= 0x00000008; + return hEOGMIOCDIC; + } + + /** + * repeated uint32 HEOGMIOCDIC = 3; + * @param value the hEOGMIOCDIC to add + * @return this + */ + public BattleSkillInfo addHEOGMIOCDIC(final int value) { + bitField0_ |= 0x00000008; + hEOGMIOCDIC.add(value); + return this; + } + + /** + * repeated uint32 HEOGMIOCDIC = 3; + * @param values the hEOGMIOCDIC to add + * @return this + */ + public BattleSkillInfo addAllHEOGMIOCDIC(final int... values) { + bitField0_ |= 0x00000008; + hEOGMIOCDIC.addAll(values); + return this; + } + + @Override + public BattleSkillInfo copyFrom(final BattleSkillInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + eCLKNMPFOOF = other.eCLKNMPFOOF; + damage = other.damage; + skillId = other.skillId; + hEOGMIOCDIC.copyFrom(other.hEOGMIOCDIC); + } + return this; + } + + @Override + public BattleSkillInfo mergeFrom(final BattleSkillInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasECLKNMPFOOF()) { + setECLKNMPFOOF(other.eCLKNMPFOOF); + } + if (other.hasDamage()) { + setDamage(other.damage); + } + if (other.hasSkillId()) { + setSkillId(other.skillId); + } + if (other.hasHEOGMIOCDIC()) { + getMutableHEOGMIOCDIC().addAll(other.hEOGMIOCDIC); + } + return this; + } + + @Override + public BattleSkillInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + eCLKNMPFOOF = 0D; + damage = 0D; + skillId = 0; + hEOGMIOCDIC.clear(); + return this; + } + + @Override + public BattleSkillInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + hEOGMIOCDIC.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BattleSkillInfo)) { + return false; + } + BattleSkillInfo other = (BattleSkillInfo) o; + return bitField0_ == other.bitField0_ + && (!hasECLKNMPFOOF() || ProtoUtil.isEqual(eCLKNMPFOOF, other.eCLKNMPFOOF)) + && (!hasDamage() || ProtoUtil.isEqual(damage, other.damage)) + && (!hasSkillId() || skillId == other.skillId) + && (!hasHEOGMIOCDIC() || hEOGMIOCDIC.equals(other.hEOGMIOCDIC)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(eCLKNMPFOOF); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(damage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(skillId); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < hEOGMIOCDIC.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(hEOGMIOCDIC.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(skillId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * hEOGMIOCDIC.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(hEOGMIOCDIC); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BattleSkillInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 17: { + // eCLKNMPFOOF + eCLKNMPFOOF = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 33) { + break; + } + } + case 33: { + // damage + damage = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // skillId + skillId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // hEOGMIOCDIC [packed=true] + input.readPackedUInt32(hEOGMIOCDIC, 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 24: { + // hEOGMIOCDIC [packed=false] + tag = input.readRepeatedUInt32(hEOGMIOCDIC, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.eCLKNMPFOOF, eCLKNMPFOOF); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.damage, damage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.skillId, skillId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.hEOGMIOCDIC, hEOGMIOCDIC); + } + output.endObject(); + } + + @Override + public BattleSkillInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 708408596: { + if (input.isAtField(FieldNames.eCLKNMPFOOF)) { + if (!input.trySkipNullValue()) { + eCLKNMPFOOF = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1339126929: { + if (input.isAtField(FieldNames.damage)) { + if (!input.trySkipNullValue()) { + damage = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2147320652: + case 2142452169: { + if (input.isAtField(FieldNames.skillId)) { + if (!input.trySkipNullValue()) { + skillId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1292251975: { + if (input.isAtField(FieldNames.hEOGMIOCDIC)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(hEOGMIOCDIC); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BattleSkillInfo clone() { + return new BattleSkillInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BattleSkillInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BattleSkillInfo(), data).checkInitialized(); + } + + public static BattleSkillInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattleSkillInfo(), input).checkInitialized(); + } + + public static BattleSkillInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattleSkillInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating BattleSkillInfo messages + */ + public static MessageFactory getFactory() { + return BattleSkillInfoFactory.INSTANCE; + } + + private enum BattleSkillInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public BattleSkillInfo create() { + return BattleSkillInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName eCLKNMPFOOF = FieldName.forField("ECLKNMPFOOF"); + + static final FieldName damage = FieldName.forField("damage"); + + static final FieldName skillId = FieldName.forField("skillId", "skill_id"); + + static final FieldName hEOGMIOCDIC = FieldName.forField("HEOGMIOCDIC"); + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/SceneEnterStageCsReqOuterClass.java b/src/generated/main/emu/lunarcore/proto/SceneEnterStageCsReqOuterClass.java new file mode 100644 index 0000000..5750310 --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/SceneEnterStageCsReqOuterClass.java @@ -0,0 +1,260 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.lunarcore.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; + +public final class SceneEnterStageCsReqOuterClass { + /** + * Protobuf type {@code SceneEnterStageCsReq} + */ + public static final class SceneEnterStageCsReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 stage_id = 1; + */ + private int stageId; + + private SceneEnterStageCsReq() { + } + + /** + * @return a new empty instance of {@code SceneEnterStageCsReq} + */ + public static SceneEnterStageCsReq newInstance() { + return new SceneEnterStageCsReq(); + } + + /** + * optional uint32 stage_id = 1; + * @return whether the stageId field is set + */ + public boolean hasStageId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 stage_id = 1; + * @return this + */ + public SceneEnterStageCsReq clearStageId() { + bitField0_ &= ~0x00000001; + stageId = 0; + return this; + } + + /** + * optional uint32 stage_id = 1; + * @return the stageId + */ + public int getStageId() { + return stageId; + } + + /** + * optional uint32 stage_id = 1; + * @param value the stageId to set + * @return this + */ + public SceneEnterStageCsReq setStageId(final int value) { + bitField0_ |= 0x00000001; + stageId = value; + return this; + } + + @Override + public SceneEnterStageCsReq copyFrom(final SceneEnterStageCsReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + stageId = other.stageId; + } + return this; + } + + @Override + public SceneEnterStageCsReq mergeFrom(final SceneEnterStageCsReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStageId()) { + setStageId(other.stageId); + } + return this; + } + + @Override + public SceneEnterStageCsReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + stageId = 0; + return this; + } + + @Override + public SceneEnterStageCsReq 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 SceneEnterStageCsReq)) { + return false; + } + SceneEnterStageCsReq other = (SceneEnterStageCsReq) o; + return bitField0_ == other.bitField0_ + && (!hasStageId() || stageId == other.stageId); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(stageId); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(stageId); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SceneEnterStageCsReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // stageId + stageId = 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.stageId, stageId); + } + output.endObject(); + } + + @Override + public SceneEnterStageCsReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1897528135: + case 1306191356: { + if (input.isAtField(FieldNames.stageId)) { + if (!input.trySkipNullValue()) { + stageId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SceneEnterStageCsReq clone() { + return new SceneEnterStageCsReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SceneEnterStageCsReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SceneEnterStageCsReq(), data).checkInitialized(); + } + + public static SceneEnterStageCsReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SceneEnterStageCsReq(), input).checkInitialized(); + } + + public static SceneEnterStageCsReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SceneEnterStageCsReq(), input).checkInitialized(); + } + + /** + * @return factory for creating SceneEnterStageCsReq messages + */ + public static MessageFactory getFactory() { + return SceneEnterStageCsReqFactory.INSTANCE; + } + + private enum SceneEnterStageCsReqFactory implements MessageFactory { + INSTANCE; + + @Override + public SceneEnterStageCsReq create() { + return SceneEnterStageCsReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName stageId = FieldName.forField("stageId", "stage_id"); + } + } +} diff --git a/src/generated/main/emu/lunarcore/proto/SceneEnterStageScRspOuterClass.java b/src/generated/main/emu/lunarcore/proto/SceneEnterStageScRspOuterClass.java new file mode 100644 index 0000000..dff3ec0 --- /dev/null +++ b/src/generated/main/emu/lunarcore/proto/SceneEnterStageScRspOuterClass.java @@ -0,0 +1,362 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.lunarcore.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; + +public final class SceneEnterStageScRspOuterClass { + /** + * Protobuf type {@code SceneEnterStageScRsp} + */ + public static final class SceneEnterStageScRsp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 retcode = 5; + */ + private int retcode; + + /** + * optional .SceneBattleInfo battle_info = 10; + */ + private final SceneBattleInfoOuterClass.SceneBattleInfo battleInfo = SceneBattleInfoOuterClass.SceneBattleInfo.newInstance(); + + private SceneEnterStageScRsp() { + } + + /** + * @return a new empty instance of {@code SceneEnterStageScRsp} + */ + public static SceneEnterStageScRsp newInstance() { + return new SceneEnterStageScRsp(); + } + + /** + * optional uint32 retcode = 5; + * @return whether the retcode field is set + */ + public boolean hasRetcode() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 retcode = 5; + * @return this + */ + public SceneEnterStageScRsp clearRetcode() { + bitField0_ &= ~0x00000001; + retcode = 0; + return this; + } + + /** + * optional uint32 retcode = 5; + * @return the retcode + */ + public int getRetcode() { + return retcode; + } + + /** + * optional uint32 retcode = 5; + * @param value the retcode to set + * @return this + */ + public SceneEnterStageScRsp setRetcode(final int value) { + bitField0_ |= 0x00000001; + retcode = value; + return this; + } + + /** + * optional .SceneBattleInfo battle_info = 10; + * @return whether the battleInfo field is set + */ + public boolean hasBattleInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .SceneBattleInfo battle_info = 10; + * @return this + */ + public SceneEnterStageScRsp clearBattleInfo() { + bitField0_ &= ~0x00000002; + battleInfo.clear(); + return this; + } + + /** + * optional .SceneBattleInfo battle_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 #getMutableBattleInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public SceneBattleInfoOuterClass.SceneBattleInfo getBattleInfo() { + return battleInfo; + } + + /** + * optional .SceneBattleInfo battle_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 SceneBattleInfoOuterClass.SceneBattleInfo getMutableBattleInfo() { + bitField0_ |= 0x00000002; + return battleInfo; + } + + /** + * optional .SceneBattleInfo battle_info = 10; + * @param value the battleInfo to set + * @return this + */ + public SceneEnterStageScRsp setBattleInfo( + final SceneBattleInfoOuterClass.SceneBattleInfo value) { + bitField0_ |= 0x00000002; + battleInfo.copyFrom(value); + return this; + } + + @Override + public SceneEnterStageScRsp copyFrom(final SceneEnterStageScRsp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + retcode = other.retcode; + battleInfo.copyFrom(other.battleInfo); + } + return this; + } + + @Override + public SceneEnterStageScRsp mergeFrom(final SceneEnterStageScRsp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRetcode()) { + setRetcode(other.retcode); + } + if (other.hasBattleInfo()) { + getMutableBattleInfo().mergeFrom(other.battleInfo); + } + return this; + } + + @Override + public SceneEnterStageScRsp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + retcode = 0; + battleInfo.clear(); + return this; + } + + @Override + public SceneEnterStageScRsp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + battleInfo.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SceneEnterStageScRsp)) { + return false; + } + SceneEnterStageScRsp other = (SceneEnterStageScRsp) o; + return bitField0_ == other.bitField0_ + && (!hasRetcode() || retcode == other.retcode) + && (!hasBattleInfo() || battleInfo.equals(other.battleInfo)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(retcode); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(battleInfo); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(battleInfo); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SceneEnterStageScRsp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 40: { + // retcode + retcode = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // battleInfo + input.readMessage(battleInfo); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.retcode, retcode); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.battleInfo, battleInfo); + } + output.endObject(); + } + + @Override + public SceneEnterStageScRsp 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 2053377414: + case -749633579: { + if (input.isAtField(FieldNames.battleInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(battleInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SceneEnterStageScRsp clone() { + return new SceneEnterStageScRsp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SceneEnterStageScRsp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SceneEnterStageScRsp(), data).checkInitialized(); + } + + public static SceneEnterStageScRsp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SceneEnterStageScRsp(), input).checkInitialized(); + } + + public static SceneEnterStageScRsp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SceneEnterStageScRsp(), input).checkInitialized(); + } + + /** + * @return factory for creating SceneEnterStageScRsp messages + */ + public static MessageFactory getFactory() { + return SceneEnterStageScRspFactory.INSTANCE; + } + + private enum SceneEnterStageScRspFactory implements MessageFactory { + INSTANCE; + + @Override + public SceneEnterStageScRsp create() { + return SceneEnterStageScRsp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName retcode = FieldName.forField("retcode"); + + static final FieldName battleInfo = FieldName.forField("battleInfo", "battle_info"); + } + } +} diff --git a/src/main/java/emu/lunarcore/game/rogue/RogueEntityLoader.java b/src/main/java/emu/lunarcore/game/rogue/RogueEntityLoader.java index d8922a0..de9e21f 100644 --- a/src/main/java/emu/lunarcore/game/rogue/RogueEntityLoader.java +++ b/src/main/java/emu/lunarcore/game/rogue/RogueEntityLoader.java @@ -94,7 +94,7 @@ public class RogueEntityLoader extends SceneEntityLoader { var nextRoom = rogue.getRooms().get(siteId); propId = switch (nextRoom.getRoomExcel().getRogueRoomType()) { - case 3 -> 1022; + case 3,8 -> 1022; case 5 -> 1023; default -> 1021; };