add arena id
parent
6d950dc2b7
commit
f0ae6a5c13
|
|
@ -12300,6 +12300,33 @@ public final class ArenaInfoProto {
|
|||
* </pre>
|
||||
*/
|
||||
int getRoundTimes();
|
||||
|
||||
// optional string id = 5;
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasId();
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
java.lang.String getId();
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getIdBytes();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code com.ljsd.jieling.protocols.ChampionTwoEnemInfo}
|
||||
|
|
@ -12388,6 +12415,11 @@ public final class ArenaInfoProto {
|
|||
roundTimes_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 42: {
|
||||
bitField0_ |= 0x00000010;
|
||||
id_ = input.readBytes();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
|
|
@ -12544,11 +12576,67 @@ public final class ArenaInfoProto {
|
|||
return roundTimes_;
|
||||
}
|
||||
|
||||
// optional string id = 5;
|
||||
public static final int ID_FIELD_NUMBER = 5;
|
||||
private java.lang.Object id_;
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasId() {
|
||||
return ((bitField0_ & 0x00000010) == 0x00000010);
|
||||
}
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
public java.lang.String getId() {
|
||||
java.lang.Object ref = id_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
if (bs.isValidUtf8()) {
|
||||
id_ = s;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdBytes() {
|
||||
java.lang.Object ref = id_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
id_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
redEnemy_ = com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.getDefaultInstance();
|
||||
blueEnemy_ = com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.getDefaultInstance();
|
||||
fightResult_ = 0;
|
||||
roundTimes_ = 0;
|
||||
id_ = "";
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
|
|
@ -12574,6 +12662,9 @@ public final class ArenaInfoProto {
|
|||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
output.writeInt32(4, roundTimes_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||
output.writeBytes(5, getIdBytes());
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
|
|
@ -12599,6 +12690,10 @@ public final class ArenaInfoProto {
|
|||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(4, roundTimes_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeBytesSize(5, getIdBytes());
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
|
|
@ -12733,6 +12828,8 @@ public final class ArenaInfoProto {
|
|||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
roundTimes_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
id_ = "";
|
||||
bitField0_ = (bitField0_ & ~0x00000010);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
@ -12785,6 +12882,10 @@ public final class ArenaInfoProto {
|
|||
to_bitField0_ |= 0x00000008;
|
||||
}
|
||||
result.roundTimes_ = roundTimes_;
|
||||
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
|
||||
to_bitField0_ |= 0x00000010;
|
||||
}
|
||||
result.id_ = id_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
onBuilt();
|
||||
return result;
|
||||
|
|
@ -12813,6 +12914,11 @@ public final class ArenaInfoProto {
|
|||
if (other.hasRoundTimes()) {
|
||||
setRoundTimes(other.getRoundTimes());
|
||||
}
|
||||
if (other.hasId()) {
|
||||
bitField0_ |= 0x00000010;
|
||||
id_ = other.id_;
|
||||
onChanged();
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
return this;
|
||||
}
|
||||
|
|
@ -13244,6 +13350,104 @@ public final class ArenaInfoProto {
|
|||
return this;
|
||||
}
|
||||
|
||||
// optional string id = 5;
|
||||
private java.lang.Object id_ = "";
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasId() {
|
||||
return ((bitField0_ & 0x00000010) == 0x00000010);
|
||||
}
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
public java.lang.String getId() {
|
||||
java.lang.Object ref = id_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
java.lang.String s = ((com.google.protobuf.ByteString) ref)
|
||||
.toStringUtf8();
|
||||
id_ = s;
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdBytes() {
|
||||
java.lang.Object ref = id_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
id_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000010;
|
||||
id_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearId() {
|
||||
bitField0_ = (bitField0_ & ~0x00000010);
|
||||
id_ = getDefaultInstance().getId();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional string id = 5;</code>
|
||||
*
|
||||
* <pre>
|
||||
* 唯一标识id
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000010;
|
||||
id_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:com.ljsd.jieling.protocols.ChampionTwoEnemInfo)
|
||||
}
|
||||
|
||||
|
|
@ -16918,25 +17122,25 @@ public final class ArenaInfoProto {
|
|||
"emy\"s\n\035ChampionGetMyTeamInfoResponse\022R\n\026" +
|
||||
"championTeamPersonInfo\030\001 \003(\01322.com.ljsd." +
|
||||
"jieling.protocols.ChampionTeamPersonInfo" +
|
||||
"\"\263\001\n\023ChampionTwoEnemInfo\0228\n\010redEnemy\030\001 \001" +
|
||||
"\"\277\001\n\023ChampionTwoEnemInfo\0228\n\010redEnemy\030\001 \001" +
|
||||
"(\0132&.com.ljsd.jieling.protocols.ArenaEne" +
|
||||
"my\0229\n\tblueEnemy\030\002 \001(\0132&.com.ljsd.jieling" +
|
||||
".protocols.ArenaEnemy\022\023\n\013fightResult\030\003 \001" +
|
||||
"(\005\022\022\n\nroundTimes\030\004 \001(\005\"\252\001\n\023ChampionMyBet",
|
||||
"Detail\022F\n\renemyPairInfo\030\001 \001(\0132/.com.ljsd" +
|
||||
".jieling.protocols.ChampionTwoEnemInfo\022\021" +
|
||||
"\n\tbetResult\030\002 \001(\005\0228\n\tfightData\030\003 \001(\0132%.c" +
|
||||
"om.ljsd.jieling.protocols.FightData\"o\n%C" +
|
||||
"hanpionGetAllMyBattleHistoryResponse\022F\n\r" +
|
||||
"enemyPairInfo\030\001 \003(\0132/.com.ljsd.jieling.p" +
|
||||
"rotocols.ChampionTwoEnemInfo\"p\n\037Champion" +
|
||||
"GetAllMyBetInfoResponse\022M\n\024championMyBet" +
|
||||
"Details\030\001 \003(\0132/.com.ljsd.jieling.protoco" +
|
||||
"ls.ChampionMyBetDetail\"(\n\030ChampionViewFi",
|
||||
"nalRequest\022\014\n\004type\030\001 \001(\005\"o\n\031ChampionView" +
|
||||
"FinalResponse\022R\n\026championBattlePairInfo\030" +
|
||||
"\001 \003(\01322.com.ljsd.jieling.protocols.Champ" +
|
||||
"ionBattlePairInfoB\002H\001"
|
||||
"(\005\022\022\n\nroundTimes\030\004 \001(\005\022\n\n\002id\030\005 \001(\t\"\252\001\n\023C",
|
||||
"hampionMyBetDetail\022F\n\renemyPairInfo\030\001 \001(" +
|
||||
"\0132/.com.ljsd.jieling.protocols.ChampionT" +
|
||||
"woEnemInfo\022\021\n\tbetResult\030\002 \001(\005\0228\n\tfightDa" +
|
||||
"ta\030\003 \001(\0132%.com.ljsd.jieling.protocols.Fi" +
|
||||
"ghtData\"o\n%ChanpionGetAllMyBattleHistory" +
|
||||
"Response\022F\n\renemyPairInfo\030\001 \003(\0132/.com.lj" +
|
||||
"sd.jieling.protocols.ChampionTwoEnemInfo" +
|
||||
"\"p\n\037ChampionGetAllMyBetInfoResponse\022M\n\024c" +
|
||||
"hampionMyBetDetails\030\001 \003(\0132/.com.ljsd.jie" +
|
||||
"ling.protocols.ChampionMyBetDetail\"(\n\030Ch",
|
||||
"ampionViewFinalRequest\022\014\n\004type\030\001 \001(\005\"o\n\031" +
|
||||
"ChampionViewFinalResponse\022R\n\026championBat" +
|
||||
"tlePairInfo\030\001 \003(\01322.com.ljsd.jieling.pro" +
|
||||
"tocols.ChampionBattlePairInfoB\002H\001"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||
|
|
@ -17050,7 +17254,7 @@ public final class ArenaInfoProto {
|
|||
internal_static_com_ljsd_jieling_protocols_ChampionTwoEnemInfo_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||
internal_static_com_ljsd_jieling_protocols_ChampionTwoEnemInfo_descriptor,
|
||||
new java.lang.String[] { "RedEnemy", "BlueEnemy", "FightResult", "RoundTimes", });
|
||||
new java.lang.String[] { "RedEnemy", "BlueEnemy", "FightResult", "RoundTimes", "Id", });
|
||||
internal_static_com_ljsd_jieling_protocols_ChampionMyBetDetail_descriptor =
|
||||
getDescriptor().getMessageTypes().get(18);
|
||||
internal_static_com_ljsd_jieling_protocols_ChampionMyBetDetail_fieldAccessorTable = new
|
||||
|
|
|
|||
|
|
@ -616,7 +616,10 @@ public class ChampionshipLogic {
|
|||
}
|
||||
int enemyType = robotConfigMap.containsKey(enemyId)?0:1;
|
||||
CommonProto.ArenaEnemy arenaEnemy = ArenaLogic.getInstance().getArenaEnemy(enemyId, enemyType);
|
||||
ArenaInfoProto.ChampionTwoEnemInfo build = ArenaInfoProto.ChampionTwoEnemInfo.newBuilder().setBlueEnemy(arenaEnemy).setRoundTimes(arenaRecord.getRoundTims()).setFightResult(fightResult).build();
|
||||
ArenaInfoProto.ChampionTwoEnemInfo build = ArenaInfoProto.ChampionTwoEnemInfo.newBuilder().setBlueEnemy(arenaEnemy).setRoundTimes(arenaRecord.getRoundTims())
|
||||
.setFightResult(fightResult)
|
||||
.setId(arenaRecord.getId())
|
||||
.build();
|
||||
builder.addEnemyPairInfo(build);
|
||||
}
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.CHAMPION_GET_MYHISTORY_RESPONSE_VALUE,builder.build(),true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue