diff --git a/src/generated/main/emu/lunarcore/proto/ChallengeStoryInfoOuterClass.java b/src/generated/main/emu/lunarcore/proto/ChallengeStoryInfoOuterClass.java index 571e0f9..51ba499 100644 --- a/src/generated/main/emu/lunarcore/proto/ChallengeStoryInfoOuterClass.java +++ b/src/generated/main/emu/lunarcore/proto/ChallengeStoryInfoOuterClass.java @@ -1,4 +1,3 @@ -// Code generated by protocol buffer compiler. Do not edit! package emu.lunarcore.proto; import java.io.IOException; @@ -12,374 +11,257 @@ import us.hebi.quickbuf.ProtoSink; import us.hebi.quickbuf.ProtoSource; public final class ChallengeStoryInfoOuterClass { - /** - * Protobuf type {@code ChallengeStoryInfo} - */ public static final class ChallengeStoryInfo extends ProtoMessage implements Cloneable { private static final long serialVersionUID = 0L; - - /** - * optional .ChallengeStoryBuffInfo cur_story_buffs = 1; - */ - private final ChallengeStoryBuffInfoOuterClass.ChallengeStoryBuffInfo curStoryBuffs = ChallengeStoryBuffInfoOuterClass.ChallengeStoryBuffInfo.newInstance(); - - /** - * optional .ChallengeBossBuffInfo cur_boss_buffs = 9; - */ + private final ChallengeBossBuffInfoOuterClass.ChallengeBossBuffInfo curBossBuffs = ChallengeBossBuffInfoOuterClass.ChallengeBossBuffInfo.newInstance(); - - private ChallengeStoryInfo() { - } - - /** - * @return a new empty instance of {@code ChallengeStoryInfo} - */ + + private final ChallengeStoryBuffInfoOuterClass.ChallengeStoryBuffInfo curStoryBuffs = ChallengeStoryBuffInfoOuterClass.ChallengeStoryBuffInfo.newInstance(); + public static ChallengeStoryInfo newInstance() { return new ChallengeStoryInfo(); } - - /** - * optional .ChallengeStoryBuffInfo cur_story_buffs = 1; - * @return whether the curStoryBuffs field is set - */ - public boolean hasCurStoryBuffs() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional .ChallengeStoryBuffInfo cur_story_buffs = 1; - * @return this - */ - public ChallengeStoryInfo clearCurStoryBuffs() { - bitField0_ &= ~0x00000001; - curStoryBuffs.clear(); - return this; - } - - /** - * optional .ChallengeStoryBuffInfo cur_story_buffs = 1; - * - * 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 #getMutableCurStoryBuffs()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ChallengeStoryBuffInfoOuterClass.ChallengeStoryBuffInfo getCurStoryBuffs() { - return curStoryBuffs; - } - - /** - * optional .ChallengeStoryBuffInfo cur_story_buffs = 1; - * - * 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 ChallengeStoryBuffInfoOuterClass.ChallengeStoryBuffInfo getMutableCurStoryBuffs() { - bitField0_ |= 0x00000001; - return curStoryBuffs; - } - - /** - * optional .ChallengeStoryBuffInfo cur_story_buffs = 1; - * @param value the curStoryBuffs to set - * @return this - */ - public ChallengeStoryInfo setCurStoryBuffs( - final ChallengeStoryBuffInfoOuterClass.ChallengeStoryBuffInfo value) { - bitField0_ |= 0x00000001; - curStoryBuffs.copyFrom(value); - return this; - } - - /** - * optional .ChallengeBossBuffInfo cur_boss_buffs = 9; - * @return whether the curBossBuffs field is set - */ + public boolean hasCurBossBuffs() { - return (bitField0_ & 0x00000002) != 0; + return ((this.bitField0_ & 0x1) != 0); } - - /** - * optional .ChallengeBossBuffInfo cur_boss_buffs = 9; - * @return this - */ + public ChallengeStoryInfo clearCurBossBuffs() { - bitField0_ &= ~0x00000002; - curBossBuffs.clear(); + this.bitField0_ &= 0xFFFFFFFE; + this.curBossBuffs.clear(); return this; } - - /** - * optional .ChallengeBossBuffInfo cur_boss_buffs = 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 #getMutableCurBossBuffs()} if you want to modify it. - * - * @return internal storage object for reading - */ + public ChallengeBossBuffInfoOuterClass.ChallengeBossBuffInfo getCurBossBuffs() { - return curBossBuffs; + return this.curBossBuffs; } - - /** - * optional .ChallengeBossBuffInfo cur_boss_buffs = 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 ChallengeBossBuffInfoOuterClass.ChallengeBossBuffInfo getMutableCurBossBuffs() { - bitField0_ |= 0x00000002; - return curBossBuffs; + this.bitField0_ |= 0x1; + return this.curBossBuffs; } - - /** - * optional .ChallengeBossBuffInfo cur_boss_buffs = 9; - * @param value the curBossBuffs to set - * @return this - */ - public ChallengeStoryInfo setCurBossBuffs( - final ChallengeBossBuffInfoOuterClass.ChallengeBossBuffInfo value) { - bitField0_ |= 0x00000002; - curBossBuffs.copyFrom(value); + + public ChallengeStoryInfo setCurBossBuffs(ChallengeBossBuffInfoOuterClass.ChallengeBossBuffInfo value) { + this.bitField0_ |= 0x1; + this.curBossBuffs.copyFrom(value); return this; } - - @Override - public ChallengeStoryInfo copyFrom(final ChallengeStoryInfo other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - curStoryBuffs.copyFrom(other.curStoryBuffs); - curBossBuffs.copyFrom(other.curBossBuffs); - } + + public boolean hasCurStoryBuffs() { + return ((this.bitField0_ & 0x2) != 0); + } + + public ChallengeStoryInfo clearCurStoryBuffs() { + this.bitField0_ &= 0xFFFFFFFD; + this.curStoryBuffs.clear(); return this; } - - @Override - public ChallengeStoryInfo mergeFrom(final ChallengeStoryInfo other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasCurStoryBuffs()) { - getMutableCurStoryBuffs().mergeFrom(other.curStoryBuffs); - } - if (other.hasCurBossBuffs()) { - getMutableCurBossBuffs().mergeFrom(other.curBossBuffs); - } + + public ChallengeStoryBuffInfoOuterClass.ChallengeStoryBuffInfo getCurStoryBuffs() { + return this.curStoryBuffs; + } + + public ChallengeStoryBuffInfoOuterClass.ChallengeStoryBuffInfo getMutableCurStoryBuffs() { + this.bitField0_ |= 0x2; + return this.curStoryBuffs; + } + + public ChallengeStoryInfo setCurStoryBuffs(ChallengeStoryBuffInfoOuterClass.ChallengeStoryBuffInfo value) { + this.bitField0_ |= 0x2; + this.curStoryBuffs.copyFrom(value); return this; } - - @Override + + public ChallengeStoryInfo copyFrom(ChallengeStoryInfo other) { + this.cachedSize = other.cachedSize; + if ((this.bitField0_ | other.bitField0_) != 0) { + this.bitField0_ = other.bitField0_; + this.curBossBuffs.copyFrom(other.curBossBuffs); + this.curStoryBuffs.copyFrom(other.curStoryBuffs); + } + return this; + } + + public ChallengeStoryInfo mergeFrom(ChallengeStoryInfo other) { + if (other.isEmpty()) + return this; + this.cachedSize = -1; + if (other.hasCurBossBuffs()) + getMutableCurBossBuffs().mergeFrom(other.curBossBuffs); + if (other.hasCurStoryBuffs()) + getMutableCurStoryBuffs().mergeFrom(other.curStoryBuffs); + return this; + } + public ChallengeStoryInfo clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - curStoryBuffs.clear(); - curBossBuffs.clear(); + if (isEmpty()) + return this; + this.cachedSize = -1; + this.bitField0_ = 0; + this.curBossBuffs.clear(); + this.curStoryBuffs.clear(); return this; } - - @Override + public ChallengeStoryInfo clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - curStoryBuffs.clearQuick(); - curBossBuffs.clearQuick(); + if (isEmpty()) + return this; + this.cachedSize = -1; + this.bitField0_ = 0; + this.curBossBuffs.clearQuick(); + this.curStoryBuffs.clearQuick(); return this; } - - @Override + public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ChallengeStoryInfo)) { - return false; - } - ChallengeStoryInfo other = (ChallengeStoryInfo) o; - return bitField0_ == other.bitField0_ - && (!hasCurStoryBuffs() || curStoryBuffs.equals(other.curStoryBuffs)) - && (!hasCurBossBuffs() || curBossBuffs.equals(other.curBossBuffs)); + if (o == this) + return true; + if (!(o instanceof ChallengeStoryInfo)) + return false; + ChallengeStoryInfo other = (ChallengeStoryInfo)o; + return (this.bitField0_ == other.bitField0_ && ( + !hasCurBossBuffs() || this.curBossBuffs.equals(other.curBossBuffs)) && ( + !hasCurStoryBuffs() || this.curStoryBuffs.equals(other.curStoryBuffs))); } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 10); - output.writeMessageNoTag(curStoryBuffs); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 74); - output.writeMessageNoTag(curBossBuffs); - } + + public void writeTo(ProtoSink output) throws IOException { + if ((this.bitField0_ & 0x1) != 0) { + output.writeRawByte((byte)66); + output.writeMessageNoTag(this.curBossBuffs); + } + if ((this.bitField0_ & 0x2) != 0) { + output.writeRawByte((byte)74); + output.writeMessageNoTag(this.curStoryBuffs); + } } - - @Override + protected int computeSerializedSize() { int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(curStoryBuffs); - } - if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(curBossBuffs); - } + if ((this.bitField0_ & 0x1) != 0) + size += 1 + ProtoSink.computeMessageSizeNoTag(this.curBossBuffs); + if ((this.bitField0_ & 0x2) != 0) + size += 1 + ProtoSink.computeMessageSizeNoTag(this.curStoryBuffs); return size; } - - @Override - @SuppressWarnings("fallthrough") - public ChallengeStoryInfo mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) + + public ChallengeStoryInfo mergeFrom(ProtoSource input) throws IOException { int tag = input.readTag(); while (true) { switch (tag) { - case 10: { - // curStoryBuffs - input.readMessage(curStoryBuffs); - bitField0_ |= 0x00000001; + case 66: + input.readMessage(this.curBossBuffs); + this.bitField0_ |= 0x1; tag = input.readTag(); - if (tag != 74) { - break; - } - } - case 74: { - // curBossBuffs - input.readMessage(curBossBuffs); - bitField0_ |= 0x00000002; + if (tag != 74) + continue; + case 74: + input.readMessage(this.curStoryBuffs); + this.bitField0_ |= 0x2; tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { + if (tag != 0) + continue; + case 0: return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } + } + if (!input.skipField(tag)) + return this; + tag = input.readTag(); + } } - - @Override - public void writeTo(final JsonSink output) throws IOException { + + public void writeTo(JsonSink output) throws IOException { output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeMessage(FieldNames.curStoryBuffs, curStoryBuffs); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeMessage(FieldNames.curBossBuffs, curBossBuffs); - } + if ((this.bitField0_ & 0x1) != 0) + output.writeMessage(FieldNames.curBossBuffs, this.curBossBuffs); + if ((this.bitField0_ & 0x2) != 0) + output.writeMessage(FieldNames.curStoryBuffs, this.curStoryBuffs); output.endObject(); } - - @Override - public ChallengeStoryInfo mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } + + public ChallengeStoryInfo mergeFrom(JsonSource input) throws IOException { + if (!input.beginObject()) + return this; while (!input.isAtEnd()) { switch (input.readFieldHash()) { - case -587091733: - case -738440393: { - if (input.isAtField(FieldNames.curStoryBuffs)) { - if (!input.trySkipNullValue()) { - input.readMessage(curStoryBuffs); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } case -1632186189: - case -340377971: { + case -340377971: if (input.isAtField(FieldNames.curBossBuffs)) { if (!input.trySkipNullValue()) { - input.readMessage(curBossBuffs); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { + input.readMessage(this.curBossBuffs); + this.bitField0_ |= 0x1; + } + continue; + } input.skipUnknownField(); - break; - } - } - } + continue; + case -738440393: + case -587091733: + if (input.isAtField(FieldNames.curStoryBuffs)) { + if (!input.trySkipNullValue()) { + input.readMessage(this.curStoryBuffs); + this.bitField0_ |= 0x2; + } + continue; + } + input.skipUnknownField(); + continue; + } + input.skipUnknownField(); + } input.endObject(); return this; } - - @Override + public ChallengeStoryInfo clone() { - return new ChallengeStoryInfo().copyFrom(this); + return (new ChallengeStoryInfo()).copyFrom(this); } - - @Override + public boolean isEmpty() { - return ((bitField0_) == 0); + return (this.bitField0_ == 0); } - - public static ChallengeStoryInfo parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ChallengeStoryInfo(), data).checkInitialized(); + + public static ChallengeStoryInfo parseFrom(byte[] data) throws InvalidProtocolBufferException { + return (ChallengeStoryInfo)((ChallengeStoryInfo)ProtoMessage.mergeFrom(new ChallengeStoryInfo(), data)).checkInitialized(); } - - public static ChallengeStoryInfo parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ChallengeStoryInfo(), input).checkInitialized(); + + public static ChallengeStoryInfo parseFrom(ProtoSource input) throws IOException { + return (ChallengeStoryInfo)((ChallengeStoryInfo)ProtoMessage.mergeFrom(new ChallengeStoryInfo(), input)).checkInitialized(); } - - public static ChallengeStoryInfo parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ChallengeStoryInfo(), input).checkInitialized(); + + public static ChallengeStoryInfo parseFrom(JsonSource input) throws IOException { + return (ChallengeStoryInfo)((ChallengeStoryInfo)ProtoMessage.mergeFrom(new ChallengeStoryInfo(), input)).checkInitialized(); } - - /** - * @return factory for creating ChallengeStoryInfo messages - */ + public static MessageFactory getFactory() { return ChallengeStoryInfoFactory.INSTANCE; } - + private enum ChallengeStoryInfoFactory implements MessageFactory { INSTANCE; - - @Override - public ChallengeStoryInfo create() { - return ChallengeStoryInfo.newInstance(); + + public ChallengeStoryInfoOuterClass.ChallengeStoryInfo create() { + return ChallengeStoryInfoOuterClass.ChallengeStoryInfo.newInstance(); } } - - /** - * Contains name constants used for serializing JSON - */ + static class FieldNames { - static final FieldName curStoryBuffs = FieldName.forField("curStoryBuffs", "cur_story_buffs"); - static final FieldName curBossBuffs = FieldName.forField("curBossBuffs", "cur_boss_buffs"); + + static final FieldName curStoryBuffs = FieldName.forField("curStoryBuffs", "cur_story_buffs"); } } + + private enum ChallengeStoryInfoFactory implements MessageFactory { + INSTANCE; + + public ChallengeStoryInfoOuterClass.ChallengeStoryInfo create() { + return ChallengeStoryInfoOuterClass.ChallengeStoryInfo.newInstance(); + } + } + + static class FieldNames { + static final FieldName curBossBuffs = FieldName.forField("curBossBuffs", "cur_boss_buffs"); + + static final FieldName curStoryBuffs = FieldName.forField("curStoryBuffs", "cur_story_buffs"); + } } diff --git a/src/main/java/emu/lunarcore/server/packet/send/PacketSceneGroupRefreshScNotify.java b/src/main/java/emu/lunarcore/server/packet/send/PacketSceneGroupRefreshScNotify.java index cb445f7..dec9321 100644 --- a/src/main/java/emu/lunarcore/server/packet/send/PacketSceneGroupRefreshScNotify.java +++ b/src/main/java/emu/lunarcore/server/packet/send/PacketSceneGroupRefreshScNotify.java @@ -16,13 +16,13 @@ public class PacketSceneGroupRefreshScNotify extends BasePacket { super(CmdId.SceneGroupRefreshScNotify); var group = SceneGroupRefreshInfo.newInstance(); + group.setGroupRefreshType(SceneGroupRefreshType.SCENE_GROUP_REFRESH_TYPE_LOADED); if (toAdd != null) { group.setGroupId(toAdd.getGroupId()); group.addRefreshEntity(SceneEntityRefreshInfo.newInstance().setAddEntity(toAdd.toSceneEntityProto())); } else if (toRemove != null) { group.setGroupId(toRemove.getGroupId()); - group.setGroupRefreshType(SceneGroupRefreshType.SCENE_GROUP_REFRESH_TYPE_UNLOAD); group.addRefreshEntity(SceneEntityRefreshInfo.newInstance().setDelEntity(toRemove.getEntityId())); }