mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-12 21:34:35 +01:00
Fix pure fiction score counter
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
- Mail system
|
- Mail system
|
||||||
- Friend system (Assists are not working yet)
|
- Friend system (Assists are not working yet)
|
||||||
- Forgotten hall
|
- Forgotten hall
|
||||||
|
- Pure Fiction
|
||||||
- ~~Simulated universe (Runs can be finished, but many features are missing)~~
|
- ~~Simulated universe (Runs can be finished, but many features are missing)~~
|
||||||
|
|
||||||
# Running the server and client
|
# Running the server and client
|
||||||
|
|||||||
@@ -0,0 +1,132 @@
|
|||||||
|
// Code generated by protocol buffer compiler. Do not edit!
|
||||||
|
package emu.lunarcore.proto;
|
||||||
|
|
||||||
|
import us.hebi.quickbuf.ProtoEnum;
|
||||||
|
import us.hebi.quickbuf.ProtoUtil;
|
||||||
|
|
||||||
|
public final class BattleEndReasonOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf enum {@code BattleEndReason}
|
||||||
|
*/
|
||||||
|
public enum BattleEndReason implements ProtoEnum<BattleEndReason> {
|
||||||
|
/**
|
||||||
|
* <code>BATTLE_END_REASON_NONE = 0;</code>
|
||||||
|
*/
|
||||||
|
BATTLE_END_REASON_NONE("BATTLE_END_REASON_NONE", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>BATTLE_END_REASON_ALL_DIE = 1;</code>
|
||||||
|
*/
|
||||||
|
BATTLE_END_REASON_ALL_DIE("BATTLE_END_REASON_ALL_DIE", 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>BATTLE_END_REASON_TURN_LIMIT = 2;</code>
|
||||||
|
*/
|
||||||
|
BATTLE_END_REASON_TURN_LIMIT("BATTLE_END_REASON_TURN_LIMIT", 2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>BATTLE_END_REASON_NONE = 0;</code>
|
||||||
|
*/
|
||||||
|
public static final int BATTLE_END_REASON_NONE_VALUE = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>BATTLE_END_REASON_ALL_DIE = 1;</code>
|
||||||
|
*/
|
||||||
|
public static final int BATTLE_END_REASON_ALL_DIE_VALUE = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>BATTLE_END_REASON_TURN_LIMIT = 2;</code>
|
||||||
|
*/
|
||||||
|
public static final int BATTLE_END_REASON_TURN_LIMIT_VALUE = 2;
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
private final int number;
|
||||||
|
|
||||||
|
private BattleEndReason(String name, int number) {
|
||||||
|
this.name = name;
|
||||||
|
this.number = number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the string representation of enum entry
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the numeric wire value of this enum entry
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int getNumber() {
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a converter that maps between this enum's numeric and text representations
|
||||||
|
*/
|
||||||
|
public static ProtoEnum.EnumConverter<BattleEndReason> converter() {
|
||||||
|
return BattleEndReasonConverter.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param value The numeric wire value of the corresponding enum entry.
|
||||||
|
* @return The enum associated with the given numeric wire value, or null if unknown.
|
||||||
|
*/
|
||||||
|
public static BattleEndReason forNumber(int value) {
|
||||||
|
return BattleEndReasonConverter.INSTANCE.forNumber(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param value The numeric wire value of the corresponding enum entry.
|
||||||
|
* @param other Fallback value in case the value is not known.
|
||||||
|
* @return The enum associated with the given numeric wire value, or the fallback value if unknown.
|
||||||
|
*/
|
||||||
|
public static BattleEndReason forNumberOr(int number, BattleEndReason other) {
|
||||||
|
BattleEndReason value = forNumber(number);
|
||||||
|
return value == null ? other : value;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum BattleEndReasonConverter implements ProtoEnum.EnumConverter<BattleEndReason> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
private static final BattleEndReason[] lookup = new BattleEndReason[3];
|
||||||
|
|
||||||
|
static {
|
||||||
|
lookup[0] = BATTLE_END_REASON_NONE;
|
||||||
|
lookup[1] = BATTLE_END_REASON_ALL_DIE;
|
||||||
|
lookup[2] = BATTLE_END_REASON_TURN_LIMIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final BattleEndReason forNumber(final int value) {
|
||||||
|
if (value >= 0 && value < lookup.length) {
|
||||||
|
return lookup[value];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final BattleEndReason forName(final CharSequence value) {
|
||||||
|
if (value.length() == 22) {
|
||||||
|
if (ProtoUtil.isEqual("BATTLE_END_REASON_NONE", value)) {
|
||||||
|
return BATTLE_END_REASON_NONE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (value.length() == 25) {
|
||||||
|
if (ProtoUtil.isEqual("BATTLE_END_REASON_ALL_DIE", value)) {
|
||||||
|
return BATTLE_END_REASON_ALL_DIE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (value.length() == 28) {
|
||||||
|
if (ProtoUtil.isEqual("BATTLE_END_REASON_TURN_LIMIT", value)) {
|
||||||
|
return BATTLE_END_REASON_TURN_LIMIT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -76,6 +76,11 @@ public final class BattleStatisticsOuterClass {
|
|||||||
*/
|
*/
|
||||||
private int challengeScore;
|
private int challengeScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .BattleEndReason end_reason = 19;</code>
|
||||||
|
*/
|
||||||
|
private int endReason;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>repeated uint32 avatar_id_list = 3;</code>
|
* <code>repeated uint32 avatar_id_list = 3;</code>
|
||||||
*/
|
*/
|
||||||
@@ -487,12 +492,74 @@ public final class BattleStatisticsOuterClass {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .BattleEndReason end_reason = 19;</code>
|
||||||
|
* @return whether the endReason field is set
|
||||||
|
*/
|
||||||
|
public boolean hasEndReason() {
|
||||||
|
return (bitField0_ & 0x00000400) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .BattleEndReason end_reason = 19;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleStatistics clearEndReason() {
|
||||||
|
bitField0_ &= ~0x00000400;
|
||||||
|
endReason = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .BattleEndReason end_reason = 19;</code>
|
||||||
|
* @return the endReason
|
||||||
|
*/
|
||||||
|
public BattleEndReasonOuterClass.BattleEndReason getEndReason() {
|
||||||
|
return BattleEndReasonOuterClass.BattleEndReason.forNumber(endReason);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the internal enum store. The result is
|
||||||
|
* equivalent to {@link BattleStatistics#getEndReason()}.getNumber().
|
||||||
|
*
|
||||||
|
* @return numeric wire representation
|
||||||
|
*/
|
||||||
|
public int getEndReasonValue() {
|
||||||
|
return endReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value of the internal enum store. This does not
|
||||||
|
* do any validity checks, so be sure to use appropriate value
|
||||||
|
* constants from {@link BattleEndReasonOuterClass.BattleEndReason}. Setting an invalid value
|
||||||
|
* can cause {@link BattleStatistics#getEndReason()} to return null
|
||||||
|
*
|
||||||
|
* @param value the numeric wire value to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleStatistics setEndReasonValue(final int value) {
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
endReason = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .BattleEndReason end_reason = 19;</code>
|
||||||
|
* @param value the endReason to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleStatistics setEndReason(final BattleEndReasonOuterClass.BattleEndReason value) {
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
endReason = value.getNumber();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>repeated uint32 avatar_id_list = 3;</code>
|
* <code>repeated uint32 avatar_id_list = 3;</code>
|
||||||
* @return whether the avatarIdList field is set
|
* @return whether the avatarIdList field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasAvatarIdList() {
|
public boolean hasAvatarIdList() {
|
||||||
return (bitField0_ & 0x00000400) != 0;
|
return (bitField0_ & 0x00000800) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -500,7 +567,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public BattleStatistics clearAvatarIdList() {
|
public BattleStatistics clearAvatarIdList() {
|
||||||
bitField0_ &= ~0x00000400;
|
bitField0_ &= ~0x00000800;
|
||||||
avatarIdList.clear();
|
avatarIdList.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -529,7 +596,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
* @return internal storage object for modifications
|
* @return internal storage object for modifications
|
||||||
*/
|
*/
|
||||||
public RepeatedInt getMutableAvatarIdList() {
|
public RepeatedInt getMutableAvatarIdList() {
|
||||||
bitField0_ |= 0x00000400;
|
bitField0_ |= 0x00000800;
|
||||||
return avatarIdList;
|
return avatarIdList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,7 +606,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public BattleStatistics addAvatarIdList(final int value) {
|
public BattleStatistics addAvatarIdList(final int value) {
|
||||||
bitField0_ |= 0x00000400;
|
bitField0_ |= 0x00000800;
|
||||||
avatarIdList.add(value);
|
avatarIdList.add(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -550,7 +617,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public BattleStatistics addAllAvatarIdList(final int... values) {
|
public BattleStatistics addAllAvatarIdList(final int... values) {
|
||||||
bitField0_ |= 0x00000400;
|
bitField0_ |= 0x00000800;
|
||||||
avatarIdList.addAll(values);
|
avatarIdList.addAll(values);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -560,7 +627,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
* @return whether the battleAvatarList field is set
|
* @return whether the battleAvatarList field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasBattleAvatarList() {
|
public boolean hasBattleAvatarList() {
|
||||||
return (bitField0_ & 0x00000800) != 0;
|
return (bitField0_ & 0x00001000) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -568,7 +635,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public BattleStatistics clearBattleAvatarList() {
|
public BattleStatistics clearBattleAvatarList() {
|
||||||
bitField0_ &= ~0x00000800;
|
bitField0_ &= ~0x00001000;
|
||||||
battleAvatarList.clear();
|
battleAvatarList.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -598,7 +665,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
*/
|
*/
|
||||||
public RepeatedMessage<AvatarBattleInfoOuterClass.AvatarBattleInfo> getMutableBattleAvatarList(
|
public RepeatedMessage<AvatarBattleInfoOuterClass.AvatarBattleInfo> getMutableBattleAvatarList(
|
||||||
) {
|
) {
|
||||||
bitField0_ |= 0x00000800;
|
bitField0_ |= 0x00001000;
|
||||||
return battleAvatarList;
|
return battleAvatarList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -609,7 +676,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
*/
|
*/
|
||||||
public BattleStatistics addBattleAvatarList(
|
public BattleStatistics addBattleAvatarList(
|
||||||
final AvatarBattleInfoOuterClass.AvatarBattleInfo value) {
|
final AvatarBattleInfoOuterClass.AvatarBattleInfo value) {
|
||||||
bitField0_ |= 0x00000800;
|
bitField0_ |= 0x00001000;
|
||||||
battleAvatarList.add(value);
|
battleAvatarList.add(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -621,7 +688,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
*/
|
*/
|
||||||
public BattleStatistics addAllBattleAvatarList(
|
public BattleStatistics addAllBattleAvatarList(
|
||||||
final AvatarBattleInfoOuterClass.AvatarBattleInfo... values) {
|
final AvatarBattleInfoOuterClass.AvatarBattleInfo... values) {
|
||||||
bitField0_ |= 0x00000800;
|
bitField0_ |= 0x00001000;
|
||||||
battleAvatarList.addAll(values);
|
battleAvatarList.addAll(values);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -631,7 +698,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
* @return whether the customValues field is set
|
* @return whether the customValues field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasCustomValues() {
|
public boolean hasCustomValues() {
|
||||||
return (bitField0_ & 0x00001000) != 0;
|
return (bitField0_ & 0x00002000) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -639,7 +706,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public BattleStatistics clearCustomValues() {
|
public BattleStatistics clearCustomValues() {
|
||||||
bitField0_ &= ~0x00001000;
|
bitField0_ &= ~0x00002000;
|
||||||
customValues.clear();
|
customValues.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -668,7 +735,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
* @return internal storage object for modifications
|
* @return internal storage object for modifications
|
||||||
*/
|
*/
|
||||||
public RepeatedMessage<CustomValuesEntry> getMutableCustomValues() {
|
public RepeatedMessage<CustomValuesEntry> getMutableCustomValues() {
|
||||||
bitField0_ |= 0x00001000;
|
bitField0_ |= 0x00002000;
|
||||||
return customValues;
|
return customValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -678,7 +745,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public BattleStatistics addCustomValues(final CustomValuesEntry value) {
|
public BattleStatistics addCustomValues(final CustomValuesEntry value) {
|
||||||
bitField0_ |= 0x00001000;
|
bitField0_ |= 0x00002000;
|
||||||
customValues.add(value);
|
customValues.add(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -689,7 +756,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public BattleStatistics addAllCustomValues(final CustomValuesEntry... values) {
|
public BattleStatistics addAllCustomValues(final CustomValuesEntry... values) {
|
||||||
bitField0_ |= 0x00001000;
|
bitField0_ |= 0x00002000;
|
||||||
customValues.addAll(values);
|
customValues.addAll(values);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -709,6 +776,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
avatarBattleTurns = other.avatarBattleTurns;
|
avatarBattleTurns = other.avatarBattleTurns;
|
||||||
monsterBattleTurns = other.monsterBattleTurns;
|
monsterBattleTurns = other.monsterBattleTurns;
|
||||||
challengeScore = other.challengeScore;
|
challengeScore = other.challengeScore;
|
||||||
|
endReason = other.endReason;
|
||||||
avatarIdList.copyFrom(other.avatarIdList);
|
avatarIdList.copyFrom(other.avatarIdList);
|
||||||
battleAvatarList.copyFrom(other.battleAvatarList);
|
battleAvatarList.copyFrom(other.battleAvatarList);
|
||||||
customValues.copyFrom(other.customValues);
|
customValues.copyFrom(other.customValues);
|
||||||
@@ -752,6 +820,9 @@ public final class BattleStatisticsOuterClass {
|
|||||||
if (other.hasChallengeScore()) {
|
if (other.hasChallengeScore()) {
|
||||||
setChallengeScore(other.challengeScore);
|
setChallengeScore(other.challengeScore);
|
||||||
}
|
}
|
||||||
|
if (other.hasEndReason()) {
|
||||||
|
setEndReasonValue(other.endReason);
|
||||||
|
}
|
||||||
if (other.hasAvatarIdList()) {
|
if (other.hasAvatarIdList()) {
|
||||||
getMutableAvatarIdList().addAll(other.avatarIdList);
|
getMutableAvatarIdList().addAll(other.avatarIdList);
|
||||||
}
|
}
|
||||||
@@ -781,6 +852,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
avatarBattleTurns = 0;
|
avatarBattleTurns = 0;
|
||||||
monsterBattleTurns = 0;
|
monsterBattleTurns = 0;
|
||||||
challengeScore = 0;
|
challengeScore = 0;
|
||||||
|
endReason = 0;
|
||||||
avatarIdList.clear();
|
avatarIdList.clear();
|
||||||
battleAvatarList.clear();
|
battleAvatarList.clear();
|
||||||
customValues.clear();
|
customValues.clear();
|
||||||
@@ -820,6 +892,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
&& (!hasAvatarBattleTurns() || avatarBattleTurns == other.avatarBattleTurns)
|
&& (!hasAvatarBattleTurns() || avatarBattleTurns == other.avatarBattleTurns)
|
||||||
&& (!hasMonsterBattleTurns() || monsterBattleTurns == other.monsterBattleTurns)
|
&& (!hasMonsterBattleTurns() || monsterBattleTurns == other.monsterBattleTurns)
|
||||||
&& (!hasChallengeScore() || challengeScore == other.challengeScore)
|
&& (!hasChallengeScore() || challengeScore == other.challengeScore)
|
||||||
|
&& (!hasEndReason() || endReason == other.endReason)
|
||||||
&& (!hasAvatarIdList() || avatarIdList.equals(other.avatarIdList))
|
&& (!hasAvatarIdList() || avatarIdList.equals(other.avatarIdList))
|
||||||
&& (!hasBattleAvatarList() || battleAvatarList.equals(other.battleAvatarList))
|
&& (!hasBattleAvatarList() || battleAvatarList.equals(other.battleAvatarList))
|
||||||
&& (!hasCustomValues() || customValues.equals(other.customValues));
|
&& (!hasCustomValues() || customValues.equals(other.customValues));
|
||||||
@@ -868,18 +941,22 @@ public final class BattleStatisticsOuterClass {
|
|||||||
output.writeUInt32NoTag(challengeScore);
|
output.writeUInt32NoTag(challengeScore);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000400) != 0) {
|
if ((bitField0_ & 0x00000400) != 0) {
|
||||||
|
output.writeRawLittleEndian16((short) 408);
|
||||||
|
output.writeEnumNoTag(endReason);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000800) != 0) {
|
||||||
for (int i = 0; i < avatarIdList.length(); i++) {
|
for (int i = 0; i < avatarIdList.length(); i++) {
|
||||||
output.writeRawByte((byte) 24);
|
output.writeRawByte((byte) 24);
|
||||||
output.writeUInt32NoTag(avatarIdList.array()[i]);
|
output.writeUInt32NoTag(avatarIdList.array()[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000800) != 0) {
|
if ((bitField0_ & 0x00001000) != 0) {
|
||||||
for (int i = 0; i < battleAvatarList.length(); i++) {
|
for (int i = 0; i < battleAvatarList.length(); i++) {
|
||||||
output.writeRawByte((byte) 58);
|
output.writeRawByte((byte) 58);
|
||||||
output.writeMessageNoTag(battleAvatarList.get(i));
|
output.writeMessageNoTag(battleAvatarList.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00001000) != 0) {
|
if ((bitField0_ & 0x00002000) != 0) {
|
||||||
for (int i = 0; i < customValues.length(); i++) {
|
for (int i = 0; i < customValues.length(); i++) {
|
||||||
output.writeRawByte((byte) 106);
|
output.writeRawByte((byte) 106);
|
||||||
output.writeMessageNoTag(customValues.get(i));
|
output.writeMessageNoTag(customValues.get(i));
|
||||||
@@ -921,12 +998,15 @@ public final class BattleStatisticsOuterClass {
|
|||||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(challengeScore);
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(challengeScore);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000400) != 0) {
|
if ((bitField0_ & 0x00000400) != 0) {
|
||||||
size += (1 * avatarIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(avatarIdList);
|
size += 2 + ProtoSink.computeEnumSizeNoTag(endReason);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000800) != 0) {
|
if ((bitField0_ & 0x00000800) != 0) {
|
||||||
size += (1 * battleAvatarList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(battleAvatarList);
|
size += (1 * avatarIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(avatarIdList);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00001000) != 0) {
|
if ((bitField0_ & 0x00001000) != 0) {
|
||||||
|
size += (1 * battleAvatarList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(battleAvatarList);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00002000) != 0) {
|
||||||
size += (1 * customValues.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(customValues);
|
size += (1 * customValues.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(customValues);
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
@@ -1025,6 +1105,18 @@ public final class BattleStatisticsOuterClass {
|
|||||||
challengeScore = input.readUInt32();
|
challengeScore = input.readUInt32();
|
||||||
bitField0_ |= 0x00000200;
|
bitField0_ |= 0x00000200;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
|
if (tag != 152) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 152: {
|
||||||
|
// endReason
|
||||||
|
final int value = input.readInt32();
|
||||||
|
if (BattleEndReasonOuterClass.BattleEndReason.forNumber(value) != null) {
|
||||||
|
endReason = value;
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
}
|
||||||
|
tag = input.readTag();
|
||||||
if (tag != 26) {
|
if (tag != 26) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1032,7 +1124,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
case 26: {
|
case 26: {
|
||||||
// avatarIdList [packed=true]
|
// avatarIdList [packed=true]
|
||||||
input.readPackedUInt32(avatarIdList, tag);
|
input.readPackedUInt32(avatarIdList, tag);
|
||||||
bitField0_ |= 0x00000400;
|
bitField0_ |= 0x00000800;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 58) {
|
if (tag != 58) {
|
||||||
break;
|
break;
|
||||||
@@ -1041,7 +1133,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
case 58: {
|
case 58: {
|
||||||
// battleAvatarList
|
// battleAvatarList
|
||||||
tag = input.readRepeatedMessage(battleAvatarList, tag);
|
tag = input.readRepeatedMessage(battleAvatarList, tag);
|
||||||
bitField0_ |= 0x00000800;
|
bitField0_ |= 0x00001000;
|
||||||
if (tag != 106) {
|
if (tag != 106) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1049,7 +1141,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
case 106: {
|
case 106: {
|
||||||
// customValues
|
// customValues
|
||||||
tag = input.readRepeatedMessage(customValues, tag);
|
tag = input.readRepeatedMessage(customValues, tag);
|
||||||
bitField0_ |= 0x00001000;
|
bitField0_ |= 0x00002000;
|
||||||
if (tag != 0) {
|
if (tag != 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1067,7 +1159,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
case 24: {
|
case 24: {
|
||||||
// avatarIdList [packed=false]
|
// avatarIdList [packed=false]
|
||||||
tag = input.readRepeatedUInt32(avatarIdList, tag);
|
tag = input.readRepeatedUInt32(avatarIdList, tag);
|
||||||
bitField0_ |= 0x00000400;
|
bitField0_ |= 0x00000800;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1108,12 +1200,15 @@ public final class BattleStatisticsOuterClass {
|
|||||||
output.writeUInt32(FieldNames.challengeScore, challengeScore);
|
output.writeUInt32(FieldNames.challengeScore, challengeScore);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000400) != 0) {
|
if ((bitField0_ & 0x00000400) != 0) {
|
||||||
output.writeRepeatedUInt32(FieldNames.avatarIdList, avatarIdList);
|
output.writeEnum(FieldNames.endReason, endReason, BattleEndReasonOuterClass.BattleEndReason.converter());
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000800) != 0) {
|
if ((bitField0_ & 0x00000800) != 0) {
|
||||||
output.writeRepeatedMessage(FieldNames.battleAvatarList, battleAvatarList);
|
output.writeRepeatedUInt32(FieldNames.avatarIdList, avatarIdList);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00001000) != 0) {
|
if ((bitField0_ & 0x00001000) != 0) {
|
||||||
|
output.writeRepeatedMessage(FieldNames.battleAvatarList, battleAvatarList);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00002000) != 0) {
|
||||||
output.writeRepeatedMessage(FieldNames.customValues, customValues);
|
output.writeRepeatedMessage(FieldNames.customValues, customValues);
|
||||||
}
|
}
|
||||||
output.endObject();
|
output.endObject();
|
||||||
@@ -1246,12 +1341,29 @@ public final class BattleStatisticsOuterClass {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 1566226175:
|
||||||
|
case 336357928: {
|
||||||
|
if (input.isAtField(FieldNames.endReason)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
final BattleEndReasonOuterClass.BattleEndReason value = input.readEnum(BattleEndReasonOuterClass.BattleEndReason.converter());
|
||||||
|
if (value != null) {
|
||||||
|
endReason = value.getNumber();
|
||||||
|
bitField0_ |= 0x00000400;
|
||||||
|
} else {
|
||||||
|
input.skipUnknownEnumValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case -1214270702:
|
case -1214270702:
|
||||||
case 1824281692: {
|
case 1824281692: {
|
||||||
if (input.isAtField(FieldNames.avatarIdList)) {
|
if (input.isAtField(FieldNames.avatarIdList)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readRepeatedUInt32(avatarIdList);
|
input.readRepeatedUInt32(avatarIdList);
|
||||||
bitField0_ |= 0x00000400;
|
bitField0_ |= 0x00000800;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -1263,7 +1375,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
if (input.isAtField(FieldNames.battleAvatarList)) {
|
if (input.isAtField(FieldNames.battleAvatarList)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readRepeatedMessage(battleAvatarList);
|
input.readRepeatedMessage(battleAvatarList);
|
||||||
bitField0_ |= 0x00000800;
|
bitField0_ |= 0x00001000;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -1275,7 +1387,7 @@ public final class BattleStatisticsOuterClass {
|
|||||||
if (input.isAtField(FieldNames.customValues)) {
|
if (input.isAtField(FieldNames.customValues)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readRepeatedMessage(customValues);
|
input.readRepeatedMessage(customValues);
|
||||||
bitField0_ |= 0x00001000;
|
bitField0_ |= 0x00002000;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -1709,6 +1821,8 @@ public final class BattleStatisticsOuterClass {
|
|||||||
|
|
||||||
static final FieldName challengeScore = FieldName.forField("challengeScore", "challenge_score");
|
static final FieldName challengeScore = FieldName.forField("challengeScore", "challenge_score");
|
||||||
|
|
||||||
|
static final FieldName endReason = FieldName.forField("endReason", "end_reason");
|
||||||
|
|
||||||
static final FieldName avatarIdList = FieldName.forField("avatarIdList", "avatar_id_list");
|
static final FieldName avatarIdList = FieldName.forField("avatarIdList", "avatar_id_list");
|
||||||
|
|
||||||
static final FieldName battleAvatarList = FieldName.forField("battleAvatarList", "battle_avatar_list");
|
static final FieldName battleAvatarList = FieldName.forField("battleAvatarList", "battle_avatar_list");
|
||||||
|
|||||||
@@ -0,0 +1,295 @@
|
|||||||
|
// 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 BattleTargetListOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code BattleTargetList}
|
||||||
|
*/
|
||||||
|
public static final class BattleTargetList extends ProtoMessage<BattleTargetList> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .BattleTarget battle_target_list = 1;</code>
|
||||||
|
*/
|
||||||
|
private final RepeatedMessage<BattleTargetOuterClass.BattleTarget> battleTargetList = RepeatedMessage.newEmptyInstance(BattleTargetOuterClass.BattleTarget.getFactory());
|
||||||
|
|
||||||
|
private BattleTargetList() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code BattleTargetList}
|
||||||
|
*/
|
||||||
|
public static BattleTargetList newInstance() {
|
||||||
|
return new BattleTargetList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .BattleTarget battle_target_list = 1;</code>
|
||||||
|
* @return whether the battleTargetList field is set
|
||||||
|
*/
|
||||||
|
public boolean hasBattleTargetList() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .BattleTarget battle_target_list = 1;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTargetList clearBattleTargetList() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
battleTargetList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .BattleTarget battle_target_list = 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.
|
||||||
|
*
|
||||||
|
* Use {@link #getMutableBattleTargetList()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<BattleTargetOuterClass.BattleTarget> getBattleTargetList() {
|
||||||
|
return battleTargetList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .BattleTarget battle_target_list = 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
|
||||||
|
* contents may be modified as long as the has state is not cleared.
|
||||||
|
*
|
||||||
|
* @return internal storage object for modifications
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<BattleTargetOuterClass.BattleTarget> getMutableBattleTargetList() {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
return battleTargetList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .BattleTarget battle_target_list = 1;</code>
|
||||||
|
* @param value the battleTargetList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTargetList addBattleTargetList(final BattleTargetOuterClass.BattleTarget value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
battleTargetList.add(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .BattleTarget battle_target_list = 1;</code>
|
||||||
|
* @param values the battleTargetList to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTargetList addAllBattleTargetList(
|
||||||
|
final BattleTargetOuterClass.BattleTarget... values) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
battleTargetList.addAll(values);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetList copyFrom(final BattleTargetList other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
battleTargetList.copyFrom(other.battleTargetList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetList mergeFrom(final BattleTargetList other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasBattleTargetList()) {
|
||||||
|
getMutableBattleTargetList().addAll(other.battleTargetList);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetList clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
battleTargetList.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetList clearQuick() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
battleTargetList.clearQuick();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(o instanceof BattleTargetList)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
BattleTargetList other = (BattleTargetList) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasBattleTargetList() || battleTargetList.equals(other.battleTargetList));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
for (int i = 0; i < battleTargetList.length(); i++) {
|
||||||
|
output.writeRawByte((byte) 10);
|
||||||
|
output.writeMessageNoTag(battleTargetList.get(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += (1 * battleTargetList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(battleTargetList);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public BattleTargetList mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 10: {
|
||||||
|
// battleTargetList
|
||||||
|
tag = input.readRepeatedMessage(battleTargetList, 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.battleTargetList, battleTargetList);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetList mergeFrom(final JsonSource input) throws IOException {
|
||||||
|
if (!input.beginObject()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
while (!input.isAtEnd()) {
|
||||||
|
switch (input.readFieldHash()) {
|
||||||
|
case 1658064039:
|
||||||
|
case 2141562245: {
|
||||||
|
if (input.isAtField(FieldNames.battleTargetList)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readRepeatedMessage(battleTargetList);
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetList clone() {
|
||||||
|
return new BattleTargetList().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BattleTargetList parseFrom(final byte[] data) throws
|
||||||
|
InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new BattleTargetList(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BattleTargetList parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new BattleTargetList(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BattleTargetList parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new BattleTargetList(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating BattleTargetList messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<BattleTargetList> getFactory() {
|
||||||
|
return BattleTargetListFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum BattleTargetListFactory implements MessageFactory<BattleTargetList> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetList create() {
|
||||||
|
return BattleTargetList.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName battleTargetList = FieldName.forField("battleTargetList", "battle_target_list");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,418 @@
|
|||||||
|
// 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 BattleTargetOuterClass {
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code BattleTarget}
|
||||||
|
*/
|
||||||
|
public static final class BattleTarget extends ProtoMessage<BattleTarget> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 id = 1;</code>
|
||||||
|
*/
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 progress = 2;</code>
|
||||||
|
*/
|
||||||
|
private int progress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 CDLKMKKOGLL = 3;</code>
|
||||||
|
*/
|
||||||
|
private int cDLKMKKOGLL;
|
||||||
|
|
||||||
|
private BattleTarget() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code BattleTarget}
|
||||||
|
*/
|
||||||
|
public static BattleTarget newInstance() {
|
||||||
|
return new BattleTarget();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 id = 1;</code>
|
||||||
|
* @return whether the id field is set
|
||||||
|
*/
|
||||||
|
public boolean hasId() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 id = 1;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTarget clearId() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
id = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 id = 1;</code>
|
||||||
|
* @return the id
|
||||||
|
*/
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 id = 1;</code>
|
||||||
|
* @param value the id to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTarget setId(final int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
id = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 progress = 2;</code>
|
||||||
|
* @return whether the progress field is set
|
||||||
|
*/
|
||||||
|
public boolean hasProgress() {
|
||||||
|
return (bitField0_ & 0x00000002) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 progress = 2;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTarget clearProgress() {
|
||||||
|
bitField0_ &= ~0x00000002;
|
||||||
|
progress = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 progress = 2;</code>
|
||||||
|
* @return the progress
|
||||||
|
*/
|
||||||
|
public int getProgress() {
|
||||||
|
return progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 progress = 2;</code>
|
||||||
|
* @param value the progress to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTarget setProgress(final int value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
progress = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 CDLKMKKOGLL = 3;</code>
|
||||||
|
* @return whether the cDLKMKKOGLL field is set
|
||||||
|
*/
|
||||||
|
public boolean hasCDLKMKKOGLL() {
|
||||||
|
return (bitField0_ & 0x00000004) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 CDLKMKKOGLL = 3;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTarget clearCDLKMKKOGLL() {
|
||||||
|
bitField0_ &= ~0x00000004;
|
||||||
|
cDLKMKKOGLL = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 CDLKMKKOGLL = 3;</code>
|
||||||
|
* @return the cDLKMKKOGLL
|
||||||
|
*/
|
||||||
|
public int getCDLKMKKOGLL() {
|
||||||
|
return cDLKMKKOGLL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 CDLKMKKOGLL = 3;</code>
|
||||||
|
* @param value the cDLKMKKOGLL to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTarget setCDLKMKKOGLL(final int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
cDLKMKKOGLL = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTarget copyFrom(final BattleTarget other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
id = other.id;
|
||||||
|
progress = other.progress;
|
||||||
|
cDLKMKKOGLL = other.cDLKMKKOGLL;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTarget mergeFrom(final BattleTarget other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasId()) {
|
||||||
|
setId(other.id);
|
||||||
|
}
|
||||||
|
if (other.hasProgress()) {
|
||||||
|
setProgress(other.progress);
|
||||||
|
}
|
||||||
|
if (other.hasCDLKMKKOGLL()) {
|
||||||
|
setCDLKMKKOGLL(other.cDLKMKKOGLL);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTarget clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
id = 0;
|
||||||
|
progress = 0;
|
||||||
|
cDLKMKKOGLL = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTarget 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 BattleTarget)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
BattleTarget other = (BattleTarget) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasId() || id == other.id)
|
||||||
|
&& (!hasProgress() || progress == other.progress)
|
||||||
|
&& (!hasCDLKMKKOGLL() || cDLKMKKOGLL == other.cDLKMKKOGLL);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRawByte((byte) 8);
|
||||||
|
output.writeUInt32NoTag(id);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeRawByte((byte) 16);
|
||||||
|
output.writeUInt32NoTag(progress);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeRawByte((byte) 24);
|
||||||
|
output.writeUInt32NoTag(cDLKMKKOGLL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(id);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(progress);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(cDLKMKKOGLL);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public BattleTarget mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 8: {
|
||||||
|
// id
|
||||||
|
id = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 16) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 16: {
|
||||||
|
// progress
|
||||||
|
progress = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 24) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 24: {
|
||||||
|
// cDLKMKKOGLL
|
||||||
|
cDLKMKKOGLL = input.readUInt32();
|
||||||
|
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.writeUInt32(FieldNames.id, id);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.progress, progress);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.cDLKMKKOGLL, cDLKMKKOGLL);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTarget mergeFrom(final JsonSource input) throws IOException {
|
||||||
|
if (!input.beginObject()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
while (!input.isAtEnd()) {
|
||||||
|
switch (input.readFieldHash()) {
|
||||||
|
case 3355: {
|
||||||
|
if (input.isAtField(FieldNames.id)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
id = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case -1001078227: {
|
||||||
|
if (input.isAtField(FieldNames.progress)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
progress = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case -1138288731: {
|
||||||
|
if (input.isAtField(FieldNames.cDLKMKKOGLL)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
cDLKMKKOGLL = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTarget clone() {
|
||||||
|
return new BattleTarget().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BattleTarget parseFrom(final byte[] data) throws InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new BattleTarget(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BattleTarget parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new BattleTarget(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BattleTarget parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new BattleTarget(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating BattleTarget messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<BattleTarget> getFactory() {
|
||||||
|
return BattleTargetFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum BattleTargetFactory implements MessageFactory<BattleTarget> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTarget create() {
|
||||||
|
return BattleTarget.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName id = FieldName.forField("id");
|
||||||
|
|
||||||
|
static final FieldName progress = FieldName.forField("progress");
|
||||||
|
|
||||||
|
static final FieldName cDLKMKKOGLL = FieldName.forField("CDLKMKKOGLL");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,6 +28,16 @@ public final class ChallengeInfoOuterClass {
|
|||||||
*/
|
*/
|
||||||
private int roundCount;
|
private int roundCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score = 8;</code>
|
||||||
|
*/
|
||||||
|
private int score;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 10;</code>
|
||||||
|
*/
|
||||||
|
private int scoreTwo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional .ChallengeStatus status = 6;</code>
|
* <code>optional .ChallengeStatus status = 6;</code>
|
||||||
*/
|
*/
|
||||||
@@ -127,12 +137,86 @@ public final class ChallengeInfoOuterClass {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score = 8;</code>
|
||||||
|
* @return whether the score field is set
|
||||||
|
*/
|
||||||
|
public boolean hasScore() {
|
||||||
|
return (bitField0_ & 0x00000004) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score = 8;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public ChallengeInfo clearScore() {
|
||||||
|
bitField0_ &= ~0x00000004;
|
||||||
|
score = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score = 8;</code>
|
||||||
|
* @return the score
|
||||||
|
*/
|
||||||
|
public int getScore() {
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score = 8;</code>
|
||||||
|
* @param value the score to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public ChallengeInfo setScore(final int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
score = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 10;</code>
|
||||||
|
* @return whether the scoreTwo field is set
|
||||||
|
*/
|
||||||
|
public boolean hasScoreTwo() {
|
||||||
|
return (bitField0_ & 0x00000008) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 10;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public ChallengeInfo clearScoreTwo() {
|
||||||
|
bitField0_ &= ~0x00000008;
|
||||||
|
scoreTwo = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 10;</code>
|
||||||
|
* @return the scoreTwo
|
||||||
|
*/
|
||||||
|
public int getScoreTwo() {
|
||||||
|
return scoreTwo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 10;</code>
|
||||||
|
* @param value the scoreTwo to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public ChallengeInfo setScoreTwo(final int value) {
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
scoreTwo = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional .ChallengeStatus status = 6;</code>
|
* <code>optional .ChallengeStatus status = 6;</code>
|
||||||
* @return whether the status field is set
|
* @return whether the status field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasStatus() {
|
public boolean hasStatus() {
|
||||||
return (bitField0_ & 0x00000004) != 0;
|
return (bitField0_ & 0x00000010) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -140,7 +224,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeInfo clearStatus() {
|
public ChallengeInfo clearStatus() {
|
||||||
bitField0_ &= ~0x00000004;
|
bitField0_ &= ~0x00000010;
|
||||||
status = 0;
|
status = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -173,7 +257,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeInfo setStatusValue(final int value) {
|
public ChallengeInfo setStatusValue(final int value) {
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000010;
|
||||||
status = value;
|
status = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -184,7 +268,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeInfo setStatus(final ChallengeStatusOuterClass.ChallengeStatus value) {
|
public ChallengeInfo setStatus(final ChallengeStatusOuterClass.ChallengeStatus value) {
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000010;
|
||||||
status = value.getNumber();
|
status = value.getNumber();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -194,7 +278,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
* @return whether the extraLineupType field is set
|
* @return whether the extraLineupType field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasExtraLineupType() {
|
public boolean hasExtraLineupType() {
|
||||||
return (bitField0_ & 0x00000008) != 0;
|
return (bitField0_ & 0x00000020) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -202,7 +286,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeInfo clearExtraLineupType() {
|
public ChallengeInfo clearExtraLineupType() {
|
||||||
bitField0_ &= ~0x00000008;
|
bitField0_ &= ~0x00000020;
|
||||||
extraLineupType = 0;
|
extraLineupType = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -235,7 +319,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeInfo setExtraLineupTypeValue(final int value) {
|
public ChallengeInfo setExtraLineupTypeValue(final int value) {
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000020;
|
||||||
extraLineupType = value;
|
extraLineupType = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -246,7 +330,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeInfo setExtraLineupType(final ExtraLineupTypeOuterClass.ExtraLineupType value) {
|
public ChallengeInfo setExtraLineupType(final ExtraLineupTypeOuterClass.ExtraLineupType value) {
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000020;
|
||||||
extraLineupType = value.getNumber();
|
extraLineupType = value.getNumber();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -256,7 +340,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
* @return whether the storyInfo field is set
|
* @return whether the storyInfo field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasStoryInfo() {
|
public boolean hasStoryInfo() {
|
||||||
return (bitField0_ & 0x00000010) != 0;
|
return (bitField0_ & 0x00000040) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -264,7 +348,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeInfo clearStoryInfo() {
|
public ChallengeInfo clearStoryInfo() {
|
||||||
bitField0_ &= ~0x00000010;
|
bitField0_ &= ~0x00000040;
|
||||||
storyInfo.clear();
|
storyInfo.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -293,7 +377,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
* @return internal storage object for modifications
|
* @return internal storage object for modifications
|
||||||
*/
|
*/
|
||||||
public ChallengeStoryInfoOuterClass.ChallengeStoryInfo getMutableStoryInfo() {
|
public ChallengeStoryInfoOuterClass.ChallengeStoryInfo getMutableStoryInfo() {
|
||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000040;
|
||||||
return storyInfo;
|
return storyInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,7 +387,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeInfo setStoryInfo(final ChallengeStoryInfoOuterClass.ChallengeStoryInfo value) {
|
public ChallengeInfo setStoryInfo(final ChallengeStoryInfoOuterClass.ChallengeStoryInfo value) {
|
||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000040;
|
||||||
storyInfo.copyFrom(value);
|
storyInfo.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -315,6 +399,8 @@ public final class ChallengeInfoOuterClass {
|
|||||||
bitField0_ = other.bitField0_;
|
bitField0_ = other.bitField0_;
|
||||||
challengeId = other.challengeId;
|
challengeId = other.challengeId;
|
||||||
roundCount = other.roundCount;
|
roundCount = other.roundCount;
|
||||||
|
score = other.score;
|
||||||
|
scoreTwo = other.scoreTwo;
|
||||||
status = other.status;
|
status = other.status;
|
||||||
extraLineupType = other.extraLineupType;
|
extraLineupType = other.extraLineupType;
|
||||||
storyInfo.copyFrom(other.storyInfo);
|
storyInfo.copyFrom(other.storyInfo);
|
||||||
@@ -334,6 +420,12 @@ public final class ChallengeInfoOuterClass {
|
|||||||
if (other.hasRoundCount()) {
|
if (other.hasRoundCount()) {
|
||||||
setRoundCount(other.roundCount);
|
setRoundCount(other.roundCount);
|
||||||
}
|
}
|
||||||
|
if (other.hasScore()) {
|
||||||
|
setScore(other.score);
|
||||||
|
}
|
||||||
|
if (other.hasScoreTwo()) {
|
||||||
|
setScoreTwo(other.scoreTwo);
|
||||||
|
}
|
||||||
if (other.hasStatus()) {
|
if (other.hasStatus()) {
|
||||||
setStatusValue(other.status);
|
setStatusValue(other.status);
|
||||||
}
|
}
|
||||||
@@ -355,6 +447,8 @@ public final class ChallengeInfoOuterClass {
|
|||||||
bitField0_ = 0;
|
bitField0_ = 0;
|
||||||
challengeId = 0;
|
challengeId = 0;
|
||||||
roundCount = 0;
|
roundCount = 0;
|
||||||
|
score = 0;
|
||||||
|
scoreTwo = 0;
|
||||||
status = 0;
|
status = 0;
|
||||||
extraLineupType = 0;
|
extraLineupType = 0;
|
||||||
storyInfo.clear();
|
storyInfo.clear();
|
||||||
@@ -384,6 +478,8 @@ public final class ChallengeInfoOuterClass {
|
|||||||
return bitField0_ == other.bitField0_
|
return bitField0_ == other.bitField0_
|
||||||
&& (!hasChallengeId() || challengeId == other.challengeId)
|
&& (!hasChallengeId() || challengeId == other.challengeId)
|
||||||
&& (!hasRoundCount() || roundCount == other.roundCount)
|
&& (!hasRoundCount() || roundCount == other.roundCount)
|
||||||
|
&& (!hasScore() || score == other.score)
|
||||||
|
&& (!hasScoreTwo() || scoreTwo == other.scoreTwo)
|
||||||
&& (!hasStatus() || status == other.status)
|
&& (!hasStatus() || status == other.status)
|
||||||
&& (!hasExtraLineupType() || extraLineupType == other.extraLineupType)
|
&& (!hasExtraLineupType() || extraLineupType == other.extraLineupType)
|
||||||
&& (!hasStoryInfo() || storyInfo.equals(other.storyInfo));
|
&& (!hasStoryInfo() || storyInfo.equals(other.storyInfo));
|
||||||
@@ -400,14 +496,22 @@ public final class ChallengeInfoOuterClass {
|
|||||||
output.writeUInt32NoTag(roundCount);
|
output.writeUInt32NoTag(roundCount);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000004) != 0) {
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeRawByte((byte) 64);
|
||||||
|
output.writeUInt32NoTag(score);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
|
output.writeRawByte((byte) 80);
|
||||||
|
output.writeUInt32NoTag(scoreTwo);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
output.writeRawByte((byte) 48);
|
output.writeRawByte((byte) 48);
|
||||||
output.writeEnumNoTag(status);
|
output.writeEnumNoTag(status);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000008) != 0) {
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
output.writeRawByte((byte) 120);
|
output.writeRawByte((byte) 120);
|
||||||
output.writeEnumNoTag(extraLineupType);
|
output.writeEnumNoTag(extraLineupType);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000010) != 0) {
|
if ((bitField0_ & 0x00000040) != 0) {
|
||||||
output.writeRawByte((byte) 106);
|
output.writeRawByte((byte) 106);
|
||||||
output.writeMessageNoTag(storyInfo);
|
output.writeMessageNoTag(storyInfo);
|
||||||
}
|
}
|
||||||
@@ -423,12 +527,18 @@ public final class ChallengeInfoOuterClass {
|
|||||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(roundCount);
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(roundCount);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000004) != 0) {
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
size += 1 + ProtoSink.computeEnumSizeNoTag(status);
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(score);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000008) != 0) {
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
size += 1 + ProtoSink.computeEnumSizeNoTag(extraLineupType);
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(scoreTwo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000010) != 0) {
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeEnumSizeNoTag(status);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeEnumSizeNoTag(extraLineupType);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000040) != 0) {
|
||||||
size += 1 + ProtoSink.computeMessageSizeNoTag(storyInfo);
|
size += 1 + ProtoSink.computeMessageSizeNoTag(storyInfo);
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
@@ -455,6 +565,24 @@ public final class ChallengeInfoOuterClass {
|
|||||||
roundCount = input.readUInt32();
|
roundCount = input.readUInt32();
|
||||||
bitField0_ |= 0x00000002;
|
bitField0_ |= 0x00000002;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
|
if (tag != 64) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 64: {
|
||||||
|
// score
|
||||||
|
score = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 80) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 80: {
|
||||||
|
// scoreTwo
|
||||||
|
scoreTwo = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
tag = input.readTag();
|
||||||
if (tag != 48) {
|
if (tag != 48) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -464,7 +592,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
final int value = input.readInt32();
|
final int value = input.readInt32();
|
||||||
if (ChallengeStatusOuterClass.ChallengeStatus.forNumber(value) != null) {
|
if (ChallengeStatusOuterClass.ChallengeStatus.forNumber(value) != null) {
|
||||||
status = value;
|
status = value;
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000010;
|
||||||
}
|
}
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 120) {
|
if (tag != 120) {
|
||||||
@@ -476,7 +604,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
final int value = input.readInt32();
|
final int value = input.readInt32();
|
||||||
if (ExtraLineupTypeOuterClass.ExtraLineupType.forNumber(value) != null) {
|
if (ExtraLineupTypeOuterClass.ExtraLineupType.forNumber(value) != null) {
|
||||||
extraLineupType = value;
|
extraLineupType = value;
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000020;
|
||||||
}
|
}
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 106) {
|
if (tag != 106) {
|
||||||
@@ -486,7 +614,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
case 106: {
|
case 106: {
|
||||||
// storyInfo
|
// storyInfo
|
||||||
input.readMessage(storyInfo);
|
input.readMessage(storyInfo);
|
||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000040;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 0) {
|
if (tag != 0) {
|
||||||
break;
|
break;
|
||||||
@@ -516,12 +644,18 @@ public final class ChallengeInfoOuterClass {
|
|||||||
output.writeUInt32(FieldNames.roundCount, roundCount);
|
output.writeUInt32(FieldNames.roundCount, roundCount);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000004) != 0) {
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
output.writeEnum(FieldNames.status, status, ChallengeStatusOuterClass.ChallengeStatus.converter());
|
output.writeUInt32(FieldNames.score, score);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000008) != 0) {
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
output.writeEnum(FieldNames.extraLineupType, extraLineupType, ExtraLineupTypeOuterClass.ExtraLineupType.converter());
|
output.writeUInt32(FieldNames.scoreTwo, scoreTwo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000010) != 0) {
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
output.writeEnum(FieldNames.status, status, ChallengeStatusOuterClass.ChallengeStatus.converter());
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
|
output.writeEnum(FieldNames.extraLineupType, extraLineupType, ExtraLineupTypeOuterClass.ExtraLineupType.converter());
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000040) != 0) {
|
||||||
output.writeMessage(FieldNames.storyInfo, storyInfo);
|
output.writeMessage(FieldNames.storyInfo, storyInfo);
|
||||||
}
|
}
|
||||||
output.endObject();
|
output.endObject();
|
||||||
@@ -558,13 +692,36 @@ public final class ChallengeInfoOuterClass {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 109264530: {
|
||||||
|
if (input.isAtField(FieldNames.score)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
score = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case -485512614:
|
||||||
|
case 2129303327: {
|
||||||
|
if (input.isAtField(FieldNames.scoreTwo)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
scoreTwo = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case -892481550: {
|
case -892481550: {
|
||||||
if (input.isAtField(FieldNames.status)) {
|
if (input.isAtField(FieldNames.status)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
final ChallengeStatusOuterClass.ChallengeStatus value = input.readEnum(ChallengeStatusOuterClass.ChallengeStatus.converter());
|
final ChallengeStatusOuterClass.ChallengeStatus value = input.readEnum(ChallengeStatusOuterClass.ChallengeStatus.converter());
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
status = value.getNumber();
|
status = value.getNumber();
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000010;
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownEnumValue();
|
input.skipUnknownEnumValue();
|
||||||
}
|
}
|
||||||
@@ -581,7 +738,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
final ExtraLineupTypeOuterClass.ExtraLineupType value = input.readEnum(ExtraLineupTypeOuterClass.ExtraLineupType.converter());
|
final ExtraLineupTypeOuterClass.ExtraLineupType value = input.readEnum(ExtraLineupTypeOuterClass.ExtraLineupType.converter());
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
extraLineupType = value.getNumber();
|
extraLineupType = value.getNumber();
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000020;
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownEnumValue();
|
input.skipUnknownEnumValue();
|
||||||
}
|
}
|
||||||
@@ -596,7 +753,7 @@ public final class ChallengeInfoOuterClass {
|
|||||||
if (input.isAtField(FieldNames.storyInfo)) {
|
if (input.isAtField(FieldNames.storyInfo)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readMessage(storyInfo);
|
input.readMessage(storyInfo);
|
||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000040;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -659,6 +816,10 @@ public final class ChallengeInfoOuterClass {
|
|||||||
|
|
||||||
static final FieldName roundCount = FieldName.forField("roundCount", "round_count");
|
static final FieldName roundCount = FieldName.forField("roundCount", "round_count");
|
||||||
|
|
||||||
|
static final FieldName score = FieldName.forField("score");
|
||||||
|
|
||||||
|
static final FieldName scoreTwo = FieldName.forField("scoreTwo", "score_two");
|
||||||
|
|
||||||
static final FieldName status = FieldName.forField("status");
|
static final FieldName status = FieldName.forField("status");
|
||||||
|
|
||||||
static final FieldName extraLineupType = FieldName.forField("extraLineupType", "extra_lineup_type");
|
static final FieldName extraLineupType = FieldName.forField("extraLineupType", "extra_lineup_type");
|
||||||
|
|||||||
@@ -18,6 +18,11 @@ public final class ChallengeOuterClass {
|
|||||||
public static final class Challenge extends ProtoMessage<Challenge> implements Cloneable {
|
public static final class Challenge extends ProtoMessage<Challenge> implements Cloneable {
|
||||||
private static final long serialVersionUID = 0L;
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 5;</code>
|
||||||
|
*/
|
||||||
|
private int scoreTwo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional uint32 stars = 10;</code>
|
* <code>optional uint32 stars = 10;</code>
|
||||||
*/
|
*/
|
||||||
@@ -33,6 +38,11 @@ public final class ChallengeOuterClass {
|
|||||||
*/
|
*/
|
||||||
private int takenReward;
|
private int takenReward;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score = 15;</code>
|
||||||
|
*/
|
||||||
|
private int score;
|
||||||
|
|
||||||
private Challenge() {
|
private Challenge() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,12 +53,49 @@ public final class ChallengeOuterClass {
|
|||||||
return new Challenge();
|
return new Challenge();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 5;</code>
|
||||||
|
* @return whether the scoreTwo field is set
|
||||||
|
*/
|
||||||
|
public boolean hasScoreTwo() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 5;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public Challenge clearScoreTwo() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
scoreTwo = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 5;</code>
|
||||||
|
* @return the scoreTwo
|
||||||
|
*/
|
||||||
|
public int getScoreTwo() {
|
||||||
|
return scoreTwo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 5;</code>
|
||||||
|
* @param value the scoreTwo to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public Challenge setScoreTwo(final int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
scoreTwo = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional uint32 stars = 10;</code>
|
* <code>optional uint32 stars = 10;</code>
|
||||||
* @return whether the stars field is set
|
* @return whether the stars field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasStars() {
|
public boolean hasStars() {
|
||||||
return (bitField0_ & 0x00000001) != 0;
|
return (bitField0_ & 0x00000002) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,7 +103,7 @@ public final class ChallengeOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public Challenge clearStars() {
|
public Challenge clearStars() {
|
||||||
bitField0_ &= ~0x00000001;
|
bitField0_ &= ~0x00000002;
|
||||||
stars = 0;
|
stars = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -75,7 +122,7 @@ public final class ChallengeOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public Challenge setStars(final int value) {
|
public Challenge setStars(final int value) {
|
||||||
bitField0_ |= 0x00000001;
|
bitField0_ |= 0x00000002;
|
||||||
stars = value;
|
stars = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -85,7 +132,7 @@ public final class ChallengeOuterClass {
|
|||||||
* @return whether the challengeId field is set
|
* @return whether the challengeId field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasChallengeId() {
|
public boolean hasChallengeId() {
|
||||||
return (bitField0_ & 0x00000002) != 0;
|
return (bitField0_ & 0x00000004) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -93,7 +140,7 @@ public final class ChallengeOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public Challenge clearChallengeId() {
|
public Challenge clearChallengeId() {
|
||||||
bitField0_ &= ~0x00000002;
|
bitField0_ &= ~0x00000004;
|
||||||
challengeId = 0;
|
challengeId = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -112,7 +159,7 @@ public final class ChallengeOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public Challenge setChallengeId(final int value) {
|
public Challenge setChallengeId(final int value) {
|
||||||
bitField0_ |= 0x00000002;
|
bitField0_ |= 0x00000004;
|
||||||
challengeId = value;
|
challengeId = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -122,7 +169,7 @@ public final class ChallengeOuterClass {
|
|||||||
* @return whether the takenReward field is set
|
* @return whether the takenReward field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasTakenReward() {
|
public boolean hasTakenReward() {
|
||||||
return (bitField0_ & 0x00000004) != 0;
|
return (bitField0_ & 0x00000008) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -130,7 +177,7 @@ public final class ChallengeOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public Challenge clearTakenReward() {
|
public Challenge clearTakenReward() {
|
||||||
bitField0_ &= ~0x00000004;
|
bitField0_ &= ~0x00000008;
|
||||||
takenReward = 0;
|
takenReward = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -149,19 +196,58 @@ public final class ChallengeOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public Challenge setTakenReward(final int value) {
|
public Challenge setTakenReward(final int value) {
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000008;
|
||||||
takenReward = value;
|
takenReward = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score = 15;</code>
|
||||||
|
* @return whether the score field is set
|
||||||
|
*/
|
||||||
|
public boolean hasScore() {
|
||||||
|
return (bitField0_ & 0x00000010) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score = 15;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public Challenge clearScore() {
|
||||||
|
bitField0_ &= ~0x00000010;
|
||||||
|
score = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score = 15;</code>
|
||||||
|
* @return the score
|
||||||
|
*/
|
||||||
|
public int getScore() {
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score = 15;</code>
|
||||||
|
* @param value the score to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public Challenge setScore(final int value) {
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
score = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Challenge copyFrom(final Challenge other) {
|
public Challenge copyFrom(final Challenge other) {
|
||||||
cachedSize = other.cachedSize;
|
cachedSize = other.cachedSize;
|
||||||
if ((bitField0_ | other.bitField0_) != 0) {
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
bitField0_ = other.bitField0_;
|
bitField0_ = other.bitField0_;
|
||||||
|
scoreTwo = other.scoreTwo;
|
||||||
stars = other.stars;
|
stars = other.stars;
|
||||||
challengeId = other.challengeId;
|
challengeId = other.challengeId;
|
||||||
takenReward = other.takenReward;
|
takenReward = other.takenReward;
|
||||||
|
score = other.score;
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -172,6 +258,9 @@ public final class ChallengeOuterClass {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
cachedSize = -1;
|
cachedSize = -1;
|
||||||
|
if (other.hasScoreTwo()) {
|
||||||
|
setScoreTwo(other.scoreTwo);
|
||||||
|
}
|
||||||
if (other.hasStars()) {
|
if (other.hasStars()) {
|
||||||
setStars(other.stars);
|
setStars(other.stars);
|
||||||
}
|
}
|
||||||
@@ -181,6 +270,9 @@ public final class ChallengeOuterClass {
|
|||||||
if (other.hasTakenReward()) {
|
if (other.hasTakenReward()) {
|
||||||
setTakenReward(other.takenReward);
|
setTakenReward(other.takenReward);
|
||||||
}
|
}
|
||||||
|
if (other.hasScore()) {
|
||||||
|
setScore(other.score);
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,9 +283,11 @@ public final class ChallengeOuterClass {
|
|||||||
}
|
}
|
||||||
cachedSize = -1;
|
cachedSize = -1;
|
||||||
bitField0_ = 0;
|
bitField0_ = 0;
|
||||||
|
scoreTwo = 0;
|
||||||
stars = 0;
|
stars = 0;
|
||||||
challengeId = 0;
|
challengeId = 0;
|
||||||
takenReward = 0;
|
takenReward = 0;
|
||||||
|
score = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,39 +311,55 @@ public final class ChallengeOuterClass {
|
|||||||
}
|
}
|
||||||
Challenge other = (Challenge) o;
|
Challenge other = (Challenge) o;
|
||||||
return bitField0_ == other.bitField0_
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasScoreTwo() || scoreTwo == other.scoreTwo)
|
||||||
&& (!hasStars() || stars == other.stars)
|
&& (!hasStars() || stars == other.stars)
|
||||||
&& (!hasChallengeId() || challengeId == other.challengeId)
|
&& (!hasChallengeId() || challengeId == other.challengeId)
|
||||||
&& (!hasTakenReward() || takenReward == other.takenReward);
|
&& (!hasTakenReward() || takenReward == other.takenReward)
|
||||||
|
&& (!hasScore() || score == other.score);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeTo(final ProtoSink output) throws IOException {
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
if ((bitField0_ & 0x00000001) != 0) {
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRawByte((byte) 40);
|
||||||
|
output.writeUInt32NoTag(scoreTwo);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
output.writeRawByte((byte) 80);
|
output.writeRawByte((byte) 80);
|
||||||
output.writeUInt32NoTag(stars);
|
output.writeUInt32NoTag(stars);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000002) != 0) {
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
output.writeRawByte((byte) 104);
|
output.writeRawByte((byte) 104);
|
||||||
output.writeUInt32NoTag(challengeId);
|
output.writeUInt32NoTag(challengeId);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000004) != 0) {
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
output.writeRawByte((byte) 112);
|
output.writeRawByte((byte) 112);
|
||||||
output.writeUInt32NoTag(takenReward);
|
output.writeUInt32NoTag(takenReward);
|
||||||
}
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
output.writeRawByte((byte) 120);
|
||||||
|
output.writeUInt32NoTag(score);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int computeSerializedSize() {
|
protected int computeSerializedSize() {
|
||||||
int size = 0;
|
int size = 0;
|
||||||
if ((bitField0_ & 0x00000001) != 0) {
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(stars);
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(scoreTwo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000002) != 0) {
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(challengeId);
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(stars);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000004) != 0) {
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(challengeId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(takenReward);
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(takenReward);
|
||||||
}
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(score);
|
||||||
|
}
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,10 +370,19 @@ public final class ChallengeOuterClass {
|
|||||||
int tag = input.readTag();
|
int tag = input.readTag();
|
||||||
while (true) {
|
while (true) {
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
|
case 40: {
|
||||||
|
// scoreTwo
|
||||||
|
scoreTwo = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 80) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
case 80: {
|
case 80: {
|
||||||
// stars
|
// stars
|
||||||
stars = input.readUInt32();
|
stars = input.readUInt32();
|
||||||
bitField0_ |= 0x00000001;
|
bitField0_ |= 0x00000002;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 104) {
|
if (tag != 104) {
|
||||||
break;
|
break;
|
||||||
@@ -272,7 +391,7 @@ public final class ChallengeOuterClass {
|
|||||||
case 104: {
|
case 104: {
|
||||||
// challengeId
|
// challengeId
|
||||||
challengeId = input.readUInt32();
|
challengeId = input.readUInt32();
|
||||||
bitField0_ |= 0x00000002;
|
bitField0_ |= 0x00000004;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 112) {
|
if (tag != 112) {
|
||||||
break;
|
break;
|
||||||
@@ -281,7 +400,16 @@ public final class ChallengeOuterClass {
|
|||||||
case 112: {
|
case 112: {
|
||||||
// takenReward
|
// takenReward
|
||||||
takenReward = input.readUInt32();
|
takenReward = input.readUInt32();
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000008;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 120) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 120: {
|
||||||
|
// score
|
||||||
|
score = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 0) {
|
if (tag != 0) {
|
||||||
break;
|
break;
|
||||||
@@ -305,14 +433,20 @@ public final class ChallengeOuterClass {
|
|||||||
public void writeTo(final JsonSink output) throws IOException {
|
public void writeTo(final JsonSink output) throws IOException {
|
||||||
output.beginObject();
|
output.beginObject();
|
||||||
if ((bitField0_ & 0x00000001) != 0) {
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
output.writeUInt32(FieldNames.stars, stars);
|
output.writeUInt32(FieldNames.scoreTwo, scoreTwo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000002) != 0) {
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
output.writeUInt32(FieldNames.challengeId, challengeId);
|
output.writeUInt32(FieldNames.stars, stars);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000004) != 0) {
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.challengeId, challengeId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
output.writeUInt32(FieldNames.takenReward, takenReward);
|
output.writeUInt32(FieldNames.takenReward, takenReward);
|
||||||
}
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.score, score);
|
||||||
|
}
|
||||||
output.endObject();
|
output.endObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,11 +457,23 @@ public final class ChallengeOuterClass {
|
|||||||
}
|
}
|
||||||
while (!input.isAtEnd()) {
|
while (!input.isAtEnd()) {
|
||||||
switch (input.readFieldHash()) {
|
switch (input.readFieldHash()) {
|
||||||
|
case -485512614:
|
||||||
|
case 2129303327: {
|
||||||
|
if (input.isAtField(FieldNames.scoreTwo)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
scoreTwo = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 109757537: {
|
case 109757537: {
|
||||||
if (input.isAtField(FieldNames.stars)) {
|
if (input.isAtField(FieldNames.stars)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
stars = input.readUInt32();
|
stars = input.readUInt32();
|
||||||
bitField0_ |= 0x00000001;
|
bitField0_ |= 0x00000002;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -339,7 +485,7 @@ public final class ChallengeOuterClass {
|
|||||||
if (input.isAtField(FieldNames.challengeId)) {
|
if (input.isAtField(FieldNames.challengeId)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
challengeId = input.readUInt32();
|
challengeId = input.readUInt32();
|
||||||
bitField0_ |= 0x00000002;
|
bitField0_ |= 0x00000004;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -351,7 +497,18 @@ public final class ChallengeOuterClass {
|
|||||||
if (input.isAtField(FieldNames.takenReward)) {
|
if (input.isAtField(FieldNames.takenReward)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
takenReward = input.readUInt32();
|
takenReward = input.readUInt32();
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000008;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 109264530: {
|
||||||
|
if (input.isAtField(FieldNames.score)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
score = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -410,11 +567,15 @@ public final class ChallengeOuterClass {
|
|||||||
* Contains name constants used for serializing JSON
|
* Contains name constants used for serializing JSON
|
||||||
*/
|
*/
|
||||||
static class FieldNames {
|
static class FieldNames {
|
||||||
|
static final FieldName scoreTwo = FieldName.forField("scoreTwo", "score_two");
|
||||||
|
|
||||||
static final FieldName stars = FieldName.forField("stars");
|
static final FieldName stars = FieldName.forField("stars");
|
||||||
|
|
||||||
static final FieldName challengeId = FieldName.forField("challengeId", "challenge_id");
|
static final FieldName challengeId = FieldName.forField("challengeId", "challenge_id");
|
||||||
|
|
||||||
static final FieldName takenReward = FieldName.forField("takenReward", "taken_reward");
|
static final FieldName takenReward = FieldName.forField("takenReward", "taken_reward");
|
||||||
|
|
||||||
|
static final FieldName score = FieldName.forField("score");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,11 +18,21 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
public static final class ChallengeSettleNotify extends ProtoMessage<ChallengeSettleNotify> implements Cloneable {
|
public static final class ChallengeSettleNotify extends ProtoMessage<ChallengeSettleNotify> implements Cloneable {
|
||||||
private static final long serialVersionUID = 0L;
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 6;</code>
|
||||||
|
*/
|
||||||
|
private int scoreTwo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional uint32 challenge_id = 9;</code>
|
* <code>optional uint32 challenge_id = 9;</code>
|
||||||
*/
|
*/
|
||||||
private int challengeId;
|
private int challengeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 challenge_score = 11;</code>
|
||||||
|
*/
|
||||||
|
private int challengeScore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional uint32 stars = 15;</code>
|
* <code>optional uint32 stars = 15;</code>
|
||||||
*/
|
*/
|
||||||
@@ -48,12 +58,49 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
return new ChallengeSettleNotify();
|
return new ChallengeSettleNotify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 6;</code>
|
||||||
|
* @return whether the scoreTwo field is set
|
||||||
|
*/
|
||||||
|
public boolean hasScoreTwo() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 6;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public ChallengeSettleNotify clearScoreTwo() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
scoreTwo = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 6;</code>
|
||||||
|
* @return the scoreTwo
|
||||||
|
*/
|
||||||
|
public int getScoreTwo() {
|
||||||
|
return scoreTwo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 score_two = 6;</code>
|
||||||
|
* @param value the scoreTwo to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public ChallengeSettleNotify setScoreTwo(final int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
scoreTwo = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional uint32 challenge_id = 9;</code>
|
* <code>optional uint32 challenge_id = 9;</code>
|
||||||
* @return whether the challengeId field is set
|
* @return whether the challengeId field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasChallengeId() {
|
public boolean hasChallengeId() {
|
||||||
return (bitField0_ & 0x00000001) != 0;
|
return (bitField0_ & 0x00000002) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,7 +108,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeSettleNotify clearChallengeId() {
|
public ChallengeSettleNotify clearChallengeId() {
|
||||||
bitField0_ &= ~0x00000001;
|
bitField0_ &= ~0x00000002;
|
||||||
challengeId = 0;
|
challengeId = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -80,17 +127,54 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeSettleNotify setChallengeId(final int value) {
|
public ChallengeSettleNotify setChallengeId(final int value) {
|
||||||
bitField0_ |= 0x00000001;
|
bitField0_ |= 0x00000002;
|
||||||
challengeId = value;
|
challengeId = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 challenge_score = 11;</code>
|
||||||
|
* @return whether the challengeScore field is set
|
||||||
|
*/
|
||||||
|
public boolean hasChallengeScore() {
|
||||||
|
return (bitField0_ & 0x00000004) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 challenge_score = 11;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public ChallengeSettleNotify clearChallengeScore() {
|
||||||
|
bitField0_ &= ~0x00000004;
|
||||||
|
challengeScore = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 challenge_score = 11;</code>
|
||||||
|
* @return the challengeScore
|
||||||
|
*/
|
||||||
|
public int getChallengeScore() {
|
||||||
|
return challengeScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 challenge_score = 11;</code>
|
||||||
|
* @param value the challengeScore to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public ChallengeSettleNotify setChallengeScore(final int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
challengeScore = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional uint32 stars = 15;</code>
|
* <code>optional uint32 stars = 15;</code>
|
||||||
* @return whether the stars field is set
|
* @return whether the stars field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasStars() {
|
public boolean hasStars() {
|
||||||
return (bitField0_ & 0x00000002) != 0;
|
return (bitField0_ & 0x00000008) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -98,7 +182,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeSettleNotify clearStars() {
|
public ChallengeSettleNotify clearStars() {
|
||||||
bitField0_ &= ~0x00000002;
|
bitField0_ &= ~0x00000008;
|
||||||
stars = 0;
|
stars = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -117,7 +201,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeSettleNotify setStars(final int value) {
|
public ChallengeSettleNotify setStars(final int value) {
|
||||||
bitField0_ |= 0x00000002;
|
bitField0_ |= 0x00000008;
|
||||||
stars = value;
|
stars = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -127,7 +211,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* @return whether the isWin field is set
|
* @return whether the isWin field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasIsWin() {
|
public boolean hasIsWin() {
|
||||||
return (bitField0_ & 0x00000004) != 0;
|
return (bitField0_ & 0x00000010) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -135,7 +219,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeSettleNotify clearIsWin() {
|
public ChallengeSettleNotify clearIsWin() {
|
||||||
bitField0_ &= ~0x00000004;
|
bitField0_ &= ~0x00000010;
|
||||||
isWin = false;
|
isWin = false;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -154,7 +238,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeSettleNotify setIsWin(final boolean value) {
|
public ChallengeSettleNotify setIsWin(final boolean value) {
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000010;
|
||||||
isWin = value;
|
isWin = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -164,7 +248,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* @return whether the reward field is set
|
* @return whether the reward field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasReward() {
|
public boolean hasReward() {
|
||||||
return (bitField0_ & 0x00000008) != 0;
|
return (bitField0_ & 0x00000020) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -172,7 +256,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeSettleNotify clearReward() {
|
public ChallengeSettleNotify clearReward() {
|
||||||
bitField0_ &= ~0x00000008;
|
bitField0_ &= ~0x00000020;
|
||||||
reward.clear();
|
reward.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -201,7 +285,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* @return internal storage object for modifications
|
* @return internal storage object for modifications
|
||||||
*/
|
*/
|
||||||
public ItemListOuterClass.ItemList getMutableReward() {
|
public ItemListOuterClass.ItemList getMutableReward() {
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000020;
|
||||||
return reward;
|
return reward;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,7 +295,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ChallengeSettleNotify setReward(final ItemListOuterClass.ItemList value) {
|
public ChallengeSettleNotify setReward(final ItemListOuterClass.ItemList value) {
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000020;
|
||||||
reward.copyFrom(value);
|
reward.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -221,7 +305,9 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
cachedSize = other.cachedSize;
|
cachedSize = other.cachedSize;
|
||||||
if ((bitField0_ | other.bitField0_) != 0) {
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
bitField0_ = other.bitField0_;
|
bitField0_ = other.bitField0_;
|
||||||
|
scoreTwo = other.scoreTwo;
|
||||||
challengeId = other.challengeId;
|
challengeId = other.challengeId;
|
||||||
|
challengeScore = other.challengeScore;
|
||||||
stars = other.stars;
|
stars = other.stars;
|
||||||
isWin = other.isWin;
|
isWin = other.isWin;
|
||||||
reward.copyFrom(other.reward);
|
reward.copyFrom(other.reward);
|
||||||
@@ -235,9 +321,15 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
cachedSize = -1;
|
cachedSize = -1;
|
||||||
|
if (other.hasScoreTwo()) {
|
||||||
|
setScoreTwo(other.scoreTwo);
|
||||||
|
}
|
||||||
if (other.hasChallengeId()) {
|
if (other.hasChallengeId()) {
|
||||||
setChallengeId(other.challengeId);
|
setChallengeId(other.challengeId);
|
||||||
}
|
}
|
||||||
|
if (other.hasChallengeScore()) {
|
||||||
|
setChallengeScore(other.challengeScore);
|
||||||
|
}
|
||||||
if (other.hasStars()) {
|
if (other.hasStars()) {
|
||||||
setStars(other.stars);
|
setStars(other.stars);
|
||||||
}
|
}
|
||||||
@@ -257,7 +349,9 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
}
|
}
|
||||||
cachedSize = -1;
|
cachedSize = -1;
|
||||||
bitField0_ = 0;
|
bitField0_ = 0;
|
||||||
|
scoreTwo = 0;
|
||||||
challengeId = 0;
|
challengeId = 0;
|
||||||
|
challengeScore = 0;
|
||||||
stars = 0;
|
stars = 0;
|
||||||
isWin = false;
|
isWin = false;
|
||||||
reward.clear();
|
reward.clear();
|
||||||
@@ -285,7 +379,9 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
}
|
}
|
||||||
ChallengeSettleNotify other = (ChallengeSettleNotify) o;
|
ChallengeSettleNotify other = (ChallengeSettleNotify) o;
|
||||||
return bitField0_ == other.bitField0_
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasScoreTwo() || scoreTwo == other.scoreTwo)
|
||||||
&& (!hasChallengeId() || challengeId == other.challengeId)
|
&& (!hasChallengeId() || challengeId == other.challengeId)
|
||||||
|
&& (!hasChallengeScore() || challengeScore == other.challengeScore)
|
||||||
&& (!hasStars() || stars == other.stars)
|
&& (!hasStars() || stars == other.stars)
|
||||||
&& (!hasIsWin() || isWin == other.isWin)
|
&& (!hasIsWin() || isWin == other.isWin)
|
||||||
&& (!hasReward() || reward.equals(other.reward));
|
&& (!hasReward() || reward.equals(other.reward));
|
||||||
@@ -294,18 +390,26 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
@Override
|
@Override
|
||||||
public void writeTo(final ProtoSink output) throws IOException {
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
if ((bitField0_ & 0x00000001) != 0) {
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRawByte((byte) 48);
|
||||||
|
output.writeUInt32NoTag(scoreTwo);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
output.writeRawByte((byte) 72);
|
output.writeRawByte((byte) 72);
|
||||||
output.writeUInt32NoTag(challengeId);
|
output.writeUInt32NoTag(challengeId);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000002) != 0) {
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
|
output.writeRawByte((byte) 88);
|
||||||
|
output.writeUInt32NoTag(challengeScore);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
output.writeRawByte((byte) 120);
|
output.writeRawByte((byte) 120);
|
||||||
output.writeUInt32NoTag(stars);
|
output.writeUInt32NoTag(stars);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000004) != 0) {
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
output.writeRawByte((byte) 104);
|
output.writeRawByte((byte) 104);
|
||||||
output.writeBoolNoTag(isWin);
|
output.writeBoolNoTag(isWin);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000008) != 0) {
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
output.writeRawByte((byte) 66);
|
output.writeRawByte((byte) 66);
|
||||||
output.writeMessageNoTag(reward);
|
output.writeMessageNoTag(reward);
|
||||||
}
|
}
|
||||||
@@ -315,15 +419,21 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
protected int computeSerializedSize() {
|
protected int computeSerializedSize() {
|
||||||
int size = 0;
|
int size = 0;
|
||||||
if ((bitField0_ & 0x00000001) != 0) {
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(challengeId);
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(scoreTwo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000002) != 0) {
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(stars);
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(challengeId);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000004) != 0) {
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
size += 2;
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(challengeScore);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000008) != 0) {
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(stars);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
size += 2;
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
size += 1 + ProtoSink.computeMessageSizeNoTag(reward);
|
size += 1 + ProtoSink.computeMessageSizeNoTag(reward);
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
@@ -336,10 +446,28 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
int tag = input.readTag();
|
int tag = input.readTag();
|
||||||
while (true) {
|
while (true) {
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
|
case 48: {
|
||||||
|
// scoreTwo
|
||||||
|
scoreTwo = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 72) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
case 72: {
|
case 72: {
|
||||||
// challengeId
|
// challengeId
|
||||||
challengeId = input.readUInt32();
|
challengeId = input.readUInt32();
|
||||||
bitField0_ |= 0x00000001;
|
bitField0_ |= 0x00000002;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 88) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 88: {
|
||||||
|
// challengeScore
|
||||||
|
challengeScore = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 120) {
|
if (tag != 120) {
|
||||||
break;
|
break;
|
||||||
@@ -348,7 +476,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
case 120: {
|
case 120: {
|
||||||
// stars
|
// stars
|
||||||
stars = input.readUInt32();
|
stars = input.readUInt32();
|
||||||
bitField0_ |= 0x00000002;
|
bitField0_ |= 0x00000008;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 104) {
|
if (tag != 104) {
|
||||||
break;
|
break;
|
||||||
@@ -357,7 +485,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
case 104: {
|
case 104: {
|
||||||
// isWin
|
// isWin
|
||||||
isWin = input.readBool();
|
isWin = input.readBool();
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000010;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 66) {
|
if (tag != 66) {
|
||||||
break;
|
break;
|
||||||
@@ -366,7 +494,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
case 66: {
|
case 66: {
|
||||||
// reward
|
// reward
|
||||||
input.readMessage(reward);
|
input.readMessage(reward);
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000020;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 0) {
|
if (tag != 0) {
|
||||||
break;
|
break;
|
||||||
@@ -390,15 +518,21 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
public void writeTo(final JsonSink output) throws IOException {
|
public void writeTo(final JsonSink output) throws IOException {
|
||||||
output.beginObject();
|
output.beginObject();
|
||||||
if ((bitField0_ & 0x00000001) != 0) {
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
output.writeUInt32(FieldNames.challengeId, challengeId);
|
output.writeUInt32(FieldNames.scoreTwo, scoreTwo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000002) != 0) {
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
output.writeUInt32(FieldNames.stars, stars);
|
output.writeUInt32(FieldNames.challengeId, challengeId);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000004) != 0) {
|
if ((bitField0_ & 0x00000004) != 0) {
|
||||||
output.writeBool(FieldNames.isWin, isWin);
|
output.writeUInt32(FieldNames.challengeScore, challengeScore);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000008) != 0) {
|
if ((bitField0_ & 0x00000008) != 0) {
|
||||||
|
output.writeUInt32(FieldNames.stars, stars);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
output.writeBool(FieldNames.isWin, isWin);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
output.writeMessage(FieldNames.reward, reward);
|
output.writeMessage(FieldNames.reward, reward);
|
||||||
}
|
}
|
||||||
output.endObject();
|
output.endObject();
|
||||||
@@ -411,12 +545,36 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
}
|
}
|
||||||
while (!input.isAtEnd()) {
|
while (!input.isAtEnd()) {
|
||||||
switch (input.readFieldHash()) {
|
switch (input.readFieldHash()) {
|
||||||
|
case -485512614:
|
||||||
|
case 2129303327: {
|
||||||
|
if (input.isAtField(FieldNames.scoreTwo)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
scoreTwo = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case -689112866:
|
case -689112866:
|
||||||
case 112359031: {
|
case 112359031: {
|
||||||
if (input.isAtField(FieldNames.challengeId)) {
|
if (input.isAtField(FieldNames.challengeId)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
challengeId = input.readUInt32();
|
challengeId = input.readUInt32();
|
||||||
bitField0_ |= 0x00000001;
|
bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 591599599:
|
||||||
|
case 1517684662: {
|
||||||
|
if (input.isAtField(FieldNames.challengeScore)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
challengeScore = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -427,7 +585,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
if (input.isAtField(FieldNames.stars)) {
|
if (input.isAtField(FieldNames.stars)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
stars = input.readUInt32();
|
stars = input.readUInt32();
|
||||||
bitField0_ |= 0x00000002;
|
bitField0_ |= 0x00000008;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -439,7 +597,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
if (input.isAtField(FieldNames.isWin)) {
|
if (input.isAtField(FieldNames.isWin)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
isWin = input.readBool();
|
isWin = input.readBool();
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000010;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -450,7 +608,7 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
if (input.isAtField(FieldNames.reward)) {
|
if (input.isAtField(FieldNames.reward)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readMessage(reward);
|
input.readMessage(reward);
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000020;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -510,8 +668,12 @@ public final class ChallengeSettleNotifyOuterClass {
|
|||||||
* Contains name constants used for serializing JSON
|
* Contains name constants used for serializing JSON
|
||||||
*/
|
*/
|
||||||
static class FieldNames {
|
static class FieldNames {
|
||||||
|
static final FieldName scoreTwo = FieldName.forField("scoreTwo", "score_two");
|
||||||
|
|
||||||
static final FieldName challengeId = FieldName.forField("challengeId", "challenge_id");
|
static final FieldName challengeId = FieldName.forField("challengeId", "challenge_id");
|
||||||
|
|
||||||
|
static final FieldName challengeScore = FieldName.forField("challengeScore", "challenge_score");
|
||||||
|
|
||||||
static final FieldName stars = FieldName.forField("stars");
|
static final FieldName stars = FieldName.forField("stars");
|
||||||
|
|
||||||
static final FieldName isWin = FieldName.forField("isWin", "is_win");
|
static final FieldName isWin = FieldName.forField("isWin", "is_win");
|
||||||
|
|||||||
@@ -64,6 +64,11 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
*/
|
*/
|
||||||
private final RepeatedMessage<BattleEventBattleInfoOuterClass.BattleEventBattleInfo> eventBattleInfoList = RepeatedMessage.newEmptyInstance(BattleEventBattleInfoOuterClass.BattleEventBattleInfo.getFactory());
|
private final RepeatedMessage<BattleEventBattleInfoOuterClass.BattleEventBattleInfo> eventBattleInfoList = RepeatedMessage.newEmptyInstance(BattleEventBattleInfoOuterClass.BattleEventBattleInfo.getFactory());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .SceneBattleInfo.BattleTargetInfoEntry battle_target_info = 1857;</code>
|
||||||
|
*/
|
||||||
|
private final RepeatedMessage<BattleTargetInfoEntry> battleTargetInfo = RepeatedMessage.newEmptyInstance(BattleTargetInfoEntry.getFactory());
|
||||||
|
|
||||||
private SceneBattleInfo() {
|
private SceneBattleInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,6 +544,74 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .SceneBattleInfo.BattleTargetInfoEntry battle_target_info = 1857;</code>
|
||||||
|
* @return whether the battleTargetInfo field is set
|
||||||
|
*/
|
||||||
|
public boolean hasBattleTargetInfo() {
|
||||||
|
return (bitField0_ & 0x00000200) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .SceneBattleInfo.BattleTargetInfoEntry battle_target_info = 1857;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SceneBattleInfo clearBattleTargetInfo() {
|
||||||
|
bitField0_ &= ~0x00000200;
|
||||||
|
battleTargetInfo.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .SceneBattleInfo.BattleTargetInfoEntry battle_target_info = 1857;</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 #getMutableBattleTargetInfo()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public RepeatedMessage<BattleTargetInfoEntry> getBattleTargetInfo() {
|
||||||
|
return battleTargetInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .SceneBattleInfo.BattleTargetInfoEntry battle_target_info = 1857;</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<BattleTargetInfoEntry> getMutableBattleTargetInfo() {
|
||||||
|
bitField0_ |= 0x00000200;
|
||||||
|
return battleTargetInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .SceneBattleInfo.BattleTargetInfoEntry battle_target_info = 1857;</code>
|
||||||
|
* @param value the battleTargetInfo to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SceneBattleInfo addBattleTargetInfo(final BattleTargetInfoEntry value) {
|
||||||
|
bitField0_ |= 0x00000200;
|
||||||
|
battleTargetInfo.add(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .SceneBattleInfo.BattleTargetInfoEntry battle_target_info = 1857;</code>
|
||||||
|
* @param values the battleTargetInfo to add
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SceneBattleInfo addAllBattleTargetInfo(final BattleTargetInfoEntry... values) {
|
||||||
|
bitField0_ |= 0x00000200;
|
||||||
|
battleTargetInfo.addAll(values);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SceneBattleInfo copyFrom(final SceneBattleInfo other) {
|
public SceneBattleInfo copyFrom(final SceneBattleInfo other) {
|
||||||
cachedSize = other.cachedSize;
|
cachedSize = other.cachedSize;
|
||||||
@@ -553,6 +626,7 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
buffList.copyFrom(other.buffList);
|
buffList.copyFrom(other.buffList);
|
||||||
battleAvatarList.copyFrom(other.battleAvatarList);
|
battleAvatarList.copyFrom(other.battleAvatarList);
|
||||||
eventBattleInfoList.copyFrom(other.eventBattleInfoList);
|
eventBattleInfoList.copyFrom(other.eventBattleInfoList);
|
||||||
|
battleTargetInfo.copyFrom(other.battleTargetInfo);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -590,6 +664,9 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
if (other.hasEventBattleInfoList()) {
|
if (other.hasEventBattleInfoList()) {
|
||||||
getMutableEventBattleInfoList().addAll(other.eventBattleInfoList);
|
getMutableEventBattleInfoList().addAll(other.eventBattleInfoList);
|
||||||
}
|
}
|
||||||
|
if (other.hasBattleTargetInfo()) {
|
||||||
|
getMutableBattleTargetInfo().addAll(other.battleTargetInfo);
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -609,6 +686,7 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
buffList.clear();
|
buffList.clear();
|
||||||
battleAvatarList.clear();
|
battleAvatarList.clear();
|
||||||
eventBattleInfoList.clear();
|
eventBattleInfoList.clear();
|
||||||
|
battleTargetInfo.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -623,6 +701,7 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
buffList.clearQuick();
|
buffList.clearQuick();
|
||||||
battleAvatarList.clearQuick();
|
battleAvatarList.clearQuick();
|
||||||
eventBattleInfoList.clearQuick();
|
eventBattleInfoList.clearQuick();
|
||||||
|
battleTargetInfo.clearQuick();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -644,7 +723,8 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
&& (!hasMonsterWaveList() || monsterWaveList.equals(other.monsterWaveList))
|
&& (!hasMonsterWaveList() || monsterWaveList.equals(other.monsterWaveList))
|
||||||
&& (!hasBuffList() || buffList.equals(other.buffList))
|
&& (!hasBuffList() || buffList.equals(other.buffList))
|
||||||
&& (!hasBattleAvatarList() || battleAvatarList.equals(other.battleAvatarList))
|
&& (!hasBattleAvatarList() || battleAvatarList.equals(other.battleAvatarList))
|
||||||
&& (!hasEventBattleInfoList() || eventBattleInfoList.equals(other.eventBattleInfoList));
|
&& (!hasEventBattleInfoList() || eventBattleInfoList.equals(other.eventBattleInfoList))
|
||||||
|
&& (!hasBattleTargetInfo() || battleTargetInfo.equals(other.battleTargetInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -693,6 +773,12 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
output.writeMessageNoTag(eventBattleInfoList.get(i));
|
output.writeMessageNoTag(eventBattleInfoList.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((bitField0_ & 0x00000200) != 0) {
|
||||||
|
for (int i = 0; i < battleTargetInfo.length(); i++) {
|
||||||
|
output.writeRawLittleEndian16((short) 29834);
|
||||||
|
output.writeMessageNoTag(battleTargetInfo.get(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -725,6 +811,9 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
if ((bitField0_ & 0x00000100) != 0) {
|
if ((bitField0_ & 0x00000100) != 0) {
|
||||||
size += (2 * eventBattleInfoList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(eventBattleInfoList);
|
size += (2 * eventBattleInfoList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(eventBattleInfoList);
|
||||||
}
|
}
|
||||||
|
if ((bitField0_ & 0x00000200) != 0) {
|
||||||
|
size += (2 * battleTargetInfo.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(battleTargetInfo);
|
||||||
|
}
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -808,6 +897,14 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
// eventBattleInfoList
|
// eventBattleInfoList
|
||||||
tag = input.readRepeatedMessage(eventBattleInfoList, tag);
|
tag = input.readRepeatedMessage(eventBattleInfoList, tag);
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000100;
|
||||||
|
if (tag != 14858) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 14858: {
|
||||||
|
// battleTargetInfo
|
||||||
|
tag = input.readRepeatedMessage(battleTargetInfo, tag);
|
||||||
|
bitField0_ |= 0x00000200;
|
||||||
if (tag != 0) {
|
if (tag != 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -856,6 +953,9 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
if ((bitField0_ & 0x00000100) != 0) {
|
if ((bitField0_ & 0x00000100) != 0) {
|
||||||
output.writeRepeatedMessage(FieldNames.eventBattleInfoList, eventBattleInfoList);
|
output.writeRepeatedMessage(FieldNames.eventBattleInfoList, eventBattleInfoList);
|
||||||
}
|
}
|
||||||
|
if ((bitField0_ & 0x00000200) != 0) {
|
||||||
|
output.writeRepeatedMessage(FieldNames.battleTargetInfo, battleTargetInfo);
|
||||||
|
}
|
||||||
output.endObject();
|
output.endObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -974,6 +1074,18 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 1657979063:
|
||||||
|
case 2141477269: {
|
||||||
|
if (input.isAtField(FieldNames.battleTargetInfo)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readRepeatedMessage(battleTargetInfo);
|
||||||
|
bitField0_ |= 0x00000200;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
break;
|
break;
|
||||||
@@ -1014,6 +1126,353 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
return SceneBattleInfoFactory.INSTANCE;
|
return SceneBattleInfoFactory.INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code BattleTargetInfoEntry}
|
||||||
|
*/
|
||||||
|
public static final class BattleTargetInfoEntry extends ProtoMessage<BattleTargetInfoEntry> implements Cloneable {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 key = 1;</code>
|
||||||
|
*/
|
||||||
|
private int key;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .BattleTargetList value = 2;</code>
|
||||||
|
*/
|
||||||
|
private final BattleTargetListOuterClass.BattleTargetList value_ = BattleTargetListOuterClass.BattleTargetList.newInstance();
|
||||||
|
|
||||||
|
private BattleTargetInfoEntry() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a new empty instance of {@code BattleTargetInfoEntry}
|
||||||
|
*/
|
||||||
|
public static BattleTargetInfoEntry newInstance() {
|
||||||
|
return new BattleTargetInfoEntry();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 key = 1;</code>
|
||||||
|
* @return whether the key field is set
|
||||||
|
*/
|
||||||
|
public boolean hasKey() {
|
||||||
|
return (bitField0_ & 0x00000001) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 key = 1;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTargetInfoEntry clearKey() {
|
||||||
|
bitField0_ &= ~0x00000001;
|
||||||
|
key = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 key = 1;</code>
|
||||||
|
* @return the key
|
||||||
|
*/
|
||||||
|
public int getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 key = 1;</code>
|
||||||
|
* @param value the key to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTargetInfoEntry setKey(final int value) {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
key = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .BattleTargetList value = 2;</code>
|
||||||
|
* @return whether the value_ field is set
|
||||||
|
*/
|
||||||
|
public boolean hasValue() {
|
||||||
|
return (bitField0_ & 0x00000002) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .BattleTargetList value = 2;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTargetInfoEntry clearValue() {
|
||||||
|
bitField0_ &= ~0x00000002;
|
||||||
|
value_.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .BattleTargetList value = 2;</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 #getMutableValue()} if you want to modify it.
|
||||||
|
*
|
||||||
|
* @return internal storage object for reading
|
||||||
|
*/
|
||||||
|
public BattleTargetListOuterClass.BattleTargetList getValue() {
|
||||||
|
return value_;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .BattleTargetList value = 2;</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 BattleTargetListOuterClass.BattleTargetList getMutableValue() {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
return value_;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .BattleTargetList value = 2;</code>
|
||||||
|
* @param value the value_ to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public BattleTargetInfoEntry setValue(
|
||||||
|
final BattleTargetListOuterClass.BattleTargetList value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
value_.copyFrom(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetInfoEntry copyFrom(final BattleTargetInfoEntry other) {
|
||||||
|
cachedSize = other.cachedSize;
|
||||||
|
if ((bitField0_ | other.bitField0_) != 0) {
|
||||||
|
bitField0_ = other.bitField0_;
|
||||||
|
key = other.key;
|
||||||
|
value_.copyFrom(other.value_);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetInfoEntry mergeFrom(final BattleTargetInfoEntry other) {
|
||||||
|
if (other.isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
if (other.hasKey()) {
|
||||||
|
setKey(other.key);
|
||||||
|
}
|
||||||
|
if (other.hasValue()) {
|
||||||
|
getMutableValue().mergeFrom(other.value_);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetInfoEntry clear() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
key = 0;
|
||||||
|
value_.clear();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetInfoEntry clearQuick() {
|
||||||
|
if (isEmpty()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
cachedSize = -1;
|
||||||
|
bitField0_ = 0;
|
||||||
|
value_.clearQuick();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(o instanceof BattleTargetInfoEntry)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
BattleTargetInfoEntry other = (BattleTargetInfoEntry) o;
|
||||||
|
return bitField0_ == other.bitField0_
|
||||||
|
&& (!hasKey() || key == other.key)
|
||||||
|
&& (!hasValue() || value_.equals(other.value_));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeTo(final ProtoSink output) throws IOException {
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
output.writeRawByte((byte) 8);
|
||||||
|
output.writeUInt32NoTag(key);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeRawByte((byte) 18);
|
||||||
|
output.writeMessageNoTag(value_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int computeSerializedSize() {
|
||||||
|
int size = 0;
|
||||||
|
if ((bitField0_ & 0x00000001) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(key);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeMessageSizeNoTag(value_);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
|
public BattleTargetInfoEntry mergeFrom(final ProtoSource input) throws IOException {
|
||||||
|
// Enabled Fall-Through Optimization (QuickBuffers)
|
||||||
|
int tag = input.readTag();
|
||||||
|
while (true) {
|
||||||
|
switch (tag) {
|
||||||
|
case 8: {
|
||||||
|
// key
|
||||||
|
key = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
tag = input.readTag();
|
||||||
|
if (tag != 18) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
// value_
|
||||||
|
input.readMessage(value_);
|
||||||
|
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.key, key);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000002) != 0) {
|
||||||
|
output.writeMessage(FieldNames.value_, value_);
|
||||||
|
}
|
||||||
|
output.endObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetInfoEntry mergeFrom(final JsonSource input) throws IOException {
|
||||||
|
if (!input.beginObject()) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
while (!input.isAtEnd()) {
|
||||||
|
switch (input.readFieldHash()) {
|
||||||
|
case 106079: {
|
||||||
|
if (input.isAtField(FieldNames.key)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
key = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 111972721: {
|
||||||
|
if (input.isAtField(FieldNames.value_)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
input.readMessage(value_);
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
input.skipUnknownField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetInfoEntry clone() {
|
||||||
|
return new BattleTargetInfoEntry().copyFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return ((bitField0_) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BattleTargetInfoEntry parseFrom(final byte[] data) throws
|
||||||
|
InvalidProtocolBufferException {
|
||||||
|
return ProtoMessage.mergeFrom(new BattleTargetInfoEntry(), data).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BattleTargetInfoEntry parseFrom(final ProtoSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new BattleTargetInfoEntry(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BattleTargetInfoEntry parseFrom(final JsonSource input) throws IOException {
|
||||||
|
return ProtoMessage.mergeFrom(new BattleTargetInfoEntry(), input).checkInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory for creating BattleTargetInfoEntry messages
|
||||||
|
*/
|
||||||
|
public static MessageFactory<BattleTargetInfoEntry> getFactory() {
|
||||||
|
return BattleTargetInfoEntryFactory.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum BattleTargetInfoEntryFactory implements MessageFactory<BattleTargetInfoEntry> {
|
||||||
|
INSTANCE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BattleTargetInfoEntry create() {
|
||||||
|
return BattleTargetInfoEntry.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains name constants used for serializing JSON
|
||||||
|
*/
|
||||||
|
static class FieldNames {
|
||||||
|
static final FieldName key = FieldName.forField("key");
|
||||||
|
|
||||||
|
static final FieldName value_ = FieldName.forField("value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private enum SceneBattleInfoFactory implements MessageFactory<SceneBattleInfo> {
|
private enum SceneBattleInfoFactory implements MessageFactory<SceneBattleInfo> {
|
||||||
INSTANCE;
|
INSTANCE;
|
||||||
|
|
||||||
@@ -1044,6 +1503,8 @@ public final class SceneBattleInfoOuterClass {
|
|||||||
static final FieldName battleAvatarList = FieldName.forField("battleAvatarList", "battle_avatar_list");
|
static final FieldName battleAvatarList = FieldName.forField("battleAvatarList", "battle_avatar_list");
|
||||||
|
|
||||||
static final FieldName eventBattleInfoList = FieldName.forField("eventBattleInfoList", "event_battle_info_list");
|
static final FieldName eventBattleInfoList = FieldName.forField("eventBattleInfoList", "event_battle_info_list");
|
||||||
|
|
||||||
|
static final FieldName battleTargetInfo = FieldName.forField("battleTargetInfo", "battle_target_info");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import emu.lunarcore.data.GameData;
|
|||||||
import emu.lunarcore.data.GameResource;
|
import emu.lunarcore.data.GameResource;
|
||||||
import emu.lunarcore.data.ResourceType;
|
import emu.lunarcore.data.ResourceType;
|
||||||
import emu.lunarcore.data.ResourceType.LoadPriority;
|
import emu.lunarcore.data.ResourceType.LoadPriority;
|
||||||
|
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@@ -12,6 +13,7 @@ public class ChallengeStoryExtraExcel extends GameResource {
|
|||||||
private int ID;
|
private int ID;
|
||||||
private int TurnLimit;
|
private int TurnLimit;
|
||||||
private int ClearScore;
|
private int ClearScore;
|
||||||
|
private IntArrayList BattleTargetID;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getId() {
|
public int getId() {
|
||||||
|
|||||||
@@ -16,8 +16,13 @@ import emu.lunarcore.game.scene.entity.EntityMonster;
|
|||||||
import emu.lunarcore.proto.BattleEndStatusOuterClass.BattleEndStatus;
|
import emu.lunarcore.proto.BattleEndStatusOuterClass.BattleEndStatus;
|
||||||
import emu.lunarcore.proto.BattleEventBattleInfoOuterClass.BattleEventBattleInfo;
|
import emu.lunarcore.proto.BattleEventBattleInfoOuterClass.BattleEventBattleInfo;
|
||||||
import emu.lunarcore.proto.BattleStatisticsOuterClass.BattleStatistics;
|
import emu.lunarcore.proto.BattleStatisticsOuterClass.BattleStatistics;
|
||||||
|
import emu.lunarcore.proto.BattleTargetListOuterClass.BattleTargetList;
|
||||||
|
import emu.lunarcore.proto.BattleTargetOuterClass.BattleTarget;
|
||||||
import emu.lunarcore.proto.SceneBattleInfoOuterClass.SceneBattleInfo;
|
import emu.lunarcore.proto.SceneBattleInfoOuterClass.SceneBattleInfo;
|
||||||
|
import emu.lunarcore.proto.SceneBattleInfoOuterClass.SceneBattleInfo.BattleTargetInfoEntry;
|
||||||
import emu.lunarcore.util.Utils;
|
import emu.lunarcore.util.Utils;
|
||||||
|
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||||
|
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||||
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||||
import it.unimi.dsi.fastutil.ints.IntList;
|
import it.unimi.dsi.fastutil.ints.IntList;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@@ -36,6 +41,7 @@ public class Battle {
|
|||||||
|
|
||||||
private StageExcel stage; // Main battle stage
|
private StageExcel stage; // Main battle stage
|
||||||
private IntList battleEvents; // TODO maybe turn it into a map?
|
private IntList battleEvents; // TODO maybe turn it into a map?
|
||||||
|
private Int2ObjectMap<BattleTargetList> battleTargets; // TODO use custom battle target object as value type in case we need to save battles to the db
|
||||||
|
|
||||||
// Internal battle data
|
// Internal battle data
|
||||||
@Setter private BattleEndStatus result;
|
@Setter private BattleEndStatus result;
|
||||||
@@ -144,6 +150,22 @@ public class Battle {
|
|||||||
return this.battleEvents;
|
return this.battleEvents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Int2ObjectMap<BattleTargetList> getBattleTargets() {
|
||||||
|
if (this.battleTargets == null) {
|
||||||
|
this.battleTargets = new Int2ObjectOpenHashMap<>();
|
||||||
|
}
|
||||||
|
return this.battleTargets;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addBattleTarget(int key, int targetId, int progress) {
|
||||||
|
var list = getBattleTargets().computeIfAbsent(key, i -> BattleTargetList.newInstance());
|
||||||
|
var battleTarget = BattleTarget.newInstance()
|
||||||
|
.setId(targetId)
|
||||||
|
.setProgress(progress);
|
||||||
|
|
||||||
|
list.addBattleTargetList(battleTarget);
|
||||||
|
}
|
||||||
|
|
||||||
public void setCustomLevel(int level) {
|
public void setCustomLevel(int level) {
|
||||||
for (var wave : this.getWaves()) {
|
for (var wave : this.getWaves()) {
|
||||||
wave.setCustomLevel(level);
|
wave.setCustomLevel(level);
|
||||||
@@ -245,6 +267,23 @@ public class Battle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Battle target map
|
||||||
|
if (this.battleTargets != null) {
|
||||||
|
// Build battle target map
|
||||||
|
for (int i = 1; i <= 5; i++) {
|
||||||
|
var battleTargetList = this.battleTargets.get(i);
|
||||||
|
var battleTargetEntry = BattleTargetInfoEntry.newInstance().setKey(i);
|
||||||
|
|
||||||
|
if (battleTargetList == null) {
|
||||||
|
battleTargetEntry.getMutableValue();
|
||||||
|
} else {
|
||||||
|
battleTargetEntry.setValue(battleTargetList);
|
||||||
|
}
|
||||||
|
|
||||||
|
proto.addBattleTargetInfo(battleTargetEntry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return proto;
|
return proto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public class ChallengeHistory {
|
|||||||
private int groupId;
|
private int groupId;
|
||||||
private int takenReward;
|
private int takenReward;
|
||||||
private int stars;
|
private int stars;
|
||||||
|
private int score;
|
||||||
|
|
||||||
@Deprecated // Morphia
|
@Deprecated // Morphia
|
||||||
public ChallengeHistory() {}
|
public ChallengeHistory() {}
|
||||||
@@ -45,10 +46,15 @@ public class ChallengeHistory {
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setScore(int score) {
|
||||||
|
this.score = score;
|
||||||
|
}
|
||||||
|
|
||||||
public Challenge toProto() {
|
public Challenge toProto() {
|
||||||
var proto = Challenge.newInstance()
|
var proto = Challenge.newInstance()
|
||||||
.setChallengeId(this.getChallengeId())
|
.setChallengeId(this.getChallengeId())
|
||||||
.setTakenReward(this.getTakenReward())
|
.setTakenReward(this.getTakenReward())
|
||||||
|
.setScore(this.getScore())
|
||||||
.setStars(this.getStars());
|
.setStars(this.getStars());
|
||||||
|
|
||||||
return proto;
|
return proto;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import emu.lunarcore.game.battle.Battle;
|
|||||||
import emu.lunarcore.game.player.Player;
|
import emu.lunarcore.game.player.Player;
|
||||||
import emu.lunarcore.game.scene.Scene;
|
import emu.lunarcore.game.scene.Scene;
|
||||||
import emu.lunarcore.game.scene.entity.EntityMonster;
|
import emu.lunarcore.game.scene.entity.EntityMonster;
|
||||||
|
import emu.lunarcore.proto.BattleEndReasonOuterClass.BattleEndReason;
|
||||||
import emu.lunarcore.proto.BattleEndStatusOuterClass.BattleEndStatus;
|
import emu.lunarcore.proto.BattleEndStatusOuterClass.BattleEndStatus;
|
||||||
import emu.lunarcore.proto.BattleStatisticsOuterClass.BattleStatistics;
|
import emu.lunarcore.proto.BattleStatisticsOuterClass.BattleStatistics;
|
||||||
import emu.lunarcore.proto.ChallengeInfoOuterClass.ChallengeInfo;
|
import emu.lunarcore.proto.ChallengeInfoOuterClass.ChallengeInfo;
|
||||||
@@ -37,6 +38,8 @@ public class ChallengeInstance {
|
|||||||
@Setter private int savedMp;
|
@Setter private int savedMp;
|
||||||
@Setter private int roundsLeft;
|
@Setter private int roundsLeft;
|
||||||
@Setter private int stars;
|
@Setter private int stars;
|
||||||
|
@Setter private int scoreStage1;
|
||||||
|
@Setter private int scoreStage2;
|
||||||
|
|
||||||
private IntList storyBuffs;
|
private IntList storyBuffs;
|
||||||
|
|
||||||
@@ -63,6 +66,10 @@ public class ChallengeInstance {
|
|||||||
return this.getExcel().getId();
|
return this.getExcel().getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isStory() {
|
||||||
|
return this.excel.isStory();
|
||||||
|
}
|
||||||
|
|
||||||
private void setStatus(ChallengeStatus status) {
|
private void setStatus(ChallengeStatus status) {
|
||||||
this.status = status.getNumber();
|
this.status = status.getNumber();
|
||||||
}
|
}
|
||||||
@@ -74,6 +81,10 @@ public class ChallengeInstance {
|
|||||||
private int getRoundsElapsed() {
|
private int getRoundsElapsed() {
|
||||||
return getExcel().getChallengeCountDown() - this.roundsLeft;
|
return getExcel().getChallengeCountDown() - this.roundsLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getTotalScore() {
|
||||||
|
return this.scoreStage1 + this.scoreStage2;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isWin() {
|
public boolean isWin() {
|
||||||
return status == ChallengeStatus.CHALLENGE_FINISH_VALUE;
|
return status == ChallengeStatus.CHALLENGE_FINISH_VALUE;
|
||||||
@@ -101,9 +112,32 @@ public class ChallengeInstance {
|
|||||||
battle.addBuff(buffId);
|
battle.addBuff(buffId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add story battle targets
|
||||||
|
if (this.getExcel().getStoryExcel() != null) {
|
||||||
|
// Add base score counter
|
||||||
|
battle.addBattleTarget(1, 10001, this.getTotalScore());
|
||||||
|
// Add battle targets from story excel
|
||||||
|
for (int id : getExcel().getStoryExcel().getBattleTargetID()) {
|
||||||
|
battle.addBattleTarget(5, id, this.getTotalScore());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onBattleFinish(Battle battle, BattleEndStatus result, BattleStatistics stats) {
|
public void onBattleFinish(Battle battle, BattleEndStatus result, BattleStatistics stats) {
|
||||||
|
// Add challenge score
|
||||||
|
if (this.isStory()) {
|
||||||
|
// Calculate score for current stage
|
||||||
|
int stageScore = stats.getChallengeScore() - this.getTotalScore();
|
||||||
|
// Set score
|
||||||
|
if (this.getCurrentStage() == 1) {
|
||||||
|
this.scoreStage1 = stageScore;
|
||||||
|
} else {
|
||||||
|
this.scoreStage2 = stageScore;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle result
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case BATTLE_END_WIN:
|
case BATTLE_END_WIN:
|
||||||
// Check if any avatar in the lineup has died
|
// Check if any avatar in the lineup has died
|
||||||
@@ -117,28 +151,7 @@ public class ChallengeInstance {
|
|||||||
long monsters = player.getScene().getEntities().values().stream().filter(e -> e instanceof EntityMonster).count();
|
long monsters = player.getScene().getEntities().values().stream().filter(e -> e instanceof EntityMonster).count();
|
||||||
|
|
||||||
if (monsters == 0) {
|
if (monsters == 0) {
|
||||||
// Progress to the next stage
|
this.advanceStage();
|
||||||
if (this.currentStage >= excel.getStageNum()) {
|
|
||||||
// Last stage
|
|
||||||
this.setStatus(ChallengeStatus.CHALLENGE_FINISH);
|
|
||||||
this.stars = this.calculateStars();
|
|
||||||
// Save history
|
|
||||||
player.getChallengeManager().addHistory(this.getChallengeId(), this.getStars());
|
|
||||||
// Send challenge result data
|
|
||||||
player.sendPacket(new PacketChallengeSettleNotify(this));
|
|
||||||
} else {
|
|
||||||
// Increment and reset stage
|
|
||||||
this.currentStage++;
|
|
||||||
// Load scene group for stage 2
|
|
||||||
this.getScene().loadGroup(excel.getMazeGroupID2());
|
|
||||||
// Change player line up
|
|
||||||
this.setCurrentExtraLineup(ExtraLineupType.LINEUP_CHALLENGE_2);
|
|
||||||
player.getLineupManager().setCurrentExtraLineup(this.getCurrentExtraLineup(), true);
|
|
||||||
player.sendPacket(new PacketChallengeLineupNotify(this.getCurrentExtraLineup()));
|
|
||||||
this.savedMp = player.getCurrentLineup().getMp();
|
|
||||||
// Move player
|
|
||||||
player.moveTo(this.getStartPos(), this.getStartRot());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate rounds left
|
// Calculate rounds left
|
||||||
@@ -155,11 +168,41 @@ public class ChallengeInstance {
|
|||||||
player.sendPacket(new PacketSyncLineupNotify(lineup));
|
player.sendPacket(new PacketSyncLineupNotify(lineup));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// Fail challenge
|
// Determine challenge result
|
||||||
this.setStatus(ChallengeStatus.CHALLENGE_FAILED);
|
if (this.isStory() && stats.getEndReason() == BattleEndReason.BATTLE_END_REASON_TURN_LIMIT) {
|
||||||
|
this.advanceStage();
|
||||||
|
} else {
|
||||||
|
// Fail challenge
|
||||||
|
this.setStatus(ChallengeStatus.CHALLENGE_FAILED);
|
||||||
|
// Send challenge result data
|
||||||
|
player.sendPacket(new PacketChallengeSettleNotify(this));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void advanceStage() {
|
||||||
|
// Progress to the next stage
|
||||||
|
if (this.currentStage >= excel.getStageNum()) {
|
||||||
|
// Last stage
|
||||||
|
this.setStatus(ChallengeStatus.CHALLENGE_FINISH);
|
||||||
|
this.stars = this.calculateStars();
|
||||||
|
// Save history
|
||||||
|
player.getChallengeManager().addHistory(this.getChallengeId(), this.getStars(), this.getTotalScore());
|
||||||
// Send challenge result data
|
// Send challenge result data
|
||||||
player.sendPacket(new PacketChallengeSettleNotify(this));
|
player.sendPacket(new PacketChallengeSettleNotify(this));
|
||||||
break;
|
} else {
|
||||||
|
// Increment and reset stage
|
||||||
|
this.currentStage++;
|
||||||
|
// Load scene group for stage 2
|
||||||
|
this.getScene().loadGroup(excel.getMazeGroupID2());
|
||||||
|
// Change player line up
|
||||||
|
this.setCurrentExtraLineup(ExtraLineupType.LINEUP_CHALLENGE_2);
|
||||||
|
player.getLineupManager().setCurrentExtraLineup(this.getCurrentExtraLineup(), true);
|
||||||
|
player.sendPacket(new PacketChallengeLineupNotify(this.getCurrentExtraLineup()));
|
||||||
|
this.savedMp = player.getCurrentLineup().getMp();
|
||||||
|
// Move player
|
||||||
|
player.moveTo(this.getStartPos(), this.getStartRot());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,6 +232,11 @@ public class ChallengeInstance {
|
|||||||
stars += (1 << i);
|
stars += (1 << i);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case TOTAL_SCORE:
|
||||||
|
if (this.getTotalScore() >= target.getChallengeTargetParam1()) {
|
||||||
|
stars += (1 << i);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -212,6 +260,8 @@ public class ChallengeInstance {
|
|||||||
var proto = ChallengeInfo.newInstance()
|
var proto = ChallengeInfo.newInstance()
|
||||||
.setChallengeId(this.getExcel().getId())
|
.setChallengeId(this.getExcel().getId())
|
||||||
.setStatusValue(this.getStatus())
|
.setStatusValue(this.getStatus())
|
||||||
|
.setScore(this.getScoreStage1())
|
||||||
|
.setScoreTwo(this.getScoreStage2())
|
||||||
.setRoundCount(this.getRoundsElapsed())
|
.setRoundCount(this.getRoundsElapsed())
|
||||||
.setExtraLineupTypeValue(this.getCurrentExtraLineup());
|
.setExtraLineupTypeValue(this.getCurrentExtraLineup());
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class ChallengeManager extends BasePlayerManager {
|
|||||||
getPlayer().sendPacket(new PacketStartChallengeScRsp(getPlayer(), challengeId));
|
getPlayer().sendPacket(new PacketStartChallengeScRsp(getPlayer(), challengeId));
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void addHistory(int challengeId, int stars) {
|
public synchronized void addHistory(int challengeId, int stars, int score) {
|
||||||
// Dont write challenge history if the player didnt get any stars
|
// Dont write challenge history if the player didnt get any stars
|
||||||
if (stars <= 0) return;
|
if (stars <= 0) return;
|
||||||
|
|
||||||
@@ -115,6 +115,7 @@ public class ChallengeManager extends BasePlayerManager {
|
|||||||
|
|
||||||
// Set
|
// Set
|
||||||
info.setStars(stars);
|
info.setStars(stars);
|
||||||
|
info.setScore(score);
|
||||||
info.save();
|
info.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ public class PacketChallengeSettleNotify extends BasePacket {
|
|||||||
var data = ChallengeSettleNotify.newInstance()
|
var data = ChallengeSettleNotify.newInstance()
|
||||||
.setChallengeId(challenge.getExcel().getId())
|
.setChallengeId(challenge.getExcel().getId())
|
||||||
.setIsWin(challenge.isWin())
|
.setIsWin(challenge.isWin())
|
||||||
|
.setChallengeScore(challenge.getScoreStage1())
|
||||||
|
.setScoreTwo(challenge.getScoreStage2())
|
||||||
.setStars(challenge.getStars());
|
.setStars(challenge.getStars());
|
||||||
|
|
||||||
// Set empty rewards
|
// Set empty rewards
|
||||||
|
|||||||
Reference in New Issue
Block a user