跨服灵妙计分

back_recharge
xuexinpeng 2021-11-23 10:13:43 +08:00
parent e341f52da6
commit a122652d60
2 changed files with 3 additions and 3 deletions

View File

@ -183,7 +183,7 @@ public class CrossLingmaiSecretAreaBattleHandler extends BaseHandler<ArenaInfoPr
int second =((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) % 60) >60 ?
60 : ((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) % 60);
oldOwner.setScore1(oldOwner.getScore1()+minute*config.getRewardList()[0][1]+(second*(config.getRewardList()[0][1]/60)));
int score = oldOwner.getScore1() + config.getRewardList()[0][1]*oldOwner.getOccupyTime();
long score = oldOwner.getScore1() + config.getRewardList()[0][1]*(long)oldOwner.getOccupyTime()/60;
rank.addRank(defUid, String.valueOf(crossGroup) + RedisKey.Delimiter_colon + group, score);
if (myLingmaiId != 0) {
//本人已有灵脉结算
@ -194,7 +194,7 @@ public class CrossLingmaiSecretAreaBattleHandler extends BaseHandler<ArenaInfoPr
60 : ((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) % 60);
myLingmai.setScore1(myLingmai.getScore1()+minute*config.getRewardList()[0][1]+(second*(config.getRewardList()[0][1]/60)));
myLingmai.setGetAwardTimeOrOccupyTime(TimeUtils.nowInt());
score = myLingmai.getScore1() + config.getRewardList()[0][1] * myLingmai.getOccupyTime();
score = myLingmai.getScore1() + config.getRewardList()[0][1] * (long)myLingmai.getOccupyTime()/60;
rank = RankContext.getRankEnum(RankEnum.CROSS_LINGMAI_RANK_PERSON.getType());
rank.addRank(user.getId(), String.valueOf(crossGroup) + RedisKey.Delimiter_colon + group, score);
//两边都计算分 置换

View File

@ -82,7 +82,7 @@ public class CrossLingmaiLogic {
crossGroup + RedisKey.Delimiter_colon + group, map.getKey(), map.getValue());
AbstractRank rank = RankContext.getRankEnum(RankEnum.CROSS_LINGMAI_RANK_PERSON.getType());
LOGGER.error("minute:"+map.getValue().getOccupyTime()+" per:"+(config.getRewardList()[0][1]/60));
int score = map.getValue().getOccupyTime() * config.getRewardList()[0][1]/60 + map.getValue().getScore1();
long score = (long)map.getValue().getOccupyTime() * config.getRewardList()[0][1]/60 + map.getValue().getScore1();
double test = rank.getScoreById(user.getId(), crossGroup + RedisKey.Delimiter_colon + group);
LOGGER.error("之前是:" + test + "之后是:" + score);
rank.addRank(user.getId(), String.valueOf(crossGroup) + RedisKey.Delimiter_colon + group, score);