Implement summon related techniques

Make sure to redownload config files are as new summon unit configs are required
This commit is contained in:
Melledy
2023-12-13 19:10:51 -08:00
parent 6c9f6743cc
commit 09337fd9ec
33 changed files with 4843 additions and 410 deletions

View File

@@ -22,37 +22,37 @@ public final class BuffInfoOuterClass {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint64 FEDNBDBBHHN = 1;</code>
* <code>optional uint64 add_time_ms = 2;</code>
*/
private long fEDNBDBBHHN;
private long addTimeMs;
/**
* <code>optional float BNEOPNNPFLE = 6;</code>
* <code>optional float life_time = 3;</code>
*/
private float bNEOPNNPFLE;
private float lifeTime;
/**
* <code>optional uint32 level = 2;</code>
*/
private int level;
/**
* <code>optional uint32 IPFABMCJDMN = 4;</code>
*/
private int iPFABMCJDMN;
/**
* <code>optional uint32 count = 12;</code>
*/
private int count;
/**
* <code>optional uint32 base_avatar_id = 14;</code>
* <code>optional uint32 base_avatar_id = 5;</code>
*/
private int baseAvatarId;
/**
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 3;</code>
* <code>optional uint32 count = 6;</code>
*/
private int count;
/**
* <code>optional uint32 buff_id = 14;</code>
*/
private int buffId;
/**
* <code>optional uint32 level = 15;</code>
*/
private int level;
/**
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 7;</code>
*/
private final RepeatedMessage<DynamicValuesEntry> dynamicValues = RepeatedMessage.newEmptyInstance(DynamicValuesEntry.getFactory());
@@ -67,210 +67,99 @@ public final class BuffInfoOuterClass {
}
/**
* <code>optional uint64 FEDNBDBBHHN = 1;</code>
* @return whether the fEDNBDBBHHN field is set
* <code>optional uint64 add_time_ms = 2;</code>
* @return whether the addTimeMs field is set
*/
public boolean hasFEDNBDBBHHN() {
public boolean hasAddTimeMs() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint64 FEDNBDBBHHN = 1;</code>
* <code>optional uint64 add_time_ms = 2;</code>
* @return this
*/
public BuffInfo clearFEDNBDBBHHN() {
public BuffInfo clearAddTimeMs() {
bitField0_ &= ~0x00000001;
fEDNBDBBHHN = 0L;
addTimeMs = 0L;
return this;
}
/**
* <code>optional uint64 FEDNBDBBHHN = 1;</code>
* @return the fEDNBDBBHHN
* <code>optional uint64 add_time_ms = 2;</code>
* @return the addTimeMs
*/
public long getFEDNBDBBHHN() {
return fEDNBDBBHHN;
public long getAddTimeMs() {
return addTimeMs;
}
/**
* <code>optional uint64 FEDNBDBBHHN = 1;</code>
* @param value the fEDNBDBBHHN to set
* <code>optional uint64 add_time_ms = 2;</code>
* @param value the addTimeMs to set
* @return this
*/
public BuffInfo setFEDNBDBBHHN(final long value) {
public BuffInfo setAddTimeMs(final long value) {
bitField0_ |= 0x00000001;
fEDNBDBBHHN = value;
addTimeMs = value;
return this;
}
/**
* <code>optional float BNEOPNNPFLE = 6;</code>
* @return whether the bNEOPNNPFLE field is set
* <code>optional float life_time = 3;</code>
* @return whether the lifeTime field is set
*/
public boolean hasBNEOPNNPFLE() {
public boolean hasLifeTime() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional float BNEOPNNPFLE = 6;</code>
* <code>optional float life_time = 3;</code>
* @return this
*/
public BuffInfo clearBNEOPNNPFLE() {
public BuffInfo clearLifeTime() {
bitField0_ &= ~0x00000002;
bNEOPNNPFLE = 0F;
lifeTime = 0F;
return this;
}
/**
* <code>optional float BNEOPNNPFLE = 6;</code>
* @return the bNEOPNNPFLE
* <code>optional float life_time = 3;</code>
* @return the lifeTime
*/
public float getBNEOPNNPFLE() {
return bNEOPNNPFLE;
public float getLifeTime() {
return lifeTime;
}
/**
* <code>optional float BNEOPNNPFLE = 6;</code>
* @param value the bNEOPNNPFLE to set
* <code>optional float life_time = 3;</code>
* @param value the lifeTime to set
* @return this
*/
public BuffInfo setBNEOPNNPFLE(final float value) {
public BuffInfo setLifeTime(final float value) {
bitField0_ |= 0x00000002;
bNEOPNNPFLE = value;
lifeTime = value;
return this;
}
/**
* <code>optional uint32 level = 2;</code>
* @return whether the level field is set
* <code>optional uint32 base_avatar_id = 5;</code>
* @return whether the baseAvatarId field is set
*/
public boolean hasLevel() {
public boolean hasBaseAvatarId() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional uint32 level = 2;</code>
* @return this
*/
public BuffInfo clearLevel() {
bitField0_ &= ~0x00000004;
level = 0;
return this;
}
/**
* <code>optional uint32 level = 2;</code>
* @return the level
*/
public int getLevel() {
return level;
}
/**
* <code>optional uint32 level = 2;</code>
* @param value the level to set
* @return this
*/
public BuffInfo setLevel(final int value) {
bitField0_ |= 0x00000004;
level = value;
return this;
}
/**
* <code>optional uint32 IPFABMCJDMN = 4;</code>
* @return whether the iPFABMCJDMN field is set
*/
public boolean hasIPFABMCJDMN() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <code>optional uint32 IPFABMCJDMN = 4;</code>
* @return this
*/
public BuffInfo clearIPFABMCJDMN() {
bitField0_ &= ~0x00000008;
iPFABMCJDMN = 0;
return this;
}
/**
* <code>optional uint32 IPFABMCJDMN = 4;</code>
* @return the iPFABMCJDMN
*/
public int getIPFABMCJDMN() {
return iPFABMCJDMN;
}
/**
* <code>optional uint32 IPFABMCJDMN = 4;</code>
* @param value the iPFABMCJDMN to set
* @return this
*/
public BuffInfo setIPFABMCJDMN(final int value) {
bitField0_ |= 0x00000008;
iPFABMCJDMN = value;
return this;
}
/**
* <code>optional uint32 count = 12;</code>
* @return whether the count field is set
*/
public boolean hasCount() {
return (bitField0_ & 0x00000010) != 0;
}
/**
* <code>optional uint32 count = 12;</code>
* @return this
*/
public BuffInfo clearCount() {
bitField0_ &= ~0x00000010;
count = 0;
return this;
}
/**
* <code>optional uint32 count = 12;</code>
* @return the count
*/
public int getCount() {
return count;
}
/**
* <code>optional uint32 count = 12;</code>
* @param value the count to set
* @return this
*/
public BuffInfo setCount(final int value) {
bitField0_ |= 0x00000010;
count = value;
return this;
}
/**
* <code>optional uint32 base_avatar_id = 14;</code>
* @return whether the baseAvatarId field is set
*/
public boolean hasBaseAvatarId() {
return (bitField0_ & 0x00000020) != 0;
}
/**
* <code>optional uint32 base_avatar_id = 14;</code>
* <code>optional uint32 base_avatar_id = 5;</code>
* @return this
*/
public BuffInfo clearBaseAvatarId() {
bitField0_ &= ~0x00000020;
bitField0_ &= ~0x00000004;
baseAvatarId = 0;
return this;
}
/**
* <code>optional uint32 base_avatar_id = 14;</code>
* <code>optional uint32 base_avatar_id = 5;</code>
* @return the baseAvatarId
*/
public int getBaseAvatarId() {
@@ -278,18 +167,129 @@ public final class BuffInfoOuterClass {
}
/**
* <code>optional uint32 base_avatar_id = 14;</code>
* <code>optional uint32 base_avatar_id = 5;</code>
* @param value the baseAvatarId to set
* @return this
*/
public BuffInfo setBaseAvatarId(final int value) {
bitField0_ |= 0x00000020;
bitField0_ |= 0x00000004;
baseAvatarId = value;
return this;
}
/**
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 3;</code>
* <code>optional uint32 count = 6;</code>
* @return whether the count field is set
*/
public boolean hasCount() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <code>optional uint32 count = 6;</code>
* @return this
*/
public BuffInfo clearCount() {
bitField0_ &= ~0x00000008;
count = 0;
return this;
}
/**
* <code>optional uint32 count = 6;</code>
* @return the count
*/
public int getCount() {
return count;
}
/**
* <code>optional uint32 count = 6;</code>
* @param value the count to set
* @return this
*/
public BuffInfo setCount(final int value) {
bitField0_ |= 0x00000008;
count = value;
return this;
}
/**
* <code>optional uint32 buff_id = 14;</code>
* @return whether the buffId field is set
*/
public boolean hasBuffId() {
return (bitField0_ & 0x00000010) != 0;
}
/**
* <code>optional uint32 buff_id = 14;</code>
* @return this
*/
public BuffInfo clearBuffId() {
bitField0_ &= ~0x00000010;
buffId = 0;
return this;
}
/**
* <code>optional uint32 buff_id = 14;</code>
* @return the buffId
*/
public int getBuffId() {
return buffId;
}
/**
* <code>optional uint32 buff_id = 14;</code>
* @param value the buffId to set
* @return this
*/
public BuffInfo setBuffId(final int value) {
bitField0_ |= 0x00000010;
buffId = value;
return this;
}
/**
* <code>optional uint32 level = 15;</code>
* @return whether the level field is set
*/
public boolean hasLevel() {
return (bitField0_ & 0x00000020) != 0;
}
/**
* <code>optional uint32 level = 15;</code>
* @return this
*/
public BuffInfo clearLevel() {
bitField0_ &= ~0x00000020;
level = 0;
return this;
}
/**
* <code>optional uint32 level = 15;</code>
* @return the level
*/
public int getLevel() {
return level;
}
/**
* <code>optional uint32 level = 15;</code>
* @param value the level to set
* @return this
*/
public BuffInfo setLevel(final int value) {
bitField0_ |= 0x00000020;
level = value;
return this;
}
/**
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 7;</code>
* @return whether the dynamicValues field is set
*/
public boolean hasDynamicValues() {
@@ -297,7 +297,7 @@ public final class BuffInfoOuterClass {
}
/**
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 3;</code>
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 7;</code>
* @return this
*/
public BuffInfo clearDynamicValues() {
@@ -307,7 +307,7 @@ public final class BuffInfoOuterClass {
}
/**
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 3;</code>
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 7;</code>
*
* 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.
@@ -321,7 +321,7 @@ public final class BuffInfoOuterClass {
}
/**
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 3;</code>
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 7;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
@@ -335,7 +335,7 @@ public final class BuffInfoOuterClass {
}
/**
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 3;</code>
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 7;</code>
* @param value the dynamicValues to add
* @return this
*/
@@ -346,7 +346,7 @@ public final class BuffInfoOuterClass {
}
/**
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 3;</code>
* <code>repeated .BuffInfo.DynamicValuesEntry dynamic_values = 7;</code>
* @param values the dynamicValues to add
* @return this
*/
@@ -361,12 +361,12 @@ public final class BuffInfoOuterClass {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
fEDNBDBBHHN = other.fEDNBDBBHHN;
bNEOPNNPFLE = other.bNEOPNNPFLE;
level = other.level;
iPFABMCJDMN = other.iPFABMCJDMN;
count = other.count;
addTimeMs = other.addTimeMs;
lifeTime = other.lifeTime;
baseAvatarId = other.baseAvatarId;
count = other.count;
buffId = other.buffId;
level = other.level;
dynamicValues.copyFrom(other.dynamicValues);
}
return this;
@@ -378,23 +378,23 @@ public final class BuffInfoOuterClass {
return this;
}
cachedSize = -1;
if (other.hasFEDNBDBBHHN()) {
setFEDNBDBBHHN(other.fEDNBDBBHHN);
if (other.hasAddTimeMs()) {
setAddTimeMs(other.addTimeMs);
}
if (other.hasBNEOPNNPFLE()) {
setBNEOPNNPFLE(other.bNEOPNNPFLE);
if (other.hasLifeTime()) {
setLifeTime(other.lifeTime);
}
if (other.hasLevel()) {
setLevel(other.level);
}
if (other.hasIPFABMCJDMN()) {
setIPFABMCJDMN(other.iPFABMCJDMN);
if (other.hasBaseAvatarId()) {
setBaseAvatarId(other.baseAvatarId);
}
if (other.hasCount()) {
setCount(other.count);
}
if (other.hasBaseAvatarId()) {
setBaseAvatarId(other.baseAvatarId);
if (other.hasBuffId()) {
setBuffId(other.buffId);
}
if (other.hasLevel()) {
setLevel(other.level);
}
if (other.hasDynamicValues()) {
getMutableDynamicValues().addAll(other.dynamicValues);
@@ -409,12 +409,12 @@ public final class BuffInfoOuterClass {
}
cachedSize = -1;
bitField0_ = 0;
fEDNBDBBHHN = 0L;
bNEOPNNPFLE = 0F;
level = 0;
iPFABMCJDMN = 0;
count = 0;
addTimeMs = 0L;
lifeTime = 0F;
baseAvatarId = 0;
count = 0;
buffId = 0;
level = 0;
dynamicValues.clear();
return this;
}
@@ -440,44 +440,44 @@ public final class BuffInfoOuterClass {
}
BuffInfo other = (BuffInfo) o;
return bitField0_ == other.bitField0_
&& (!hasFEDNBDBBHHN() || fEDNBDBBHHN == other.fEDNBDBBHHN)
&& (!hasBNEOPNNPFLE() || ProtoUtil.isEqual(bNEOPNNPFLE, other.bNEOPNNPFLE))
&& (!hasLevel() || level == other.level)
&& (!hasIPFABMCJDMN() || iPFABMCJDMN == other.iPFABMCJDMN)
&& (!hasCount() || count == other.count)
&& (!hasAddTimeMs() || addTimeMs == other.addTimeMs)
&& (!hasLifeTime() || ProtoUtil.isEqual(lifeTime, other.lifeTime))
&& (!hasBaseAvatarId() || baseAvatarId == other.baseAvatarId)
&& (!hasCount() || count == other.count)
&& (!hasBuffId() || buffId == other.buffId)
&& (!hasLevel() || level == other.level)
&& (!hasDynamicValues() || dynamicValues.equals(other.dynamicValues));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 8);
output.writeUInt64NoTag(fEDNBDBBHHN);
output.writeRawByte((byte) 16);
output.writeUInt64NoTag(addTimeMs);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 53);
output.writeFloatNoTag(bNEOPNNPFLE);
output.writeRawByte((byte) 29);
output.writeFloatNoTag(lifeTime);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 16);
output.writeUInt32NoTag(level);
output.writeRawByte((byte) 40);
output.writeUInt32NoTag(baseAvatarId);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeRawByte((byte) 32);
output.writeUInt32NoTag(iPFABMCJDMN);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeRawByte((byte) 96);
output.writeRawByte((byte) 48);
output.writeUInt32NoTag(count);
}
if ((bitField0_ & 0x00000020) != 0) {
if ((bitField0_ & 0x00000010) != 0) {
output.writeRawByte((byte) 112);
output.writeUInt32NoTag(baseAvatarId);
output.writeUInt32NoTag(buffId);
}
if ((bitField0_ & 0x00000020) != 0) {
output.writeRawByte((byte) 120);
output.writeUInt32NoTag(level);
}
if ((bitField0_ & 0x00000040) != 0) {
for (int i = 0; i < dynamicValues.length(); i++) {
output.writeRawByte((byte) 26);
output.writeRawByte((byte) 58);
output.writeMessageNoTag(dynamicValues.get(i));
}
}
@@ -487,22 +487,22 @@ public final class BuffInfoOuterClass {
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt64SizeNoTag(fEDNBDBBHHN);
size += 1 + ProtoSink.computeUInt64SizeNoTag(addTimeMs);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 5;
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(level);
size += 1 + ProtoSink.computeUInt32SizeNoTag(baseAvatarId);
}
if ((bitField0_ & 0x00000008) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(iPFABMCJDMN);
}
if ((bitField0_ & 0x00000010) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(count);
}
if ((bitField0_ & 0x00000010) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(buffId);
}
if ((bitField0_ & 0x00000020) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(baseAvatarId);
size += 1 + ProtoSink.computeUInt32SizeNoTag(level);
}
if ((bitField0_ & 0x00000040) != 0) {
size += (1 * dynamicValues.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(dynamicValues);
@@ -517,61 +517,61 @@ public final class BuffInfoOuterClass {
int tag = input.readTag();
while (true) {
switch (tag) {
case 8: {
// fEDNBDBBHHN
fEDNBDBBHHN = input.readUInt64();
case 16: {
// addTimeMs
addTimeMs = input.readUInt64();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 53) {
if (tag != 29) {
break;
}
}
case 53: {
// bNEOPNNPFLE
bNEOPNNPFLE = input.readFloat();
case 29: {
// lifeTime
lifeTime = input.readFloat();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 16) {
if (tag != 40) {
break;
}
}
case 16: {
// level
level = input.readUInt32();
case 40: {
// baseAvatarId
baseAvatarId = input.readUInt32();
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 32) {
if (tag != 48) {
break;
}
}
case 32: {
// iPFABMCJDMN
iPFABMCJDMN = input.readUInt32();
bitField0_ |= 0x00000008;
tag = input.readTag();
if (tag != 96) {
break;
}
}
case 96: {
case 48: {
// count
count = input.readUInt32();
bitField0_ |= 0x00000010;
bitField0_ |= 0x00000008;
tag = input.readTag();
if (tag != 112) {
break;
}
}
case 112: {
// baseAvatarId
baseAvatarId = input.readUInt32();
bitField0_ |= 0x00000020;
// buffId
buffId = input.readUInt32();
bitField0_ |= 0x00000010;
tag = input.readTag();
if (tag != 26) {
if (tag != 120) {
break;
}
}
case 26: {
case 120: {
// level
level = input.readUInt32();
bitField0_ |= 0x00000020;
tag = input.readTag();
if (tag != 58) {
break;
}
}
case 58: {
// dynamicValues
tag = input.readRepeatedMessage(dynamicValues, tag);
bitField0_ |= 0x00000040;
@@ -597,22 +597,22 @@ public final class BuffInfoOuterClass {
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt64(FieldNames.fEDNBDBBHHN, fEDNBDBBHHN);
output.writeUInt64(FieldNames.addTimeMs, addTimeMs);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeFloat(FieldNames.bNEOPNNPFLE, bNEOPNNPFLE);
output.writeFloat(FieldNames.lifeTime, lifeTime);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeUInt32(FieldNames.level, level);
output.writeUInt32(FieldNames.baseAvatarId, baseAvatarId);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeUInt32(FieldNames.iPFABMCJDMN, iPFABMCJDMN);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeUInt32(FieldNames.count, count);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeUInt32(FieldNames.buffId, buffId);
}
if ((bitField0_ & 0x00000020) != 0) {
output.writeUInt32(FieldNames.baseAvatarId, baseAvatarId);
output.writeUInt32(FieldNames.level, level);
}
if ((bitField0_ & 0x00000040) != 0) {
output.writeRepeatedMessage(FieldNames.dynamicValues, dynamicValues);
@@ -627,10 +627,11 @@ public final class BuffInfoOuterClass {
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -1304199581: {
if (input.isAtField(FieldNames.fEDNBDBBHHN)) {
case 19170644:
case 5373626: {
if (input.isAtField(FieldNames.addTimeMs)) {
if (!input.trySkipNullValue()) {
fEDNBDBBHHN = input.readUInt64();
addTimeMs = input.readUInt64();
bitField0_ |= 0x00000001;
}
} else {
@@ -638,10 +639,11 @@ public final class BuffInfoOuterClass {
}
break;
}
case -406688439: {
if (input.isAtField(FieldNames.bNEOPNNPFLE)) {
case 959617001:
case -306161104: {
if (input.isAtField(FieldNames.lifeTime)) {
if (!input.trySkipNullValue()) {
bNEOPNNPFLE = input.readFloat();
lifeTime = input.readFloat();
bitField0_ |= 0x00000002;
}
} else {
@@ -649,44 +651,45 @@ public final class BuffInfoOuterClass {
}
break;
}
case 102865796: {
if (input.isAtField(FieldNames.level)) {
if (!input.trySkipNullValue()) {
level = input.readUInt32();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case -509586607: {
if (input.isAtField(FieldNames.iPFABMCJDMN)) {
if (!input.trySkipNullValue()) {
iPFABMCJDMN = input.readUInt32();
bitField0_ |= 0x00000008;
}
} else {
input.skipUnknownField();
}
break;
}
case 94851343: {
if (input.isAtField(FieldNames.count)) {
if (!input.trySkipNullValue()) {
count = input.readUInt32();
bitField0_ |= 0x00000010;
}
} else {
input.skipUnknownField();
}
break;
}
case 118022725:
case -1756826157: {
if (input.isAtField(FieldNames.baseAvatarId)) {
if (!input.trySkipNullValue()) {
baseAvatarId = input.readUInt32();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case 94851343: {
if (input.isAtField(FieldNames.count)) {
if (!input.trySkipNullValue()) {
count = input.readUInt32();
bitField0_ |= 0x00000008;
}
} else {
input.skipUnknownField();
}
break;
}
case -1378119474:
case 227990663: {
if (input.isAtField(FieldNames.buffId)) {
if (!input.trySkipNullValue()) {
buffId = input.readUInt32();
bitField0_ |= 0x00000010;
}
} else {
input.skipUnknownField();
}
break;
}
case 102865796: {
if (input.isAtField(FieldNames.level)) {
if (!input.trySkipNullValue()) {
level = input.readUInt32();
bitField0_ |= 0x00000020;
}
} else {
@@ -1112,17 +1115,17 @@ public final class BuffInfoOuterClass {
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName fEDNBDBBHHN = FieldName.forField("FEDNBDBBHHN");
static final FieldName addTimeMs = FieldName.forField("addTimeMs", "add_time_ms");
static final FieldName bNEOPNNPFLE = FieldName.forField("BNEOPNNPFLE");
static final FieldName lifeTime = FieldName.forField("lifeTime", "life_time");
static final FieldName level = FieldName.forField("level");
static final FieldName iPFABMCJDMN = FieldName.forField("IPFABMCJDMN");
static final FieldName baseAvatarId = FieldName.forField("baseAvatarId", "base_avatar_id");
static final FieldName count = FieldName.forField("count");
static final FieldName baseAvatarId = FieldName.forField("baseAvatarId", "base_avatar_id");
static final FieldName buffId = FieldName.forField("buffId", "buff_id");
static final FieldName level = FieldName.forField("level");
static final FieldName dynamicValues = FieldName.forField("dynamicValues", "dynamic_values");
}

View File

@@ -0,0 +1,730 @@
// 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.RepeatedByte;
public final class ClientDownloadDataScNotifyOuterClass {
/**
* Protobuf type {@code ClientDownloadDataScNotify}
*/
public static final class ClientDownloadDataScNotify extends ProtoMessage<ClientDownloadDataScNotify> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional .ClientDownloadDataScNotify.ClientDownloadData download_data = 5;</code>
*/
private final ClientDownloadData downloadData = ClientDownloadData.newInstance();
private ClientDownloadDataScNotify() {
}
/**
* @return a new empty instance of {@code ClientDownloadDataScNotify}
*/
public static ClientDownloadDataScNotify newInstance() {
return new ClientDownloadDataScNotify();
}
/**
* <code>optional .ClientDownloadDataScNotify.ClientDownloadData download_data = 5;</code>
* @return whether the downloadData field is set
*/
public boolean hasDownloadData() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional .ClientDownloadDataScNotify.ClientDownloadData download_data = 5;</code>
* @return this
*/
public ClientDownloadDataScNotify clearDownloadData() {
bitField0_ &= ~0x00000001;
downloadData.clear();
return this;
}
/**
* <code>optional .ClientDownloadDataScNotify.ClientDownloadData download_data = 5;</code>
*
* 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 #getMutableDownloadData()} if you want to modify it.
*
* @return internal storage object for reading
*/
public ClientDownloadData getDownloadData() {
return downloadData;
}
/**
* <code>optional .ClientDownloadDataScNotify.ClientDownloadData download_data = 5;</code>
*
* 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 ClientDownloadData getMutableDownloadData() {
bitField0_ |= 0x00000001;
return downloadData;
}
/**
* <code>optional .ClientDownloadDataScNotify.ClientDownloadData download_data = 5;</code>
* @param value the downloadData to set
* @return this
*/
public ClientDownloadDataScNotify setDownloadData(final ClientDownloadData value) {
bitField0_ |= 0x00000001;
downloadData.copyFrom(value);
return this;
}
@Override
public ClientDownloadDataScNotify copyFrom(final ClientDownloadDataScNotify other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
downloadData.copyFrom(other.downloadData);
}
return this;
}
@Override
public ClientDownloadDataScNotify mergeFrom(final ClientDownloadDataScNotify other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasDownloadData()) {
getMutableDownloadData().mergeFrom(other.downloadData);
}
return this;
}
@Override
public ClientDownloadDataScNotify clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
downloadData.clear();
return this;
}
@Override
public ClientDownloadDataScNotify clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
downloadData.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ClientDownloadDataScNotify)) {
return false;
}
ClientDownloadDataScNotify other = (ClientDownloadDataScNotify) o;
return bitField0_ == other.bitField0_
&& (!hasDownloadData() || downloadData.equals(other.downloadData));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 42);
output.writeMessageNoTag(downloadData);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(downloadData);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public ClientDownloadDataScNotify mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 42: {
// downloadData
input.readMessage(downloadData);
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeMessage(FieldNames.downloadData, downloadData);
}
output.endObject();
}
@Override
public ClientDownloadDataScNotify mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1108584530:
case 31388929: {
if (input.isAtField(FieldNames.downloadData)) {
if (!input.trySkipNullValue()) {
input.readMessage(downloadData);
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public ClientDownloadDataScNotify clone() {
return new ClientDownloadDataScNotify().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static ClientDownloadDataScNotify parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new ClientDownloadDataScNotify(), data).checkInitialized();
}
public static ClientDownloadDataScNotify parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new ClientDownloadDataScNotify(), input).checkInitialized();
}
public static ClientDownloadDataScNotify parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new ClientDownloadDataScNotify(), input).checkInitialized();
}
/**
* @return factory for creating ClientDownloadDataScNotify messages
*/
public static MessageFactory<ClientDownloadDataScNotify> getFactory() {
return ClientDownloadDataScNotifyFactory.INSTANCE;
}
/**
* Protobuf type {@code ClientDownloadData}
*/
public static final class ClientDownloadData extends ProtoMessage<ClientDownloadData> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional int64 time = 2;</code>
*/
private long time;
/**
* <code>optional uint32 version = 1;</code>
*/
private int version;
/**
* <code>optional bytes data = 3;</code>
*/
private final RepeatedByte data = RepeatedByte.newEmptyInstance();
private ClientDownloadData() {
}
/**
* @return a new empty instance of {@code ClientDownloadData}
*/
public static ClientDownloadData newInstance() {
return new ClientDownloadData();
}
/**
* <code>optional int64 time = 2;</code>
* @return whether the time field is set
*/
public boolean hasTime() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional int64 time = 2;</code>
* @return this
*/
public ClientDownloadData clearTime() {
bitField0_ &= ~0x00000001;
time = 0L;
return this;
}
/**
* <code>optional int64 time = 2;</code>
* @return the time
*/
public long getTime() {
return time;
}
/**
* <code>optional int64 time = 2;</code>
* @param value the time to set
* @return this
*/
public ClientDownloadData setTime(final long value) {
bitField0_ |= 0x00000001;
time = value;
return this;
}
/**
* <code>optional uint32 version = 1;</code>
* @return whether the version field is set
*/
public boolean hasVersion() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 version = 1;</code>
* @return this
*/
public ClientDownloadData clearVersion() {
bitField0_ &= ~0x00000002;
version = 0;
return this;
}
/**
* <code>optional uint32 version = 1;</code>
* @return the version
*/
public int getVersion() {
return version;
}
/**
* <code>optional uint32 version = 1;</code>
* @param value the version to set
* @return this
*/
public ClientDownloadData setVersion(final int value) {
bitField0_ |= 0x00000002;
version = value;
return this;
}
/**
* <code>optional bytes data = 3;</code>
* @return whether the data field is set
*/
public boolean hasData() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional bytes data = 3;</code>
* @return this
*/
public ClientDownloadData clearData() {
bitField0_ &= ~0x00000004;
data.clear();
return this;
}
/**
* <code>optional bytes data = 3;</code>
*
* 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 #getMutableData()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedByte getData() {
return data;
}
/**
* <code>optional bytes data = 3;</code>
*
* 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 RepeatedByte getMutableData() {
bitField0_ |= 0x00000004;
return data;
}
/**
* <code>optional bytes data = 3;</code>
* @param value the data to add
* @return this
*/
public ClientDownloadData addData(final byte value) {
bitField0_ |= 0x00000004;
data.add(value);
return this;
}
/**
* <code>optional bytes data = 3;</code>
* @param values the data to add
* @return this
*/
public ClientDownloadData addAllData(final byte... values) {
bitField0_ |= 0x00000004;
data.addAll(values);
return this;
}
/**
* <code>optional bytes data = 3;</code>
* @param values the data to set
* @return this
*/
public ClientDownloadData setData(final byte... values) {
bitField0_ |= 0x00000004;
data.copyFrom(values);
return this;
}
@Override
public ClientDownloadData copyFrom(final ClientDownloadData other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
time = other.time;
version = other.version;
data.copyFrom(other.data);
}
return this;
}
@Override
public ClientDownloadData mergeFrom(final ClientDownloadData other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasTime()) {
setTime(other.time);
}
if (other.hasVersion()) {
setVersion(other.version);
}
if (other.hasData()) {
getMutableData().copyFrom(other.data);
}
return this;
}
@Override
public ClientDownloadData clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
time = 0L;
version = 0;
data.clear();
return this;
}
@Override
public ClientDownloadData clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
data.clear();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ClientDownloadData)) {
return false;
}
ClientDownloadData other = (ClientDownloadData) o;
return bitField0_ == other.bitField0_
&& (!hasTime() || time == other.time)
&& (!hasVersion() || version == other.version)
&& (!hasData() || data.equals(other.data));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 16);
output.writeInt64NoTag(time);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 8);
output.writeUInt32NoTag(version);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 26);
output.writeBytesNoTag(data);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeInt64SizeNoTag(time);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(version);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeBytesSizeNoTag(data);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public ClientDownloadData mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 16: {
// time
time = input.readInt64();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 8) {
break;
}
}
case 8: {
// version
version = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 26) {
break;
}
}
case 26: {
// data
input.readBytes(data);
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeInt64(FieldNames.time, time);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.version, version);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeBytes(FieldNames.data, data);
}
output.endObject();
}
@Override
public ClientDownloadData mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 3560141: {
if (input.isAtField(FieldNames.time)) {
if (!input.trySkipNullValue()) {
time = input.readInt64();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 351608024: {
if (input.isAtField(FieldNames.version)) {
if (!input.trySkipNullValue()) {
version = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case 3076010: {
if (input.isAtField(FieldNames.data)) {
if (!input.trySkipNullValue()) {
input.readBytes(data);
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public ClientDownloadData clone() {
return new ClientDownloadData().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static ClientDownloadData parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new ClientDownloadData(), data).checkInitialized();
}
public static ClientDownloadData parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new ClientDownloadData(), input).checkInitialized();
}
public static ClientDownloadData parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new ClientDownloadData(), input).checkInitialized();
}
/**
* @return factory for creating ClientDownloadData messages
*/
public static MessageFactory<ClientDownloadData> getFactory() {
return ClientDownloadDataFactory.INSTANCE;
}
private enum ClientDownloadDataFactory implements MessageFactory<ClientDownloadData> {
INSTANCE;
@Override
public ClientDownloadData create() {
return ClientDownloadData.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName time = FieldName.forField("time");
static final FieldName version = FieldName.forField("version");
static final FieldName data = FieldName.forField("data");
}
}
private enum ClientDownloadDataScNotifyFactory implements MessageFactory<ClientDownloadDataScNotify> {
INSTANCE;
@Override
public ClientDownloadDataScNotify create() {
return ClientDownloadDataScNotify.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName downloadData = FieldName.forField("downloadData", "download_data");
}
}
}

View File

@@ -0,0 +1,473 @@
// 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 EntityBuffChangeInfoOuterClass {
/**
* Protobuf type {@code EntityBuffChangeInfo}
*/
public static final class EntityBuffChangeInfo extends ProtoMessage<EntityBuffChangeInfo> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 CBOEIMDHBIJ = 5;</code>
*/
private int cBOEIMDHBIJ;
/**
* <code>optional uint32 entity_id = 8;</code>
*/
private int entityId;
/**
* <code>optional .BuffInfo buff_change_info = 4;</code>
*/
private final BuffInfoOuterClass.BuffInfo buffChangeInfo = BuffInfoOuterClass.BuffInfo.newInstance();
private EntityBuffChangeInfo() {
}
/**
* @return a new empty instance of {@code EntityBuffChangeInfo}
*/
public static EntityBuffChangeInfo newInstance() {
return new EntityBuffChangeInfo();
}
public boolean hasInfo() {
return (((bitField0_ & 0x00000003)) != 0);
}
public EntityBuffChangeInfo clearInfo() {
if (hasInfo()) {
clearCBOEIMDHBIJ();
clearBuffChangeInfo();
}
return this;
}
private void clearInfoOtherCBOEIMDHBIJ() {
if ((((bitField0_ & 0x00000002)) != 0)) {
clearBuffChangeInfo();
}
}
private void clearInfoOtherBuffChangeInfo() {
if ((((bitField0_ & 0x00000001)) != 0)) {
clearCBOEIMDHBIJ();
}
}
/**
* <code>optional uint32 CBOEIMDHBIJ = 5;</code>
* @return whether the cBOEIMDHBIJ field is set
*/
public boolean hasCBOEIMDHBIJ() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 CBOEIMDHBIJ = 5;</code>
* @return this
*/
public EntityBuffChangeInfo clearCBOEIMDHBIJ() {
bitField0_ &= ~0x00000001;
cBOEIMDHBIJ = 0;
return this;
}
/**
* <code>optional uint32 CBOEIMDHBIJ = 5;</code>
* @return the cBOEIMDHBIJ
*/
public int getCBOEIMDHBIJ() {
return cBOEIMDHBIJ;
}
/**
* <code>optional uint32 CBOEIMDHBIJ = 5;</code>
* @param value the cBOEIMDHBIJ to set
* @return this
*/
public EntityBuffChangeInfo setCBOEIMDHBIJ(final int value) {
clearInfoOtherCBOEIMDHBIJ();
bitField0_ |= 0x00000001;
cBOEIMDHBIJ = value;
return this;
}
/**
* <code>optional uint32 entity_id = 8;</code>
* @return whether the entityId field is set
*/
public boolean hasEntityId() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional uint32 entity_id = 8;</code>
* @return this
*/
public EntityBuffChangeInfo clearEntityId() {
bitField0_ &= ~0x00000004;
entityId = 0;
return this;
}
/**
* <code>optional uint32 entity_id = 8;</code>
* @return the entityId
*/
public int getEntityId() {
return entityId;
}
/**
* <code>optional uint32 entity_id = 8;</code>
* @param value the entityId to set
* @return this
*/
public EntityBuffChangeInfo setEntityId(final int value) {
bitField0_ |= 0x00000004;
entityId = value;
return this;
}
/**
* <code>optional .BuffInfo buff_change_info = 4;</code>
* @return whether the buffChangeInfo field is set
*/
public boolean hasBuffChangeInfo() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional .BuffInfo buff_change_info = 4;</code>
* @return this
*/
public EntityBuffChangeInfo clearBuffChangeInfo() {
bitField0_ &= ~0x00000002;
buffChangeInfo.clear();
return this;
}
/**
* <code>optional .BuffInfo buff_change_info = 4;</code>
*
* 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 #getMutableBuffChangeInfo()} if you want to modify it.
*
* @return internal storage object for reading
*/
public BuffInfoOuterClass.BuffInfo getBuffChangeInfo() {
return buffChangeInfo;
}
/**
* <code>optional .BuffInfo buff_change_info = 4;</code>
*
* 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 BuffInfoOuterClass.BuffInfo getMutableBuffChangeInfo() {
clearInfoOtherBuffChangeInfo();
bitField0_ |= 0x00000002;
return buffChangeInfo;
}
/**
* <code>optional .BuffInfo buff_change_info = 4;</code>
* @param value the buffChangeInfo to set
* @return this
*/
public EntityBuffChangeInfo setBuffChangeInfo(final BuffInfoOuterClass.BuffInfo value) {
clearInfoOtherBuffChangeInfo();
bitField0_ |= 0x00000002;
buffChangeInfo.copyFrom(value);
return this;
}
@Override
public EntityBuffChangeInfo copyFrom(final EntityBuffChangeInfo other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
cBOEIMDHBIJ = other.cBOEIMDHBIJ;
entityId = other.entityId;
buffChangeInfo.copyFrom(other.buffChangeInfo);
}
return this;
}
@Override
public EntityBuffChangeInfo mergeFrom(final EntityBuffChangeInfo other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasCBOEIMDHBIJ()) {
setCBOEIMDHBIJ(other.cBOEIMDHBIJ);
}
if (other.hasEntityId()) {
setEntityId(other.entityId);
}
if (other.hasBuffChangeInfo()) {
getMutableBuffChangeInfo().mergeFrom(other.buffChangeInfo);
}
return this;
}
@Override
public EntityBuffChangeInfo clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
cBOEIMDHBIJ = 0;
entityId = 0;
buffChangeInfo.clear();
return this;
}
@Override
public EntityBuffChangeInfo clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
buffChangeInfo.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof EntityBuffChangeInfo)) {
return false;
}
EntityBuffChangeInfo other = (EntityBuffChangeInfo) o;
return bitField0_ == other.bitField0_
&& (!hasCBOEIMDHBIJ() || cBOEIMDHBIJ == other.cBOEIMDHBIJ)
&& (!hasEntityId() || entityId == other.entityId)
&& (!hasBuffChangeInfo() || buffChangeInfo.equals(other.buffChangeInfo));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 40);
output.writeUInt32NoTag(cBOEIMDHBIJ);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 64);
output.writeUInt32NoTag(entityId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 34);
output.writeMessageNoTag(buffChangeInfo);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(cBOEIMDHBIJ);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(entityId);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(buffChangeInfo);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public EntityBuffChangeInfo mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 40: {
// cBOEIMDHBIJ
clearInfoOtherCBOEIMDHBIJ();
cBOEIMDHBIJ = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 64) {
break;
}
}
case 64: {
// entityId
entityId = input.readUInt32();
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 34) {
break;
}
}
case 34: {
// buffChangeInfo
clearInfoOtherBuffChangeInfo();
input.readMessage(buffChangeInfo);
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.cBOEIMDHBIJ, cBOEIMDHBIJ);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeUInt32(FieldNames.entityId, entityId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeMessage(FieldNames.buffChangeInfo, buffChangeInfo);
}
output.endObject();
}
@Override
public EntityBuffChangeInfo mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1350914854: {
if (input.isAtField(FieldNames.cBOEIMDHBIJ)) {
if (!input.trySkipNullValue()) {
clearInfoOtherCBOEIMDHBIJ();
cBOEIMDHBIJ = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -2102099874:
case -740565257: {
if (input.isAtField(FieldNames.entityId)) {
if (!input.trySkipNullValue()) {
entityId = input.readUInt32();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case -731204303:
case -369384975: {
if (input.isAtField(FieldNames.buffChangeInfo)) {
if (!input.trySkipNullValue()) {
clearInfoOtherBuffChangeInfo();
input.readMessage(buffChangeInfo);
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public EntityBuffChangeInfo clone() {
return new EntityBuffChangeInfo().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static EntityBuffChangeInfo parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new EntityBuffChangeInfo(), data).checkInitialized();
}
public static EntityBuffChangeInfo parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new EntityBuffChangeInfo(), input).checkInitialized();
}
public static EntityBuffChangeInfo parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new EntityBuffChangeInfo(), input).checkInitialized();
}
/**
* @return factory for creating EntityBuffChangeInfo messages
*/
public static MessageFactory<EntityBuffChangeInfo> getFactory() {
return EntityBuffChangeInfoFactory.INSTANCE;
}
private enum EntityBuffChangeInfoFactory implements MessageFactory<EntityBuffChangeInfo> {
INSTANCE;
@Override
public EntityBuffChangeInfo create() {
return EntityBuffChangeInfo.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName cBOEIMDHBIJ = FieldName.forField("CBOEIMDHBIJ");
static final FieldName entityId = FieldName.forField("entityId", "entity_id");
static final FieldName buffChangeInfo = FieldName.forField("buffChangeInfo", "buff_change_info");
}
}
}

View File

@@ -0,0 +1,597 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedInt;
import us.hebi.quickbuf.Utf8String;
public final class RefreshTriggerByClientCsReqOuterClass {
/**
* Protobuf type {@code RefreshTriggerByClientCsReq}
*/
public static final class RefreshTriggerByClientCsReq extends ProtoMessage<RefreshTriggerByClientCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 trigger_entity_id = 6;</code>
*/
private int triggerEntityId;
/**
* <code>optional .MotionInfo trigger_motion = 11;</code>
*/
private final MotionInfoOuterClass.MotionInfo triggerMotion = MotionInfoOuterClass.MotionInfo.newInstance();
/**
* <code>optional string trigger_name = 8;</code>
*/
private final Utf8String triggerName = Utf8String.newEmptyInstance();
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
*/
private final RepeatedInt triggerTargetIdList = RepeatedInt.newEmptyInstance();
private RefreshTriggerByClientCsReq() {
}
/**
* @return a new empty instance of {@code RefreshTriggerByClientCsReq}
*/
public static RefreshTriggerByClientCsReq newInstance() {
return new RefreshTriggerByClientCsReq();
}
/**
* <code>optional uint32 trigger_entity_id = 6;</code>
* @return whether the triggerEntityId field is set
*/
public boolean hasTriggerEntityId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 trigger_entity_id = 6;</code>
* @return this
*/
public RefreshTriggerByClientCsReq clearTriggerEntityId() {
bitField0_ &= ~0x00000001;
triggerEntityId = 0;
return this;
}
/**
* <code>optional uint32 trigger_entity_id = 6;</code>
* @return the triggerEntityId
*/
public int getTriggerEntityId() {
return triggerEntityId;
}
/**
* <code>optional uint32 trigger_entity_id = 6;</code>
* @param value the triggerEntityId to set
* @return this
*/
public RefreshTriggerByClientCsReq setTriggerEntityId(final int value) {
bitField0_ |= 0x00000001;
triggerEntityId = value;
return this;
}
/**
* <code>optional .MotionInfo trigger_motion = 11;</code>
* @return whether the triggerMotion field is set
*/
public boolean hasTriggerMotion() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional .MotionInfo trigger_motion = 11;</code>
* @return this
*/
public RefreshTriggerByClientCsReq clearTriggerMotion() {
bitField0_ &= ~0x00000002;
triggerMotion.clear();
return this;
}
/**
* <code>optional .MotionInfo trigger_motion = 11;</code>
*
* 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 #getMutableTriggerMotion()} if you want to modify it.
*
* @return internal storage object for reading
*/
public MotionInfoOuterClass.MotionInfo getTriggerMotion() {
return triggerMotion;
}
/**
* <code>optional .MotionInfo trigger_motion = 11;</code>
*
* 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 MotionInfoOuterClass.MotionInfo getMutableTriggerMotion() {
bitField0_ |= 0x00000002;
return triggerMotion;
}
/**
* <code>optional .MotionInfo trigger_motion = 11;</code>
* @param value the triggerMotion to set
* @return this
*/
public RefreshTriggerByClientCsReq setTriggerMotion(
final MotionInfoOuterClass.MotionInfo value) {
bitField0_ |= 0x00000002;
triggerMotion.copyFrom(value);
return this;
}
/**
* <code>optional string trigger_name = 8;</code>
* @return whether the triggerName field is set
*/
public boolean hasTriggerName() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional string trigger_name = 8;</code>
* @return this
*/
public RefreshTriggerByClientCsReq clearTriggerName() {
bitField0_ &= ~0x00000004;
triggerName.clear();
return this;
}
/**
* <code>optional string trigger_name = 8;</code>
* @return the triggerName
*/
public String getTriggerName() {
return triggerName.getString();
}
/**
* <code>optional string trigger_name = 8;</code>
* @return internal {@code Utf8String} representation of triggerName for reading
*/
public Utf8String getTriggerNameBytes() {
return this.triggerName;
}
/**
* <code>optional string trigger_name = 8;</code>
* @return internal {@code Utf8String} representation of triggerName for modifications
*/
public Utf8String getMutableTriggerNameBytes() {
bitField0_ |= 0x00000004;
return this.triggerName;
}
/**
* <code>optional string trigger_name = 8;</code>
* @param value the triggerName to set
* @return this
*/
public RefreshTriggerByClientCsReq setTriggerName(final CharSequence value) {
bitField0_ |= 0x00000004;
triggerName.copyFrom(value);
return this;
}
/**
* <code>optional string trigger_name = 8;</code>
* @param value the triggerName to set
* @return this
*/
public RefreshTriggerByClientCsReq setTriggerName(final Utf8String value) {
bitField0_ |= 0x00000004;
triggerName.copyFrom(value);
return this;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
* @return whether the triggerTargetIdList field is set
*/
public boolean hasTriggerTargetIdList() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
* @return this
*/
public RefreshTriggerByClientCsReq clearTriggerTargetIdList() {
bitField0_ &= ~0x00000008;
triggerTargetIdList.clear();
return this;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
*
* 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 #getMutableTriggerTargetIdList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedInt getTriggerTargetIdList() {
return triggerTargetIdList;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
*
* 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 getMutableTriggerTargetIdList() {
bitField0_ |= 0x00000008;
return triggerTargetIdList;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
* @param value the triggerTargetIdList to add
* @return this
*/
public RefreshTriggerByClientCsReq addTriggerTargetIdList(final int value) {
bitField0_ |= 0x00000008;
triggerTargetIdList.add(value);
return this;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
* @param values the triggerTargetIdList to add
* @return this
*/
public RefreshTriggerByClientCsReq addAllTriggerTargetIdList(final int... values) {
bitField0_ |= 0x00000008;
triggerTargetIdList.addAll(values);
return this;
}
@Override
public RefreshTriggerByClientCsReq copyFrom(final RefreshTriggerByClientCsReq other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
triggerEntityId = other.triggerEntityId;
triggerMotion.copyFrom(other.triggerMotion);
triggerName.copyFrom(other.triggerName);
triggerTargetIdList.copyFrom(other.triggerTargetIdList);
}
return this;
}
@Override
public RefreshTriggerByClientCsReq mergeFrom(final RefreshTriggerByClientCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasTriggerEntityId()) {
setTriggerEntityId(other.triggerEntityId);
}
if (other.hasTriggerMotion()) {
getMutableTriggerMotion().mergeFrom(other.triggerMotion);
}
if (other.hasTriggerName()) {
getMutableTriggerNameBytes().copyFrom(other.triggerName);
}
if (other.hasTriggerTargetIdList()) {
getMutableTriggerTargetIdList().addAll(other.triggerTargetIdList);
}
return this;
}
@Override
public RefreshTriggerByClientCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
triggerEntityId = 0;
triggerMotion.clear();
triggerName.clear();
triggerTargetIdList.clear();
return this;
}
@Override
public RefreshTriggerByClientCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
triggerMotion.clearQuick();
triggerName.clear();
triggerTargetIdList.clear();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof RefreshTriggerByClientCsReq)) {
return false;
}
RefreshTriggerByClientCsReq other = (RefreshTriggerByClientCsReq) o;
return bitField0_ == other.bitField0_
&& (!hasTriggerEntityId() || triggerEntityId == other.triggerEntityId)
&& (!hasTriggerMotion() || triggerMotion.equals(other.triggerMotion))
&& (!hasTriggerName() || triggerName.equals(other.triggerName))
&& (!hasTriggerTargetIdList() || triggerTargetIdList.equals(other.triggerTargetIdList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 48);
output.writeUInt32NoTag(triggerEntityId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 90);
output.writeMessageNoTag(triggerMotion);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 66);
output.writeStringNoTag(triggerName);
}
if ((bitField0_ & 0x00000008) != 0) {
for (int i = 0; i < triggerTargetIdList.length(); i++) {
output.writeRawByte((byte) 24);
output.writeUInt32NoTag(triggerTargetIdList.array()[i]);
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(triggerEntityId);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(triggerMotion);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeStringSizeNoTag(triggerName);
}
if ((bitField0_ & 0x00000008) != 0) {
size += (1 * triggerTargetIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(triggerTargetIdList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public RefreshTriggerByClientCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 48: {
// triggerEntityId
triggerEntityId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 90) {
break;
}
}
case 90: {
// triggerMotion
input.readMessage(triggerMotion);
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 66) {
break;
}
}
case 66: {
// triggerName
input.readString(triggerName);
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 26) {
break;
}
}
case 26: {
// triggerTargetIdList [packed=true]
input.readPackedUInt32(triggerTargetIdList, 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: {
// triggerTargetIdList [packed=false]
tag = input.readRepeatedUInt32(triggerTargetIdList, tag);
bitField0_ |= 0x00000008;
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.triggerEntityId, triggerEntityId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeMessage(FieldNames.triggerMotion, triggerMotion);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeString(FieldNames.triggerName, triggerName);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeRepeatedUInt32(FieldNames.triggerTargetIdList, triggerTargetIdList);
}
output.endObject();
}
@Override
public RefreshTriggerByClientCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 242025014:
case -2081789648: {
if (input.isAtField(FieldNames.triggerEntityId)) {
if (!input.trySkipNullValue()) {
triggerEntityId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -1754146930:
case 189663261: {
if (input.isAtField(FieldNames.triggerMotion)) {
if (!input.trySkipNullValue()) {
input.readMessage(triggerMotion);
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case -681138077:
case 375632050: {
if (input.isAtField(FieldNames.triggerName)) {
if (!input.trySkipNullValue()) {
input.readString(triggerName);
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case -482857182:
case -1827914245: {
if (input.isAtField(FieldNames.triggerTargetIdList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedUInt32(triggerTargetIdList);
bitField0_ |= 0x00000008;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public RefreshTriggerByClientCsReq clone() {
return new RefreshTriggerByClientCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static RefreshTriggerByClientCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new RefreshTriggerByClientCsReq(), data).checkInitialized();
}
public static RefreshTriggerByClientCsReq parseFrom(final ProtoSource input) throws
IOException {
return ProtoMessage.mergeFrom(new RefreshTriggerByClientCsReq(), input).checkInitialized();
}
public static RefreshTriggerByClientCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new RefreshTriggerByClientCsReq(), input).checkInitialized();
}
/**
* @return factory for creating RefreshTriggerByClientCsReq messages
*/
public static MessageFactory<RefreshTriggerByClientCsReq> getFactory() {
return RefreshTriggerByClientCsReqFactory.INSTANCE;
}
private enum RefreshTriggerByClientCsReqFactory implements MessageFactory<RefreshTriggerByClientCsReq> {
INSTANCE;
@Override
public RefreshTriggerByClientCsReq create() {
return RefreshTriggerByClientCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName triggerEntityId = FieldName.forField("triggerEntityId", "trigger_entity_id");
static final FieldName triggerMotion = FieldName.forField("triggerMotion", "trigger_motion");
static final FieldName triggerName = FieldName.forField("triggerName", "trigger_name");
static final FieldName triggerTargetIdList = FieldName.forField("triggerTargetIdList", "trigger_target_id_list");
}
}
}

View File

@@ -0,0 +1,495 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedInt;
import us.hebi.quickbuf.Utf8String;
public final class RefreshTriggerByClientScNotifyOuterClass {
/**
* Protobuf type {@code RefreshTriggerByClientScNotify}
*/
public static final class RefreshTriggerByClientScNotify extends ProtoMessage<RefreshTriggerByClientScNotify> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 trigger_entity_id = 14;</code>
*/
private int triggerEntityId;
/**
* <code>optional string trigger_name = 11;</code>
*/
private final Utf8String triggerName = Utf8String.newEmptyInstance();
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
*/
private final RepeatedInt triggerTargetIdList = RepeatedInt.newEmptyInstance();
private RefreshTriggerByClientScNotify() {
}
/**
* @return a new empty instance of {@code RefreshTriggerByClientScNotify}
*/
public static RefreshTriggerByClientScNotify newInstance() {
return new RefreshTriggerByClientScNotify();
}
/**
* <code>optional uint32 trigger_entity_id = 14;</code>
* @return whether the triggerEntityId field is set
*/
public boolean hasTriggerEntityId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 trigger_entity_id = 14;</code>
* @return this
*/
public RefreshTriggerByClientScNotify clearTriggerEntityId() {
bitField0_ &= ~0x00000001;
triggerEntityId = 0;
return this;
}
/**
* <code>optional uint32 trigger_entity_id = 14;</code>
* @return the triggerEntityId
*/
public int getTriggerEntityId() {
return triggerEntityId;
}
/**
* <code>optional uint32 trigger_entity_id = 14;</code>
* @param value the triggerEntityId to set
* @return this
*/
public RefreshTriggerByClientScNotify setTriggerEntityId(final int value) {
bitField0_ |= 0x00000001;
triggerEntityId = value;
return this;
}
/**
* <code>optional string trigger_name = 11;</code>
* @return whether the triggerName field is set
*/
public boolean hasTriggerName() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional string trigger_name = 11;</code>
* @return this
*/
public RefreshTriggerByClientScNotify clearTriggerName() {
bitField0_ &= ~0x00000002;
triggerName.clear();
return this;
}
/**
* <code>optional string trigger_name = 11;</code>
* @return the triggerName
*/
public String getTriggerName() {
return triggerName.getString();
}
/**
* <code>optional string trigger_name = 11;</code>
* @return internal {@code Utf8String} representation of triggerName for reading
*/
public Utf8String getTriggerNameBytes() {
return this.triggerName;
}
/**
* <code>optional string trigger_name = 11;</code>
* @return internal {@code Utf8String} representation of triggerName for modifications
*/
public Utf8String getMutableTriggerNameBytes() {
bitField0_ |= 0x00000002;
return this.triggerName;
}
/**
* <code>optional string trigger_name = 11;</code>
* @param value the triggerName to set
* @return this
*/
public RefreshTriggerByClientScNotify setTriggerName(final CharSequence value) {
bitField0_ |= 0x00000002;
triggerName.copyFrom(value);
return this;
}
/**
* <code>optional string trigger_name = 11;</code>
* @param value the triggerName to set
* @return this
*/
public RefreshTriggerByClientScNotify setTriggerName(final Utf8String value) {
bitField0_ |= 0x00000002;
triggerName.copyFrom(value);
return this;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
* @return whether the triggerTargetIdList field is set
*/
public boolean hasTriggerTargetIdList() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
* @return this
*/
public RefreshTriggerByClientScNotify clearTriggerTargetIdList() {
bitField0_ &= ~0x00000004;
triggerTargetIdList.clear();
return this;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
*
* 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 #getMutableTriggerTargetIdList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedInt getTriggerTargetIdList() {
return triggerTargetIdList;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
*
* 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 getMutableTriggerTargetIdList() {
bitField0_ |= 0x00000004;
return triggerTargetIdList;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
* @param value the triggerTargetIdList to add
* @return this
*/
public RefreshTriggerByClientScNotify addTriggerTargetIdList(final int value) {
bitField0_ |= 0x00000004;
triggerTargetIdList.add(value);
return this;
}
/**
* <code>repeated uint32 trigger_target_id_list = 3;</code>
* @param values the triggerTargetIdList to add
* @return this
*/
public RefreshTriggerByClientScNotify addAllTriggerTargetIdList(final int... values) {
bitField0_ |= 0x00000004;
triggerTargetIdList.addAll(values);
return this;
}
@Override
public RefreshTriggerByClientScNotify copyFrom(final RefreshTriggerByClientScNotify other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
triggerEntityId = other.triggerEntityId;
triggerName.copyFrom(other.triggerName);
triggerTargetIdList.copyFrom(other.triggerTargetIdList);
}
return this;
}
@Override
public RefreshTriggerByClientScNotify mergeFrom(final RefreshTriggerByClientScNotify other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasTriggerEntityId()) {
setTriggerEntityId(other.triggerEntityId);
}
if (other.hasTriggerName()) {
getMutableTriggerNameBytes().copyFrom(other.triggerName);
}
if (other.hasTriggerTargetIdList()) {
getMutableTriggerTargetIdList().addAll(other.triggerTargetIdList);
}
return this;
}
@Override
public RefreshTriggerByClientScNotify clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
triggerEntityId = 0;
triggerName.clear();
triggerTargetIdList.clear();
return this;
}
@Override
public RefreshTriggerByClientScNotify clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
triggerName.clear();
triggerTargetIdList.clear();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof RefreshTriggerByClientScNotify)) {
return false;
}
RefreshTriggerByClientScNotify other = (RefreshTriggerByClientScNotify) o;
return bitField0_ == other.bitField0_
&& (!hasTriggerEntityId() || triggerEntityId == other.triggerEntityId)
&& (!hasTriggerName() || triggerName.equals(other.triggerName))
&& (!hasTriggerTargetIdList() || triggerTargetIdList.equals(other.triggerTargetIdList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 112);
output.writeUInt32NoTag(triggerEntityId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 90);
output.writeStringNoTag(triggerName);
}
if ((bitField0_ & 0x00000004) != 0) {
for (int i = 0; i < triggerTargetIdList.length(); i++) {
output.writeRawByte((byte) 24);
output.writeUInt32NoTag(triggerTargetIdList.array()[i]);
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(triggerEntityId);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeStringSizeNoTag(triggerName);
}
if ((bitField0_ & 0x00000004) != 0) {
size += (1 * triggerTargetIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(triggerTargetIdList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public RefreshTriggerByClientScNotify mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 112: {
// triggerEntityId
triggerEntityId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 90) {
break;
}
}
case 90: {
// triggerName
input.readString(triggerName);
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 26) {
break;
}
}
case 26: {
// triggerTargetIdList [packed=true]
input.readPackedUInt32(triggerTargetIdList, tag);
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
case 24: {
// triggerTargetIdList [packed=false]
tag = input.readRepeatedUInt32(triggerTargetIdList, tag);
bitField0_ |= 0x00000004;
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.triggerEntityId, triggerEntityId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeString(FieldNames.triggerName, triggerName);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRepeatedUInt32(FieldNames.triggerTargetIdList, triggerTargetIdList);
}
output.endObject();
}
@Override
public RefreshTriggerByClientScNotify mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 242025014:
case -2081789648: {
if (input.isAtField(FieldNames.triggerEntityId)) {
if (!input.trySkipNullValue()) {
triggerEntityId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -681138077:
case 375632050: {
if (input.isAtField(FieldNames.triggerName)) {
if (!input.trySkipNullValue()) {
input.readString(triggerName);
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case -482857182:
case -1827914245: {
if (input.isAtField(FieldNames.triggerTargetIdList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedUInt32(triggerTargetIdList);
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public RefreshTriggerByClientScNotify clone() {
return new RefreshTriggerByClientScNotify().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static RefreshTriggerByClientScNotify parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new RefreshTriggerByClientScNotify(), data).checkInitialized();
}
public static RefreshTriggerByClientScNotify parseFrom(final ProtoSource input) throws
IOException {
return ProtoMessage.mergeFrom(new RefreshTriggerByClientScNotify(), input).checkInitialized();
}
public static RefreshTriggerByClientScNotify parseFrom(final JsonSource input) throws
IOException {
return ProtoMessage.mergeFrom(new RefreshTriggerByClientScNotify(), input).checkInitialized();
}
/**
* @return factory for creating RefreshTriggerByClientScNotify messages
*/
public static MessageFactory<RefreshTriggerByClientScNotify> getFactory() {
return RefreshTriggerByClientScNotifyFactory.INSTANCE;
}
private enum RefreshTriggerByClientScNotifyFactory implements MessageFactory<RefreshTriggerByClientScNotify> {
INSTANCE;
@Override
public RefreshTriggerByClientScNotify create() {
return RefreshTriggerByClientScNotify.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName triggerEntityId = FieldName.forField("triggerEntityId", "trigger_entity_id");
static final FieldName triggerName = FieldName.forField("triggerName", "trigger_name");
static final FieldName triggerTargetIdList = FieldName.forField("triggerTargetIdList", "trigger_target_id_list");
}
}
}

View File

@@ -0,0 +1,533 @@
// 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.Utf8String;
public final class RefreshTriggerByClientScRspOuterClass {
/**
* Protobuf type {@code RefreshTriggerByClientScRsp}
*/
public static final class RefreshTriggerByClientScRsp extends ProtoMessage<RefreshTriggerByClientScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 trigger_entity_id = 5;</code>
*/
private int triggerEntityId;
/**
* <code>optional uint32 retcode = 10;</code>
*/
private int retcode;
/**
* <code>optional bool refresh_trigger = 14;</code>
*/
private boolean refreshTrigger;
/**
* <code>optional string trigger_name = 1;</code>
*/
private final Utf8String triggerName = Utf8String.newEmptyInstance();
private RefreshTriggerByClientScRsp() {
}
/**
* @return a new empty instance of {@code RefreshTriggerByClientScRsp}
*/
public static RefreshTriggerByClientScRsp newInstance() {
return new RefreshTriggerByClientScRsp();
}
/**
* <code>optional uint32 trigger_entity_id = 5;</code>
* @return whether the triggerEntityId field is set
*/
public boolean hasTriggerEntityId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 trigger_entity_id = 5;</code>
* @return this
*/
public RefreshTriggerByClientScRsp clearTriggerEntityId() {
bitField0_ &= ~0x00000001;
triggerEntityId = 0;
return this;
}
/**
* <code>optional uint32 trigger_entity_id = 5;</code>
* @return the triggerEntityId
*/
public int getTriggerEntityId() {
return triggerEntityId;
}
/**
* <code>optional uint32 trigger_entity_id = 5;</code>
* @param value the triggerEntityId to set
* @return this
*/
public RefreshTriggerByClientScRsp setTriggerEntityId(final int value) {
bitField0_ |= 0x00000001;
triggerEntityId = value;
return this;
}
/**
* <code>optional uint32 retcode = 10;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 retcode = 10;</code>
* @return this
*/
public RefreshTriggerByClientScRsp clearRetcode() {
bitField0_ &= ~0x00000002;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 10;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 10;</code>
* @param value the retcode to set
* @return this
*/
public RefreshTriggerByClientScRsp setRetcode(final int value) {
bitField0_ |= 0x00000002;
retcode = value;
return this;
}
/**
* <code>optional bool refresh_trigger = 14;</code>
* @return whether the refreshTrigger field is set
*/
public boolean hasRefreshTrigger() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional bool refresh_trigger = 14;</code>
* @return this
*/
public RefreshTriggerByClientScRsp clearRefreshTrigger() {
bitField0_ &= ~0x00000004;
refreshTrigger = false;
return this;
}
/**
* <code>optional bool refresh_trigger = 14;</code>
* @return the refreshTrigger
*/
public boolean getRefreshTrigger() {
return refreshTrigger;
}
/**
* <code>optional bool refresh_trigger = 14;</code>
* @param value the refreshTrigger to set
* @return this
*/
public RefreshTriggerByClientScRsp setRefreshTrigger(final boolean value) {
bitField0_ |= 0x00000004;
refreshTrigger = value;
return this;
}
/**
* <code>optional string trigger_name = 1;</code>
* @return whether the triggerName field is set
*/
public boolean hasTriggerName() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <code>optional string trigger_name = 1;</code>
* @return this
*/
public RefreshTriggerByClientScRsp clearTriggerName() {
bitField0_ &= ~0x00000008;
triggerName.clear();
return this;
}
/**
* <code>optional string trigger_name = 1;</code>
* @return the triggerName
*/
public String getTriggerName() {
return triggerName.getString();
}
/**
* <code>optional string trigger_name = 1;</code>
* @return internal {@code Utf8String} representation of triggerName for reading
*/
public Utf8String getTriggerNameBytes() {
return this.triggerName;
}
/**
* <code>optional string trigger_name = 1;</code>
* @return internal {@code Utf8String} representation of triggerName for modifications
*/
public Utf8String getMutableTriggerNameBytes() {
bitField0_ |= 0x00000008;
return this.triggerName;
}
/**
* <code>optional string trigger_name = 1;</code>
* @param value the triggerName to set
* @return this
*/
public RefreshTriggerByClientScRsp setTriggerName(final CharSequence value) {
bitField0_ |= 0x00000008;
triggerName.copyFrom(value);
return this;
}
/**
* <code>optional string trigger_name = 1;</code>
* @param value the triggerName to set
* @return this
*/
public RefreshTriggerByClientScRsp setTriggerName(final Utf8String value) {
bitField0_ |= 0x00000008;
triggerName.copyFrom(value);
return this;
}
@Override
public RefreshTriggerByClientScRsp copyFrom(final RefreshTriggerByClientScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
triggerEntityId = other.triggerEntityId;
retcode = other.retcode;
refreshTrigger = other.refreshTrigger;
triggerName.copyFrom(other.triggerName);
}
return this;
}
@Override
public RefreshTriggerByClientScRsp mergeFrom(final RefreshTriggerByClientScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasTriggerEntityId()) {
setTriggerEntityId(other.triggerEntityId);
}
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasRefreshTrigger()) {
setRefreshTrigger(other.refreshTrigger);
}
if (other.hasTriggerName()) {
getMutableTriggerNameBytes().copyFrom(other.triggerName);
}
return this;
}
@Override
public RefreshTriggerByClientScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
triggerEntityId = 0;
retcode = 0;
refreshTrigger = false;
triggerName.clear();
return this;
}
@Override
public RefreshTriggerByClientScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
triggerName.clear();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof RefreshTriggerByClientScRsp)) {
return false;
}
RefreshTriggerByClientScRsp other = (RefreshTriggerByClientScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasTriggerEntityId() || triggerEntityId == other.triggerEntityId)
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasRefreshTrigger() || refreshTrigger == other.refreshTrigger)
&& (!hasTriggerName() || triggerName.equals(other.triggerName));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 40);
output.writeUInt32NoTag(triggerEntityId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 80);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 112);
output.writeBoolNoTag(refreshTrigger);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeRawByte((byte) 10);
output.writeStringNoTag(triggerName);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(triggerEntityId);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 2;
}
if ((bitField0_ & 0x00000008) != 0) {
size += 1 + ProtoSink.computeStringSizeNoTag(triggerName);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public RefreshTriggerByClientScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 40: {
// triggerEntityId
triggerEntityId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 80) {
break;
}
}
case 80: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 112) {
break;
}
}
case 112: {
// refreshTrigger
refreshTrigger = input.readBool();
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 10) {
break;
}
}
case 10: {
// triggerName
input.readString(triggerName);
bitField0_ |= 0x00000008;
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.triggerEntityId, triggerEntityId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeBool(FieldNames.refreshTrigger, refreshTrigger);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeString(FieldNames.triggerName, triggerName);
}
output.endObject();
}
@Override
public RefreshTriggerByClientScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 242025014:
case -2081789648: {
if (input.isAtField(FieldNames.triggerEntityId)) {
if (!input.trySkipNullValue()) {
triggerEntityId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case 1616019037:
case -1712421804: {
if (input.isAtField(FieldNames.refreshTrigger)) {
if (!input.trySkipNullValue()) {
refreshTrigger = input.readBool();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case -681138077:
case 375632050: {
if (input.isAtField(FieldNames.triggerName)) {
if (!input.trySkipNullValue()) {
input.readString(triggerName);
bitField0_ |= 0x00000008;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public RefreshTriggerByClientScRsp clone() {
return new RefreshTriggerByClientScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static RefreshTriggerByClientScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new RefreshTriggerByClientScRsp(), data).checkInitialized();
}
public static RefreshTriggerByClientScRsp parseFrom(final ProtoSource input) throws
IOException {
return ProtoMessage.mergeFrom(new RefreshTriggerByClientScRsp(), input).checkInitialized();
}
public static RefreshTriggerByClientScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new RefreshTriggerByClientScRsp(), input).checkInitialized();
}
/**
* @return factory for creating RefreshTriggerByClientScRsp messages
*/
public static MessageFactory<RefreshTriggerByClientScRsp> getFactory() {
return RefreshTriggerByClientScRspFactory.INSTANCE;
}
private enum RefreshTriggerByClientScRspFactory implements MessageFactory<RefreshTriggerByClientScRsp> {
INSTANCE;
@Override
public RefreshTriggerByClientScRsp create() {
return RefreshTriggerByClientScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName triggerEntityId = FieldName.forField("triggerEntityId", "trigger_entity_id");
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName refreshTrigger = FieldName.forField("refreshTrigger", "refresh_trigger");
static final FieldName triggerName = FieldName.forField("triggerName", "trigger_name");
}
}
}

View File

@@ -49,10 +49,6 @@ public final class SceneEntityInfoOuterClass {
private final SceneNpcMonsterInfoOuterClass.SceneNpcMonsterInfo npcMonster = SceneNpcMonsterInfoOuterClass.SceneNpcMonsterInfo.newInstance();
/**
* <pre>
* SceneSummonUnitInfo summon_unit = 15;
* </pre>
*
* <code>optional .ScenePropInfo prop = 10;</code>
*/
private final ScenePropInfoOuterClass.ScenePropInfo prop = ScenePropInfoOuterClass.ScenePropInfo.newInstance();
@@ -62,6 +58,11 @@ public final class SceneEntityInfoOuterClass {
*/
private final SceneActorInfoOuterClass.SceneActorInfo actor = SceneActorInfoOuterClass.SceneActorInfo.newInstance();
/**
* <code>optional .SceneSummonUnitInfo summon_unit = 15;</code>
*/
private final SceneSummonUnitInfoOuterClass.SceneSummonUnitInfo summonUnit = SceneSummonUnitInfoOuterClass.SceneSummonUnitInfo.newInstance();
private SceneEntityInfo() {
}
@@ -73,7 +74,7 @@ public final class SceneEntityInfoOuterClass {
}
public boolean hasEntityCase() {
return (((bitField0_ & 0x0000000f)) != 0);
return (((bitField0_ & 0x0000001f)) != 0);
}
public SceneEntityInfo clearEntityCase() {
@@ -82,39 +83,53 @@ public final class SceneEntityInfoOuterClass {
clearNpcMonster();
clearProp();
clearActor();
clearSummonUnit();
}
return this;
}
private void clearEntityCaseOtherNpc() {
if ((((bitField0_ & 0x0000000e)) != 0)) {
if ((((bitField0_ & 0x0000001e)) != 0)) {
clearNpcMonster();
clearProp();
clearActor();
clearSummonUnit();
}
}
private void clearEntityCaseOtherNpcMonster() {
if ((((bitField0_ & 0x0000000d)) != 0)) {
if ((((bitField0_ & 0x0000001d)) != 0)) {
clearNpc();
clearProp();
clearActor();
clearSummonUnit();
}
}
private void clearEntityCaseOtherProp() {
if ((((bitField0_ & 0x0000000b)) != 0)) {
if ((((bitField0_ & 0x0000001b)) != 0)) {
clearNpc();
clearNpcMonster();
clearActor();
clearSummonUnit();
}
}
private void clearEntityCaseOtherActor() {
if ((((bitField0_ & 0x00000007)) != 0)) {
if ((((bitField0_ & 0x00000017)) != 0)) {
clearNpc();
clearNpcMonster();
clearProp();
clearSummonUnit();
}
}
private void clearEntityCaseOtherSummonUnit() {
if ((((bitField0_ & 0x0000000f)) != 0)) {
clearNpc();
clearNpcMonster();
clearProp();
clearActor();
}
}
@@ -123,7 +138,7 @@ public final class SceneEntityInfoOuterClass {
* @return whether the groupId field is set
*/
public boolean hasGroupId() {
return (bitField0_ & 0x00000010) != 0;
return (bitField0_ & 0x00000020) != 0;
}
/**
@@ -131,7 +146,7 @@ public final class SceneEntityInfoOuterClass {
* @return this
*/
public SceneEntityInfo clearGroupId() {
bitField0_ &= ~0x00000010;
bitField0_ &= ~0x00000020;
groupId = 0;
return this;
}
@@ -150,7 +165,7 @@ public final class SceneEntityInfoOuterClass {
* @return this
*/
public SceneEntityInfo setGroupId(final int value) {
bitField0_ |= 0x00000010;
bitField0_ |= 0x00000020;
groupId = value;
return this;
}
@@ -160,7 +175,7 @@ public final class SceneEntityInfoOuterClass {
* @return whether the instId field is set
*/
public boolean hasInstId() {
return (bitField0_ & 0x00000020) != 0;
return (bitField0_ & 0x00000040) != 0;
}
/**
@@ -168,7 +183,7 @@ public final class SceneEntityInfoOuterClass {
* @return this
*/
public SceneEntityInfo clearInstId() {
bitField0_ &= ~0x00000020;
bitField0_ &= ~0x00000040;
instId = 0;
return this;
}
@@ -187,7 +202,7 @@ public final class SceneEntityInfoOuterClass {
* @return this
*/
public SceneEntityInfo setInstId(final int value) {
bitField0_ |= 0x00000020;
bitField0_ |= 0x00000040;
instId = value;
return this;
}
@@ -197,7 +212,7 @@ public final class SceneEntityInfoOuterClass {
* @return whether the entityId field is set
*/
public boolean hasEntityId() {
return (bitField0_ & 0x00000040) != 0;
return (bitField0_ & 0x00000080) != 0;
}
/**
@@ -205,7 +220,7 @@ public final class SceneEntityInfoOuterClass {
* @return this
*/
public SceneEntityInfo clearEntityId() {
bitField0_ &= ~0x00000040;
bitField0_ &= ~0x00000080;
entityId = 0;
return this;
}
@@ -224,7 +239,7 @@ public final class SceneEntityInfoOuterClass {
* @return this
*/
public SceneEntityInfo setEntityId(final int value) {
bitField0_ |= 0x00000040;
bitField0_ |= 0x00000080;
entityId = value;
return this;
}
@@ -234,7 +249,7 @@ public final class SceneEntityInfoOuterClass {
* @return whether the motion field is set
*/
public boolean hasMotion() {
return (bitField0_ & 0x00000080) != 0;
return (bitField0_ & 0x00000100) != 0;
}
/**
@@ -242,7 +257,7 @@ public final class SceneEntityInfoOuterClass {
* @return this
*/
public SceneEntityInfo clearMotion() {
bitField0_ &= ~0x00000080;
bitField0_ &= ~0x00000100;
motion.clear();
return this;
}
@@ -271,7 +286,7 @@ public final class SceneEntityInfoOuterClass {
* @return internal storage object for modifications
*/
public MotionInfoOuterClass.MotionInfo getMutableMotion() {
bitField0_ |= 0x00000080;
bitField0_ |= 0x00000100;
return motion;
}
@@ -281,7 +296,7 @@ public final class SceneEntityInfoOuterClass {
* @return this
*/
public SceneEntityInfo setMotion(final MotionInfoOuterClass.MotionInfo value) {
bitField0_ |= 0x00000080;
bitField0_ |= 0x00000100;
motion.copyFrom(value);
return this;
}
@@ -406,10 +421,6 @@ public final class SceneEntityInfoOuterClass {
}
/**
* <pre>
* SceneSummonUnitInfo summon_unit = 15;
* </pre>
*
* <code>optional .ScenePropInfo prop = 10;</code>
* @return whether the prop field is set
*/
@@ -418,10 +429,6 @@ public final class SceneEntityInfoOuterClass {
}
/**
* <pre>
* SceneSummonUnitInfo summon_unit = 15;
* </pre>
*
* <code>optional .ScenePropInfo prop = 10;</code>
* @return this
*/
@@ -432,10 +439,6 @@ public final class SceneEntityInfoOuterClass {
}
/**
* <pre>
* SceneSummonUnitInfo summon_unit = 15;
* </pre>
*
* <code>optional .ScenePropInfo prop = 10;</code>
*
* This method returns the internal storage object without modifying any has state.
@@ -450,10 +453,6 @@ public final class SceneEntityInfoOuterClass {
}
/**
* <pre>
* SceneSummonUnitInfo summon_unit = 15;
* </pre>
*
* <code>optional .ScenePropInfo prop = 10;</code>
*
* This method returns the internal storage object and sets the corresponding
@@ -469,10 +468,6 @@ public final class SceneEntityInfoOuterClass {
}
/**
* <pre>
* SceneSummonUnitInfo summon_unit = 15;
* </pre>
*
* <code>optional .ScenePropInfo prop = 10;</code>
* @param value the prop to set
* @return this
@@ -543,6 +538,66 @@ public final class SceneEntityInfoOuterClass {
return this;
}
/**
* <code>optional .SceneSummonUnitInfo summon_unit = 15;</code>
* @return whether the summonUnit field is set
*/
public boolean hasSummonUnit() {
return (bitField0_ & 0x00000010) != 0;
}
/**
* <code>optional .SceneSummonUnitInfo summon_unit = 15;</code>
* @return this
*/
public SceneEntityInfo clearSummonUnit() {
bitField0_ &= ~0x00000010;
summonUnit.clear();
return this;
}
/**
* <code>optional .SceneSummonUnitInfo summon_unit = 15;</code>
*
* 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 #getMutableSummonUnit()} if you want to modify it.
*
* @return internal storage object for reading
*/
public SceneSummonUnitInfoOuterClass.SceneSummonUnitInfo getSummonUnit() {
return summonUnit;
}
/**
* <code>optional .SceneSummonUnitInfo summon_unit = 15;</code>
*
* 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 SceneSummonUnitInfoOuterClass.SceneSummonUnitInfo getMutableSummonUnit() {
clearEntityCaseOtherSummonUnit();
bitField0_ |= 0x00000010;
return summonUnit;
}
/**
* <code>optional .SceneSummonUnitInfo summon_unit = 15;</code>
* @param value the summonUnit to set
* @return this
*/
public SceneEntityInfo setSummonUnit(
final SceneSummonUnitInfoOuterClass.SceneSummonUnitInfo value) {
clearEntityCaseOtherSummonUnit();
bitField0_ |= 0x00000010;
summonUnit.copyFrom(value);
return this;
}
@Override
public SceneEntityInfo copyFrom(final SceneEntityInfo other) {
cachedSize = other.cachedSize;
@@ -556,6 +611,7 @@ public final class SceneEntityInfoOuterClass {
npcMonster.copyFrom(other.npcMonster);
prop.copyFrom(other.prop);
actor.copyFrom(other.actor);
summonUnit.copyFrom(other.summonUnit);
}
return this;
}
@@ -590,6 +646,9 @@ public final class SceneEntityInfoOuterClass {
if (other.hasActor()) {
getMutableActor().mergeFrom(other.actor);
}
if (other.hasSummonUnit()) {
getMutableSummonUnit().mergeFrom(other.summonUnit);
}
return this;
}
@@ -608,6 +667,7 @@ public final class SceneEntityInfoOuterClass {
npcMonster.clear();
prop.clear();
actor.clear();
summonUnit.clear();
return this;
}
@@ -623,6 +683,7 @@ public final class SceneEntityInfoOuterClass {
npcMonster.clearQuick();
prop.clearQuick();
actor.clearQuick();
summonUnit.clearQuick();
return this;
}
@@ -643,24 +704,25 @@ public final class SceneEntityInfoOuterClass {
&& (!hasNpc() || npc.equals(other.npc))
&& (!hasNpcMonster() || npcMonster.equals(other.npcMonster))
&& (!hasProp() || prop.equals(other.prop))
&& (!hasActor() || actor.equals(other.actor));
&& (!hasActor() || actor.equals(other.actor))
&& (!hasSummonUnit() || summonUnit.equals(other.summonUnit));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000010) != 0) {
if ((bitField0_ & 0x00000020) != 0) {
output.writeRawByte((byte) 8);
output.writeUInt32NoTag(groupId);
}
if ((bitField0_ & 0x00000020) != 0) {
if ((bitField0_ & 0x00000040) != 0) {
output.writeRawByte((byte) 40);
output.writeUInt32NoTag(instId);
}
if ((bitField0_ & 0x00000040) != 0) {
if ((bitField0_ & 0x00000080) != 0) {
output.writeRawByte((byte) 64);
output.writeUInt32NoTag(entityId);
}
if ((bitField0_ & 0x00000080) != 0) {
if ((bitField0_ & 0x00000100) != 0) {
output.writeRawByte((byte) 34);
output.writeMessageNoTag(motion);
}
@@ -680,21 +742,25 @@ public final class SceneEntityInfoOuterClass {
output.writeRawByte((byte) 106);
output.writeMessageNoTag(actor);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeRawByte((byte) 122);
output.writeMessageNoTag(summonUnit);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000010) != 0) {
if ((bitField0_ & 0x00000020) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId);
}
if ((bitField0_ & 0x00000020) != 0) {
if ((bitField0_ & 0x00000040) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(instId);
}
if ((bitField0_ & 0x00000040) != 0) {
if ((bitField0_ & 0x00000080) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(entityId);
}
if ((bitField0_ & 0x00000080) != 0) {
if ((bitField0_ & 0x00000100) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(motion);
}
if ((bitField0_ & 0x00000001) != 0) {
@@ -709,6 +775,9 @@ public final class SceneEntityInfoOuterClass {
if ((bitField0_ & 0x00000008) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(actor);
}
if ((bitField0_ & 0x00000010) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(summonUnit);
}
return size;
}
@@ -722,7 +791,7 @@ public final class SceneEntityInfoOuterClass {
case 8: {
// groupId
groupId = input.readUInt32();
bitField0_ |= 0x00000010;
bitField0_ |= 0x00000020;
tag = input.readTag();
if (tag != 40) {
break;
@@ -731,7 +800,7 @@ public final class SceneEntityInfoOuterClass {
case 40: {
// instId
instId = input.readUInt32();
bitField0_ |= 0x00000020;
bitField0_ |= 0x00000040;
tag = input.readTag();
if (tag != 64) {
break;
@@ -740,7 +809,7 @@ public final class SceneEntityInfoOuterClass {
case 64: {
// entityId
entityId = input.readUInt32();
bitField0_ |= 0x00000040;
bitField0_ |= 0x00000080;
tag = input.readTag();
if (tag != 34) {
break;
@@ -749,7 +818,7 @@ public final class SceneEntityInfoOuterClass {
case 34: {
// motion
input.readMessage(motion);
bitField0_ |= 0x00000080;
bitField0_ |= 0x00000100;
tag = input.readTag();
if (tag != 50) {
break;
@@ -791,6 +860,16 @@ public final class SceneEntityInfoOuterClass {
input.readMessage(actor);
bitField0_ |= 0x00000008;
tag = input.readTag();
if (tag != 122) {
break;
}
}
case 122: {
// summonUnit
clearEntityCaseOtherSummonUnit();
input.readMessage(summonUnit);
bitField0_ |= 0x00000010;
tag = input.readTag();
if (tag != 0) {
break;
}
@@ -812,16 +891,16 @@ public final class SceneEntityInfoOuterClass {
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000010) != 0) {
if ((bitField0_ & 0x00000020) != 0) {
output.writeUInt32(FieldNames.groupId, groupId);
}
if ((bitField0_ & 0x00000020) != 0) {
if ((bitField0_ & 0x00000040) != 0) {
output.writeUInt32(FieldNames.instId, instId);
}
if ((bitField0_ & 0x00000040) != 0) {
if ((bitField0_ & 0x00000080) != 0) {
output.writeUInt32(FieldNames.entityId, entityId);
}
if ((bitField0_ & 0x00000080) != 0) {
if ((bitField0_ & 0x00000100) != 0) {
output.writeMessage(FieldNames.motion, motion);
}
if ((bitField0_ & 0x00000001) != 0) {
@@ -836,6 +915,9 @@ public final class SceneEntityInfoOuterClass {
if ((bitField0_ & 0x00000008) != 0) {
output.writeMessage(FieldNames.actor, actor);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeMessage(FieldNames.summonUnit, summonUnit);
}
output.endObject();
}
@@ -851,7 +933,7 @@ public final class SceneEntityInfoOuterClass {
if (input.isAtField(FieldNames.groupId)) {
if (!input.trySkipNullValue()) {
groupId = input.readUInt32();
bitField0_ |= 0x00000010;
bitField0_ |= 0x00000020;
}
} else {
input.skipUnknownField();
@@ -863,7 +945,7 @@ public final class SceneEntityInfoOuterClass {
if (input.isAtField(FieldNames.instId)) {
if (!input.trySkipNullValue()) {
instId = input.readUInt32();
bitField0_ |= 0x00000020;
bitField0_ |= 0x00000040;
}
} else {
input.skipUnknownField();
@@ -875,7 +957,7 @@ public final class SceneEntityInfoOuterClass {
if (input.isAtField(FieldNames.entityId)) {
if (!input.trySkipNullValue()) {
entityId = input.readUInt32();
bitField0_ |= 0x00000040;
bitField0_ |= 0x00000080;
}
} else {
input.skipUnknownField();
@@ -886,7 +968,7 @@ public final class SceneEntityInfoOuterClass {
if (input.isAtField(FieldNames.motion)) {
if (!input.trySkipNullValue()) {
input.readMessage(motion);
bitField0_ |= 0x00000080;
bitField0_ |= 0x00000100;
}
} else {
input.skipUnknownField();
@@ -942,6 +1024,19 @@ public final class SceneEntityInfoOuterClass {
}
break;
}
case 80492037:
case -1790265822: {
if (input.isAtField(FieldNames.summonUnit)) {
if (!input.trySkipNullValue()) {
clearEntityCaseOtherSummonUnit();
input.readMessage(summonUnit);
bitField0_ |= 0x00000010;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
@@ -1010,6 +1105,8 @@ public final class SceneEntityInfoOuterClass {
static final FieldName prop = FieldName.forField("prop");
static final FieldName actor = FieldName.forField("actor");
static final FieldName summonUnit = FieldName.forField("summonUnit", "summon_unit");
}
}
}

View File

@@ -0,0 +1,699 @@
// 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.RepeatedString;
public final class SceneSummonUnitInfoOuterClass {
/**
* Protobuf type {@code SceneSummonUnitInfo}
*/
public static final class SceneSummonUnitInfo extends ProtoMessage<SceneSummonUnitInfo> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint64 create_time_ms = 14;</code>
*/
private long createTimeMs;
/**
* <code>optional int32 life_time_ms = 6;</code>
*/
private int lifeTimeMs;
/**
* <code>optional uint32 caster_entity_id = 11;</code>
*/
private int casterEntityId;
/**
* <code>optional uint32 attach_entity_id = 12;</code>
*/
private int attachEntityId;
/**
* <code>optional uint32 summon_unit_id = 13;</code>
*/
private int summonUnitId;
/**
* <code>repeated string custom_triggers = 3;</code>
*/
private final RepeatedString customTriggers = RepeatedString.newEmptyInstance();
private SceneSummonUnitInfo() {
}
/**
* @return a new empty instance of {@code SceneSummonUnitInfo}
*/
public static SceneSummonUnitInfo newInstance() {
return new SceneSummonUnitInfo();
}
/**
* <code>optional uint64 create_time_ms = 14;</code>
* @return whether the createTimeMs field is set
*/
public boolean hasCreateTimeMs() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint64 create_time_ms = 14;</code>
* @return this
*/
public SceneSummonUnitInfo clearCreateTimeMs() {
bitField0_ &= ~0x00000001;
createTimeMs = 0L;
return this;
}
/**
* <code>optional uint64 create_time_ms = 14;</code>
* @return the createTimeMs
*/
public long getCreateTimeMs() {
return createTimeMs;
}
/**
* <code>optional uint64 create_time_ms = 14;</code>
* @param value the createTimeMs to set
* @return this
*/
public SceneSummonUnitInfo setCreateTimeMs(final long value) {
bitField0_ |= 0x00000001;
createTimeMs = value;
return this;
}
/**
* <code>optional int32 life_time_ms = 6;</code>
* @return whether the lifeTimeMs field is set
*/
public boolean hasLifeTimeMs() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional int32 life_time_ms = 6;</code>
* @return this
*/
public SceneSummonUnitInfo clearLifeTimeMs() {
bitField0_ &= ~0x00000002;
lifeTimeMs = 0;
return this;
}
/**
* <code>optional int32 life_time_ms = 6;</code>
* @return the lifeTimeMs
*/
public int getLifeTimeMs() {
return lifeTimeMs;
}
/**
* <code>optional int32 life_time_ms = 6;</code>
* @param value the lifeTimeMs to set
* @return this
*/
public SceneSummonUnitInfo setLifeTimeMs(final int value) {
bitField0_ |= 0x00000002;
lifeTimeMs = value;
return this;
}
/**
* <code>optional uint32 caster_entity_id = 11;</code>
* @return whether the casterEntityId field is set
*/
public boolean hasCasterEntityId() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional uint32 caster_entity_id = 11;</code>
* @return this
*/
public SceneSummonUnitInfo clearCasterEntityId() {
bitField0_ &= ~0x00000004;
casterEntityId = 0;
return this;
}
/**
* <code>optional uint32 caster_entity_id = 11;</code>
* @return the casterEntityId
*/
public int getCasterEntityId() {
return casterEntityId;
}
/**
* <code>optional uint32 caster_entity_id = 11;</code>
* @param value the casterEntityId to set
* @return this
*/
public SceneSummonUnitInfo setCasterEntityId(final int value) {
bitField0_ |= 0x00000004;
casterEntityId = value;
return this;
}
/**
* <code>optional uint32 attach_entity_id = 12;</code>
* @return whether the attachEntityId field is set
*/
public boolean hasAttachEntityId() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <code>optional uint32 attach_entity_id = 12;</code>
* @return this
*/
public SceneSummonUnitInfo clearAttachEntityId() {
bitField0_ &= ~0x00000008;
attachEntityId = 0;
return this;
}
/**
* <code>optional uint32 attach_entity_id = 12;</code>
* @return the attachEntityId
*/
public int getAttachEntityId() {
return attachEntityId;
}
/**
* <code>optional uint32 attach_entity_id = 12;</code>
* @param value the attachEntityId to set
* @return this
*/
public SceneSummonUnitInfo setAttachEntityId(final int value) {
bitField0_ |= 0x00000008;
attachEntityId = value;
return this;
}
/**
* <code>optional uint32 summon_unit_id = 13;</code>
* @return whether the summonUnitId field is set
*/
public boolean hasSummonUnitId() {
return (bitField0_ & 0x00000010) != 0;
}
/**
* <code>optional uint32 summon_unit_id = 13;</code>
* @return this
*/
public SceneSummonUnitInfo clearSummonUnitId() {
bitField0_ &= ~0x00000010;
summonUnitId = 0;
return this;
}
/**
* <code>optional uint32 summon_unit_id = 13;</code>
* @return the summonUnitId
*/
public int getSummonUnitId() {
return summonUnitId;
}
/**
* <code>optional uint32 summon_unit_id = 13;</code>
* @param value the summonUnitId to set
* @return this
*/
public SceneSummonUnitInfo setSummonUnitId(final int value) {
bitField0_ |= 0x00000010;
summonUnitId = value;
return this;
}
/**
* <code>repeated string custom_triggers = 3;</code>
* @return whether the customTriggers field is set
*/
public boolean hasCustomTriggers() {
return (bitField0_ & 0x00000020) != 0;
}
/**
* <code>repeated string custom_triggers = 3;</code>
* @return this
*/
public SceneSummonUnitInfo clearCustomTriggers() {
bitField0_ &= ~0x00000020;
customTriggers.clear();
return this;
}
/**
* <code>repeated string custom_triggers = 3;</code>
*
* 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 #getMutableCustomTriggers()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedString getCustomTriggers() {
return customTriggers;
}
/**
* <code>repeated string custom_triggers = 3;</code>
*
* 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 RepeatedString getMutableCustomTriggers() {
bitField0_ |= 0x00000020;
return customTriggers;
}
/**
* <code>repeated string custom_triggers = 3;</code>
* @param value the customTriggers to add
* @return this
*/
public SceneSummonUnitInfo addCustomTriggers(final CharSequence value) {
bitField0_ |= 0x00000020;
customTriggers.add(value);
return this;
}
/**
* <code>repeated string custom_triggers = 3;</code>
* @param values the customTriggers to add
* @return this
*/
public SceneSummonUnitInfo addAllCustomTriggers(final CharSequence... values) {
bitField0_ |= 0x00000020;
customTriggers.addAll(values);
return this;
}
@Override
public SceneSummonUnitInfo copyFrom(final SceneSummonUnitInfo other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
createTimeMs = other.createTimeMs;
lifeTimeMs = other.lifeTimeMs;
casterEntityId = other.casterEntityId;
attachEntityId = other.attachEntityId;
summonUnitId = other.summonUnitId;
customTriggers.copyFrom(other.customTriggers);
}
return this;
}
@Override
public SceneSummonUnitInfo mergeFrom(final SceneSummonUnitInfo other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasCreateTimeMs()) {
setCreateTimeMs(other.createTimeMs);
}
if (other.hasLifeTimeMs()) {
setLifeTimeMs(other.lifeTimeMs);
}
if (other.hasCasterEntityId()) {
setCasterEntityId(other.casterEntityId);
}
if (other.hasAttachEntityId()) {
setAttachEntityId(other.attachEntityId);
}
if (other.hasSummonUnitId()) {
setSummonUnitId(other.summonUnitId);
}
if (other.hasCustomTriggers()) {
getMutableCustomTriggers().addAll(other.customTriggers);
}
return this;
}
@Override
public SceneSummonUnitInfo clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
createTimeMs = 0L;
lifeTimeMs = 0;
casterEntityId = 0;
attachEntityId = 0;
summonUnitId = 0;
customTriggers.clear();
return this;
}
@Override
public SceneSummonUnitInfo clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
customTriggers.clear();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SceneSummonUnitInfo)) {
return false;
}
SceneSummonUnitInfo other = (SceneSummonUnitInfo) o;
return bitField0_ == other.bitField0_
&& (!hasCreateTimeMs() || createTimeMs == other.createTimeMs)
&& (!hasLifeTimeMs() || lifeTimeMs == other.lifeTimeMs)
&& (!hasCasterEntityId() || casterEntityId == other.casterEntityId)
&& (!hasAttachEntityId() || attachEntityId == other.attachEntityId)
&& (!hasSummonUnitId() || summonUnitId == other.summonUnitId)
&& (!hasCustomTriggers() || customTriggers.equals(other.customTriggers));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 112);
output.writeUInt64NoTag(createTimeMs);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 48);
output.writeInt32NoTag(lifeTimeMs);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 88);
output.writeUInt32NoTag(casterEntityId);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeRawByte((byte) 96);
output.writeUInt32NoTag(attachEntityId);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeRawByte((byte) 104);
output.writeUInt32NoTag(summonUnitId);
}
if ((bitField0_ & 0x00000020) != 0) {
for (int i = 0; i < customTriggers.length(); i++) {
output.writeRawByte((byte) 26);
output.writeStringNoTag(customTriggers.get(i));
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt64SizeNoTag(createTimeMs);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeInt32SizeNoTag(lifeTimeMs);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(casterEntityId);
}
if ((bitField0_ & 0x00000008) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(attachEntityId);
}
if ((bitField0_ & 0x00000010) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(summonUnitId);
}
if ((bitField0_ & 0x00000020) != 0) {
size += (1 * customTriggers.length()) + ProtoSink.computeRepeatedStringSizeNoTag(customTriggers);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public SceneSummonUnitInfo mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 112: {
// createTimeMs
createTimeMs = input.readUInt64();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 48) {
break;
}
}
case 48: {
// lifeTimeMs
lifeTimeMs = input.readInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 88) {
break;
}
}
case 88: {
// casterEntityId
casterEntityId = input.readUInt32();
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 96) {
break;
}
}
case 96: {
// attachEntityId
attachEntityId = input.readUInt32();
bitField0_ |= 0x00000008;
tag = input.readTag();
if (tag != 104) {
break;
}
}
case 104: {
// summonUnitId
summonUnitId = input.readUInt32();
bitField0_ |= 0x00000010;
tag = input.readTag();
if (tag != 26) {
break;
}
}
case 26: {
// customTriggers
tag = input.readRepeatedString(customTriggers, tag);
bitField0_ |= 0x00000020;
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.writeUInt64(FieldNames.createTimeMs, createTimeMs);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeInt32(FieldNames.lifeTimeMs, lifeTimeMs);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeUInt32(FieldNames.casterEntityId, casterEntityId);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeUInt32(FieldNames.attachEntityId, attachEntityId);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeUInt32(FieldNames.summonUnitId, summonUnitId);
}
if ((bitField0_ & 0x00000020) != 0) {
output.writeRepeatedString(FieldNames.customTriggers, customTriggers);
}
output.endObject();
}
@Override
public SceneSummonUnitInfo mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1554103663:
case 1902222357: {
if (input.isAtField(FieldNames.createTimeMs)) {
if (!input.trySkipNullValue()) {
createTimeMs = input.readUInt64();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -1226028177:
case 1665182229: {
if (input.isAtField(FieldNames.lifeTimeMs)) {
if (!input.trySkipNullValue()) {
lifeTimeMs = input.readInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case -1831162710:
case -1550367068: {
if (input.isAtField(FieldNames.casterEntityId)) {
if (!input.trySkipNullValue()) {
casterEntityId = input.readUInt32();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case -900612669:
case -644975235: {
if (input.isAtField(FieldNames.attachEntityId)) {
if (!input.trySkipNullValue()) {
attachEntityId = input.readUInt32();
bitField0_ |= 0x00000008;
}
} else {
input.skipUnknownField();
}
break;
}
case 43438592:
case 1094873176: {
if (input.isAtField(FieldNames.summonUnitId)) {
if (!input.trySkipNullValue()) {
summonUnitId = input.readUInt32();
bitField0_ |= 0x00000010;
}
} else {
input.skipUnknownField();
}
break;
}
case -1316859828:
case -1929554231: {
if (input.isAtField(FieldNames.customTriggers)) {
if (!input.trySkipNullValue()) {
input.readRepeatedString(customTriggers);
bitField0_ |= 0x00000020;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public SceneSummonUnitInfo clone() {
return new SceneSummonUnitInfo().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static SceneSummonUnitInfo parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new SceneSummonUnitInfo(), data).checkInitialized();
}
public static SceneSummonUnitInfo parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new SceneSummonUnitInfo(), input).checkInitialized();
}
public static SceneSummonUnitInfo parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new SceneSummonUnitInfo(), input).checkInitialized();
}
/**
* @return factory for creating SceneSummonUnitInfo messages
*/
public static MessageFactory<SceneSummonUnitInfo> getFactory() {
return SceneSummonUnitInfoFactory.INSTANCE;
}
private enum SceneSummonUnitInfoFactory implements MessageFactory<SceneSummonUnitInfo> {
INSTANCE;
@Override
public SceneSummonUnitInfo create() {
return SceneSummonUnitInfo.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName createTimeMs = FieldName.forField("createTimeMs", "create_time_ms");
static final FieldName lifeTimeMs = FieldName.forField("lifeTimeMs", "life_time_ms");
static final FieldName casterEntityId = FieldName.forField("casterEntityId", "caster_entity_id");
static final FieldName attachEntityId = FieldName.forField("attachEntityId", "attach_entity_id");
static final FieldName summonUnitId = FieldName.forField("summonUnitId", "summon_unit_id");
static final FieldName customTriggers = FieldName.forField("customTriggers", "custom_triggers");
}
}
}

View File

@@ -0,0 +1,301 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedMessage;
public final class SyncEntityBuffChangeListScNotifyOuterClass {
/**
* Protobuf type {@code SyncEntityBuffChangeListScNotify}
*/
public static final class SyncEntityBuffChangeListScNotify extends ProtoMessage<SyncEntityBuffChangeListScNotify> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>repeated .EntityBuffChangeInfo entity_buff_info_list = 5;</code>
*/
private final RepeatedMessage<EntityBuffChangeInfoOuterClass.EntityBuffChangeInfo> entityBuffInfoList = RepeatedMessage.newEmptyInstance(EntityBuffChangeInfoOuterClass.EntityBuffChangeInfo.getFactory());
private SyncEntityBuffChangeListScNotify() {
}
/**
* @return a new empty instance of {@code SyncEntityBuffChangeListScNotify}
*/
public static SyncEntityBuffChangeListScNotify newInstance() {
return new SyncEntityBuffChangeListScNotify();
}
/**
* <code>repeated .EntityBuffChangeInfo entity_buff_info_list = 5;</code>
* @return whether the entityBuffInfoList field is set
*/
public boolean hasEntityBuffInfoList() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>repeated .EntityBuffChangeInfo entity_buff_info_list = 5;</code>
* @return this
*/
public SyncEntityBuffChangeListScNotify clearEntityBuffInfoList() {
bitField0_ &= ~0x00000001;
entityBuffInfoList.clear();
return this;
}
/**
* <code>repeated .EntityBuffChangeInfo entity_buff_info_list = 5;</code>
*
* 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 #getMutableEntityBuffInfoList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<EntityBuffChangeInfoOuterClass.EntityBuffChangeInfo> getEntityBuffInfoList(
) {
return entityBuffInfoList;
}
/**
* <code>repeated .EntityBuffChangeInfo entity_buff_info_list = 5;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<EntityBuffChangeInfoOuterClass.EntityBuffChangeInfo> getMutableEntityBuffInfoList(
) {
bitField0_ |= 0x00000001;
return entityBuffInfoList;
}
/**
* <code>repeated .EntityBuffChangeInfo entity_buff_info_list = 5;</code>
* @param value the entityBuffInfoList to add
* @return this
*/
public SyncEntityBuffChangeListScNotify addEntityBuffInfoList(
final EntityBuffChangeInfoOuterClass.EntityBuffChangeInfo value) {
bitField0_ |= 0x00000001;
entityBuffInfoList.add(value);
return this;
}
/**
* <code>repeated .EntityBuffChangeInfo entity_buff_info_list = 5;</code>
* @param values the entityBuffInfoList to add
* @return this
*/
public SyncEntityBuffChangeListScNotify addAllEntityBuffInfoList(
final EntityBuffChangeInfoOuterClass.EntityBuffChangeInfo... values) {
bitField0_ |= 0x00000001;
entityBuffInfoList.addAll(values);
return this;
}
@Override
public SyncEntityBuffChangeListScNotify copyFrom(final SyncEntityBuffChangeListScNotify other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
entityBuffInfoList.copyFrom(other.entityBuffInfoList);
}
return this;
}
@Override
public SyncEntityBuffChangeListScNotify mergeFrom(
final SyncEntityBuffChangeListScNotify other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasEntityBuffInfoList()) {
getMutableEntityBuffInfoList().addAll(other.entityBuffInfoList);
}
return this;
}
@Override
public SyncEntityBuffChangeListScNotify clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
entityBuffInfoList.clear();
return this;
}
@Override
public SyncEntityBuffChangeListScNotify clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
entityBuffInfoList.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SyncEntityBuffChangeListScNotify)) {
return false;
}
SyncEntityBuffChangeListScNotify other = (SyncEntityBuffChangeListScNotify) o;
return bitField0_ == other.bitField0_
&& (!hasEntityBuffInfoList() || entityBuffInfoList.equals(other.entityBuffInfoList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
for (int i = 0; i < entityBuffInfoList.length(); i++) {
output.writeRawByte((byte) 42);
output.writeMessageNoTag(entityBuffInfoList.get(i));
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += (1 * entityBuffInfoList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(entityBuffInfoList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public SyncEntityBuffChangeListScNotify mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 42: {
// entityBuffInfoList
tag = input.readRepeatedMessage(entityBuffInfoList, tag);
bitField0_ |= 0x00000001;
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.writeRepeatedMessage(FieldNames.entityBuffInfoList, entityBuffInfoList);
}
output.endObject();
}
@Override
public SyncEntityBuffChangeListScNotify mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -614748318:
case -1583683457: {
if (input.isAtField(FieldNames.entityBuffInfoList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(entityBuffInfoList);
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public SyncEntityBuffChangeListScNotify clone() {
return new SyncEntityBuffChangeListScNotify().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static SyncEntityBuffChangeListScNotify parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new SyncEntityBuffChangeListScNotify(), data).checkInitialized();
}
public static SyncEntityBuffChangeListScNotify parseFrom(final ProtoSource input) throws
IOException {
return ProtoMessage.mergeFrom(new SyncEntityBuffChangeListScNotify(), input).checkInitialized();
}
public static SyncEntityBuffChangeListScNotify parseFrom(final JsonSource input) throws
IOException {
return ProtoMessage.mergeFrom(new SyncEntityBuffChangeListScNotify(), input).checkInitialized();
}
/**
* @return factory for creating SyncEntityBuffChangeListScNotify messages
*/
public static MessageFactory<SyncEntityBuffChangeListScNotify> getFactory() {
return SyncEntityBuffChangeListScNotifyFactory.INSTANCE;
}
private enum SyncEntityBuffChangeListScNotifyFactory implements MessageFactory<SyncEntityBuffChangeListScNotify> {
INSTANCE;
@Override
public SyncEntityBuffChangeListScNotify create() {
return SyncEntityBuffChangeListScNotify.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName entityBuffInfoList = FieldName.forField("entityBuffInfoList", "entity_buff_info_list");
}
}
}

View File

@@ -24,6 +24,7 @@ public class GameData {
@Getter private static Int2ObjectMap<RelicExcel> relicExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<PropExcel> propExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<NpcExcel> npcExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<SummonUnitExcel> summonUnitExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<MonsterExcel> monsterExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<NpcMonsterExcel> npcMonsterExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<StageExcel> stageExcelMap = new Int2ObjectOpenHashMap<>();

View File

@@ -21,6 +21,7 @@ import emu.lunarcore.data.config.FloorInfo;
import emu.lunarcore.data.config.FloorInfo.FloorGroupSimpleInfo;
import emu.lunarcore.data.config.GroupInfo;
import emu.lunarcore.data.config.SkillAbilityInfo;
import emu.lunarcore.data.config.SummonUnitInfo;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
public class ResourceLoader {
@@ -227,8 +228,40 @@ public class ResourceLoader {
// Might be better to cache
private static void loadMazeAbilities() {
// Loaded configs count
int count = 0;
// Load summon unit configs
for (var summonUnitExcel : GameData.getSummonUnitExcelMap().values()) {
if (summonUnitExcel.isIsClient()) {
count++;
continue;
}
// Get file
File file = new File(LunarCore.getConfig().getResourceDir() + "/" + summonUnitExcel.getJsonPath());
if (!file.exists()) continue;
try (FileReader reader = new FileReader(file)) {
SummonUnitInfo info = gson.fromJson(reader, SummonUnitInfo.class);
info.buildMazeSkillActions();
summonUnitExcel.setInfo(info);
count++;
} catch (Exception e) {
e.printStackTrace();
}
}
// Notify the server owner if we are missing any files
if (count < GameData.getSummonUnitExcelMap().size()) {
LunarCore.getLogger().warn("Summon unit configs are missing, please check your resources folder: {resources}/Config/ConfigSummonUnit. Character summon techniques may not work!");
}
// Reset loaded count
count = 0;
// Load maze abilities
for (var avatarExcel : GameData.getAvatarExcelMap().values()) {
// Get file
File file = new File(LunarCore.getConfig().getResourceDir() + "/Config/ConfigAdventureAbility/LocalPlayer/LocalPlayer_" + avatarExcel.getNameKey() + "_Ability.json");

View File

@@ -2,6 +2,7 @@ package emu.lunarcore.data.config;
import java.util.List;
import emu.lunarcore.data.GameData;
import emu.lunarcore.data.excel.AvatarExcel;
import emu.lunarcore.game.battle.skills.*;
import lombok.Getter;
@@ -27,6 +28,13 @@ public class SkillAbilityInfo {
avatarExcel.setMazeSkill(skill);
actionList = skill.getCastActions();
// Hacky way to check if an avatar can summon with their skill
var summonUnitExcel = GameData.getSummonUnitExcelMap().get((skill.getId() * 10) + 1);
if (summonUnitExcel != null && !summonUnitExcel.isIsClient()) {
// TODO duration is hardcoded
skill.getCastActions().add(new MazeSkillSummonUnit(summonUnitExcel, 20));
}
} else if (ability.getName().contains("NormalAtk")) {
skill = new MazeSkill(avatarExcel, 0);
avatarExcel.setMazeAttack(skill);
@@ -46,6 +54,7 @@ public class SkillAbilityInfo {
}
// "Simple" way to parse maze attacks/skills
// TODO parse tasks better
private void parseTask(MazeSkill skill, List<MazeSkillAction> actionList, TaskInfo task) {
if (task.getType().contains("AddMazeBuff")) {
// TODO get duration from params if buff duration is dynamic
@@ -59,7 +68,7 @@ public class SkillAbilityInfo {
// TODO get sp increase value from params, also handle target alias
actionList.add(new MazeSkillModifySP(50));
} else if (task.getType().contains("CreateSummonUnit")) {
// Ignored
} else if (task.getSuccessTaskList() != null) {
for (TaskInfo t : task.getSuccessTaskList()) {
parseTask(skill, actionList, t);

View File

@@ -0,0 +1,75 @@
package emu.lunarcore.data.config;
import java.util.ArrayList;
import java.util.List;
import emu.lunarcore.game.battle.skills.MazeSkillAction;
import emu.lunarcore.game.battle.skills.MazeSkillAddBuff;
import lombok.Getter;
/**
* Original name: SummonUnitConfig
*/
@Getter
public class SummonUnitInfo {
private String AttachPoint;
private SummonUnitTriggers TriggerConfig;
public List<SummonUnitCustomTrigger> getCustomTriggers() {
return TriggerConfig.getCustomTriggers();
}
public SummonUnitCustomTrigger getTriggerByName(String name) {
return getCustomTriggers().stream()
.filter(c -> c.getTriggerName().equals(name))
.findFirst()
.orElse(null);
}
public void buildMazeSkillActions() {
for (var customTrigger : getCustomTriggers()) {
customTrigger.buildMazeSkillActions();
}
}
/**
* Original name: SummonUnitTriggerConfig
*/
@Getter
public static class SummonUnitTriggers {
private List<SummonUnitCustomTrigger> CustomTriggers;
}
/**
* Original name: UnitCustomTriggerConfig
*/
@Getter
public static class SummonUnitCustomTrigger {
private String TriggerName;
private List<TaskInfo> OnTriggerEnter;
private transient List<MazeSkillAction> actions;
public void buildMazeSkillActions() {
// Create actions list
this.actions = new ArrayList<>();
// Sanity check
if (this.OnTriggerEnter == null) return;
// Build maze actions
for (var task : this.OnTriggerEnter) {
if (task.getType().contains("AddMazeBuff")) {
// TODO get duration from params if buff duration is dynamic
var actionAddBuff = new MazeSkillAddBuff(task.getID(), 15);
actionAddBuff.setSendBuffPacket(true);
actions.add(actionAddBuff);
} else if (task.getType().contains("TriggerHitProp")) {
// actions.add(new MazeSkillAddBuff(task.getID(), 20));
}
}
}
}
}

View File

@@ -0,0 +1,28 @@
package emu.lunarcore.data.excel;
import emu.lunarcore.data.GameResource;
import emu.lunarcore.data.ResourceType;
import emu.lunarcore.data.config.SummonUnitInfo;
import lombok.Getter;
@Getter
@ResourceType(name = {"SummonUnitData.json"})
public class SummonUnitExcel extends GameResource {
private int ID;
private String JsonPath;
private boolean IsClient;
private transient SummonUnitInfo info;
@Override
public int getId() {
return ID;
}
public void setInfo(SummonUnitInfo info) {
if (this.info == null && !this.IsClient) {
this.info = info;
}
}
}

View File

@@ -80,9 +80,9 @@ public class BattleService extends BaseGameService {
if (entity instanceof EntityMonster monster) {
monsters.add(monster);
} else if (entity instanceof EntityProp) {
} else if (entity instanceof EntityProp prop) {
it.remove();
player.getScene().removeEntity(entity);
player.getScene().destroyProp(prop);
}
}

View File

@@ -6,7 +6,7 @@ import java.util.List;
import emu.lunarcore.data.excel.AvatarExcel;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.battle.Battle;
import emu.lunarcore.game.scene.entity.EntityMonster;
import emu.lunarcore.game.scene.entity.GameEntity;
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
import lombok.Getter;
import lombok.Setter;
@@ -47,11 +47,11 @@ public class MazeSkill {
}
// Triggered when player attacks an enemy
public void onAttack(GameAvatar caster, List<EntityMonster> monsters) {
public void onAttack(GameAvatar caster, List<? extends GameEntity> entities) {
if (this.getAttackActions().size() == 0) return;
for (var action : this.getAttackActions()) {
action.onAttack(caster, monsters);
action.onAttack(caster, entities);
}
}
}

View File

@@ -4,7 +4,7 @@ import java.util.List;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.battle.Battle;
import emu.lunarcore.game.scene.entity.EntityMonster;
import emu.lunarcore.game.scene.entity.GameEntity;
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
public abstract class MazeSkillAction {
@@ -13,6 +13,6 @@ public abstract class MazeSkillAction {
public abstract void onAttack(GameAvatar caster, Battle battle);
public abstract void onAttack(GameAvatar caster, List<EntityMonster> monsters);
public abstract void onAttack(GameAvatar caster, List<? extends GameEntity> entities);
}

View File

@@ -5,14 +5,20 @@ import java.util.List;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.battle.Battle;
import emu.lunarcore.game.scene.entity.EntityMonster;
import emu.lunarcore.game.scene.entity.GameEntity;
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
import emu.lunarcore.server.packet.send.PacketSyncEntityBuffChangeListScNotify;
import lombok.Getter;
import lombok.Setter;
@Getter
public class MazeSkillAddBuff extends MazeSkillAction {
private int buffId;
private int duration;
@Setter
private boolean sendBuffPacket;
public MazeSkillAddBuff(int buffId, int duration) {
this.buffId = buffId;
this.duration = duration;
@@ -34,9 +40,17 @@ public class MazeSkillAddBuff extends MazeSkillAction {
}
@Override
public void onAttack(GameAvatar caster, List<EntityMonster> monsters) {
for (EntityMonster monster : monsters) {
monster.addBuff(caster.getAvatarId(), buffId, duration);
public void onAttack(GameAvatar caster, List<? extends GameEntity> entities) {
for (GameEntity entity : entities) {
if (entity instanceof EntityMonster monster) {
// Add buff to monster
var buff = monster.addBuff(caster.getAvatarId(), buffId, duration);
// Send packet
if (buff != null && this.sendBuffPacket) {
caster.getOwner().sendPacket(new PacketSyncEntityBuffChangeListScNotify(entity.getEntityId(), buff));
}
}
}
}

View File

@@ -0,0 +1,34 @@
package emu.lunarcore.game.battle.skills;
import java.util.List;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.battle.Battle;
import emu.lunarcore.game.scene.entity.EntityProp;
import emu.lunarcore.game.scene.entity.GameEntity;
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
import lombok.Getter;
@Getter
public class MazeSkillHitProp extends MazeSkillAction {
@Override
public void onCast(GameAvatar caster, MotionInfo castPosition) {
// Skip
}
@Override
public void onAttack(GameAvatar caster, Battle battle) {
// Skip
}
@Override
public void onAttack(GameAvatar caster, List<? extends GameEntity> entities) {
for (GameEntity entity : entities) {
if (entity instanceof EntityProp prop) {
caster.getScene().destroyProp(prop);
}
}
}
}

View File

@@ -4,7 +4,7 @@ import java.util.List;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.battle.Battle;
import emu.lunarcore.game.scene.entity.EntityMonster;
import emu.lunarcore.game.scene.entity.GameEntity;
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
public class MazeSkillModifyHP extends MazeSkillAction {
@@ -25,7 +25,7 @@ public class MazeSkillModifyHP extends MazeSkillAction {
}
@Override
public void onAttack(GameAvatar caster, List<EntityMonster> monsters) {
public void onAttack(GameAvatar caster, List<? extends GameEntity> entities) {
}

View File

@@ -4,7 +4,7 @@ import java.util.List;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.battle.Battle;
import emu.lunarcore.game.scene.entity.EntityMonster;
import emu.lunarcore.game.scene.entity.GameEntity;
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
public class MazeSkillModifySP extends MazeSkillAction {
@@ -28,7 +28,7 @@ public class MazeSkillModifySP extends MazeSkillAction {
}
@Override
public void onAttack(GameAvatar caster, List<EntityMonster> monsters) {
public void onAttack(GameAvatar caster, List<? extends GameEntity> entities) {
}

View File

@@ -2,26 +2,37 @@ package emu.lunarcore.game.battle.skills;
import java.util.List;
import emu.lunarcore.data.excel.SummonUnitExcel;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.battle.Battle;
import emu.lunarcore.game.scene.entity.EntityMonster;
import emu.lunarcore.game.scene.entity.GameEntity;
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
import emu.lunarcore.util.Position;
import lombok.Getter;
@Getter
public class MazeSkillSummonUnit extends MazeSkillAction {
private SummonUnitExcel excel;
private int duration;
public MazeSkillSummonUnit(SummonUnitExcel excel, int duration) {
this.excel = excel;
this.duration = duration;
}
@Override
public void onCast(GameAvatar caster, MotionInfo castPosition) {
// TODO Auto-generated method stub
caster.getScene().summonUnit(caster, excel, new Position(castPosition.getPos()), new Position(castPosition.getRot()), duration);
}
@Override
public void onAttack(GameAvatar caster, Battle battle) {
// TODO Auto-generated method stub
// Skip
}
@Override
public void onAttack(GameAvatar caster, List<EntityMonster> monsters) {
// TODO Auto-generated method stub
public void onAttack(GameAvatar caster, List<? extends GameEntity> entities) {
// Skip
}
}

View File

@@ -274,9 +274,16 @@ public class Player {
}
public void setWorldLevel(int level) {
if (this.worldLevel == level) {
return;
}
this.worldLevel = level;
if (this.isOnline()) {
this.save();
this.sendPacket(new PacketPlayerSyncScNotify(this));
this.getSession().send(new PacketPlayerSyncScNotify(this));
}
}
public int getWorldLevel() {
@@ -470,7 +477,12 @@ public class Player {
}
public void setBattle(Battle battle) {
// Set battle first
this.battle = battle;
// Scene handler
if (this.getScene() != null) {
this.getScene().onBattleStart(battle);
}
}
public void forceQuitBattle() {
@@ -572,7 +584,7 @@ public class Player {
// Finish puzzle
prop.setState(PropState.Locked);
// Trigger event
this.getScene().invokeTrigger(PropTriggerType.PUZZLE_FINISH, prop.getGroupId(), prop.getInstId());
this.getScene().invokePropTrigger(PropTriggerType.PUZZLE_FINISH, prop.getGroupId(), prop.getInstId());
//
return prop;
}
@@ -711,7 +723,12 @@ public class Player {
}
public void onTick() {
// Update stamina
this.updateStamina();
// Scene update
if (this.getScene() != null) {
this.getScene().onTick();
}
}
@SuppressWarnings("deprecation")

View File

@@ -6,22 +6,27 @@ import java.util.List;
import emu.lunarcore.data.GameData;
import emu.lunarcore.data.config.*;
import emu.lunarcore.data.excel.MazePlaneExcel;
import emu.lunarcore.data.excel.SummonUnitExcel;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.battle.Battle;
import emu.lunarcore.game.enums.PlaneType;
import emu.lunarcore.game.scene.entity.*;
import emu.lunarcore.game.scene.triggers.PropTrigger;
import emu.lunarcore.game.scene.triggers.PropTriggerType;
import emu.lunarcore.game.player.Player;
import emu.lunarcore.game.player.lineup.PlayerLineup;
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
import emu.lunarcore.proto.SceneEntityGroupInfoOuterClass.SceneEntityGroupInfo;
import emu.lunarcore.proto.SceneGroupStateOuterClass.SceneGroupState;
import emu.lunarcore.proto.SceneInfoOuterClass.SceneInfo;
import emu.lunarcore.server.packet.send.PacketActivateFarmElementScRsp;
import emu.lunarcore.server.packet.send.PacketRefreshTriggerByClientScNotify;
import emu.lunarcore.server.packet.send.PacketSceneGroupRefreshScNotify;
import emu.lunarcore.util.Position;
import it.unimi.dsi.fastutil.ints.*;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import lombok.Getter;
import us.hebi.quickbuf.RepeatedInt;
@Getter
public class Scene {
@@ -39,6 +44,7 @@ public class Scene {
// Avatar entites
private final IntSet avatarEntityIds;
private final Int2ObjectMap<GameAvatar> avatars;
private EntitySummonUnit playerSummon;
// Other entities
private final Int2ObjectMap<GameEntity> entities;
@@ -208,6 +214,64 @@ public class Scene {
return true;
}
// Summons
public synchronized void summonUnit(GameAvatar caster, SummonUnitExcel excel, Position pos, Position rot, int duration) {
// Remove previous summon
this.removeSummonUnit();
// Add a new summoned unit to scene
var summon = new EntitySummonUnit(this, caster, excel, pos, rot);
summon.setDuration(duration);
this.addEntity(summon, true);
}
public synchronized void removeSummonUnit() {
if (this.getPlayerSummon() != null) {
this.removeEntity(this.getPlayerSummon());
}
}
public void handleSummonUnitTriggers(int entityId, String name, MotionInfo motion, RepeatedInt targetIds) {
// Get summon unit
EntitySummonUnit summonUnit = null;
var entity = this.getEntityById(entityId);
if (entity instanceof EntitySummonUnit) {
summonUnit = (EntitySummonUnit) entity;
} else {
return;
}
// Get trigger
var trigger = summonUnit.getExcel().getInfo().getTriggerByName(name);
if (trigger == null) return;
// Get targets
var targets = new ArrayList<GameEntity>();
for (int targetId : targetIds) {
var target = this.getEntityById(targetId);
if (target != null) {
targets.add(target);
}
}
// Handle task actions
for (var action : trigger.getActions()) {
action.onAttack(summonUnit.getCaster(), targets);
}
// Send packet
this.getPlayer().sendPacket(new PacketRefreshTriggerByClientScNotify(entityId, name, targetIds));
}
public void destroyProp(EntityProp prop) {
// TODO sanity check prop to make sure it can be destroyed
this.removeEntity(prop);
}
/**
* Returns the nearest spring (Space Anchor) to the player in the scene
* @return
@@ -238,7 +302,7 @@ public class Scene {
return spring;
}
public void invokeTrigger(PropTriggerType type, int param1, int param2) {
public void invokePropTrigger(PropTriggerType type, int param1, int param2) {
for (PropTrigger trigger : this.getTriggers()) {
if (trigger.shouldRun(param1, param2)) {
trigger.run(this);
@@ -286,6 +350,26 @@ public class Scene {
}
}
// Player events
public void onTick() {
// Remove summoned unit if it expired
if (this.getPlayerSummon() != null) {
if (this.getPlayerSummon().isExpired()) {
this.removeSummonUnit();
}
}
}
public void onBattleStart(Battle battle) {
// Remove summoned unit
if (this.getPlayerSummon() != null) {
this.removeSummonUnit();
}
}
// Proto serialization
public synchronized SceneInfo toProto() {
// Set loaded flag
this.loaded = true;

View File

@@ -0,0 +1,37 @@
package emu.lunarcore.game.scene;
import emu.lunarcore.proto.BuffInfoOuterClass.BuffInfo;
import lombok.Getter;
@Getter
public class SceneBuff {
private int casterAvatarId; // Owner avatar id
private int buffId;
private int buffLevel;
private int duration;
private long createTime;
private long expiry;
public SceneBuff(int casterAvatarId, int buffId, int seconds) {
this.casterAvatarId = casterAvatarId;
this.buffId = buffId;
this.buffLevel = 1;
this.createTime = System.currentTimeMillis();
this.duration = seconds * 1000;
this.expiry = this.createTime + duration;
}
// Serialization
public BuffInfo toProto() {
var proto = BuffInfo.newInstance()
.setBuffId(this.getBuffId())
.setLevel(this.getBuffLevel())
.setBaseAvatarId(this.getCasterAvatarId())
.setAddTimeMs(this.getCreateTime())
.setLifeTime(this.getDuration() / 10)
.setCount(1);
return proto;
}
}

View File

@@ -1,16 +0,0 @@
package emu.lunarcore.game.scene;
import lombok.Getter;
@Getter
public class SceneEntityBuff {
private int owner; // Owner avatar id
private int id;
private long expiry;
public SceneEntityBuff(int owner, int id, long duration) {
this.owner = owner;
this.id = id;
this.expiry = System.currentTimeMillis() + (duration * 1000);
}
}

View File

@@ -5,7 +5,7 @@ import emu.lunarcore.data.config.MonsterInfo;
import emu.lunarcore.data.excel.NpcMonsterExcel;
import emu.lunarcore.game.battle.Battle;
import emu.lunarcore.game.scene.Scene;
import emu.lunarcore.game.scene.SceneEntityBuff;
import emu.lunarcore.game.scene.SceneBuff;
import emu.lunarcore.game.scene.triggers.PropTriggerType;
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
import emu.lunarcore.proto.SceneEntityInfoOuterClass.SceneEntityInfo;
@@ -29,7 +29,7 @@ public class EntityMonster implements GameEntity {
private final Position pos;
private final Position rot;
private Int2ObjectMap<SceneEntityBuff> buffs;
private Int2ObjectMap<SceneBuff> buffs;
private int farmElementId;
@Setter private int overrideStageId;
@Setter private int overrideLevel;
@@ -56,12 +56,17 @@ public class EntityMonster implements GameEntity {
}
}
public void addBuff(int caster, int buffId, int duration) {
public SceneBuff addBuff(int caster, int buffId, int duration) {
if (this.buffs == null) {
this.buffs = new Int2ObjectOpenHashMap<>();
}
this.buffs.put(buffId, new SceneEntityBuff(caster, buffId, duration));
// Create buff
var buff = new SceneBuff(caster, buffId, duration);
// Add to buff map
this.buffs.put(buffId, buff);
return buff;
}
public void applyBuffs(Battle battle) {
@@ -79,7 +84,7 @@ public class EntityMonster implements GameEntity {
}
// Get owner index
int ownerIndex = battle.getLineup().indexOf(entry.getValue().getOwner());
int ownerIndex = battle.getLineup().indexOf(entry.getValue().getCasterAvatarId());
// Add buff to battle if owner exists
if (ownerIndex != -1) {
@@ -92,7 +97,7 @@ public class EntityMonster implements GameEntity {
@Override
public void onRemove() {
// Try to fire any triggers
getScene().invokeTrigger(PropTriggerType.MONSTER_DIE, this.getGroupId(), this.getInstId());
getScene().invokePropTrigger(PropTriggerType.MONSTER_DIE, this.getGroupId(), this.getInstId());
}
@Override

View File

@@ -0,0 +1,72 @@
package emu.lunarcore.game.scene.entity;
import emu.lunarcore.data.excel.SummonUnitExcel;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.scene.Scene;
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
import emu.lunarcore.proto.SceneEntityInfoOuterClass.SceneEntityInfo;
import emu.lunarcore.proto.SceneSummonUnitInfoOuterClass.SceneSummonUnitInfo;
import emu.lunarcore.util.Position;
import lombok.Getter;
import lombok.Setter;
@Getter
public class EntitySummonUnit implements GameEntity {
@Setter private int entityId;
private final GameAvatar caster;
private final SummonUnitExcel excel;
private final Scene scene;
private final Position pos;
private final Position rot;
private final long createTime;
private int attachedEntityId;
private int duration;
private long expiry;
public EntitySummonUnit(Scene scene, GameAvatar caster, SummonUnitExcel excel, Position pos, Position rot) {
this.scene = scene;
this.caster = caster;
this.excel = excel;
this.pos = pos;
this.rot = rot;
this.createTime = System.currentTimeMillis();
// Attach summon unit to an entity
String attachPoint = excel.getInfo().getAttachPoint();
if (attachPoint != null && attachPoint.equals("Origin")) {
this.attachedEntityId = caster.getEntityId();
}
}
public void setDuration(int seconds) {
this.duration = seconds * 1000;
this.expiry = this.createTime + duration;
}
public boolean isExpired() {
return System.currentTimeMillis() > this.expiry;
}
@Override
public SceneEntityInfo toSceneEntityProto() {
var summon = SceneSummonUnitInfo.newInstance()
.setLifeTimeMs(this.getDuration())
.setCreateTimeMs(this.getCreateTime())
.setCasterEntityId(this.getCaster().getEntityId())
.setAttachEntityId(this.getAttachedEntityId())
.setSummonUnitId(this.getExcel().getId());
for (var trigger : this.getExcel().getInfo().getCustomTriggers()) {
summon.addCustomTriggers(trigger.getTriggerName());
}
var proto = SceneEntityInfo.newInstance()
.setEntityId(this.getEntityId())
.setMotion(MotionInfo.newInstance().setPos(getPos().toProto()).setRot(getRot().toProto()))
.setSummonUnit(summon);
return proto;
}
}

View File

@@ -0,0 +1,29 @@
package emu.lunarcore.server.packet.recv;
import emu.lunarcore.proto.RefreshTriggerByClientCsReqOuterClass.RefreshTriggerByClientCsReq;
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.PacketRefreshTriggerByClientScRsp;
@Opcodes(CmdId.RefreshTriggerByClientCsReq)
public class HandlerRefreshTriggerByClientCsReq extends PacketHandler {
@Override
public void handle(GameSession session, byte[] data) throws Exception {
var req = RefreshTriggerByClientCsReq.parseFrom(data);
if (session.getPlayer().getScene() != null) {
session.getPlayer().getScene().handleSummonUnitTriggers(
req.getTriggerEntityId(),
req.getTriggerName(),
req.getTriggerMotion(),
req.getTriggerTargetIdList()
);
}
session.send(new PacketRefreshTriggerByClientScRsp(req));
}
}

View File

@@ -0,0 +1,23 @@
package emu.lunarcore.server.packet.send;
import emu.lunarcore.proto.RefreshTriggerByClientScNotifyOuterClass.RefreshTriggerByClientScNotify;
import emu.lunarcore.server.packet.BasePacket;
import emu.lunarcore.server.packet.CmdId;
import us.hebi.quickbuf.RepeatedInt;
public class PacketRefreshTriggerByClientScNotify extends BasePacket {
public PacketRefreshTriggerByClientScNotify(int triggerEntityId, String name, RepeatedInt targetIds) {
super(CmdId.RefreshTriggerByClientScNotify);
var data = RefreshTriggerByClientScNotify.newInstance()
.setTriggerName(name)
.setTriggerEntityId(triggerEntityId);
for (int id : targetIds) {
data.addTriggerTargetIdList(id);
}
this.setData(data);
}
}

View File

@@ -0,0 +1,20 @@
package emu.lunarcore.server.packet.send;
import emu.lunarcore.proto.RefreshTriggerByClientCsReqOuterClass.RefreshTriggerByClientCsReq;
import emu.lunarcore.proto.RefreshTriggerByClientScRspOuterClass.RefreshTriggerByClientScRsp;
import emu.lunarcore.server.packet.BasePacket;
import emu.lunarcore.server.packet.CmdId;
public class PacketRefreshTriggerByClientScRsp extends BasePacket {
public PacketRefreshTriggerByClientScRsp(RefreshTriggerByClientCsReq req) {
super(CmdId.RefreshTriggerByClientScRsp);
var data = RefreshTriggerByClientScRsp.newInstance()
.setTriggerEntityId(req.getTriggerEntityId())
.setTriggerName(req.getTriggerName())
.setRefreshTrigger(true);
this.setData(data);
}
}

View File

@@ -0,0 +1,23 @@
package emu.lunarcore.server.packet.send;
import emu.lunarcore.game.scene.SceneBuff;
import emu.lunarcore.proto.EntityBuffChangeInfoOuterClass.EntityBuffChangeInfo;
import emu.lunarcore.proto.SyncEntityBuffChangeListScNotifyOuterClass.SyncEntityBuffChangeListScNotify;
import emu.lunarcore.server.packet.BasePacket;
import emu.lunarcore.server.packet.CmdId;
public class PacketSyncEntityBuffChangeListScNotify extends BasePacket {
public PacketSyncEntityBuffChangeListScNotify(int entityId, SceneBuff buff) {
super(CmdId.SyncEntityBuffChangeListScNotify);
var buffChange = EntityBuffChangeInfo.newInstance().setEntityId(entityId)
.setBuffChangeInfo(buff.toProto())
.setEntityId(entityId);
var data = SyncEntityBuffChangeListScNotify.newInstance()
.addEntityBuffInfoList(buffChange);
this.setData(data);
}
}

View File

@@ -25,6 +25,12 @@ public class Position {
this.z = position.getZ();
}
public Position(Vector vector) {
this.x = vector.getX();
this.y = vector.getY();
this.z = vector.getZ();
}
public int getX() {
return x;
}