还原灵脉
parent
5e4cf04ff7
commit
8c39e341c9
|
|
@ -201,7 +201,7 @@ public class CrossLingmaiLogic {
|
|||
// * 占领奖励 每十分钟发放一次
|
||||
// */
|
||||
public void sendOccypyReward() {
|
||||
//周二 四 六 日开放 9点-21点
|
||||
//每日12点到22点
|
||||
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
if (crossGroup == -1) {
|
||||
return;
|
||||
|
|
@ -214,10 +214,12 @@ public class CrossLingmaiLogic {
|
|||
LOGGER.info("跨服灵脉,灵脉积分定时更新, key:{} 跨服分组 ={},未获取到锁",lockKey, crossGroup);
|
||||
return;
|
||||
}
|
||||
LOGGER.info("跨服灵脉,灵脉积分定时更新开始, serverId:{} 跨服分组 ={},未获取到锁",GameApplication.serverId, crossGroup);
|
||||
Map<String, LingMaiSecretArea> lingMaiMap1 = RedisUtil.getInstence().old_getmapvalue_toclass(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + 1, String.class, LingMaiSecretArea.class);
|
||||
Map<String, LingMaiSecretArea> lingMaiMap2 = RedisUtil.getInstence().old_getmapvalue_toclass(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + 2, String.class, LingMaiSecretArea.class);
|
||||
updateLingmaiData(lingMaiMap1, crossGroup, 1);
|
||||
updateLingmaiData(lingMaiMap2, crossGroup, 2);
|
||||
LOGGER.info("跨服灵脉,灵脉积分定时更新结束, serverId:{} 跨服分组 ={},未获取到锁",GameApplication.serverId, crossGroup);
|
||||
}
|
||||
//
|
||||
//
|
||||
|
|
@ -234,15 +236,15 @@ public class CrossLingmaiLogic {
|
|||
//秒
|
||||
int second = Math.min((nowTime - occupyTime) % 60, 60);
|
||||
//difVal =1 ;
|
||||
LOGGER.error("玩家" + map.getValue().getUid() + "原有秒:"+map.getValue().getOccupyTime()+" 获得秒:" + (minute*60+second));
|
||||
// LOGGER.error("玩家" + map.getValue().getUid() + "原有秒:"+map.getValue().getOccupyTime()+" 获得秒:" + (minute*60+second));
|
||||
map.getValue().setOccupyTime(map.getValue().getOccupyTime() + minute*60+second);
|
||||
map.getValue().setGetAwardTimeOrOccupyTime(nowTime);
|
||||
RedisUtil.getInstence().old_putmap(RedisKey.CROSS_LINGMAISECRET_INFO, groupkey, map.getKey(), map.getValue());
|
||||
AbstractRank rank = RankContext.getRankEnum(RankEnum.CROSS_LINGMAI_RANK_PERSON.getType());
|
||||
LOGGER.error("second:"+map.getValue().getOccupyTime()+" perMinuteReward:"+(config.getRewardList()[0][1]));
|
||||
// LOGGER.error("second:"+map.getValue().getOccupyTime()+" perMinuteReward:"+(config.getRewardList()[0][1]));
|
||||
long score = (long)map.getValue().getOccupyTime() * config.getRewardList()[0][1]/60 + map.getValue().getScore1();
|
||||
double test = rank.getScoreById(map.getValue().getUid(), groupkey);
|
||||
LOGGER.error("之前是:" + test + "之后是:" + score);
|
||||
// LOGGER.error("之前是:" + test + "之后是:" + score);
|
||||
rank.addRank(map.getValue().getUid(), groupkey, score);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue