Add additional stuff for handling rogue npc dialogues

This commit is contained in:
Melledy
2023-10-29 13:13:53 -07:00
parent 3f6d83a052
commit 4e65fd6a7d
7 changed files with 821 additions and 82 deletions

View File

@@ -20,9 +20,9 @@ public final class NpcRogueInfoOuterClass {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 dialogue_group_id = 1;</code>
* <code>optional uint32 PNDKDICODHP = 1;</code>
*/
private int dialogueGroupId;
private int pNDKDICODHP;
/**
* <code>optional uint32 KCPOHLMKMFH = 3;</code>
@@ -35,13 +35,9 @@ public final class NpcRogueInfoOuterClass {
private int rogueNpcId;
/**
* <pre>
* repeated IICJAGOKIMP ALFIOHKDPLJ = 2;
* </pre>
*
* <code>optional uint32 ODGHKLBCEOF = 13;</code>
* <code>optional uint32 dialogue_group_id = 13;</code>
*/
private int oDGHKLBCEOF;
private int dialogueGroupId;
/**
* <code>optional bool IAJLMEKFNMO = 8;</code>
@@ -69,39 +65,39 @@ public final class NpcRogueInfoOuterClass {
}
/**
* <code>optional uint32 dialogue_group_id = 1;</code>
* @return whether the dialogueGroupId field is set
* <code>optional uint32 PNDKDICODHP = 1;</code>
* @return whether the pNDKDICODHP field is set
*/
public boolean hasDialogueGroupId() {
public boolean hasPNDKDICODHP() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 dialogue_group_id = 1;</code>
* <code>optional uint32 PNDKDICODHP = 1;</code>
* @return this
*/
public NpcRogueInfo clearDialogueGroupId() {
public NpcRogueInfo clearPNDKDICODHP() {
bitField0_ &= ~0x00000001;
dialogueGroupId = 0;
pNDKDICODHP = 0;
return this;
}
/**
* <code>optional uint32 dialogue_group_id = 1;</code>
* @return the dialogueGroupId
* <code>optional uint32 PNDKDICODHP = 1;</code>
* @return the pNDKDICODHP
*/
public int getDialogueGroupId() {
return dialogueGroupId;
public int getPNDKDICODHP() {
return pNDKDICODHP;
}
/**
* <code>optional uint32 dialogue_group_id = 1;</code>
* @param value the dialogueGroupId to set
* <code>optional uint32 PNDKDICODHP = 1;</code>
* @param value the pNDKDICODHP to set
* @return this
*/
public NpcRogueInfo setDialogueGroupId(final int value) {
public NpcRogueInfo setPNDKDICODHP(final int value) {
bitField0_ |= 0x00000001;
dialogueGroupId = value;
pNDKDICODHP = value;
return this;
}
@@ -180,55 +176,39 @@ public final class NpcRogueInfoOuterClass {
}
/**
* <pre>
* repeated IICJAGOKIMP ALFIOHKDPLJ = 2;
* </pre>
*
* <code>optional uint32 ODGHKLBCEOF = 13;</code>
* @return whether the oDGHKLBCEOF field is set
* <code>optional uint32 dialogue_group_id = 13;</code>
* @return whether the dialogueGroupId field is set
*/
public boolean hasODGHKLBCEOF() {
public boolean hasDialogueGroupId() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <pre>
* repeated IICJAGOKIMP ALFIOHKDPLJ = 2;
* </pre>
*
* <code>optional uint32 ODGHKLBCEOF = 13;</code>
* <code>optional uint32 dialogue_group_id = 13;</code>
* @return this
*/
public NpcRogueInfo clearODGHKLBCEOF() {
public NpcRogueInfo clearDialogueGroupId() {
bitField0_ &= ~0x00000008;
oDGHKLBCEOF = 0;
dialogueGroupId = 0;
return this;
}
/**
* <pre>
* repeated IICJAGOKIMP ALFIOHKDPLJ = 2;
* </pre>
*
* <code>optional uint32 ODGHKLBCEOF = 13;</code>
* @return the oDGHKLBCEOF
* <code>optional uint32 dialogue_group_id = 13;</code>
* @return the dialogueGroupId
*/
public int getODGHKLBCEOF() {
return oDGHKLBCEOF;
public int getDialogueGroupId() {
return dialogueGroupId;
}
/**
* <pre>
* repeated IICJAGOKIMP ALFIOHKDPLJ = 2;
* </pre>
*
* <code>optional uint32 ODGHKLBCEOF = 13;</code>
* @param value the oDGHKLBCEOF to set
* <code>optional uint32 dialogue_group_id = 13;</code>
* @param value the dialogueGroupId to set
* @return this
*/
public NpcRogueInfo setODGHKLBCEOF(final int value) {
public NpcRogueInfo setDialogueGroupId(final int value) {
bitField0_ |= 0x00000008;
oDGHKLBCEOF = value;
dialogueGroupId = value;
return this;
}
@@ -379,10 +359,10 @@ public final class NpcRogueInfoOuterClass {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
dialogueGroupId = other.dialogueGroupId;
pNDKDICODHP = other.pNDKDICODHP;
kCPOHLMKMFH = other.kCPOHLMKMFH;
rogueNpcId = other.rogueNpcId;
oDGHKLBCEOF = other.oDGHKLBCEOF;
dialogueGroupId = other.dialogueGroupId;
iAJLMEKFNMO = other.iAJLMEKFNMO;
nHEENJEGNLL = other.nHEENJEGNLL;
jGJHOEBINDP.copyFrom(other.jGJHOEBINDP);
@@ -396,8 +376,8 @@ public final class NpcRogueInfoOuterClass {
return this;
}
cachedSize = -1;
if (other.hasDialogueGroupId()) {
setDialogueGroupId(other.dialogueGroupId);
if (other.hasPNDKDICODHP()) {
setPNDKDICODHP(other.pNDKDICODHP);
}
if (other.hasKCPOHLMKMFH()) {
setKCPOHLMKMFH(other.kCPOHLMKMFH);
@@ -405,8 +385,8 @@ public final class NpcRogueInfoOuterClass {
if (other.hasRogueNpcId()) {
setRogueNpcId(other.rogueNpcId);
}
if (other.hasODGHKLBCEOF()) {
setODGHKLBCEOF(other.oDGHKLBCEOF);
if (other.hasDialogueGroupId()) {
setDialogueGroupId(other.dialogueGroupId);
}
if (other.hasIAJLMEKFNMO()) {
setIAJLMEKFNMO(other.iAJLMEKFNMO);
@@ -427,10 +407,10 @@ public final class NpcRogueInfoOuterClass {
}
cachedSize = -1;
bitField0_ = 0;
dialogueGroupId = 0;
pNDKDICODHP = 0;
kCPOHLMKMFH = 0;
rogueNpcId = 0;
oDGHKLBCEOF = 0;
dialogueGroupId = 0;
iAJLMEKFNMO = false;
nHEENJEGNLL = false;
jGJHOEBINDP.clear();
@@ -458,10 +438,10 @@ public final class NpcRogueInfoOuterClass {
}
NpcRogueInfo other = (NpcRogueInfo) o;
return bitField0_ == other.bitField0_
&& (!hasDialogueGroupId() || dialogueGroupId == other.dialogueGroupId)
&& (!hasPNDKDICODHP() || pNDKDICODHP == other.pNDKDICODHP)
&& (!hasKCPOHLMKMFH() || kCPOHLMKMFH == other.kCPOHLMKMFH)
&& (!hasRogueNpcId() || rogueNpcId == other.rogueNpcId)
&& (!hasODGHKLBCEOF() || oDGHKLBCEOF == other.oDGHKLBCEOF)
&& (!hasDialogueGroupId() || dialogueGroupId == other.dialogueGroupId)
&& (!hasIAJLMEKFNMO() || iAJLMEKFNMO == other.iAJLMEKFNMO)
&& (!hasNHEENJEGNLL() || nHEENJEGNLL == other.nHEENJEGNLL)
&& (!hasJGJHOEBINDP() || jGJHOEBINDP.equals(other.jGJHOEBINDP));
@@ -471,7 +451,7 @@ public final class NpcRogueInfoOuterClass {
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 8);
output.writeUInt32NoTag(dialogueGroupId);
output.writeUInt32NoTag(pNDKDICODHP);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 24);
@@ -483,7 +463,7 @@ public final class NpcRogueInfoOuterClass {
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeRawByte((byte) 104);
output.writeUInt32NoTag(oDGHKLBCEOF);
output.writeUInt32NoTag(dialogueGroupId);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeRawByte((byte) 64);
@@ -505,7 +485,7 @@ public final class NpcRogueInfoOuterClass {
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(dialogueGroupId);
size += 1 + ProtoSink.computeUInt32SizeNoTag(pNDKDICODHP);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(kCPOHLMKMFH);
@@ -514,7 +494,7 @@ public final class NpcRogueInfoOuterClass {
size += 1 + ProtoSink.computeUInt32SizeNoTag(rogueNpcId);
}
if ((bitField0_ & 0x00000008) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(oDGHKLBCEOF);
size += 1 + ProtoSink.computeUInt32SizeNoTag(dialogueGroupId);
}
if ((bitField0_ & 0x00000010) != 0) {
size += 2;
@@ -536,8 +516,8 @@ public final class NpcRogueInfoOuterClass {
while (true) {
switch (tag) {
case 8: {
// dialogueGroupId
dialogueGroupId = input.readUInt32();
// pNDKDICODHP
pNDKDICODHP = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 24) {
@@ -563,8 +543,8 @@ public final class NpcRogueInfoOuterClass {
}
}
case 104: {
// oDGHKLBCEOF
oDGHKLBCEOF = input.readUInt32();
// dialogueGroupId
dialogueGroupId = input.readUInt32();
bitField0_ |= 0x00000008;
tag = input.readTag();
if (tag != 64) {
@@ -615,7 +595,7 @@ public final class NpcRogueInfoOuterClass {
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.dialogueGroupId, dialogueGroupId);
output.writeUInt32(FieldNames.pNDKDICODHP, pNDKDICODHP);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.kCPOHLMKMFH, kCPOHLMKMFH);
@@ -624,7 +604,7 @@ public final class NpcRogueInfoOuterClass {
output.writeUInt32(FieldNames.rogueNpcId, rogueNpcId);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeUInt32(FieldNames.oDGHKLBCEOF, oDGHKLBCEOF);
output.writeUInt32(FieldNames.dialogueGroupId, dialogueGroupId);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeBool(FieldNames.iAJLMEKFNMO, iAJLMEKFNMO);
@@ -645,11 +625,10 @@ public final class NpcRogueInfoOuterClass {
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1758320386:
case 1899979106: {
if (input.isAtField(FieldNames.dialogueGroupId)) {
case 1418498134: {
if (input.isAtField(FieldNames.pNDKDICODHP)) {
if (!input.trySkipNullValue()) {
dialogueGroupId = input.readUInt32();
pNDKDICODHP = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
@@ -680,10 +659,11 @@ public final class NpcRogueInfoOuterClass {
}
break;
}
case 826923524: {
if (input.isAtField(FieldNames.oDGHKLBCEOF)) {
case 1758320386:
case 1899979106: {
if (input.isAtField(FieldNames.dialogueGroupId)) {
if (!input.trySkipNullValue()) {
oDGHKLBCEOF = input.readUInt32();
dialogueGroupId = input.readUInt32();
bitField0_ |= 0x00000008;
}
} else {
@@ -1101,13 +1081,13 @@ public final class NpcRogueInfoOuterClass {
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName dialogueGroupId = FieldName.forField("dialogueGroupId", "dialogue_group_id");
static final FieldName pNDKDICODHP = FieldName.forField("PNDKDICODHP");
static final FieldName kCPOHLMKMFH = FieldName.forField("KCPOHLMKMFH");
static final FieldName rogueNpcId = FieldName.forField("rogueNpcId", "rogue_npc_id");
static final FieldName oDGHKLBCEOF = FieldName.forField("ODGHKLBCEOF");
static final FieldName dialogueGroupId = FieldName.forField("dialogueGroupId", "dialogue_group_id");
static final FieldName iAJLMEKFNMO = FieldName.forField("IAJLMEKFNMO");

View File

@@ -0,0 +1,342 @@
// 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 SelectRogueDialogueEventCsReqOuterClass {
/**
* Protobuf type {@code SelectRogueDialogueEventCsReq}
*/
public static final class SelectRogueDialogueEventCsReq extends ProtoMessage<SelectRogueDialogueEventCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 COMHCIAONKJ = 4;</code>
*/
private int cOMHCIAONKJ;
/**
* <code>optional uint32 dialogue_event_id = 15;</code>
*/
private int dialogueEventId;
private SelectRogueDialogueEventCsReq() {
}
/**
* @return a new empty instance of {@code SelectRogueDialogueEventCsReq}
*/
public static SelectRogueDialogueEventCsReq newInstance() {
return new SelectRogueDialogueEventCsReq();
}
/**
* <code>optional uint32 COMHCIAONKJ = 4;</code>
* @return whether the cOMHCIAONKJ field is set
*/
public boolean hasCOMHCIAONKJ() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 COMHCIAONKJ = 4;</code>
* @return this
*/
public SelectRogueDialogueEventCsReq clearCOMHCIAONKJ() {
bitField0_ &= ~0x00000001;
cOMHCIAONKJ = 0;
return this;
}
/**
* <code>optional uint32 COMHCIAONKJ = 4;</code>
* @return the cOMHCIAONKJ
*/
public int getCOMHCIAONKJ() {
return cOMHCIAONKJ;
}
/**
* <code>optional uint32 COMHCIAONKJ = 4;</code>
* @param value the cOMHCIAONKJ to set
* @return this
*/
public SelectRogueDialogueEventCsReq setCOMHCIAONKJ(final int value) {
bitField0_ |= 0x00000001;
cOMHCIAONKJ = value;
return this;
}
/**
* <code>optional uint32 dialogue_event_id = 15;</code>
* @return whether the dialogueEventId field is set
*/
public boolean hasDialogueEventId() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 dialogue_event_id = 15;</code>
* @return this
*/
public SelectRogueDialogueEventCsReq clearDialogueEventId() {
bitField0_ &= ~0x00000002;
dialogueEventId = 0;
return this;
}
/**
* <code>optional uint32 dialogue_event_id = 15;</code>
* @return the dialogueEventId
*/
public int getDialogueEventId() {
return dialogueEventId;
}
/**
* <code>optional uint32 dialogue_event_id = 15;</code>
* @param value the dialogueEventId to set
* @return this
*/
public SelectRogueDialogueEventCsReq setDialogueEventId(final int value) {
bitField0_ |= 0x00000002;
dialogueEventId = value;
return this;
}
@Override
public SelectRogueDialogueEventCsReq copyFrom(final SelectRogueDialogueEventCsReq other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
cOMHCIAONKJ = other.cOMHCIAONKJ;
dialogueEventId = other.dialogueEventId;
}
return this;
}
@Override
public SelectRogueDialogueEventCsReq mergeFrom(final SelectRogueDialogueEventCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasCOMHCIAONKJ()) {
setCOMHCIAONKJ(other.cOMHCIAONKJ);
}
if (other.hasDialogueEventId()) {
setDialogueEventId(other.dialogueEventId);
}
return this;
}
@Override
public SelectRogueDialogueEventCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
cOMHCIAONKJ = 0;
dialogueEventId = 0;
return this;
}
@Override
public SelectRogueDialogueEventCsReq 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 SelectRogueDialogueEventCsReq)) {
return false;
}
SelectRogueDialogueEventCsReq other = (SelectRogueDialogueEventCsReq) o;
return bitField0_ == other.bitField0_
&& (!hasCOMHCIAONKJ() || cOMHCIAONKJ == other.cOMHCIAONKJ)
&& (!hasDialogueEventId() || dialogueEventId == other.dialogueEventId);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 32);
output.writeUInt32NoTag(cOMHCIAONKJ);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 120);
output.writeUInt32NoTag(dialogueEventId);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(cOMHCIAONKJ);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(dialogueEventId);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public SelectRogueDialogueEventCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 32: {
// cOMHCIAONKJ
cOMHCIAONKJ = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 120) {
break;
}
}
case 120: {
// dialogueEventId
dialogueEventId = 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.cOMHCIAONKJ, cOMHCIAONKJ);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.dialogueEventId, dialogueEventId);
}
output.endObject();
}
@Override
public SelectRogueDialogueEventCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -2097477198: {
if (input.isAtField(FieldNames.cOMHCIAONKJ)) {
if (!input.trySkipNullValue()) {
cOMHCIAONKJ = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 88389725:
case 1671736167: {
if (input.isAtField(FieldNames.dialogueEventId)) {
if (!input.trySkipNullValue()) {
dialogueEventId = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public SelectRogueDialogueEventCsReq clone() {
return new SelectRogueDialogueEventCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static SelectRogueDialogueEventCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new SelectRogueDialogueEventCsReq(), data).checkInitialized();
}
public static SelectRogueDialogueEventCsReq parseFrom(final ProtoSource input) throws
IOException {
return ProtoMessage.mergeFrom(new SelectRogueDialogueEventCsReq(), input).checkInitialized();
}
public static SelectRogueDialogueEventCsReq parseFrom(final JsonSource input) throws
IOException {
return ProtoMessage.mergeFrom(new SelectRogueDialogueEventCsReq(), input).checkInitialized();
}
/**
* @return factory for creating SelectRogueDialogueEventCsReq messages
*/
public static MessageFactory<SelectRogueDialogueEventCsReq> getFactory() {
return SelectRogueDialogueEventCsReqFactory.INSTANCE;
}
private enum SelectRogueDialogueEventCsReqFactory implements MessageFactory<SelectRogueDialogueEventCsReq> {
INSTANCE;
@Override
public SelectRogueDialogueEventCsReq create() {
return SelectRogueDialogueEventCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName cOMHCIAONKJ = FieldName.forField("COMHCIAONKJ");
static final FieldName dialogueEventId = FieldName.forField("dialogueEventId", "dialogue_event_id");
}
}
}

View File

@@ -0,0 +1,367 @@
// 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 SelectRogueDialogueEventScRspOuterClass {
/**
* Protobuf type {@code SelectRogueDialogueEventScRsp}
*/
public static final class SelectRogueDialogueEventScRsp extends ProtoMessage<SelectRogueDialogueEventScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 retcode = 8;</code>
*/
private int retcode;
/**
* <pre>
* RogueDialogueEvent selected_dialogue_event = 14;
* ODKKECCOLLB JJNBIFDOLFH = 15;
* </pre>
*
* <code>optional uint32 dialogue_event_id = 10;</code>
*/
private int dialogueEventId;
private SelectRogueDialogueEventScRsp() {
}
/**
* @return a new empty instance of {@code SelectRogueDialogueEventScRsp}
*/
public static SelectRogueDialogueEventScRsp newInstance() {
return new SelectRogueDialogueEventScRsp();
}
/**
* <code>optional uint32 retcode = 8;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 retcode = 8;</code>
* @return this
*/
public SelectRogueDialogueEventScRsp clearRetcode() {
bitField0_ &= ~0x00000001;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 8;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 8;</code>
* @param value the retcode to set
* @return this
*/
public SelectRogueDialogueEventScRsp setRetcode(final int value) {
bitField0_ |= 0x00000001;
retcode = value;
return this;
}
/**
* <pre>
* RogueDialogueEvent selected_dialogue_event = 14;
* ODKKECCOLLB JJNBIFDOLFH = 15;
* </pre>
*
* <code>optional uint32 dialogue_event_id = 10;</code>
* @return whether the dialogueEventId field is set
*/
public boolean hasDialogueEventId() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <pre>
* RogueDialogueEvent selected_dialogue_event = 14;
* ODKKECCOLLB JJNBIFDOLFH = 15;
* </pre>
*
* <code>optional uint32 dialogue_event_id = 10;</code>
* @return this
*/
public SelectRogueDialogueEventScRsp clearDialogueEventId() {
bitField0_ &= ~0x00000002;
dialogueEventId = 0;
return this;
}
/**
* <pre>
* RogueDialogueEvent selected_dialogue_event = 14;
* ODKKECCOLLB JJNBIFDOLFH = 15;
* </pre>
*
* <code>optional uint32 dialogue_event_id = 10;</code>
* @return the dialogueEventId
*/
public int getDialogueEventId() {
return dialogueEventId;
}
/**
* <pre>
* RogueDialogueEvent selected_dialogue_event = 14;
* ODKKECCOLLB JJNBIFDOLFH = 15;
* </pre>
*
* <code>optional uint32 dialogue_event_id = 10;</code>
* @param value the dialogueEventId to set
* @return this
*/
public SelectRogueDialogueEventScRsp setDialogueEventId(final int value) {
bitField0_ |= 0x00000002;
dialogueEventId = value;
return this;
}
@Override
public SelectRogueDialogueEventScRsp copyFrom(final SelectRogueDialogueEventScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
retcode = other.retcode;
dialogueEventId = other.dialogueEventId;
}
return this;
}
@Override
public SelectRogueDialogueEventScRsp mergeFrom(final SelectRogueDialogueEventScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasDialogueEventId()) {
setDialogueEventId(other.dialogueEventId);
}
return this;
}
@Override
public SelectRogueDialogueEventScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
retcode = 0;
dialogueEventId = 0;
return this;
}
@Override
public SelectRogueDialogueEventScRsp 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 SelectRogueDialogueEventScRsp)) {
return false;
}
SelectRogueDialogueEventScRsp other = (SelectRogueDialogueEventScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasDialogueEventId() || dialogueEventId == other.dialogueEventId);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 64);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 80);
output.writeUInt32NoTag(dialogueEventId);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(dialogueEventId);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public SelectRogueDialogueEventScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 64: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 80) {
break;
}
}
case 80: {
// dialogueEventId
dialogueEventId = 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.retcode, retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.dialogueEventId, dialogueEventId);
}
output.endObject();
}
@Override
public SelectRogueDialogueEventScRsp 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 88389725:
case 1671736167: {
if (input.isAtField(FieldNames.dialogueEventId)) {
if (!input.trySkipNullValue()) {
dialogueEventId = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public SelectRogueDialogueEventScRsp clone() {
return new SelectRogueDialogueEventScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static SelectRogueDialogueEventScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new SelectRogueDialogueEventScRsp(), data).checkInitialized();
}
public static SelectRogueDialogueEventScRsp parseFrom(final ProtoSource input) throws
IOException {
return ProtoMessage.mergeFrom(new SelectRogueDialogueEventScRsp(), input).checkInitialized();
}
public static SelectRogueDialogueEventScRsp parseFrom(final JsonSource input) throws
IOException {
return ProtoMessage.mergeFrom(new SelectRogueDialogueEventScRsp(), input).checkInitialized();
}
/**
* @return factory for creating SelectRogueDialogueEventScRsp messages
*/
public static MessageFactory<SelectRogueDialogueEventScRsp> getFactory() {
return SelectRogueDialogueEventScRspFactory.INSTANCE;
}
private enum SelectRogueDialogueEventScRspFactory implements MessageFactory<SelectRogueDialogueEventScRsp> {
INSTANCE;
@Override
public SelectRogueDialogueEventScRsp create() {
return SelectRogueDialogueEventScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName dialogueEventId = FieldName.forField("dialogueEventId", "dialogue_event_id");
}
}
}

View File

@@ -213,6 +213,14 @@ public class RogueInstance {
return nextRoom;
}
// Dialogue stuff
public void selectDialogue(int dialogueEventId) {
}
// Battle
public synchronized void onBattleStart(Battle battle) {
for (var buff : this.getBuffs().values()) {
battle.addBuff(buff.toMazeBuff());

View File

@@ -38,7 +38,8 @@ public class EntityNpc implements GameEntity {
// Rogue data
if (this.rogueNpcId > 0) {
var rogue = NpcRogueInfo.newInstance()
.setRogueNpcId(this.rogueNpcId);
.setRogueNpcId(this.rogueNpcId)
.setDialogueGroupId(1);
npc.getMutableExtraInfo().setRogueInfo(rogue);
}

View File

@@ -0,0 +1,24 @@
package emu.lunarcore.server.packet.recv;
import emu.lunarcore.proto.SelectRogueDialogueEventCsReqOuterClass.SelectRogueDialogueEventCsReq;
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.PacketSelectRogueDialogueEventScRsp;
@Opcodes(CmdId.SelectRogueDialogueEventCsReq)
public class HandlerSelectRogueDialogueEventCsReq extends PacketHandler {
@Override
public void handle(GameSession session, byte[] header, byte[] data) throws Exception {
var req = SelectRogueDialogueEventCsReq.parseFrom(data);
if (session.getPlayer().getRogueInstance() != null) {
session.getPlayer().getRogueInstance().selectDialogue(req.getDialogueEventId());
}
session.send(new PacketSelectRogueDialogueEventScRsp(req.getDialogueEventId()));
}
}

View File

@@ -0,0 +1,17 @@
package emu.lunarcore.server.packet.send;
import emu.lunarcore.proto.SelectRogueDialogueEventScRspOuterClass.SelectRogueDialogueEventScRsp;
import emu.lunarcore.server.packet.BasePacket;
import emu.lunarcore.server.packet.CmdId;
public class PacketSelectRogueDialogueEventScRsp extends BasePacket {
public PacketSelectRogueDialogueEventScRsp(int dialogueEventId) {
super(CmdId.SelectRogueDialogueEventScRsp);
var data = SelectRogueDialogueEventScRsp.newInstance()
.setDialogueEventId(dialogueEventId);
this.setData(data);
}
}