mirror of
https://github.com/Anime-Game-Servers/AGSLunarCore.git
synced 2024-11-23 04:19:48 +00:00
Add simple handlers for rotators
This commit is contained in:
parent
7cf67f6149
commit
c61e87fcd5
@ -24,9 +24,9 @@ public final class DeployRotaterScRspOuterClass {
|
||||
private int retcode;
|
||||
|
||||
/**
|
||||
* <code>optional .DeployRotaterScRsp.EnergyInfo energy_info = 7;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 7;</code>
|
||||
*/
|
||||
private final EnergyInfo energyInfo = EnergyInfo.newInstance();
|
||||
private final RotatorEnergyInfoOuterClass.RotatorEnergyInfo energyInfo = RotatorEnergyInfoOuterClass.RotatorEnergyInfo.newInstance();
|
||||
|
||||
/**
|
||||
* <code>optional .RotaterData rotater_data = 9;</code>
|
||||
@ -81,7 +81,7 @@ public final class DeployRotaterScRspOuterClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .DeployRotaterScRsp.EnergyInfo energy_info = 7;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 7;</code>
|
||||
* @return whether the energyInfo field is set
|
||||
*/
|
||||
public boolean hasEnergyInfo() {
|
||||
@ -89,7 +89,7 @@ public final class DeployRotaterScRspOuterClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .DeployRotaterScRsp.EnergyInfo energy_info = 7;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 7;</code>
|
||||
* @return this
|
||||
*/
|
||||
public DeployRotaterScRsp clearEnergyInfo() {
|
||||
@ -99,7 +99,7 @@ public final class DeployRotaterScRspOuterClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .DeployRotaterScRsp.EnergyInfo energy_info = 7;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 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.
|
||||
@ -108,12 +108,12 @@ public final class DeployRotaterScRspOuterClass {
|
||||
*
|
||||
* @return internal storage object for reading
|
||||
*/
|
||||
public EnergyInfo getEnergyInfo() {
|
||||
public RotatorEnergyInfoOuterClass.RotatorEnergyInfo getEnergyInfo() {
|
||||
return energyInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .DeployRotaterScRsp.EnergyInfo energy_info = 7;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 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
|
||||
@ -121,17 +121,18 @@ public final class DeployRotaterScRspOuterClass {
|
||||
*
|
||||
* @return internal storage object for modifications
|
||||
*/
|
||||
public EnergyInfo getMutableEnergyInfo() {
|
||||
public RotatorEnergyInfoOuterClass.RotatorEnergyInfo getMutableEnergyInfo() {
|
||||
bitField0_ |= 0x00000002;
|
||||
return energyInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .DeployRotaterScRsp.EnergyInfo energy_info = 7;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 7;</code>
|
||||
* @param value the energyInfo to set
|
||||
* @return this
|
||||
*/
|
||||
public DeployRotaterScRsp setEnergyInfo(final EnergyInfo value) {
|
||||
public DeployRotaterScRsp setEnergyInfo(
|
||||
final RotatorEnergyInfoOuterClass.RotatorEnergyInfo value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
energyInfo.copyFrom(value);
|
||||
return this;
|
||||
@ -440,332 +441,6 @@ public final class DeployRotaterScRspOuterClass {
|
||||
return DeployRotaterScRspFactory.INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf type {@code EnergyInfo}
|
||||
*/
|
||||
public static final class EnergyInfo extends ProtoMessage<EnergyInfo> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
*/
|
||||
private int curNum;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
*/
|
||||
private int maxNum;
|
||||
|
||||
private EnergyInfo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code EnergyInfo}
|
||||
*/
|
||||
public static EnergyInfo newInstance() {
|
||||
return new EnergyInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @return whether the curNum field is set
|
||||
*/
|
||||
public boolean hasCurNum() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @return this
|
||||
*/
|
||||
public EnergyInfo clearCurNum() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
curNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @return the curNum
|
||||
*/
|
||||
public int getCurNum() {
|
||||
return curNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @param value the curNum to set
|
||||
* @return this
|
||||
*/
|
||||
public EnergyInfo setCurNum(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
curNum = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @return whether the maxNum field is set
|
||||
*/
|
||||
public boolean hasMaxNum() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @return this
|
||||
*/
|
||||
public EnergyInfo clearMaxNum() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
maxNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @return the maxNum
|
||||
*/
|
||||
public int getMaxNum() {
|
||||
return maxNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @param value the maxNum to set
|
||||
* @return this
|
||||
*/
|
||||
public EnergyInfo setMaxNum(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
maxNum = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo copyFrom(final EnergyInfo other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
curNum = other.curNum;
|
||||
maxNum = other.maxNum;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo mergeFrom(final EnergyInfo other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasCurNum()) {
|
||||
setCurNum(other.curNum);
|
||||
}
|
||||
if (other.hasMaxNum()) {
|
||||
setMaxNum(other.maxNum);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
curNum = 0;
|
||||
maxNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo clearQuick() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof EnergyInfo)) {
|
||||
return false;
|
||||
}
|
||||
EnergyInfo other = (EnergyInfo) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasCurNum() || curNum == other.curNum)
|
||||
&& (!hasMaxNum() || maxNum == other.maxNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 24);
|
||||
output.writeUInt32NoTag(curNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 112);
|
||||
output.writeUInt32NoTag(maxNum);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(curNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(maxNum);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public EnergyInfo mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 24: {
|
||||
// curNum
|
||||
curNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 112) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 112: {
|
||||
// maxNum
|
||||
maxNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 0: {
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
return this;
|
||||
}
|
||||
tag = input.readTag();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final JsonSink output) throws IOException {
|
||||
output.beginObject();
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeUInt32(FieldNames.curNum, curNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.maxNum, maxNum);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case -1349154522:
|
||||
case 1126382855: {
|
||||
if (input.isAtField(FieldNames.curNum)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
curNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -1081154686:
|
||||
case 844443179: {
|
||||
if (input.isAtField(FieldNames.maxNum)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
maxNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo clone() {
|
||||
return new EnergyInfo().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static EnergyInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new EnergyInfo(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static EnergyInfo parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new EnergyInfo(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static EnergyInfo parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new EnergyInfo(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating EnergyInfo messages
|
||||
*/
|
||||
public static MessageFactory<EnergyInfo> getFactory() {
|
||||
return EnergyInfoFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum EnergyInfoFactory implements MessageFactory<EnergyInfo> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public EnergyInfo create() {
|
||||
return EnergyInfo.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName curNum = FieldName.forField("curNum", "cur_num");
|
||||
|
||||
static final FieldName maxNum = FieldName.forField("maxNum", "max_num");
|
||||
}
|
||||
}
|
||||
|
||||
private enum DeployRotaterScRspFactory implements MessageFactory<DeployRotaterScRsp> {
|
||||
INSTANCE;
|
||||
|
||||
|
@ -23,15 +23,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
*/
|
||||
private int retcode;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* obf: MIAGCEIOPJH
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .InteractChargerScRsp.ECKNFHCDJFH OEKHAFALOFB = 6;</code>
|
||||
*/
|
||||
private final ECKNFHCDJFH oEKHAFALOFB = ECKNFHCDJFH.newInstance();
|
||||
|
||||
/**
|
||||
* <code>optional .ChargerInfo charger_info = 13;</code>
|
||||
*/
|
||||
@ -84,89 +75,12 @@ public final class InteractChargerScRspOuterClass {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* obf: MIAGCEIOPJH
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .InteractChargerScRsp.ECKNFHCDJFH OEKHAFALOFB = 6;</code>
|
||||
* @return whether the oEKHAFALOFB field is set
|
||||
*/
|
||||
public boolean hasOEKHAFALOFB() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* obf: MIAGCEIOPJH
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .InteractChargerScRsp.ECKNFHCDJFH OEKHAFALOFB = 6;</code>
|
||||
* @return this
|
||||
*/
|
||||
public InteractChargerScRsp clearOEKHAFALOFB() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
oEKHAFALOFB.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* obf: MIAGCEIOPJH
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .InteractChargerScRsp.ECKNFHCDJFH OEKHAFALOFB = 6;</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 #getMutableOEKHAFALOFB()} if you want to modify it.
|
||||
*
|
||||
* @return internal storage object for reading
|
||||
*/
|
||||
public ECKNFHCDJFH getOEKHAFALOFB() {
|
||||
return oEKHAFALOFB;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* obf: MIAGCEIOPJH
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .InteractChargerScRsp.ECKNFHCDJFH OEKHAFALOFB = 6;</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 ECKNFHCDJFH getMutableOEKHAFALOFB() {
|
||||
bitField0_ |= 0x00000002;
|
||||
return oEKHAFALOFB;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* obf: MIAGCEIOPJH
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .InteractChargerScRsp.ECKNFHCDJFH OEKHAFALOFB = 6;</code>
|
||||
* @param value the oEKHAFALOFB to set
|
||||
* @return this
|
||||
*/
|
||||
public InteractChargerScRsp setOEKHAFALOFB(final ECKNFHCDJFH value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
oEKHAFALOFB.copyFrom(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .ChargerInfo charger_info = 13;</code>
|
||||
* @return whether the chargerInfo field is set
|
||||
*/
|
||||
public boolean hasChargerInfo() {
|
||||
return (bitField0_ & 0x00000004) != 0;
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -174,7 +88,7 @@ public final class InteractChargerScRspOuterClass {
|
||||
* @return this
|
||||
*/
|
||||
public InteractChargerScRsp clearChargerInfo() {
|
||||
bitField0_ &= ~0x00000004;
|
||||
bitField0_ &= ~0x00000002;
|
||||
chargerInfo.clear();
|
||||
return this;
|
||||
}
|
||||
@ -203,7 +117,7 @@ public final class InteractChargerScRspOuterClass {
|
||||
* @return internal storage object for modifications
|
||||
*/
|
||||
public ChargerInfoOuterClass.ChargerInfo getMutableChargerInfo() {
|
||||
bitField0_ |= 0x00000004;
|
||||
bitField0_ |= 0x00000002;
|
||||
return chargerInfo;
|
||||
}
|
||||
|
||||
@ -213,7 +127,7 @@ public final class InteractChargerScRspOuterClass {
|
||||
* @return this
|
||||
*/
|
||||
public InteractChargerScRsp setChargerInfo(final ChargerInfoOuterClass.ChargerInfo value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
bitField0_ |= 0x00000002;
|
||||
chargerInfo.copyFrom(value);
|
||||
return this;
|
||||
}
|
||||
@ -224,7 +138,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
retcode = other.retcode;
|
||||
oEKHAFALOFB.copyFrom(other.oEKHAFALOFB);
|
||||
chargerInfo.copyFrom(other.chargerInfo);
|
||||
}
|
||||
return this;
|
||||
@ -239,9 +152,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
if (other.hasRetcode()) {
|
||||
setRetcode(other.retcode);
|
||||
}
|
||||
if (other.hasOEKHAFALOFB()) {
|
||||
getMutableOEKHAFALOFB().mergeFrom(other.oEKHAFALOFB);
|
||||
}
|
||||
if (other.hasChargerInfo()) {
|
||||
getMutableChargerInfo().mergeFrom(other.chargerInfo);
|
||||
}
|
||||
@ -256,7 +166,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
retcode = 0;
|
||||
oEKHAFALOFB.clear();
|
||||
chargerInfo.clear();
|
||||
return this;
|
||||
}
|
||||
@ -268,7 +177,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
oEKHAFALOFB.clearQuick();
|
||||
chargerInfo.clearQuick();
|
||||
return this;
|
||||
}
|
||||
@ -284,7 +192,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
InteractChargerScRsp other = (InteractChargerScRsp) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasRetcode() || retcode == other.retcode)
|
||||
&& (!hasOEKHAFALOFB() || oEKHAFALOFB.equals(other.oEKHAFALOFB))
|
||||
&& (!hasChargerInfo() || chargerInfo.equals(other.chargerInfo));
|
||||
}
|
||||
|
||||
@ -295,10 +202,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
output.writeUInt32NoTag(retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 50);
|
||||
output.writeMessageNoTag(oEKHAFALOFB);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeRawByte((byte) 106);
|
||||
output.writeMessageNoTag(chargerInfo);
|
||||
}
|
||||
@ -311,9 +214,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeMessageSizeNoTag(oEKHAFALOFB);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
size += 1 + ProtoSink.computeMessageSizeNoTag(chargerInfo);
|
||||
}
|
||||
return size;
|
||||
@ -331,15 +231,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
retcode = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 50) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 50: {
|
||||
// oEKHAFALOFB
|
||||
input.readMessage(oEKHAFALOFB);
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 106) {
|
||||
break;
|
||||
}
|
||||
@ -347,7 +238,7 @@ public final class InteractChargerScRspOuterClass {
|
||||
case 106: {
|
||||
// chargerInfo
|
||||
input.readMessage(chargerInfo);
|
||||
bitField0_ |= 0x00000004;
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 0) {
|
||||
break;
|
||||
@ -374,9 +265,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
output.writeUInt32(FieldNames.retcode, retcode);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeMessage(FieldNames.oEKHAFALOFB, oEKHAFALOFB);
|
||||
}
|
||||
if ((bitField0_ & 0x00000004) != 0) {
|
||||
output.writeMessage(FieldNames.chargerInfo, chargerInfo);
|
||||
}
|
||||
output.endObject();
|
||||
@ -400,23 +288,12 @@ public final class InteractChargerScRspOuterClass {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1533003560: {
|
||||
if (input.isAtField(FieldNames.oEKHAFALOFB)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
input.readMessage(oEKHAFALOFB);
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1038073356:
|
||||
case 2135678991: {
|
||||
if (input.isAtField(FieldNames.chargerInfo)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
input.readMessage(chargerInfo);
|
||||
bitField0_ |= 0x00000004;
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
@ -463,330 +340,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
return InteractChargerScRspFactory.INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf type {@code ECKNFHCDJFH}
|
||||
*/
|
||||
public static final class ECKNFHCDJFH extends ProtoMessage<ECKNFHCDJFH> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 PJHMBIAHHBG = 3;</code>
|
||||
*/
|
||||
private int pJHMBIAHHBG;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 CLMDBEPFDNG = 14;</code>
|
||||
*/
|
||||
private int cLMDBEPFDNG;
|
||||
|
||||
private ECKNFHCDJFH() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code ECKNFHCDJFH}
|
||||
*/
|
||||
public static ECKNFHCDJFH newInstance() {
|
||||
return new ECKNFHCDJFH();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 PJHMBIAHHBG = 3;</code>
|
||||
* @return whether the pJHMBIAHHBG field is set
|
||||
*/
|
||||
public boolean hasPJHMBIAHHBG() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 PJHMBIAHHBG = 3;</code>
|
||||
* @return this
|
||||
*/
|
||||
public ECKNFHCDJFH clearPJHMBIAHHBG() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
pJHMBIAHHBG = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 PJHMBIAHHBG = 3;</code>
|
||||
* @return the pJHMBIAHHBG
|
||||
*/
|
||||
public int getPJHMBIAHHBG() {
|
||||
return pJHMBIAHHBG;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 PJHMBIAHHBG = 3;</code>
|
||||
* @param value the pJHMBIAHHBG to set
|
||||
* @return this
|
||||
*/
|
||||
public ECKNFHCDJFH setPJHMBIAHHBG(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
pJHMBIAHHBG = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 CLMDBEPFDNG = 14;</code>
|
||||
* @return whether the cLMDBEPFDNG field is set
|
||||
*/
|
||||
public boolean hasCLMDBEPFDNG() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 CLMDBEPFDNG = 14;</code>
|
||||
* @return this
|
||||
*/
|
||||
public ECKNFHCDJFH clearCLMDBEPFDNG() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
cLMDBEPFDNG = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 CLMDBEPFDNG = 14;</code>
|
||||
* @return the cLMDBEPFDNG
|
||||
*/
|
||||
public int getCLMDBEPFDNG() {
|
||||
return cLMDBEPFDNG;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 CLMDBEPFDNG = 14;</code>
|
||||
* @param value the cLMDBEPFDNG to set
|
||||
* @return this
|
||||
*/
|
||||
public ECKNFHCDJFH setCLMDBEPFDNG(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
cLMDBEPFDNG = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ECKNFHCDJFH copyFrom(final ECKNFHCDJFH other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
pJHMBIAHHBG = other.pJHMBIAHHBG;
|
||||
cLMDBEPFDNG = other.cLMDBEPFDNG;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ECKNFHCDJFH mergeFrom(final ECKNFHCDJFH other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasPJHMBIAHHBG()) {
|
||||
setPJHMBIAHHBG(other.pJHMBIAHHBG);
|
||||
}
|
||||
if (other.hasCLMDBEPFDNG()) {
|
||||
setCLMDBEPFDNG(other.cLMDBEPFDNG);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ECKNFHCDJFH clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
pJHMBIAHHBG = 0;
|
||||
cLMDBEPFDNG = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ECKNFHCDJFH clearQuick() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof ECKNFHCDJFH)) {
|
||||
return false;
|
||||
}
|
||||
ECKNFHCDJFH other = (ECKNFHCDJFH) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasPJHMBIAHHBG() || pJHMBIAHHBG == other.pJHMBIAHHBG)
|
||||
&& (!hasCLMDBEPFDNG() || cLMDBEPFDNG == other.cLMDBEPFDNG);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 24);
|
||||
output.writeUInt32NoTag(pJHMBIAHHBG);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 112);
|
||||
output.writeUInt32NoTag(cLMDBEPFDNG);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(pJHMBIAHHBG);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(cLMDBEPFDNG);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public ECKNFHCDJFH mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 24: {
|
||||
// pJHMBIAHHBG
|
||||
pJHMBIAHHBG = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 112) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 112: {
|
||||
// cLMDBEPFDNG
|
||||
cLMDBEPFDNG = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 0: {
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
return this;
|
||||
}
|
||||
tag = input.readTag();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final JsonSink output) throws IOException {
|
||||
output.beginObject();
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeUInt32(FieldNames.pJHMBIAHHBG, pJHMBIAHHBG);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.cLMDBEPFDNG, cLMDBEPFDNG);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ECKNFHCDJFH mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case 978262976: {
|
||||
if (input.isAtField(FieldNames.pJHMBIAHHBG)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
pJHMBIAHHBG = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -877688540: {
|
||||
if (input.isAtField(FieldNames.cLMDBEPFDNG)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
cLMDBEPFDNG = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ECKNFHCDJFH clone() {
|
||||
return new ECKNFHCDJFH().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static ECKNFHCDJFH parseFrom(final byte[] data) throws InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new ECKNFHCDJFH(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static ECKNFHCDJFH parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new ECKNFHCDJFH(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static ECKNFHCDJFH parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new ECKNFHCDJFH(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating ECKNFHCDJFH messages
|
||||
*/
|
||||
public static MessageFactory<ECKNFHCDJFH> getFactory() {
|
||||
return ECKNFHCDJFHFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum ECKNFHCDJFHFactory implements MessageFactory<ECKNFHCDJFH> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public ECKNFHCDJFH create() {
|
||||
return ECKNFHCDJFH.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName pJHMBIAHHBG = FieldName.forField("PJHMBIAHHBG");
|
||||
|
||||
static final FieldName cLMDBEPFDNG = FieldName.forField("CLMDBEPFDNG");
|
||||
}
|
||||
}
|
||||
|
||||
private enum InteractChargerScRspFactory implements MessageFactory<InteractChargerScRsp> {
|
||||
INSTANCE;
|
||||
|
||||
@ -802,8 +355,6 @@ public final class InteractChargerScRspOuterClass {
|
||||
static class FieldNames {
|
||||
static final FieldName retcode = FieldName.forField("retcode");
|
||||
|
||||
static final FieldName oEKHAFALOFB = FieldName.forField("OEKHAFALOFB");
|
||||
|
||||
static final FieldName chargerInfo = FieldName.forField("chargerInfo", "charger_info");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,341 @@
|
||||
// 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 RotatorEnergyInfoOuterClass {
|
||||
/**
|
||||
* Protobuf type {@code RotatorEnergyInfo}
|
||||
*/
|
||||
public static final class RotatorEnergyInfo extends ProtoMessage<RotatorEnergyInfo> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
*/
|
||||
private int curNum;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
*/
|
||||
private int maxNum;
|
||||
|
||||
private RotatorEnergyInfo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code RotatorEnergyInfo}
|
||||
*/
|
||||
public static RotatorEnergyInfo newInstance() {
|
||||
return new RotatorEnergyInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @return whether the curNum field is set
|
||||
*/
|
||||
public boolean hasCurNum() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @return this
|
||||
*/
|
||||
public RotatorEnergyInfo clearCurNum() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
curNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @return the curNum
|
||||
*/
|
||||
public int getCurNum() {
|
||||
return curNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @param value the curNum to set
|
||||
* @return this
|
||||
*/
|
||||
public RotatorEnergyInfo setCurNum(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
curNum = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @return whether the maxNum field is set
|
||||
*/
|
||||
public boolean hasMaxNum() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @return this
|
||||
*/
|
||||
public RotatorEnergyInfo clearMaxNum() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
maxNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @return the maxNum
|
||||
*/
|
||||
public int getMaxNum() {
|
||||
return maxNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @param value the maxNum to set
|
||||
* @return this
|
||||
*/
|
||||
public RotatorEnergyInfo setMaxNum(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
maxNum = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RotatorEnergyInfo copyFrom(final RotatorEnergyInfo other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
curNum = other.curNum;
|
||||
maxNum = other.maxNum;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RotatorEnergyInfo mergeFrom(final RotatorEnergyInfo other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasCurNum()) {
|
||||
setCurNum(other.curNum);
|
||||
}
|
||||
if (other.hasMaxNum()) {
|
||||
setMaxNum(other.maxNum);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RotatorEnergyInfo clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
curNum = 0;
|
||||
maxNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RotatorEnergyInfo clearQuick() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof RotatorEnergyInfo)) {
|
||||
return false;
|
||||
}
|
||||
RotatorEnergyInfo other = (RotatorEnergyInfo) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasCurNum() || curNum == other.curNum)
|
||||
&& (!hasMaxNum() || maxNum == other.maxNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 24);
|
||||
output.writeUInt32NoTag(curNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 112);
|
||||
output.writeUInt32NoTag(maxNum);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(curNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(maxNum);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public RotatorEnergyInfo mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 24: {
|
||||
// curNum
|
||||
curNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 112) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 112: {
|
||||
// maxNum
|
||||
maxNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 0: {
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
return this;
|
||||
}
|
||||
tag = input.readTag();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final JsonSink output) throws IOException {
|
||||
output.beginObject();
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeUInt32(FieldNames.curNum, curNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.maxNum, maxNum);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RotatorEnergyInfo mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case -1349154522:
|
||||
case 1126382855: {
|
||||
if (input.isAtField(FieldNames.curNum)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
curNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -1081154686:
|
||||
case 844443179: {
|
||||
if (input.isAtField(FieldNames.maxNum)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
maxNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RotatorEnergyInfo clone() {
|
||||
return new RotatorEnergyInfo().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static RotatorEnergyInfo parseFrom(final byte[] data) throws
|
||||
InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new RotatorEnergyInfo(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static RotatorEnergyInfo parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new RotatorEnergyInfo(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static RotatorEnergyInfo parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new RotatorEnergyInfo(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating RotatorEnergyInfo messages
|
||||
*/
|
||||
public static MessageFactory<RotatorEnergyInfo> getFactory() {
|
||||
return RotatorEnergyInfoFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum RotatorEnergyInfoFactory implements MessageFactory<RotatorEnergyInfo> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public RotatorEnergyInfo create() {
|
||||
return RotatorEnergyInfo.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName curNum = FieldName.forField("curNum", "cur_num");
|
||||
|
||||
static final FieldName maxNum = FieldName.forField("maxNum", "max_num");
|
||||
}
|
||||
}
|
||||
}
|
@ -19,9 +19,9 @@ public final class UpdateEnergyScNotifyOuterClass {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional .UpdateEnergyScNotify.EnergyInfo energy_info = 1;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 1;</code>
|
||||
*/
|
||||
private final EnergyInfo energyInfo = EnergyInfo.newInstance();
|
||||
private final RotatorEnergyInfoOuterClass.RotatorEnergyInfo energyInfo = RotatorEnergyInfoOuterClass.RotatorEnergyInfo.newInstance();
|
||||
|
||||
private UpdateEnergyScNotify() {
|
||||
}
|
||||
@ -34,7 +34,7 @@ public final class UpdateEnergyScNotifyOuterClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .UpdateEnergyScNotify.EnergyInfo energy_info = 1;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 1;</code>
|
||||
* @return whether the energyInfo field is set
|
||||
*/
|
||||
public boolean hasEnergyInfo() {
|
||||
@ -42,7 +42,7 @@ public final class UpdateEnergyScNotifyOuterClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .UpdateEnergyScNotify.EnergyInfo energy_info = 1;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 1;</code>
|
||||
* @return this
|
||||
*/
|
||||
public UpdateEnergyScNotify clearEnergyInfo() {
|
||||
@ -52,7 +52,7 @@ public final class UpdateEnergyScNotifyOuterClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .UpdateEnergyScNotify.EnergyInfo energy_info = 1;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 1;</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.
|
||||
@ -61,12 +61,12 @@ public final class UpdateEnergyScNotifyOuterClass {
|
||||
*
|
||||
* @return internal storage object for reading
|
||||
*/
|
||||
public EnergyInfo getEnergyInfo() {
|
||||
public RotatorEnergyInfoOuterClass.RotatorEnergyInfo getEnergyInfo() {
|
||||
return energyInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .UpdateEnergyScNotify.EnergyInfo energy_info = 1;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 1;</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
|
||||
@ -74,17 +74,18 @@ public final class UpdateEnergyScNotifyOuterClass {
|
||||
*
|
||||
* @return internal storage object for modifications
|
||||
*/
|
||||
public EnergyInfo getMutableEnergyInfo() {
|
||||
public RotatorEnergyInfoOuterClass.RotatorEnergyInfo getMutableEnergyInfo() {
|
||||
bitField0_ |= 0x00000001;
|
||||
return energyInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .UpdateEnergyScNotify.EnergyInfo energy_info = 1;</code>
|
||||
* <code>optional .RotatorEnergyInfo energy_info = 1;</code>
|
||||
* @param value the energyInfo to set
|
||||
* @return this
|
||||
*/
|
||||
public UpdateEnergyScNotify setEnergyInfo(final EnergyInfo value) {
|
||||
public UpdateEnergyScNotify setEnergyInfo(
|
||||
final RotatorEnergyInfoOuterClass.RotatorEnergyInfo value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
energyInfo.copyFrom(value);
|
||||
return this;
|
||||
@ -262,332 +263,6 @@ public final class UpdateEnergyScNotifyOuterClass {
|
||||
return UpdateEnergyScNotifyFactory.INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf type {@code EnergyInfo}
|
||||
*/
|
||||
public static final class EnergyInfo extends ProtoMessage<EnergyInfo> implements Cloneable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
*/
|
||||
private int curNum;
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
*/
|
||||
private int maxNum;
|
||||
|
||||
private EnergyInfo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new empty instance of {@code EnergyInfo}
|
||||
*/
|
||||
public static EnergyInfo newInstance() {
|
||||
return new EnergyInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @return whether the curNum field is set
|
||||
*/
|
||||
public boolean hasCurNum() {
|
||||
return (bitField0_ & 0x00000001) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @return this
|
||||
*/
|
||||
public EnergyInfo clearCurNum() {
|
||||
bitField0_ &= ~0x00000001;
|
||||
curNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @return the curNum
|
||||
*/
|
||||
public int getCurNum() {
|
||||
return curNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 cur_num = 3;</code>
|
||||
* @param value the curNum to set
|
||||
* @return this
|
||||
*/
|
||||
public EnergyInfo setCurNum(final int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
curNum = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @return whether the maxNum field is set
|
||||
*/
|
||||
public boolean hasMaxNum() {
|
||||
return (bitField0_ & 0x00000002) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @return this
|
||||
*/
|
||||
public EnergyInfo clearMaxNum() {
|
||||
bitField0_ &= ~0x00000002;
|
||||
maxNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @return the maxNum
|
||||
*/
|
||||
public int getMaxNum() {
|
||||
return maxNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional uint32 max_num = 14;</code>
|
||||
* @param value the maxNum to set
|
||||
* @return this
|
||||
*/
|
||||
public EnergyInfo setMaxNum(final int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
maxNum = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo copyFrom(final EnergyInfo other) {
|
||||
cachedSize = other.cachedSize;
|
||||
if ((bitField0_ | other.bitField0_) != 0) {
|
||||
bitField0_ = other.bitField0_;
|
||||
curNum = other.curNum;
|
||||
maxNum = other.maxNum;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo mergeFrom(final EnergyInfo other) {
|
||||
if (other.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
if (other.hasCurNum()) {
|
||||
setCurNum(other.curNum);
|
||||
}
|
||||
if (other.hasMaxNum()) {
|
||||
setMaxNum(other.maxNum);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo clear() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
curNum = 0;
|
||||
maxNum = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo clearQuick() {
|
||||
if (isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
cachedSize = -1;
|
||||
bitField0_ = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof EnergyInfo)) {
|
||||
return false;
|
||||
}
|
||||
EnergyInfo other = (EnergyInfo) o;
|
||||
return bitField0_ == other.bitField0_
|
||||
&& (!hasCurNum() || curNum == other.curNum)
|
||||
&& (!hasMaxNum() || maxNum == other.maxNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final ProtoSink output) throws IOException {
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeRawByte((byte) 24);
|
||||
output.writeUInt32NoTag(curNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeRawByte((byte) 112);
|
||||
output.writeUInt32NoTag(maxNum);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int computeSerializedSize() {
|
||||
int size = 0;
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(curNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(maxNum);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public EnergyInfo mergeFrom(final ProtoSource input) throws IOException {
|
||||
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||
int tag = input.readTag();
|
||||
while (true) {
|
||||
switch (tag) {
|
||||
case 24: {
|
||||
// curNum
|
||||
curNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
tag = input.readTag();
|
||||
if (tag != 112) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 112: {
|
||||
// maxNum
|
||||
maxNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
tag = input.readTag();
|
||||
if (tag != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 0: {
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
return this;
|
||||
}
|
||||
tag = input.readTag();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final JsonSink output) throws IOException {
|
||||
output.beginObject();
|
||||
if ((bitField0_ & 0x00000001) != 0) {
|
||||
output.writeUInt32(FieldNames.curNum, curNum);
|
||||
}
|
||||
if ((bitField0_ & 0x00000002) != 0) {
|
||||
output.writeUInt32(FieldNames.maxNum, maxNum);
|
||||
}
|
||||
output.endObject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo mergeFrom(final JsonSource input) throws IOException {
|
||||
if (!input.beginObject()) {
|
||||
return this;
|
||||
}
|
||||
while (!input.isAtEnd()) {
|
||||
switch (input.readFieldHash()) {
|
||||
case -1349154522:
|
||||
case 1126382855: {
|
||||
if (input.isAtField(FieldNames.curNum)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
curNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case -1081154686:
|
||||
case 844443179: {
|
||||
if (input.isAtField(FieldNames.maxNum)) {
|
||||
if (!input.trySkipNullValue()) {
|
||||
maxNum = input.readUInt32();
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
} else {
|
||||
input.skipUnknownField();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
input.skipUnknownField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.endObject();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyInfo clone() {
|
||||
return new EnergyInfo().copyFrom(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return ((bitField0_) == 0);
|
||||
}
|
||||
|
||||
public static EnergyInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException {
|
||||
return ProtoMessage.mergeFrom(new EnergyInfo(), data).checkInitialized();
|
||||
}
|
||||
|
||||
public static EnergyInfo parseFrom(final ProtoSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new EnergyInfo(), input).checkInitialized();
|
||||
}
|
||||
|
||||
public static EnergyInfo parseFrom(final JsonSource input) throws IOException {
|
||||
return ProtoMessage.mergeFrom(new EnergyInfo(), input).checkInitialized();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return factory for creating EnergyInfo messages
|
||||
*/
|
||||
public static MessageFactory<EnergyInfo> getFactory() {
|
||||
return EnergyInfoFactory.INSTANCE;
|
||||
}
|
||||
|
||||
private enum EnergyInfoFactory implements MessageFactory<EnergyInfo> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public EnergyInfo create() {
|
||||
return EnergyInfo.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains name constants used for serializing JSON
|
||||
*/
|
||||
static class FieldNames {
|
||||
static final FieldName curNum = FieldName.forField("curNum", "cur_num");
|
||||
|
||||
static final FieldName maxNum = FieldName.forField("maxNum", "max_num");
|
||||
}
|
||||
}
|
||||
|
||||
private enum UpdateEnergyScNotifyFactory implements MessageFactory<UpdateEnergyScNotify> {
|
||||
INSTANCE;
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
package emu.lunarcore.server.packet.recv;
|
||||
|
||||
import emu.lunarcore.proto.DeployRotaterCsReqOuterClass.DeployRotaterCsReq;
|
||||
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.PacketDeployRotaterScRsp;
|
||||
|
||||
@Opcodes(CmdId.DeployRotaterCsReq)
|
||||
public class HandlerDeployRotaterCsReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] data) throws Exception {
|
||||
var req = DeployRotaterCsReq.parseFrom(data);
|
||||
|
||||
session.send(new PacketDeployRotaterScRsp(req.getRotaterData()));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package emu.lunarcore.server.packet.recv;
|
||||
|
||||
import emu.lunarcore.proto.EnterMapRotationRegionCsReqOuterClass.EnterMapRotationRegionCsReq;
|
||||
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.PacketEnterMapRotationRegionScRsp;
|
||||
|
||||
@Opcodes(CmdId.EnterMapRotationRegionCsReq)
|
||||
public class HandlerEnterMapRotationRegionCsReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] data) throws Exception {
|
||||
var req = EnterMapRotationRegionCsReq.parseFrom(data);
|
||||
session.send(new PacketEnterMapRotationRegionScRsp(req.getMotion()));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package emu.lunarcore.server.packet.recv;
|
||||
|
||||
import emu.lunarcore.proto.InteractChargerCsReqOuterClass.InteractChargerCsReq;
|
||||
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.PacketInteractChargerScRsp;
|
||||
import emu.lunarcore.server.packet.send.PacketUpdateEnergyScNotify;
|
||||
|
||||
@Opcodes(CmdId.InteractChargerCsReq)
|
||||
public class HandlerInteractChargerCsReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] data) throws Exception {
|
||||
var req = InteractChargerCsReq.parseFrom(data);
|
||||
session.send(new PacketInteractChargerScRsp(req.getChargerInfo()));
|
||||
session.send(new PacketUpdateEnergyScNotify());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package emu.lunarcore.server.packet.recv;
|
||||
|
||||
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
|
||||
import emu.lunarcore.proto.RotateMapCsReqOuterClass.RotateMapCsReq;
|
||||
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.PacketRotateMapScRsp;
|
||||
|
||||
@Opcodes(CmdId.RotateMapCsReq)
|
||||
public class HandlerRotateMapCsReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] data) throws Exception {
|
||||
var req = RotateMapCsReq.parseFrom(data);
|
||||
|
||||
MotionInfo motion = req.getMotion();
|
||||
|
||||
session.send(new PacketRotateMapScRsp(motion));
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package emu.lunarcore.server.packet.send;
|
||||
|
||||
import emu.lunarcore.proto.DeployRotaterScRspOuterClass.DeployRotaterScRsp;
|
||||
import emu.lunarcore.proto.RotaterDataOuterClass.RotaterData;
|
||||
import emu.lunarcore.proto.RotatorEnergyInfoOuterClass.RotatorEnergyInfo;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
|
||||
public class PacketDeployRotaterScRsp extends BasePacket {
|
||||
|
||||
public PacketDeployRotaterScRsp(RotaterData rotaterData) {
|
||||
super(CmdId.DeployRotaterScRsp);
|
||||
|
||||
var energyInfo = RotatorEnergyInfo.newInstance()
|
||||
.setMaxNum(100)
|
||||
.setCurNum(100);
|
||||
|
||||
var data = DeployRotaterScRsp.newInstance()
|
||||
.setRotaterData(rotaterData)
|
||||
.setEnergyInfo(energyInfo);
|
||||
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package emu.lunarcore.server.packet.send;
|
||||
|
||||
import emu.lunarcore.proto.EnterMapRotationRegionScRspOuterClass.EnterMapRotationRegionScRsp;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;;
|
||||
|
||||
public class PacketEnterMapRotationRegionScRsp extends BasePacket {
|
||||
|
||||
public PacketEnterMapRotationRegionScRsp(MotionInfo motionInfo) {
|
||||
super(CmdId.EnterMapRotationRegionScRsp);
|
||||
|
||||
var data = EnterMapRotationRegionScRsp.newInstance()
|
||||
.setMotion(motionInfo);
|
||||
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package emu.lunarcore.server.packet.send;
|
||||
|
||||
import emu.lunarcore.proto.ChargerInfoOuterClass.ChargerInfo;
|
||||
import emu.lunarcore.proto.InteractChargerScRspOuterClass.InteractChargerScRsp;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
|
||||
public class PacketInteractChargerScRsp extends BasePacket {
|
||||
|
||||
public PacketInteractChargerScRsp(ChargerInfo chargerInfo) {
|
||||
super(CmdId.InteractChargerScRsp);
|
||||
|
||||
var data = InteractChargerScRsp.newInstance()
|
||||
.setChargerInfo(chargerInfo);
|
||||
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package emu.lunarcore.server.packet.send;
|
||||
|
||||
import emu.lunarcore.proto.MotionInfoOuterClass.MotionInfo;
|
||||
import emu.lunarcore.proto.RotateMapScRspOuterClass.RotateMapScRsp;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
|
||||
public class PacketRotateMapScRsp extends BasePacket {
|
||||
|
||||
public PacketRotateMapScRsp(MotionInfo motion) {
|
||||
super(CmdId.RotateMapScRsp);
|
||||
|
||||
var data = RotateMapScRsp.newInstance()
|
||||
.setMotion(motion);
|
||||
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package emu.lunarcore.server.packet.send;
|
||||
|
||||
import emu.lunarcore.proto.RotatorEnergyInfoOuterClass.RotatorEnergyInfo;
|
||||
import emu.lunarcore.proto.UpdateEnergyScNotifyOuterClass.UpdateEnergyScNotify;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
|
||||
public class PacketUpdateEnergyScNotify extends BasePacket {
|
||||
|
||||
public PacketUpdateEnergyScNotify() {
|
||||
super(CmdId.UpdateEnergyScNotify);
|
||||
|
||||
var temp = RotatorEnergyInfo.newInstance()
|
||||
.setMaxNum(100)
|
||||
.setCurNum(100);
|
||||
|
||||
var data = UpdateEnergyScNotify.newInstance()
|
||||
.setEnergyInfo(temp);
|
||||
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user