hero position

back_recharge
wangyuan 2020-05-01 15:06:57 +08:00
parent 5c1946e7f7
commit 3b6008fb4a
4 changed files with 157 additions and 74 deletions

View File

@ -67864,6 +67864,16 @@ public final class CommonProto {
* <code>optional int32 level = 4;</code> * <code>optional int32 level = 4;</code>
*/ */
int getLevel(); int getLevel();
// optional int32 position = 5;
/**
* <code>optional int32 position = 5;</code>
*/
boolean hasPosition();
/**
* <code>optional int32 position = 5;</code>
*/
int getPosition();
} }
/** /**
* Protobuf type {@code com.ljsd.jieling.protocols.TeamSimpleInfo} * Protobuf type {@code com.ljsd.jieling.protocols.TeamSimpleInfo}
@ -67936,6 +67946,11 @@ public final class CommonProto {
level_ = input.readInt32(); level_ = input.readInt32();
break; break;
} }
case 40: {
bitField0_ |= 0x00000010;
position_ = input.readInt32();
break;
}
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@ -68067,11 +68082,28 @@ public final class CommonProto {
return level_; return level_;
} }
// optional int32 position = 5;
public static final int POSITION_FIELD_NUMBER = 5;
private int position_;
/**
* <code>optional int32 position = 5;</code>
*/
public boolean hasPosition() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* <code>optional int32 position = 5;</code>
*/
public int getPosition() {
return position_;
}
private void initFields() { private void initFields() {
heroid_ = ""; heroid_ = "";
heroTid_ = 0; heroTid_ = 0;
star_ = 0; star_ = 0;
level_ = 0; level_ = 0;
position_ = 0;
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
public final boolean isInitialized() { public final boolean isInitialized() {
@ -68097,6 +68129,9 @@ public final class CommonProto {
if (((bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeInt32(4, level_); output.writeInt32(4, level_);
} }
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeInt32(5, position_);
}
getUnknownFields().writeTo(output); getUnknownFields().writeTo(output);
} }
@ -68122,6 +68157,10 @@ public final class CommonProto {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, level_); .computeInt32Size(4, level_);
} }
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, position_);
}
size += getUnknownFields().getSerializedSize(); size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
@ -68246,6 +68285,8 @@ public final class CommonProto {
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
level_ = 0; level_ = 0;
bitField0_ = (bitField0_ & ~0x00000008); bitField0_ = (bitField0_ & ~0x00000008);
position_ = 0;
bitField0_ = (bitField0_ & ~0x00000010);
return this; return this;
} }
@ -68290,6 +68331,10 @@ public final class CommonProto {
to_bitField0_ |= 0x00000008; to_bitField0_ |= 0x00000008;
} }
result.level_ = level_; result.level_ = level_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.position_ = position_;
result.bitField0_ = to_bitField0_; result.bitField0_ = to_bitField0_;
onBuilt(); onBuilt();
return result; return result;
@ -68320,6 +68365,9 @@ public final class CommonProto {
if (other.hasLevel()) { if (other.hasLevel()) {
setLevel(other.getLevel()); setLevel(other.getLevel());
} }
if (other.hasPosition()) {
setPosition(other.getPosition());
}
this.mergeUnknownFields(other.getUnknownFields()); this.mergeUnknownFields(other.getUnknownFields());
return this; return this;
} }
@ -68520,6 +68568,39 @@ public final class CommonProto {
return this; return this;
} }
// optional int32 position = 5;
private int position_ ;
/**
* <code>optional int32 position = 5;</code>
*/
public boolean hasPosition() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* <code>optional int32 position = 5;</code>
*/
public int getPosition() {
return position_;
}
/**
* <code>optional int32 position = 5;</code>
*/
public Builder setPosition(int value) {
bitField0_ |= 0x00000010;
position_ = value;
onChanged();
return this;
}
/**
* <code>optional int32 position = 5;</code>
*/
public Builder clearPosition() {
bitField0_ = (bitField0_ & ~0x00000010);
position_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:com.ljsd.jieling.protocols.TeamSimpleInfo) // @@protoc_insertion_point(builder_scope:com.ljsd.jieling.protocols.TeamSimpleInfo)
} }
@ -90113,75 +90194,76 @@ public final class CommonProto {
"\t\022\r\n\005score\030\002 \001(\005\022\014\n\004rank\030\003 \001(\005\022\r\n\005level\030" + "\t\022\r\n\005score\030\002 \001(\005\022\014\n\004rank\030\003 \001(\005\022\r\n\005level\030" +
"\004 \001(\005\022\014\n\004head\030\005 \001(\005\022\021\n\theadFrame\030\006 \001(\005\")" + "\004 \001(\005\022\014\n\004head\030\005 \001(\005\022\021\n\theadFrame\030\006 \001(\005\")" +
"\n\nSignInInfo\022\014\n\004days\030\001 \001(\005\022\r\n\005state\030\002 \001(" + "\n\nSignInInfo\022\014\n\004days\030\001 \001(\005\022\r\n\005state\030\002 \001(" +
"\005\"N\n\016TeamSimpleInfo\022\016\n\006heroid\030\001 \001(\t\022\017\n\007h", "\005\"`\n\016TeamSimpleInfo\022\016\n\006heroid\030\001 \001(\t\022\017\n\007h",
"eroTid\030\002 \001(\005\022\014\n\004star\030\003 \001(\005\022\r\n\005level\030\004 \001(" + "eroTid\030\002 \001(\005\022\014\n\004star\030\003 \001(\005\022\r\n\005level\030\004 \001(" +
"\005\"\207\001\n\017TeamOneTeamInfo\0228\n\004team\030\001 \003(\0132*.co" + "\005\022\020\n\010position\030\005 \001(\005\"\207\001\n\017TeamOneTeamInfo\022" +
"m.ljsd.jieling.protocols.TeamSimpleInfo\022" + "8\n\004team\030\001 \003(\0132*.com.ljsd.jieling.protoco" +
"\024\n\014PokemonInfos\030\002 \003(\005\022\022\n\ntotalForce\030\003 \001(" + "ls.TeamSimpleInfo\022\024\n\014PokemonInfos\030\002 \003(\005\022" +
"\005\022\020\n\010remainHp\030\004 \003(\005\"\271\001\n\013TeamOneInfo\022\013\n\003u" + "\022\n\ntotalForce\030\003 \001(\005\022\020\n\010remainHp\030\004 \003(\005\"\271\001" +
"id\030\001 \001(\005\022\r\n\005level\030\002 \001(\005\022\014\n\004name\030\003 \001(\t\022\014\n" + "\n\013TeamOneInfo\022\013\n\003uid\030\001 \001(\005\022\r\n\005level\030\002 \001(" +
"\004head\030\004 \001(\005\022\021\n\theadFrame\030\005 \001(\005\022\021\n\tguildN" + "\005\022\014\n\004name\030\003 \001(\t\022\014\n\004head\030\004 \001(\005\022\021\n\theadFra" +
"ame\030\007 \001(\t\0229\n\004team\030\006 \001(\0132+.com.ljsd.jieli" + "me\030\005 \001(\005\022\021\n\tguildName\030\007 \001(\t\0229\n\004team\030\006 \001(" +
"ng.protocols.TeamOneTeamInfo\022\021\n\tisApplye" + "\0132+.com.ljsd.jieling.protocols.TeamOneTe" +
"d\030\010 \001(\005\"y\n\017MonsterRankInfo\022\014\n\004name\030\001 \001(\t", "amInfo\022\021\n\tisApplyed\030\010 \001(\005\"y\n\017MonsterRank",
"\022\r\n\005score\030\002 \001(\005\022\014\n\004rank\030\003 \001(\005\022\r\n\005level\030\004" + "Info\022\014\n\004name\030\001 \001(\t\022\r\n\005score\030\002 \001(\005\022\014\n\004ran" +
" \001(\005\022\014\n\004head\030\005 \001(\005\022\021\n\theadFrame\030\006 \001(\005\022\013\n" + "k\030\003 \001(\005\022\r\n\005level\030\004 \001(\005\022\014\n\004head\030\005 \001(\005\022\021\n\t" +
"\003uid\030\007 \001(\005\"2\n\rHeroBloodInfo\022\016\n\006heroId\030\001 " + "headFrame\030\006 \001(\005\022\013\n\003uid\030\007 \001(\005\"2\n\rHeroBloo" +
"\001(\t\022\021\n\tlostBlood\030\002 \001(\005\"D\n\013EndlessInfo\022\r\n" + "dInfo\022\016\n\006heroId\030\001 \001(\t\022\021\n\tlostBlood\030\002 \001(\005" +
"\005mapId\030\001 \001(\005\022\022\n\nworldLevel\030\002 \001(\005\022\022\n\nbloo" + "\"D\n\013EndlessInfo\022\r\n\005mapId\030\001 \001(\005\022\022\n\nworldL" +
"dScore\030\003 \001(\005\"2\n\017PlayerBindPhone\022\020\n\010phone" + "evel\030\002 \001(\005\022\022\n\nbloodScore\030\003 \001(\005\"2\n\017Player" +
"Num\030\001 \001(\t\022\r\n\005state\030\002 \001(\005\"3\n\014EndlessPoint" + "BindPhone\022\020\n\010phoneNum\030\001 \001(\t\022\r\n\005state\030\002 \001" +
"\022\020\n\010location\030\001 \001(\005\022\021\n\tmonsterId\030\002 \001(\005\"2\n" + "(\005\"3\n\014EndlessPoint\022\020\n\010location\030\001 \001(\005\022\021\n\t" +
"\014StrongerInfo\022\020\n\010curScore\030\001 \001(\005\022\020\n\010maxSc" + "monsterId\030\002 \001(\005\"2\n\014StrongerInfo\022\020\n\010curSc" +
"ore\030\002 \001(\005\"U\n\017QuestionOptions\022\017\n\007content\030", "ore\030\001 \001(\005\022\020\n\010maxScore\030\002 \001(\005\"U\n\017QuestionO",
"\001 \001(\t\022\014\n\004type\030\002 \001(\005\022\017\n\007options\030\003 \003(\t\022\022\n\n" + "ptions\022\017\n\007content\030\001 \001(\t\022\014\n\004type\030\002 \001(\005\022\017\n" +
"answerType\030\004 \001(\005\"\212\001\n\017BloodPersonInfo\022\n\n\002" + "\007options\030\003 \003(\t\022\022\n\nanswerType\030\004 \001(\005\"\212\001\n\017B" +
"id\030\001 \001(\005\022\014\n\004name\030\002 \001(\t\022\021\n\theadFrame\030\003 \001(" + "loodPersonInfo\022\n\n\002id\030\001 \001(\005\022\014\n\004name\030\002 \001(\t" +
"\005\022\014\n\004head\030\004 \001(\005\022\020\n\010serverId\030\005 \001(\005\022\r\n\005lev" + "\022\021\n\theadFrame\030\003 \001(\005\022\014\n\004head\030\004 \001(\005\022\020\n\010ser" +
"el\030\006 \001(\005\022\014\n\004rank\030\007 \001(\005\022\r\n\005score\030\010 \001(\005\"H\n" + "verId\030\005 \001(\005\022\r\n\005level\030\006 \001(\005\022\014\n\004rank\030\007 \001(\005" +
"\026LuckWheelRewardPosInfo\022\013\n\003pos\030\001 \001(\005\022\016\n\006" + "\022\r\n\005score\030\010 \001(\005\"H\n\026LuckWheelRewardPosInf" +
"luckId\030\002 \001(\005\022\021\n\tluckTimes\030\003 \001(\005\"l\n\013Refre" + "o\022\013\n\003pos\030\001 \001(\005\022\016\n\006luckId\030\002 \001(\005\022\021\n\tluckTi" +
"shTask\022\014\n\004type\030\001 \001(\005\022:\n\005tasks\030\002 \003(\0132+.co" + "mes\030\003 \001(\005\"l\n\013RefreshTask\022\014\n\004type\030\001 \001(\005\022:" +
"m.ljsd.jieling.protocols.UserMissionInfo" + "\n\005tasks\030\002 \003(\0132+.com.ljsd.jieling.protoco" +
"\022\023\n\013refreshTime\030\003 \001(\005\"\221\001\n\021MainLevelRankI", "ls.UserMissionInfo\022\023\n\013refreshTime\030\003 \001(\005\"",
"nfo\022\013\n\003uid\030\001 \001(\005\022\r\n\005level\030\002 \001(\005\022\014\n\004name\030" + "\221\001\n\021MainLevelRankInfo\022\013\n\003uid\030\001 \001(\005\022\r\n\005le" +
"\003 \001(\t\022\017\n\007fightId\030\004 \001(\005\022\014\n\004head\030\005 \001(\005\022\014\n\004" + "vel\030\002 \001(\005\022\014\n\004name\030\003 \001(\t\022\017\n\007fightId\030\004 \001(\005" +
"rank\030\006 \001(\005\022\022\n\ntotalForce\030\007 \001(\005\022\021\n\theadFr" + "\022\014\n\004head\030\005 \001(\005\022\014\n\004rank\030\006 \001(\005\022\022\n\ntotalFor" +
"ame\030\010 \001(\005\"B\n\017ChampionBetInfo\022\n\n\002id\030\001 \001(\t" + "ce\030\007 \001(\005\022\021\n\theadFrame\030\010 \001(\005\"B\n\017ChampionB" +
"\022\020\n\010redCoins\030\002 \001(\005\022\021\n\tblueCoins\030\003 \001(\005\"\323\001" + "etInfo\022\n\n\002id\030\001 \001(\t\022\020\n\010redCoins\030\002 \001(\005\022\021\n\t" +
"\n\022ChampionBattleInfo\0227\n\006myInfo\030\001 \001(\0132\'.c" + "blueCoins\030\003 \001(\005\"\323\001\n\022ChampionBattleInfo\0227" +
"om.ljsd.jieling.protocols.TeamOneInfo\022:\n" + "\n\006myInfo\030\001 \001(\0132\'.com.ljsd.jieling.protoc" +
"\tenemyInfo\030\002 \001(\0132\'.com.ljsd.jieling.prot" + "ols.TeamOneInfo\022:\n\tenemyInfo\030\002 \001(\0132\'.com" +
"ocols.TeamOneInfo\022\016\n\006result\030\003 \001(\005\0228\n\tfig" + ".ljsd.jieling.protocols.TeamOneInfo\022\016\n\006r" +
"htData\030\004 \001(\0132%.com.ljsd.jieling.protocol", "esult\030\003 \001(\005\0228\n\tfightData\030\004 \001(\0132%.com.ljs",
"s.FightData\"\367\001\n\026ChampionBattlePairInfo\022;" + "d.jieling.protocols.FightData\"\367\001\n\026Champi" +
"\n\nattackInfo\030\001 \001(\0132\'.com.ljsd.jieling.pr" + "onBattlePairInfo\022;\n\nattackInfo\030\001 \001(\0132\'.c" +
"otocols.TeamOneInfo\0228\n\007defInfo\030\002 \001(\0132\'.c" + "om.ljsd.jieling.protocols.TeamOneInfo\0228\n" +
"om.ljsd.jieling.protocols.TeamOneInfo\022\023\n" + "\007defInfo\030\002 \001(\0132\'.com.ljsd.jieling.protoc" +
"\013fightResult\030\003 \001(\005\022\n\n\002id\030\004 \001(\t\022\022\n\nroundT" + "ols.TeamOneInfo\022\023\n\013fightResult\030\003 \001(\005\022\n\n\002" +
"Imes\030\005 \001(\005\022\016\n\006teamId\030\006 \001(\005\022\020\n\010position\030\007" + "id\030\004 \001(\t\022\022\n\nroundTImes\030\005 \001(\005\022\016\n\006teamId\030\006" +
" \001(\005\022\017\n\007isGUess\030\010 \001(\005\"q\n\nRedPackage\022\020\n\010u" + " \001(\005\022\020\n\010position\030\007 \001(\005\022\017\n\007isGUess\030\010 \001(\005\"" +
"serName\030\001 \001(\t\022\r\n\005redId\030\002 \001(\005\022\r\n\005isGet\030\003 " + "q\n\nRedPackage\022\020\n\010userName\030\001 \001(\t\022\r\n\005redId" +
"\001(\005\022\020\n\010getCount\030\004 \001(\005\022\017\n\007redType\030\005 \001(\005\022\020" + "\030\002 \001(\005\022\r\n\005isGet\030\003 \001(\005\022\020\n\010getCount\030\004 \001(\005\022" +
"\n\010sendTime\030\006 \001(\005\"\211\001\n\014RedOneDetail\022\013\n\003uid", "\017\n\007redType\030\005 \001(\005\022\020\n\010sendTime\030\006 \001(\005\"\211\001\n\014R",
"\030\001 \001(\005\022\014\n\004head\030\002 \001(\005\022\021\n\theadFrame\030\003 \001(\005\022" + "edOneDetail\022\013\n\003uid\030\001 \001(\005\022\014\n\004head\030\002 \001(\005\022\021" +
"\014\n\004name\030\004 \001(\t\022\014\n\004time\030\005 \001(\005\022\r\n\005count\030\006 \001" + "\n\theadFrame\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022\014\n\004time\030" +
"(\005\022\016\n\006itemId\030\007 \001(\005\022\020\n\010position\030\010 \001(\005\"Z\n\030" + "\005 \001(\005\022\r\n\005count\030\006 \001(\005\022\016\n\006itemId\030\007 \001(\005\022\020\n\010" +
"ExpeditionSimpleBossInfo\022\017\n\007heroTid\030\001 \001(" + "position\030\010 \001(\005\"Z\n\030ExpeditionSimpleBossIn" +
"\005\022\014\n\004star\030\002 \001(\005\022\r\n\005level\030\003 \001(\005\022\020\n\010remain" + "fo\022\017\n\007heroTid\030\001 \001(\005\022\014\n\004star\030\002 \001(\005\022\r\n\005lev" +
"Hp\030\004 \001(\001\"\202\001\n\022ExpeditionTeamInfo\022B\n\004hero\030" + "el\030\003 \001(\005\022\020\n\010remainHp\030\004 \001(\001\"\202\001\n\022Expeditio" +
"\001 \003(\01324.com.ljsd.jieling.protocols.Exped" + "nTeamInfo\022B\n\004hero\030\001 \003(\01324.com.ljsd.jieli" +
"itionSimpleBossInfo\022\024\n\014PokemonInfos\030\002 \003(" + "ng.protocols.ExpeditionSimpleBossInfo\022\024\n" +
"\005\022\022\n\ntotalForce\030\003 \001(\005\"\251\001\n\022ExpeditionNode" + "\014PokemonInfos\030\002 \003(\005\022\022\n\ntotalForce\030\003 \001(\005\"" +
"Info\022\016\n\006sortId\030\001 \001(\005\022\013\n\003lay\030\002 \001(\005\022\014\n\004typ", "\251\001\n\022ExpeditionNodeInfo\022\016\n\006sortId\030\001 \001(\005\022\013",
"e\030\003 \001(\005\022D\n\014bossTeaminfo\030\004 \001(\0132..com.ljsd" + "\n\003lay\030\002 \001(\005\022\014\n\004type\030\003 \001(\005\022D\n\014bossTeaminf" +
".jieling.protocols.ExpeditionTeamInfo\022\r\n" + "o\030\004 \001(\0132..com.ljsd.jieling.protocols.Exp" +
"\005state\030\005 \001(\005\022\023\n\013holyEquipID\030\006 \003(\005\"<\n\030Exp" + "editionTeamInfo\022\r\n\005state\030\005 \001(\005\022\023\n\013holyEq" +
"editionSimpleHeroInfo\022\016\n\006heroId\030\001 \001(\t\022\020\n" + "uipID\030\006 \003(\005\"<\n\030ExpeditionSimpleHeroInfo\022" +
"\010remainHp\030\002 \001(\001\"/\n\017ExpeditionEquip\022\n\n\002id" + "\016\n\006heroId\030\001 \001(\t\022\020\n\010remainHp\030\002 \001(\001\"/\n\017Exp" +
"\030\001 \001(\t\022\020\n\010equiptId\030\002 \001(\005\"P\n\rMonthCardInf" + "editionEquip\022\n\n\002id\030\001 \001(\t\022\020\n\010equiptId\030\002 \001" +
"o\022\n\n\002id\030\001 \001(\005\022\022\n\nendingTime\030\002 \001(\005\022\r\n\005sta" + "(\005\"P\n\rMonthCardInfo\022\n\n\002id\030\001 \001(\005\022\022\n\nendin" +
"te\030\003 \001(\005\022\020\n\010totleAmt\030\004 \001(\005B\002H\001" "gTime\030\002 \001(\005\022\r\n\005state\030\003 \001(\005\022\020\n\010totleAmt\030\004" +
" \001(\005B\002H\001"
}; };
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@ -90631,7 +90713,7 @@ public final class CommonProto {
internal_static_com_ljsd_jieling_protocols_TeamSimpleInfo_fieldAccessorTable = new internal_static_com_ljsd_jieling_protocols_TeamSimpleInfo_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable( com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_com_ljsd_jieling_protocols_TeamSimpleInfo_descriptor, internal_static_com_ljsd_jieling_protocols_TeamSimpleInfo_descriptor,
new java.lang.String[] { "Heroid", "HeroTid", "Star", "Level", }); new java.lang.String[] { "Heroid", "HeroTid", "Star", "Level", "Position", });
internal_static_com_ljsd_jieling_protocols_TeamOneTeamInfo_descriptor = internal_static_com_ljsd_jieling_protocols_TeamOneTeamInfo_descriptor =
getDescriptor().getMessageTypes().get(73); getDescriptor().getMessageTypes().get(73);
internal_static_com_ljsd_jieling_protocols_TeamOneTeamInfo_fieldAccessorTable = new internal_static_com_ljsd_jieling_protocols_TeamOneTeamInfo_fieldAccessorTable = new

View File

@ -149,7 +149,7 @@ public class GuildFightLogic {
} }
for(TeamPosHeroInfo heroInfo:teamPosHeroInfos){ for(TeamPosHeroInfo heroInfo:teamPosHeroInfos){
Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId()); Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId());
oneInfo.addTeam(CBean2Proto.getSimpleTeamInfoByHero(hero)); oneInfo.addTeam(CBean2Proto.getSimpleTeamInfoByHero(hero,heroInfo.getPosition()));
} }
int force = HeroLogic.getInstance().calTeamTotalForce(user, 501, false); int force = HeroLogic.getInstance().calTeamTotalForce(user, 501, false);
if(force==0){ if(force==0){

View File

@ -536,7 +536,7 @@ public class PlayerLogic {
if(teamPosManager.getTeamPosForHero().containsKey(teamId)){ if(teamPosManager.getTeamPosForHero().containsKey(teamId)){
for (TeamPosHeroInfo heroInfo:teamPosManager.getTeamPosForHero().get(teamId)) { for (TeamPosHeroInfo heroInfo:teamPosManager.getTeamPosForHero().get(teamId)) {
Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId()); Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId());
teamInfo.addTeam(CBean2Proto.getSimpleTeamInfoByHero(hero)); teamInfo.addTeam(CBean2Proto.getSimpleTeamInfoByHero(hero,heroInfo.getPosition()));
} }
} }
int guildId = user.getPlayerInfoManager().getGuildId(); int guildId = user.getPlayerInfoManager().getGuildId();
@ -564,10 +564,11 @@ public class PlayerLogic {
} }
} }
teamInfo.setTotalForce(sArenaRobotConfig.getTotalForce()); teamInfo.setTotalForce(sArenaRobotConfig.getTotalForce());
int position = 1;
for(Map.Entry<Integer,Integer> item : sArenaRobotConfig.getStarOfHeroMap().entrySet()){ for(Map.Entry<Integer,Integer> item : sArenaRobotConfig.getStarOfHeroMap().entrySet()){
Integer heroTid = item.getKey(); Integer heroTid = item.getKey();
Integer heroStar = item.getValue(); Integer heroStar = item.getValue();
teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder().setHeroid(String.valueOf(heroTid)).setHeroTid(heroTid).setLevel(sArenaRobotConfig.getRoleLv()).setStar(heroStar).build()); teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder().setHeroid(String.valueOf(heroTid)).setHeroTid(heroTid).setLevel(sArenaRobotConfig.getRoleLv()).setStar(heroStar).setPosition(position++).build());
} }
oneInfo.setTeam(teamInfo); oneInfo.setTeam(teamInfo);
return oneInfo; return oneInfo;

View File

@ -540,7 +540,7 @@ public class CBean2Proto {
} }
public static CommonProto.TeamSimpleInfo getSimpleTeamInfoByHero(Hero hero){ public static CommonProto.TeamSimpleInfo getSimpleTeamInfoByHero(Hero hero,int position){
return CommonProto.TeamSimpleInfo.newBuilder().setHeroid(hero.getId()).setHeroTid(hero.getTemplateId()).setLevel(hero.getLevel()).setStar(hero.getStar()).build(); return CommonProto.TeamSimpleInfo.newBuilder().setHeroid(hero.getId()).setHeroTid(hero.getTemplateId()).setLevel(hero.getLevel()).setStar(hero.getStar()).setPosition(position).build();
} }
} }