cal score
parent
611dd26e04
commit
45fe740b3d
|
@ -385,6 +385,7 @@ public class Scene implements Runnable{
|
||||||
score=0;
|
score=0;
|
||||||
}
|
}
|
||||||
UserBloodySnpInfo userBloodySnpInfo = BattleManager.bloodMyHeroInfoMap.get(id);
|
UserBloodySnpInfo userBloodySnpInfo = BattleManager.bloodMyHeroInfoMap.get(id);
|
||||||
|
myscore= calScore(sortDataBean);
|
||||||
builder.addSceneSimpleRankInfo(SceneFight.SceneSimpleRankInfo.newBuilder()
|
builder.addSceneSimpleRankInfo(SceneFight.SceneSimpleRankInfo.newBuilder()
|
||||||
.setScore(myscore).setUpdateScore(score).setUid(id)
|
.setScore(myscore).setUpdateScore(score).setUid(id)
|
||||||
.setHead(userBloodySnpInfo.getHead()).setHeadFrame(userBloodySnpInfo.getHeadFrame()).setLevel(userBloodySnpInfo.getLevel())
|
.setHead(userBloodySnpInfo.getHead()).setHeadFrame(userBloodySnpInfo.getHeadFrame()).setLevel(userBloodySnpInfo.getLevel())
|
||||||
|
@ -527,4 +528,21 @@ public class Scene implements Runnable{
|
||||||
this.quickEnd = -1;
|
this.quickEnd = -1;
|
||||||
this.quickPlayId = 0;
|
this.quickPlayId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int calScore(SortDataBean sortDataBean){
|
||||||
|
int result = 0;
|
||||||
|
int killNums = sortDataBean.getKillNums();
|
||||||
|
int mineral = sortDataBean.getMineral();
|
||||||
|
int[][] scoreConversion = SBloodyBattleSetting.sBloodyBattleSetting.getScoreConversion();
|
||||||
|
for(int [] scoreItem : scoreConversion){
|
||||||
|
int type = scoreItem[0];
|
||||||
|
if(type == 1){
|
||||||
|
result+=mineral/scoreItem[1];
|
||||||
|
}else{
|
||||||
|
result+=killNums/scoreItem[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue