back_recharge
zhangshanxue 2019-12-17 10:27:19 +08:00
commit 647391a628
21 changed files with 915 additions and 306 deletions

View File

@ -10543,23 +10543,31 @@ public final class ArenaInfoProto {
com.ljsd.jieling.protocols.CommonProto.ArenaEnemyOrBuilder getRankInfosOrBuilder(
int index);
// optional int32 myRank = 3;
// optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;
/**
* <code>optional int32 myRank = 3;</code>
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
boolean hasMyRank();
boolean hasMyInfo();
/**
* <code>optional int32 myRank = 3;</code>
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
int getMyRank();
com.ljsd.jieling.protocols.CommonProto.ArenaEnemy getMyInfo();
/**
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
com.ljsd.jieling.protocols.CommonProto.ArenaEnemyOrBuilder getMyInfoOrBuilder();
}
/**
* Protobuf type {@code com.ljsd.jieling.protocols.ChampionGetWorldRankResponse}
@ -10620,9 +10628,17 @@ public final class ArenaInfoProto {
rankInfos_.add(input.readMessage(com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.PARSER, extensionRegistry));
break;
}
case 24: {
case 26: {
com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = myInfo_.toBuilder();
}
myInfo_ = input.readMessage(com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(myInfo_);
myInfo_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
myRank_ = input.readInt32();
break;
}
}
@ -10724,33 +10740,43 @@ public final class ArenaInfoProto {
return rankInfos_.get(index);
}
// optional int32 myRank = 3;
public static final int MYRANK_FIELD_NUMBER = 3;
private int myRank_;
// optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;
public static final int MYINFO_FIELD_NUMBER = 3;
private com.ljsd.jieling.protocols.CommonProto.ArenaEnemy myInfo_;
/**
* <code>optional int32 myRank = 3;</code>
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
public boolean hasMyRank() {
public boolean hasMyInfo() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional int32 myRank = 3;</code>
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
public int getMyRank() {
return myRank_;
public com.ljsd.jieling.protocols.CommonProto.ArenaEnemy getMyInfo() {
return myInfo_;
}
/**
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
public com.ljsd.jieling.protocols.CommonProto.ArenaEnemyOrBuilder getMyInfoOrBuilder() {
return myInfo_;
}
private void initFields() {
rankInfos_ = java.util.Collections.emptyList();
myRank_ = 0;
myInfo_ = com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
@ -10768,7 +10794,7 @@ public final class ArenaInfoProto {
output.writeMessage(1, rankInfos_.get(i));
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(3, myRank_);
output.writeMessage(3, myInfo_);
}
getUnknownFields().writeTo(output);
}
@ -10785,7 +10811,7 @@ public final class ArenaInfoProto {
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, myRank_);
.computeMessageSize(3, myInfo_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
@ -10896,6 +10922,7 @@ public final class ArenaInfoProto {
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getRankInfosFieldBuilder();
getMyInfoFieldBuilder();
}
}
private static Builder create() {
@ -10910,7 +10937,11 @@ public final class ArenaInfoProto {
} else {
rankInfosBuilder_.clear();
}
myRank_ = 0;
if (myInfoBuilder_ == null) {
myInfo_ = com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.getDefaultInstance();
} else {
myInfoBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@ -10952,7 +10983,11 @@ public final class ArenaInfoProto {
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000001;
}
result.myRank_ = myRank_;
if (myInfoBuilder_ == null) {
result.myInfo_ = myInfo_;
} else {
result.myInfo_ = myInfoBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
@ -10995,8 +11030,8 @@ public final class ArenaInfoProto {
}
}
}
if (other.hasMyRank()) {
setMyRank(other.getMyRank());
if (other.hasMyInfo()) {
mergeMyInfo(other.getMyInfo());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
@ -11337,54 +11372,158 @@ public final class ArenaInfoProto {
return rankInfosBuilder_;
}
// optional int32 myRank = 3;
private int myRank_ ;
// optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;
private com.ljsd.jieling.protocols.CommonProto.ArenaEnemy myInfo_ = com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
com.ljsd.jieling.protocols.CommonProto.ArenaEnemy, com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.Builder, com.ljsd.jieling.protocols.CommonProto.ArenaEnemyOrBuilder> myInfoBuilder_;
/**
* <code>optional int32 myRank = 3;</code>
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
public boolean hasMyRank() {
public boolean hasMyInfo() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* <code>optional int32 myRank = 3;</code>
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
public int getMyRank() {
return myRank_;
public com.ljsd.jieling.protocols.CommonProto.ArenaEnemy getMyInfo() {
if (myInfoBuilder_ == null) {
return myInfo_;
} else {
return myInfoBuilder_.getMessage();
}
}
/**
* <code>optional int32 myRank = 3;</code>
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
public Builder setMyRank(int value) {
public Builder setMyInfo(com.ljsd.jieling.protocols.CommonProto.ArenaEnemy value) {
if (myInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
myInfo_ = value;
onChanged();
} else {
myInfoBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
myRank_ = value;
onChanged();
return this;
}
/**
* <code>optional int32 myRank = 3;</code>
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
public Builder clearMyRank() {
bitField0_ = (bitField0_ & ~0x00000002);
myRank_ = 0;
onChanged();
public Builder setMyInfo(
com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.Builder builderForValue) {
if (myInfoBuilder_ == null) {
myInfo_ = builderForValue.build();
onChanged();
} else {
myInfoBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
public Builder mergeMyInfo(com.ljsd.jieling.protocols.CommonProto.ArenaEnemy value) {
if (myInfoBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002) &&
myInfo_ != com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.getDefaultInstance()) {
myInfo_ =
com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.newBuilder(myInfo_).mergeFrom(value).buildPartial();
} else {
myInfo_ = value;
}
onChanged();
} else {
myInfoBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
public Builder clearMyInfo() {
if (myInfoBuilder_ == null) {
myInfo_ = com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.getDefaultInstance();
onChanged();
} else {
myInfoBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
public com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.Builder getMyInfoBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getMyInfoFieldBuilder().getBuilder();
}
/**
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
public com.ljsd.jieling.protocols.CommonProto.ArenaEnemyOrBuilder getMyInfoOrBuilder() {
if (myInfoBuilder_ != null) {
return myInfoBuilder_.getMessageOrBuilder();
} else {
return myInfo_;
}
}
/**
* <code>optional .com.ljsd.jieling.protocols.ArenaEnemy myInfo = 3;</code>
*
* <pre>
*
* </pre>
*/
private com.google.protobuf.SingleFieldBuilder<
com.ljsd.jieling.protocols.CommonProto.ArenaEnemy, com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.Builder, com.ljsd.jieling.protocols.CommonProto.ArenaEnemyOrBuilder>
getMyInfoFieldBuilder() {
if (myInfoBuilder_ == null) {
myInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.ljsd.jieling.protocols.CommonProto.ArenaEnemy, com.ljsd.jieling.protocols.CommonProto.ArenaEnemy.Builder, com.ljsd.jieling.protocols.CommonProto.ArenaEnemyOrBuilder>(
myInfo_,
getParentForChildren(),
isClean());
myInfo_ = null;
}
return myInfoBuilder_;
}
// @@protoc_insertion_point(builder_scope:com.ljsd.jieling.protocols.ChampionGetWorldRankResponse)
}
@ -12161,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}
@ -12249,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) {
@ -12405,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() {
@ -12435,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);
}
@ -12460,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;
@ -12594,6 +12828,8 @@ public final class ArenaInfoProto {
bitField0_ = (bitField0_ & ~0x00000004);
roundTimes_ = 0;
bitField0_ = (bitField0_ & ~0x00000008);
id_ = "";
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
@ -12646,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;
@ -12674,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;
}
@ -13105,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)
}
@ -16772,31 +17115,32 @@ public final class ArenaInfoProto {
"ocols.ChampionBetInfo\022\016\n\006winUid\030\003 \001(\005\"3\n" +
"\022ChampionBetReqeust\022\016\n\006winUid\030\001 \001(\005\022\r\n\005c" +
"oins\030\002 \001(\005\"+\n\033ChampionGetWorldRankReques" +
"t\022\014\n\004page\030\001 \001(\005\"i\n\034ChampionGetWorldRankR" +
"esponse\0229\n\trankInfos\030\001 \003(\0132&.com.ljsd.ji",
"eling.protocols.ArenaEnemy\022\016\n\006myRank\030\003 \001" +
"(\005\"s\n\035ChampionGetMyTeamInfoResponse\022R\n\026c" +
"hampionTeamPersonInfo\030\001 \003(\01322.com.ljsd.j" +
"ieling.protocols.ChampionTeamPersonInfo\"" +
"\263\001\n\023ChampionTwoEnemInfo\0228\n\010redEnemy\030\001 \001(" +
"\0132&.com.ljsd.jieling.protocols.ArenaEnem" +
"y\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\023ChampionMyBetD" +
"etail\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%.co" +
"m.ljsd.jieling.protocols.FightData\"o\n%Ch" +
"anpionGetAllMyBattleHistoryResponse\022F\n\re" +
"nemyPairInfo\030\001 \003(\0132/.com.ljsd.jieling.pr" +
"otocols.ChampionTwoEnemInfo\"p\n\037ChampionG" +
"etAllMyBetInfoResponse\022M\n\024championMyBetD" +
"etails\030\001 \003(\0132/.com.ljsd.jieling.protocol" +
"s.ChampionMyBetDetail\"(\n\030ChampionViewFin" +
"alRequest\022\014\n\004type\030\001 \001(\005\"o\n\031ChampionViewF",
"inalResponse\022R\n\026championBattlePairInfo\030\001" +
" \003(\01322.com.ljsd.jieling.protocols.Champi" +
"onBattlePairInfoB\002H\001"
"t\022\014\n\004page\030\001 \001(\005\"\221\001\n\034ChampionGetWorldRank" +
"Response\0229\n\trankInfos\030\001 \003(\0132&.com.ljsd.j",
"ieling.protocols.ArenaEnemy\0226\n\006myInfo\030\003 " +
"\001(\0132&.com.ljsd.jieling.protocols.ArenaEn" +
"emy\"s\n\035ChampionGetMyTeamInfoResponse\022R\n\026" +
"championTeamPersonInfo\030\001 \003(\01322.com.ljsd." +
"jieling.protocols.ChampionTeamPersonInfo" +
"\"\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\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() {
@ -16898,7 +17242,7 @@ public final class ArenaInfoProto {
internal_static_com_ljsd_jieling_protocols_ChampionGetWorldRankResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_com_ljsd_jieling_protocols_ChampionGetWorldRankResponse_descriptor,
new java.lang.String[] { "RankInfos", "MyRank", });
new java.lang.String[] { "RankInfos", "MyInfo", });
internal_static_com_ljsd_jieling_protocols_ChampionGetMyTeamInfoResponse_descriptor =
getDescriptor().getMessageTypes().get(16);
internal_static_com_ljsd_jieling_protocols_ChampionGetMyTeamInfoResponse_fieldAccessorTable = new
@ -16910,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

View File

@ -81509,41 +81509,68 @@ public final class CommonProto {
*/
int getFightResult();
// optional .com.ljsd.jieling.protocols.FightData fightData = 4;
// optional string id = 4;
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
boolean hasFightData();
boolean hasId();
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
com.ljsd.jieling.protocols.CommonProto.FightData getFightData();
java.lang.String getId();
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
com.ljsd.jieling.protocols.CommonProto.FightDataOrBuilder getFightDataOrBuilder();
com.google.protobuf.ByteString
getIdBytes();
// optional int32 roundTImes = 5;
/**
* <code>optional int32 roundTImes = 5;</code>
*
* <pre>
*
* </pre>
*/
boolean hasRoundTImes();
/**
* <code>optional int32 roundTImes = 5;</code>
*
* <pre>
*
* </pre>
*/
int getRoundTImes();
// optional int32 teamId = 6;
/**
* <code>optional int32 teamId = 6;</code>
*
* <pre>
*
* </pre>
*/
boolean hasTeamId();
/**
* <code>optional int32 teamId = 6;</code>
*
* <pre>
*
* </pre>
*/
int getTeamId();
}
/**
* Protobuf type {@code com.ljsd.jieling.protocols.ChampionBattlePairInfo}
@ -81612,16 +81639,8 @@ public final class CommonProto {
break;
}
case 34: {
com.ljsd.jieling.protocols.CommonProto.FightData.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = fightData_.toBuilder();
}
fightData_ = input.readMessage(com.ljsd.jieling.protocols.CommonProto.FightData.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(fightData_);
fightData_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
id_ = input.readBytes();
break;
}
case 40: {
@ -81629,6 +81648,11 @@ public final class CommonProto {
roundTImes_ = input.readInt32();
break;
}
case 48: {
bitField0_ |= 0x00000020;
teamId_ = input.readInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@ -81779,38 +81803,59 @@ public final class CommonProto {
return fightResult_;
}
// optional .com.ljsd.jieling.protocols.FightData fightData = 4;
public static final int FIGHTDATA_FIELD_NUMBER = 4;
private com.ljsd.jieling.protocols.CommonProto.FightData fightData_;
// optional string id = 4;
public static final int ID_FIELD_NUMBER = 4;
private java.lang.Object id_;
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
public boolean hasFightData() {
public boolean hasId() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
public com.ljsd.jieling.protocols.CommonProto.FightData getFightData() {
return fightData_;
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 .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
public com.ljsd.jieling.protocols.CommonProto.FightDataOrBuilder getFightDataOrBuilder() {
return fightData_;
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;
}
}
// optional int32 roundTImes = 5;
@ -81818,23 +81863,56 @@ public final class CommonProto {
private int roundTImes_;
/**
* <code>optional int32 roundTImes = 5;</code>
*
* <pre>
*
* </pre>
*/
public boolean hasRoundTImes() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* <code>optional int32 roundTImes = 5;</code>
*
* <pre>
*
* </pre>
*/
public int getRoundTImes() {
return roundTImes_;
}
// optional int32 teamId = 6;
public static final int TEAMID_FIELD_NUMBER = 6;
private int teamId_;
/**
* <code>optional int32 teamId = 6;</code>
*
* <pre>
*
* </pre>
*/
public boolean hasTeamId() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* <code>optional int32 teamId = 6;</code>
*
* <pre>
*
* </pre>
*/
public int getTeamId() {
return teamId_;
}
private void initFields() {
attackName_ = "";
defName_ = "";
fightResult_ = 0;
fightData_ = com.ljsd.jieling.protocols.CommonProto.FightData.getDefaultInstance();
id_ = "";
roundTImes_ = 0;
teamId_ = 0;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
@ -81858,11 +81936,14 @@ public final class CommonProto {
output.writeInt32(3, fightResult_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(4, fightData_);
output.writeBytes(4, getIdBytes());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeInt32(5, roundTImes_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeInt32(6, teamId_);
}
getUnknownFields().writeTo(output);
}
@ -81886,12 +81967,16 @@ public final class CommonProto {
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, fightData_);
.computeBytesSize(4, getIdBytes());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, roundTImes_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(6, teamId_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
@ -82000,7 +82085,6 @@ public final class CommonProto {
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getFightDataFieldBuilder();
}
}
private static Builder create() {
@ -82015,14 +82099,12 @@ public final class CommonProto {
bitField0_ = (bitField0_ & ~0x00000002);
fightResult_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
if (fightDataBuilder_ == null) {
fightData_ = com.ljsd.jieling.protocols.CommonProto.FightData.getDefaultInstance();
} else {
fightDataBuilder_.clear();
}
id_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
roundTImes_ = 0;
bitField0_ = (bitField0_ & ~0x00000010);
teamId_ = 0;
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@ -82066,15 +82148,15 @@ public final class CommonProto {
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
if (fightDataBuilder_ == null) {
result.fightData_ = fightData_;
} else {
result.fightData_ = fightDataBuilder_.build();
}
result.id_ = id_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.roundTImes_ = roundTImes_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000020;
}
result.teamId_ = teamId_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
@ -82104,12 +82186,17 @@ public final class CommonProto {
if (other.hasFightResult()) {
setFightResult(other.getFightResult());
}
if (other.hasFightData()) {
mergeFightData(other.getFightData());
if (other.hasId()) {
bitField0_ |= 0x00000008;
id_ = other.id_;
onChanged();
}
if (other.hasRoundTImes()) {
setRoundTImes(other.getRoundTImes());
}
if (other.hasTeamId()) {
setTeamId(other.getTeamId());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
@ -82334,175 +82421,132 @@ public final class CommonProto {
return this;
}
// optional .com.ljsd.jieling.protocols.FightData fightData = 4;
private com.ljsd.jieling.protocols.CommonProto.FightData fightData_ = com.ljsd.jieling.protocols.CommonProto.FightData.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
com.ljsd.jieling.protocols.CommonProto.FightData, com.ljsd.jieling.protocols.CommonProto.FightData.Builder, com.ljsd.jieling.protocols.CommonProto.FightDataOrBuilder> fightDataBuilder_;
// optional string id = 4;
private java.lang.Object id_ = "";
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
public boolean hasFightData() {
public boolean hasId() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
public com.ljsd.jieling.protocols.CommonProto.FightData getFightData() {
if (fightDataBuilder_ == null) {
return fightData_;
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 fightDataBuilder_.getMessage();
return (java.lang.String) ref;
}
}
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
public Builder setFightData(com.ljsd.jieling.protocols.CommonProto.FightData value) {
if (fightDataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fightData_ = value;
onChanged();
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 {
fightDataBuilder_.setMessage(value);
return (com.google.protobuf.ByteString) ref;
}
bitField0_ |= 0x00000008;
return this;
}
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
public Builder setFightData(
com.ljsd.jieling.protocols.CommonProto.FightData.Builder builderForValue) {
if (fightDataBuilder_ == null) {
fightData_ = builderForValue.build();
onChanged();
} else {
fightDataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
*
* <pre>
*
* </pre>
*/
public Builder mergeFightData(com.ljsd.jieling.protocols.CommonProto.FightData value) {
if (fightDataBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008) &&
fightData_ != com.ljsd.jieling.protocols.CommonProto.FightData.getDefaultInstance()) {
fightData_ =
com.ljsd.jieling.protocols.CommonProto.FightData.newBuilder(fightData_).mergeFrom(value).buildPartial();
} else {
fightData_ = value;
}
onChanged();
} else {
fightDataBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
*
* <pre>
*
* </pre>
*/
public Builder clearFightData() {
if (fightDataBuilder_ == null) {
fightData_ = com.ljsd.jieling.protocols.CommonProto.FightData.getDefaultInstance();
onChanged();
} else {
fightDataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
*
* <pre>
*
* </pre>
*/
public com.ljsd.jieling.protocols.CommonProto.FightData.Builder getFightDataBuilder() {
bitField0_ |= 0x00000008;
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
id_ = value;
onChanged();
return getFightDataFieldBuilder().getBuilder();
return this;
}
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
public com.ljsd.jieling.protocols.CommonProto.FightDataOrBuilder getFightDataOrBuilder() {
if (fightDataBuilder_ != null) {
return fightDataBuilder_.getMessageOrBuilder();
} else {
return fightData_;
}
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000008);
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
* <code>optional .com.ljsd.jieling.protocols.FightData fightData = 4;</code>
* <code>optional string id = 4;</code>
*
* <pre>
*
*
* </pre>
*/
private com.google.protobuf.SingleFieldBuilder<
com.ljsd.jieling.protocols.CommonProto.FightData, com.ljsd.jieling.protocols.CommonProto.FightData.Builder, com.ljsd.jieling.protocols.CommonProto.FightDataOrBuilder>
getFightDataFieldBuilder() {
if (fightDataBuilder_ == null) {
fightDataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.ljsd.jieling.protocols.CommonProto.FightData, com.ljsd.jieling.protocols.CommonProto.FightData.Builder, com.ljsd.jieling.protocols.CommonProto.FightDataOrBuilder>(
fightData_,
getParentForChildren(),
isClean());
fightData_ = null;
}
return fightDataBuilder_;
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
id_ = value;
onChanged();
return this;
}
// optional int32 roundTImes = 5;
private int roundTImes_ ;
/**
* <code>optional int32 roundTImes = 5;</code>
*
* <pre>
*
* </pre>
*/
public boolean hasRoundTImes() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* <code>optional int32 roundTImes = 5;</code>
*
* <pre>
*
* </pre>
*/
public int getRoundTImes() {
return roundTImes_;
}
/**
* <code>optional int32 roundTImes = 5;</code>
*
* <pre>
*
* </pre>
*/
public Builder setRoundTImes(int value) {
bitField0_ |= 0x00000010;
@ -82512,6 +82556,10 @@ public final class CommonProto {
}
/**
* <code>optional int32 roundTImes = 5;</code>
*
* <pre>
*
* </pre>
*/
public Builder clearRoundTImes() {
bitField0_ = (bitField0_ & ~0x00000010);
@ -82520,6 +82568,55 @@ public final class CommonProto {
return this;
}
// optional int32 teamId = 6;
private int teamId_ ;
/**
* <code>optional int32 teamId = 6;</code>
*
* <pre>
*
* </pre>
*/
public boolean hasTeamId() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* <code>optional int32 teamId = 6;</code>
*
* <pre>
*
* </pre>
*/
public int getTeamId() {
return teamId_;
}
/**
* <code>optional int32 teamId = 6;</code>
*
* <pre>
*
* </pre>
*/
public Builder setTeamId(int value) {
bitField0_ |= 0x00000020;
teamId_ = value;
onChanged();
return this;
}
/**
* <code>optional int32 teamId = 6;</code>
*
* <pre>
*
* </pre>
*/
public Builder clearTeamId() {
bitField0_ = (bitField0_ & ~0x00000020);
teamId_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:com.ljsd.jieling.protocols.ChampionBattlePairInfo)
}
@ -83234,11 +83331,11 @@ public final class CommonProto {
"s.TeamOneInfo\022:\n\tenemyInfo\030\002 \001(\0132\'.com.l" +
"jsd.jieling.protocols.TeamOneInfo\022\016\n\006res" +
"ult\030\003 \001(\005\0228\n\tfightData\030\004 \001(\0132%.com.ljsd." +
"jieling.protocols.FightData\"\240\001\n\026Champion",
"jieling.protocols.FightData\"\202\001\n\026Champion",
"BattlePairInfo\022\022\n\nattackName\030\001 \001(\t\022\017\n\007de" +
"fName\030\002 \001(\t\022\023\n\013fightResult\030\003 \001(\005\0228\n\tfigh" +
"tData\030\004 \001(\0132%.com.ljsd.jieling.protocols" +
".FightData\022\022\n\nroundTImes\030\005 \001(\005B\002H\001"
"fName\030\002 \001(\t\022\023\n\013fightResult\030\003 \001(\005\022\n\n\002id\030\004" +
" \001(\t\022\022\n\nroundTImes\030\005 \001(\005\022\016\n\006teamId\030\006 \001(\005" +
"B\002H\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@ -83790,7 +83887,7 @@ public final class CommonProto {
internal_static_com_ljsd_jieling_protocols_ChampionBattlePairInfo_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_com_ljsd_jieling_protocols_ChampionBattlePairInfo_descriptor,
new java.lang.String[] { "AttackName", "DefName", "FightResult", "FightData", "RoundTImes", });
new java.lang.String[] { "AttackName", "DefName", "FightResult", "Id", "RoundTImes", "TeamId", });
return null;
}
};

View File

@ -559,6 +559,10 @@ public final class MessageTypeProto {
CHAMPION_PROGRESS_UPDATE_INDICATION(86, 10217),
/**
* <code>CHAMPION_VIEW_FINAL_REQUEST = 10218;</code>
*
* <pre>
*32
* </pre>
*/
CHAMPION_VIEW_FINAL_REQUEST(87, 10218),
/**
@ -3529,6 +3533,10 @@ public final class MessageTypeProto {
public static final int CHAMPION_PROGRESS_UPDATE_INDICATION_VALUE = 10217;
/**
* <code>CHAMPION_VIEW_FINAL_REQUEST = 10218;</code>
*
* <pre>
*32
* </pre>
*/
public static final int CHAMPION_VIEW_FINAL_REQUEST_VALUE = 10218;
/**

View File

@ -200,7 +200,8 @@ public class RedisKey {
public final static String CHAMPION_JOIN = "CHAMPION_JOIN";
public final static String CHAMPION_ARENA_RECORD = "CHAMPION_ARENA_RECORD";
public final static String CHAMPION_CUR_JOIN_IDS = "CHAMPION_CUR_JOIN_IDS";
public final static String CHAMPION_FINAL_JOIN_IDS = "CHAMPION_CUR_JOIN_IDS";
public final static String CHAMPION_FINAL32_JOIN_IDS = "CHAMPION_FINAL32_JOIN_IDS";
public final static String CHAMPION_FINAL4_JOIN_IDS = "CHAMPION_FINAL4_JOIN_IDS";
public final static String CHAMPION_MY_BATTLLE_IDS = "CHAMPION_MY_BATTLLE_IDS";
public final static String CHAMPION_CUR_BETID = "CHAMPION_CUR_BETID";
@ -210,9 +211,9 @@ public class RedisKey {
public final static String CHAMPION_FINAL_TEAM_INFO = "CHAMPION_FINAL_TEAM_INFO";
public final static String CHAMPION_BET_MINE = "CHAMPION_BET_MINE"; // 我的竞猜
public final static String CHAMPION_BET_ALL = "CHAMPION_BET_ALL"; // 竞猜信息
public final static String CHAMPION_BET_RANK = "CHAMPION_BET_RANK"; // 巅峰赛排名
public final static String CHAMPION_BET_MINE = "CHAMPION_BET_MINE"; // 我的竞猜 selectIdForRedis value: winUid
public final static String CHAMPION_BET_DETAIL = "CHAMPION_BET_DETAIL"; // 我的竞猜 selectUid + ":" +winUid
public final static String CHAMPION_BET_ALL = "CHAMPION_BET_ALL"; // 竞猜信息 selectUid + ":" +winUid
public final static String CHAMPION_FINAL_RECODED_IDS = "CHAMPION_FINAL_RECODED_IDS"; // 巅峰赛決賽信息
public final static String PIDGIDTEMP = "PIDGIDTEMP";

View File

@ -164,6 +164,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
.addAllPlayedMapTypes(mapManager.getPlayedMapType())
.setAmount(rechargeInfo.getSaveAmt())
.setVipDaily(playerInfoManager.getHadTakeDailyBoxVip())
.setMissingRefreshCount(user.getUserMissionManager().getMissingRoomMissionType().getCoinRefreshCount())
.build();
try {
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);

View File

@ -245,11 +245,7 @@ public class GlobalDataManaager implements IManager {
new UserLevelEventHandler();
new RemoveEventHeroHandler();
new FightMainEventHandler();
// ChampionshipLogic. start();
ChampionshipLogic.minuteCheck(true);
// ChampionshipLogic. selectToBattle();
// ChampionshipLogic. switchBet();
} catch (Exception e) {
LOGGER.error("e",e);
}

View File

@ -593,11 +593,17 @@ public class ArenaLogic {
public void getFightReplayData(ISession iSession,int type,String fightId) throws Exception {
int uid = iSession.getUid();
ArenaRecord arenaRecord = RedisUtil.getInstence().getMapEntry(RedisKey.ARENA_RRECORD, Integer.toString(uid), fightId, ArenaRecord.class);
ArenaRecord arenaRecord=null;
if(type == 2){
arenaRecord = RedisUtil.getInstence().getMapEntry(RedisKey.CHAMPION_ARENA_RECORD,"", fightId, ArenaRecord.class);
}else if(type == 1){
arenaRecord = RedisUtil.getInstence().getMapEntry(RedisKey.ARENA_RRECORD, Integer.toString(uid), fightId, ArenaRecord.class);
}
if(arenaRecord == null){
throw new ErrorCodeException(ErrorCode.newDefineCode("arena_rrecord null"));
}
byte[] fightData = arenaRecord.getFightData();
byte[] fightData = arenaRecord.getFightData();
CommonProto.FightData fightDataProto = CommonProto.FightData.parseFrom(fightData);
FightInfoProto.FightRePlayResponse build = FightInfoProto.FightRePlayResponse.newBuilder().setFightData(fightDataProto).build();
MessageUtil.sendMessage(iSession,1, MessageTypeProto.MessageType.VIEW_FIGHTREPLAY_RESPONSE_VALUE,build,true);

View File

@ -68,22 +68,46 @@ public class ChampionshipLogic {
Type valueType = new TypeToken<List<Integer>>() {
}.getType();
Map<Integer, List<Integer>> finalmemberOfTeam = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_FINAL_TEAM_INFO, "", Integer.class, valueType);
List<String> arenaRecodeds = RedisUtil.getInstence().lGet(RedisKey.CHAMPION_FINAL_JOIN_IDS, "", 0, -1);
Map<Integer, Integer> memberPerOfTeam = new HashMap<>();
List<String> arenaRecodeds = new ArrayList<>();
if(type == 1){
arenaRecodeds = RedisUtil.getInstence().lGet(RedisKey.CHAMPION_FINAL32_JOIN_IDS, "", 0, -1);
finalmemberOfTeam.forEach((k,v)->{
v.forEach(memberId->{
memberPerOfTeam.put(memberId,k);
});
});
}else{
arenaRecodeds = RedisUtil.getInstence().lGet(RedisKey.CHAMPION_FINAL4_JOIN_IDS, "", 0, -1);
}
List<Object> arenaIds = new ArrayList<>(arenaRecodeds);
List<ArenaRecord> arenaRecords = RedisUtil.getInstence().getMapEntrys(RedisKey.CHAMPION_ARENA_RECORD, "", arenaIds, ArenaRecord.class);
Map<Integer, SArenaRobotConfig> config = STableManager.getConfig(SArenaRobotConfig.class);
List<String> curArenaRecordIds = RedisUtil.getInstence().lGet(RedisKey.CHAMPION_CUR_JOIN_IDS, "", 0, -1);
ArenaInfoProto.ChampionViewFinalResponse.Builder builder = ArenaInfoProto.ChampionViewFinalResponse.newBuilder();
for (ArenaRecord arenaRecord : arenaRecords) {
int attackId = arenaRecord.getAttackId();
int defUid = arenaRecord.getDefUid();
String attackName = getRoleNameById(attackId, config);
String defName = getRoleNameById(attackId, config);
String defName = getRoleNameById(defUid, config);
int fightResult = arenaRecord.getFightResult();
if (progress % 10 % 4 != 0) {
if (curArenaRecordIds.contains(arenaRecord.getId()) && progress % 10 % 4 != 0) {
fightResult = -1;
}
int teamId=1;
if(type == 1){
teamId = memberPerOfTeam.get(attackId) +1;
}
builder.addChampionBattlePairInfo(CommonProto.ChampionBattlePairInfo.newBuilder()
.setAttackName(attackName)
.setDefName(defName)
.setFightResult(fightResult)
.setRoundTImes(arenaRecord.getRoundTims())
.setTeamId(teamId)
.setId(arenaRecord.getId())
);
}
MessageUtil.sendMessage(iSession,1, MessageTypeProto.MessageType.CHAMPION_VIEW_FINAL_RESPONSE_VALUE,builder.build(),true);
}
public static String getRoleNameById(int uid,Map<Integer,SArenaRobotConfig> config ) throws Exception {
@ -301,7 +325,7 @@ public class ChampionshipLogic {
});
int rank=1;
Set<ZSetOperations.TypedTuple<String>> arenaRankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.CHAMPION_BET_RANK, Integer.toString(1), 0, -1);
Set<ZSetOperations.TypedTuple<String>> arenaRankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.CHAMPION_RANK, Integer.toString(1), 0, -1);
Map<Integer, SArenaRobotConfig> robotConfigMap = STableManager.getConfig(SArenaRobotConfig.class);
int nowTime = (int)(TimeUtils.now()/1000);
for(ZSetOperations.TypedTuple<String> item : arenaRankInfo){
@ -349,14 +373,13 @@ public class ChampionshipLogic {
selectToJoinFinal();
schedule=2;
for(int i=8;i<13;i++){
for(int i=8;i<12;i++){
roundTimes=i;
selectToBattle();
switchBet();
scoreToRedis();
}
*/
}*/
}
@ -446,14 +469,10 @@ public class ChampionshipLogic {
if(progress%10%4 != 0){
fightResult =-1;
}
int myGuessID = arenaRecord.getAttackId();
Integer coins = RedisUtil.getInstence().getMapEntry(RedisKey.CHAMPION_BET_MINE, Integer.toString(uid), selectIdForRedis + ":" +myGuessID, Integer.class);
if(coins == null) {
myGuessID = arenaRecord.getDefUid();
coins = RedisUtil.getInstence().getMapEntry(RedisKey.CHAMPION_BET_MINE, Integer.toString(uid), selectIdForRedis + ":" +myGuessID, Integer.class);
}
if(coins == null){
myGuessID = 0;
int myGuessID = 0;
String guessUidStr = RedisUtil.getInstence().getMapEntry(RedisKey.CHAMPION_BET_MINE, Integer.toString(uid), selectIdForRedis, String.class);
if(!StringUtil.isEmpty(guessUidStr)) {
myGuessID = Integer.parseInt(guessUidStr);
}
CommonProto.ChampionBattleInfo.Builder builder1 = CommonProto.ChampionBattleInfo.newBuilder()
.setMyInfo(getChampionBattleInfo(arenaRecord.getAttackId()))
@ -597,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);
@ -672,7 +694,17 @@ public class ChampionshipLogic {
}
String pokenmonSkills = HeroLogic.getInstance().getPokenmonSkills(user, snapTeamId);
fightInfo.setPokenmonSkills(pokenmonSkills);
// RedisUtil.getInstence().putMapEntry(RedisKey.CHAMPION_FIGHT, "", String.valueOf(uid), fightInfo);
List<TeamPosForPokenInfo> teamPosForPokenInfos = user.getTeamPosManager().getTeamPosForPoken().get(snapTeamId);
if(teamPosForPokenInfos!=null){
List<Integer> pokens = new ArrayList<>();
for(TeamPosForPokenInfo teamPosForPokenInfo : teamPosForPokenInfos){
pokens.add(teamPosForPokenInfo.getPokenId());
}
fightInfo.setPokenmonIds(pokens);
}
memberInfo.setFightInfo(fightInfo);
joinMembers.put(memberInfo.getUid(),memberInfo);
RedisUtil.getInstence().putMapEntry(RedisKey.CHAMPION_JOIN,"",String.valueOf(uid),memberInfo);
@ -737,12 +769,17 @@ public class ChampionshipLogic {
String selectUid = getSelectIdForRedis();
if(progress%10%4!=1 || StringUtil.isEmpty(selectUid)){
LOGGER.error("the uid={} not in time",uid);
throw new ErrorCodeException(ErrorCode.SYS_ERROR_CODE);
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
String alreadyCoins = RedisUtil.getInstence().getMapEntry(RedisKey.CHAMPION_BET_MINE, Integer.toString(uid), selectUid, String.class);
if(!StringUtil.isEmpty(alreadyCoins)){
LOGGER.error("the uid={} guess winner={} had guessed",uid,winUid);
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
ArenaRecord arenaRecord = RedisUtil.getInstence().getMapValue(RedisKey.CHAMPION_ARENA_RECORD, "", selectUid, ArenaRecord.class);
if(arenaRecord.getAttackId()!=winUid && arenaRecord.getDefUid()!=winUid){
LOGGER.error("the uid={} guess winner={} is not exists",uid,winUid);
throw new ErrorCodeException(ErrorCode.SYS_ERROR_CODE);
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
User user = UserManager.getUser(uid);
int[] arenaItem = STableManager.getFigureConfig(CommonStaticConfig.class).getsChampionshipSetting().getArenaItem();
@ -753,9 +790,9 @@ public class ChampionshipLogic {
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
}
//我下注信息
RedisUtil.getInstence().putMapEntry(RedisKey.CHAMPION_BET_MINE,Integer.toString(uid),selectUid +":" + winUid,chip);
RedisUtil.getInstence().putMapEntry(RedisKey.CHAMPION_BET_MINE,Integer.toString(uid),selectUid,winUid);
RedisUtil.getInstence().incrementZsetScore(RedisKey.CHAMPION_BET_ALL,"",selectUid +":" + winUid,chip);
RedisUtil.getInstence().putMapEntry(RedisKey.CHAMPION_BET_MINE,selectUid +":" + winUid,Integer.toString(uid),chip);
RedisUtil.getInstence().putMapEntry(RedisKey.CHAMPION_BET_DETAIL,selectUid +":" + winUid,Integer.toString(uid),chip);
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.CHAMPION_BET_GUESS_RESPONSE_VALUE,null,true);
@ -770,7 +807,7 @@ public class ChampionshipLogic {
String betAllKey = RedisUtil.getInstence().getKey(RedisKey.CHAMPION_BET_ALL, "");
Set<String> betDetails = RedisUtil.getInstence().getZset(betAllKey, 0, -1);
for(String betInfo : betDetails){
delKeys.add(RedisUtil.getInstence().getKey(RedisKey.CHAMPION_BET_MINE, betInfo));
delKeys.add(RedisUtil.getInstence().getKey(RedisKey.CHAMPION_BET_DETAIL, betInfo));
}
delKeys.add(betAllKey);
}
@ -797,7 +834,7 @@ public class ChampionshipLogic {
Double failCoins = RedisUtil.getInstence().getZSetScore(RedisKey.CHAMPION_BET_ALL, "", selectUid + ":" + failUid);
double winRate = (winCoins + failCoins) / winCoins;
Map<Integer, Integer> betPersonInfoMap = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_BET_MINE, selectUid + ":" + winUid, Integer.class, Integer.class);
Map<Integer, Integer> betPersonInfoMap = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_BET_DETAIL, selectUid + ":" + winUid, Integer.class, Integer.class);
betPersonInfoMap.forEach((betUid,coins)->{
try {
User user = UserManager.getUser(betUid);
@ -828,16 +865,10 @@ public class ChampionshipLogic {
*/
public static void viewMGuessHistory(ISession session) throws Exception {
int uid = session.getUid();
Map<String, Integer> betHistorys = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_BET_MINE, Integer.toString(uid), String.class, Integer.class);
Map<String, String> betHistorys = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_BET_MINE, Integer.toString(uid), String.class, String.class);
ArenaInfoProto.ChampionGetAllMyBetInfoResponse.Builder builder = ArenaInfoProto.ChampionGetAllMyBetInfoResponse.newBuilder();
if(!betHistorys.isEmpty()){
List<String> guessIds = new ArrayList<>(betHistorys.size());
betHistorys.forEach((idAndBet,coins)->{
String[] idAndBetSplit = idAndBet.split(":");
String id = idAndBetSplit[0];
guessIds.add(id);
});
List<Object> ids = new ArrayList<>(guessIds);
List<Object> ids = new ArrayList<>(betHistorys.keySet());
List<ArenaRecord> arenaRecords = RedisUtil.getInstence().getMapEntrys(RedisKey.CHAMPION_ARENA_RECORD, "", ids, ArenaRecord.class);
String selectIdForRedis = getSelectIdForRedis();
Map<Integer, SArenaRobotConfig> arenaRobotConfigMap = STableManager.getConfig(SArenaRobotConfig.class);
@ -868,8 +899,8 @@ public class ChampionshipLogic {
if(fightResult == 0){
winner = arenaRecord.getDefUid();
}
Integer coins = betHistorys.get(arenaRecord.getId()+ ":" + winner);
if(coins!=null){
String guessUid = betHistorys.get(arenaRecord.getId());
if(!StringUtil.isEmpty(guessUid) && guessUid.equals(winner)){
guessState = 2;
}
// betDetailBuilder.setFightData(CommonProto.FightData.parseFrom(arenaRecord.getFightData()));
@ -971,11 +1002,19 @@ public class ChampionshipLogic {
arenaRecord.setRoundTims(roundTimes);
arenaRecordMap.put(arenaRecord.getId(),arenaRecord);
}
}
RedisUtil.getInstence().putMapEntrys(RedisKey.CHAMPION_ARENA_RECORD,"",arenaRecordMap);
arenaRecordIds.addAll(arenaRecordMap.keySet());
RedisUtil.getInstence().lSet(RedisKey.CHAMPION_CUR_JOIN_IDS,"",arenaRecordIds);
RedisUtil.getInstence().lSet(RedisKey.CHAMPION_FINAL_JOIN_IDS,"",arenaRecordIds);
if(schedule == 2){
if(arenaRecordIds.size()>=4){
RedisUtil.getInstence().lSet(RedisKey.CHAMPION_FINAL32_JOIN_IDS,"",arenaRecordIds);
}else{
RedisUtil.getInstence().lSet(RedisKey.CHAMPION_FINAL4_JOIN_IDS,"",arenaRecordIds);
}
}
Map<Integer, SArenaRobotConfig> robotConfigMap = STableManager.getConfig(SArenaRobotConfig.class);
arenaRecordMap.forEach((id,arenaRecord)->{
int defUid = arenaRecord.getDefUid();
@ -1080,9 +1119,11 @@ public class ChampionshipLogic {
List<CommonProto.ArenaEnemy> arenaRankMemberInfo = new ArrayList<>(20);
int rankEndLine = STableManager.getFigureConfig(CommonStaticConfig.class).getsChampionshipSetting().getChampionshipPlayer();
int myUid = session.getUid();
CommonProto.ArenaEnemy myInfo = null;
ArenaInfoProto.ChampionGetWorldRankResponse.Builder builder = ArenaInfoProto.ChampionGetWorldRankResponse.newBuilder();
if(end<rankEndLine) {
Set<ZSetOperations.TypedTuple<String>> arenaRankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.CHAMPION_BET_RANK, Integer.toString(1), start, end);
Set<ZSetOperations.TypedTuple<String>> arenaRankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.CHAMPION_RANK,"", start, end);
for (ZSetOperations.TypedTuple<String> item : arenaRankInfo) {
String value = item.getValue();
int uid = Integer.parseInt(value);
@ -1093,23 +1134,23 @@ public class ChampionshipLogic {
continue;
}
arenaRankMemberInfo.add(enemyInfo);
if(uid == myUid){
myInfo = enemyInfo;
}
}
}
int uid = session.getUid();
int score = RedisUtil.getInstence().getZSetScore(RedisKey.CHAMPION_BET_RANK,Integer.toString(1), Integer.toString(uid)).intValue();
int myRank =-1;
if(score == -1){
score =0;
}else{
myRank= RedisUtil.getInstence().getZSetreverseRank(RedisKey.CHAMPION_BET_RANK,Integer.toString(1),Integer.toString(uid)).intValue();
if(myInfo==null && end>=rankEndLine){
int myRank= RedisUtil.getInstence().getZSetreverseRank(RedisKey.CHAMPION_RANK,"",Integer.toString(myUid)).intValue();
if(myRank != -1){
myInfo=getEnemyInfo(myUid, myRank);
}
}
if(myInfo!=null){
builder.setMyInfo(myInfo);
}
ArenaInfoProto.GetArenaRankInfoResponse buildResponse = ArenaInfoProto.GetArenaRankInfoResponse.newBuilder()
.addAllRankInfos(arenaRankMemberInfo)
.setMyRank(myRank)
.setMyscore(score)
.build();
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.ARENA_RANK_RESPONSE_VALUE,buildResponse,true);
ArenaInfoProto.ChampionGetWorldRankResponse buildResponse = builder.addAllRankInfos(arenaRankMemberInfo).build();
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.CHAMPION_GET_RANK_RESPONSE_VALUE,buildResponse,true);
}
@ -1186,7 +1227,7 @@ public class ChampionshipLogic {
if(roundTimes<2){
return;
}
progressTmp = 200 + (int)diff*10 + progressState;
progressTmp = 200 + (int)(diff+1)*10 + progressState;
if(schedule==1){ // 刚开始进入决赛,选拔出选手
selectToJoinFinal();
}

View File

@ -116,6 +116,8 @@ public class CumulationData {
public int joinFamilyCount;//加入公会次数
public int friendApplyCount;//提出好友申请次数
public Map<Integer,Integer> especialEquipStar = new HashMap<>();//法宝升到%s星级的数量为

View File

@ -23,6 +23,8 @@ import manager.STableManager;
import util.TimeUtils;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class UserMissionManager extends MongoBase {
@ -158,17 +160,30 @@ public class UserMissionManager extends MongoBase {
updateString("bloodyMissionIdsType",bloodyMissionIdsType);
break;
case MISSING_ROOM_REFRESH:
Map<Integer,Integer> mustAppear = new HashMap<>();
if((int)parm[0]==1){
//删除已经领取奖励的
missingRoomMissionType.getFinishMissionIds().removeIf(value->missingRoomMissionType.getAllMissingTime().get(value)==-1);
missingRoomMissionType.getAllMissingTime().values().removeIf(value->value==-1);
boolean result;
SMazeTreasureSetting sMazeTreasureSetting = SMazeTreasureSetting.sMazeTreasureSettingMap.get(1);
result = ItemUtil.itemCost(user, new int[][]{sMazeTreasureSetting.getTakeOrder()}, BIReason.MISSING_ROOM_REFRESH_CONSUME, 1);
if(!result){
result = ItemUtil.itemCost(user, new int[][]{sMazeTreasureSetting.getRefreshItem()}, BIReason.MISSING_ROOM_REFRESH_CONSUME, 1);
if(!result){
int coinRefreshCount = missingRoomMissionType.getCoinRefreshCount();
int[][] refreshHighTypeNum = SMazeTreasureSetting.sMazeTreasureSettingMap.get(1).getRefreshHighTypeNum();
for(int[] refresh:refreshHighTypeNum){
if(coinRefreshCount==0||coinRefreshCount%refresh[0]!=0){
continue;
}else{
mustAppear.put(refresh[1],mustAppear.get(refresh[1])==null?1:(mustAppear.get(refresh[1])+1));
}
}
int[][] cost = sMazeTreasureSetting.getCost();
int count = (int)MathUtils.calABX(missingRoomMissionType.getCoinRefreshCount(), cost[1]);
int count = (int)MathUtils.calABX(coinRefreshCount, cost[1]);
result = ItemUtil.itemCost(user, new int[][]{new int[]{cost[0][0], count}}, BIReason.MISSING_ROOM_REFRESH_CONSUME, 1);
missingRoomMissionType.setCoinRefreshCount(coinRefreshCount +1);
}
}
if(!result){
@ -176,17 +191,39 @@ public class UserMissionManager extends MongoBase {
}
missingRoomMissionType.getDoingMissionIds().clear();
}
int[][] missingRoomMission = new int[SMazeTreasure.sMazeTreasureMap.size()][];
List<Integer> mustMissions = new ArrayList<>();
if(!mustAppear.isEmpty()){
for(Map.Entry<Integer,Integer> entry:mustAppear.entrySet()){
List<SMazeTreasure> sMazeTreasures = SMazeTreasure.mazeMapByTaskType.get(entry.getKey());
List<int[]> mustList = new ArrayList<>();
for(SMazeTreasure maze :sMazeTreasures){
if(mustMissions.contains(maze.getId())){
continue;
}
int[] refreshWeight = new int[2];
refreshWeight[0] = maze.getId();
refreshWeight[1] = maze.getTaskRefreshProbability();
mustList.add(refreshWeight);
}
int[][] mustArray = mustList.toArray(new int[mustList.size()][]);
int[] missions = MathUtils.randomFromWeightWithTaking(mustArray, entry.getValue());
Arrays.stream(missions).forEach(mission->mustMissions.add(mission));
}
}
List<int[]> missingRoomMission = new ArrayList<>();
for(Map.Entry<Integer,SMazeTreasure> entry:SMazeTreasure.sMazeTreasureMap.entrySet()){
int[] refreshWeight = new int[2];
refreshWeight[0] = entry.getKey();
refreshWeight[1] = entry.getValue().getTaskRefreshProbability();
missingRoomMission[entry.getKey()-1] =refreshWeight;
missingRoomMission.add(refreshWeight);
}
int[] missions = MathUtils.randomFromWeightWithTaking(missingRoomMission, 6);
int[] missions = MathUtils.randomFromWeightWithTaking(missingRoomMission.toArray(new int[missingRoomMission.size()][]), 6-mustMissions.size());
for(int mission:missions){
missingRoomMissionType.addDoingMission(missingRoomMissionType.getMissionIndex()*10000+mission);
}
for(int mission:mustMissions){
missingRoomMissionType.addDoingMission(missingRoomMissionType.getMissionIndex()*10000+mission);
}
updateString("missingRoomMissionType",missingRoomMissionType);
break;
}

View File

@ -267,6 +267,7 @@ public class FriendLogic {
friendManager.addApplyFriend(uid);
user.getFriendManager().addMyApplyFriend(inviteUid);
sendFriendInfoIndication(uid,inviteUid,1);
user.getUserMissionManager().onGameEvent(user,GameEvent.FRIEND_APPLY);
}
MessageUtil.sendMessage(iSession, 1, msgId, null, true);
}

View File

@ -70,6 +70,7 @@ public enum GameEvent {
TAKE_FRIEND_GIFT,//领取好友赠礼
JOIN_FAMILY,//加入公会次数
FRIEND_APPLY,//提出好友申请次数
}

View File

@ -298,9 +298,13 @@ public class MissionLoigc {
for(Integer missionId:missingRoomMissionType.getFinishMissionIds()){
CommonProto.UserMissionInfo.Builder info = CommonProto.UserMissionInfo.newBuilder();
int missingTime = missingRoomMissionType.getMissingTime(missionId);
List<String> heroesInfo = missingRoomMissionType.getHerosInfo(missionId);
info.setMissionId(missionId).setState(missingTime>0?0:missingTime==0?1:2)
.setType(GameMisionType.MISSINGROOMMISSION.getType())
.setProgress(missingTime).addAllHeroId(missingRoomMissionType.getHerosInfo(missionId));
.setProgress(missingTime);
if(heroesInfo!=null&&!heroesInfo.isEmpty()){
info.addAllHeroId(heroesInfo);
}
missionList.add(info.build());
}
}

View File

@ -84,6 +84,7 @@ public enum MissionType {
FIND_STAR(65),//占星
TAKE_FRIEND_GIFT(66),//领取好友友情点
JOIN_FAMILY(69),
FRIEND_APPLY(71),//提出%s次好友申请
;
private int missionType;
@ -228,6 +229,8 @@ public enum MissionType {
return TAKE_FRIEND_GIFT;
case 69:
return JOIN_FAMILY;
case 71:
return FRIEND_APPLY;
default:
return null;
}

View File

@ -106,6 +106,7 @@ public class DataManagerDistributor {
judges.put(MissionType.TAKE_FRIEND_GIFT,new TakeFriendGiftTimesManager());
judges.put(MissionType.JOIN_FAMILY,new JoinFamilyCountManager());
judges.put(MissionType.FRIEND_APPLY,new FriendApplyManager());

View File

@ -0,0 +1,17 @@
package com.ljsd.jieling.logic.mission.data;
import com.ljsd.jieling.logic.dao.CumulationData;
import com.ljsd.jieling.logic.mission.MissionType;
/**
* @author lvxinran
* @date 2019/12/17
* @discribe
*/
public class FriendApplyManager implements BaseDataManager {
@Override
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
data.friendApplyCount++;
return new CumulationData.Result(missionType);
}
}

View File

@ -284,6 +284,11 @@ public class MissionEventDistributor {
eventEnumListMap.put(GameEvent.JOIN_FAMILY,typeList);
eventProcessor.put(GameEvent.JOIN_FAMILY,new CumulationDataEventProcessor());
typeList = new ArrayList<>();
typeList.add(MissionType.FRIEND_APPLY);
eventEnumListMap.put(GameEvent.FRIEND_APPLY,typeList);
eventProcessor.put(GameEvent.FRIEND_APPLY,new CumulationDataEventProcessor());
}
private static final ThreadLocal<Map<GameMisionType, List<MissionStateChangeInfo>>> threadMissionChangeList =

View File

@ -21,8 +21,11 @@ import java.util.*;
*/
public class MissingRoomMissionType extends AbstractMissionType{
private Map<Integer,Integer> missingTime = new HashMap<>();
private Map<Integer,List<String>> heroesInfo = new HashMap<>();
private int missionIndex;
private int coinRefreshCount;
@Override
@ -36,22 +39,39 @@ public class MissingRoomMissionType extends AbstractMissionType{
@Override
public int[][] reward(int missionId) {
heroesInfo.remove(missionId);
int realId = missionId % 10000;
return SMazeTreasure.sMazeTreasureMap.get(realId).getReward();
}
@Override
public void rewardMission(int missionId, List<MissionStateChangeInfo> missionTypeEnumListMap) {
if(!missingTime.containsKey(missionId)||!getFinishMissionIds().contains(missionId)){
return;
if(missionId!=0){
if(!missingTime.containsKey(missionId)||!getFinishMissionIds().contains(missionId)){
return;
}
if(missingTime.get(missionId)!=0&&missingTime.get(missionId)>TimeUtils.now()/1000){
return;
}
missingTime.put(missionId,-1);
MissionStateChangeInfo stateChangeInfo = new MissionStateChangeInfo(missionId, MissionState.REWARD, reward(missionId));
missionTypeEnumListMap.add(stateChangeInfo);
} else {
List<int[]> rewardAll = new ArrayList<>();
for (Integer id : getFinishMissionIds()) {
if(missingTime.get(id)==-1){
continue;
}
if (missingTime.get(id)==0||missingTime.get(id) <= TimeUtils.now() / 1000) {
for(int[] re:reward(id)){
rewardAll.add(re);
}
missingTime.put(id,-1);
}
}
MissionStateChangeInfo stateChangeInfo = new MissionStateChangeInfo(missionId, MissionState.REWARD, rewardAll.toArray(new int[rewardAll.size()][]));
missionTypeEnumListMap.add(stateChangeInfo);
}
if(missingTime.get(missionId)!=0&&missingTime.get(missionId)>TimeUtils.now()/1000){
return;
}
missingTime.put(missionId,-1);
MissionStateChangeInfo stateChangeInfo = new MissionStateChangeInfo(missionId, MissionState.REWARD, reward(missionId));
missionTypeEnumListMap.add(stateChangeInfo);
}
@Override
@ -109,6 +129,9 @@ public class MissingRoomMissionType extends AbstractMissionType{
heroesInfo.put(missionId,heroes);
}
public Map<Integer,Integer> getAllMissingTime(){
return missingTime;
}
public int getMissingTime(int missionId) {
return missingTime.get(missionId);
}

View File

@ -53,6 +53,8 @@ public class SCHero implements BaseConfig{
private int natural;
private int[][] growthSwitch;
private Map<Integer,Integer> secondaryFactorMap;
private Map<Integer, List<Integer>> skillListByStar;
@ -270,4 +272,8 @@ public class SCHero implements BaseConfig{
public void setSkillListByStar(Map<Integer, List<Integer>> skillListByStar) {
this.skillListByStar = skillListByStar;
}
public int[][] getGrowthSwitch() {
return growthSwitch;
}
}

View File

@ -3,6 +3,9 @@ package config;
import manager.STableManager;
import manager.Table;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -28,10 +31,16 @@ public class SMazeTreasure implements BaseConfig {
private int needCard;
public static Map<Integer,SMazeTreasure> sMazeTreasureMap;
public static Map<Integer, List<SMazeTreasure>> mazeMapByTaskType;
@Override
public void init() throws Exception {
sMazeTreasureMap = STableManager.getConfig(SMazeTreasure.class);
mazeMapByTaskType = new HashMap<>();
for (Map.Entry<Integer,SMazeTreasure> entry:sMazeTreasureMap.entrySet()){
mazeMapByTaskType.computeIfAbsent(entry.getValue().getTaskType(),v->new ArrayList<>()).add(entry.getValue());
}
}

View File

@ -19,6 +19,8 @@ public class SPlayerLevelConfig implements BaseConfig {
private int extraAdd;
private int[] mazeTreasureMax;
@Override
public void init() throws Exception {
@ -46,6 +48,10 @@ public class SPlayerLevelConfig implements BaseConfig {
return extraAdd;
}
public int[] getMazeTreasureMax() {
return mazeTreasureMax;
}
public static Map<Integer, SPlayerLevelConfig> getsPlayerLevelConfigMap() {
return sPlayerLevelConfigMap;
}