服务器挂掉 停服 期间内的也算收益
parent
8a1e4fe26a
commit
4af6f1bffa
|
@ -121,7 +121,8 @@ public class CrossLingmaiSecretAreaBattleHandler extends BaseHandler<ArenaInfoPr
|
||||||
if (myLingmaiId != 0){
|
if (myLingmaiId != 0){
|
||||||
LingMaiSecretArea myLingmai = lingMaiMap.get(String.valueOf(myLingmaiId));
|
LingMaiSecretArea myLingmai = lingMaiMap.get(String.valueOf(myLingmaiId));
|
||||||
config = SLodeConfig.lodeConfig.get(myLingmaiId);
|
config = SLodeConfig.lodeConfig.get(myLingmaiId);
|
||||||
int minute = ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) / 60) > 10 ? 10 : ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) / 60);
|
//int minute = ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) / 60) > 10 ? 10 : ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) / 60);
|
||||||
|
int minute = ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) / 60);
|
||||||
int second =((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) % 60) >60 ?
|
int second =((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) % 60) >60 ?
|
||||||
60 : ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) % 60);
|
60 : ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) % 60);
|
||||||
myLingmai.setScore1(myLingmai.getScore1() + minute*config.getRewardList()[0][1]+(second*(config.getRewardList()[0][1]/60)));
|
myLingmai.setScore1(myLingmai.getScore1() + minute*config.getRewardList()[0][1]+(second*(config.getRewardList()[0][1]/60)));
|
||||||
|
@ -182,7 +183,8 @@ public class CrossLingmaiSecretAreaBattleHandler extends BaseHandler<ArenaInfoPr
|
||||||
//赢了 我有灵脉 我没灵脉
|
//赢了 我有灵脉 我没灵脉
|
||||||
//别人积分收益结算
|
//别人积分收益结算
|
||||||
LingMaiSecretArea oldOwner = lingMaiMap.get(String.valueOf(id));//上一个占领者
|
LingMaiSecretArea oldOwner = lingMaiMap.get(String.valueOf(id));//上一个占领者
|
||||||
int minute = ((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) / 60) > 10 ? 10 : ((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) / 60);
|
//int minute = ((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) / 60) > 10 ? 10 : ((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) / 60);
|
||||||
|
int minute = ((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) / 60);
|
||||||
int second =((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) % 60) >60 ?
|
int second =((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) % 60) >60 ?
|
||||||
60 : ((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) % 60);
|
60 : ((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) % 60);
|
||||||
long tempScore = second*config.getRewardList()[0][1]/60;
|
long tempScore = second*config.getRewardList()[0][1]/60;
|
||||||
|
@ -193,7 +195,8 @@ public class CrossLingmaiSecretAreaBattleHandler extends BaseHandler<ArenaInfoPr
|
||||||
//本人已有灵脉结算
|
//本人已有灵脉结算
|
||||||
LingMaiSecretArea myLingmai = lingMaiMap.get(String.valueOf(myLingmaiId));//上一个占领者
|
LingMaiSecretArea myLingmai = lingMaiMap.get(String.valueOf(myLingmaiId));//上一个占领者
|
||||||
config = SLodeConfig.lodeConfig.get(myLingmaiId);
|
config = SLodeConfig.lodeConfig.get(myLingmaiId);
|
||||||
minute = ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) / 60) > 10 ? 10 : ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) / 60);
|
//minute = ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) / 60) > 10 ? 10 : ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) / 60);
|
||||||
|
minute = ((TimeUtils.nowInt() - (int)myLingmai.getGetAwardTimeOrOccupyTime()) / 60);
|
||||||
second =((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) % 60) >60 ?
|
second =((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) % 60) >60 ?
|
||||||
60 : ((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) % 60);
|
60 : ((TimeUtils.nowInt() - (int)oldOwner.getGetAwardTimeOrOccupyTime()) % 60);
|
||||||
tempScore =(second*config.getRewardList()[0][1]/60);
|
tempScore =(second*config.getRewardList()[0][1]/60);
|
||||||
|
@ -248,7 +251,6 @@ public class CrossLingmaiSecretAreaBattleHandler extends BaseHandler<ArenaInfoPr
|
||||||
//被抢占 给在线的被抢占玩家发红点
|
//被抢占 给在线的被抢占玩家发红点
|
||||||
ISession sess = OnlineUserManager.sessionMap.get(defUid);
|
ISession sess = OnlineUserManager.sessionMap.get(defUid);
|
||||||
if (sess != null) {
|
if (sess != null) {
|
||||||
LOGGER.info("灵脉秘境红点logloglogggggggggggggg");
|
|
||||||
ArenaInfoProto.CrossLingmaiIndicationResponse.Builder indication = ArenaInfoProto.CrossLingmaiIndicationResponse.newBuilder();
|
ArenaInfoProto.CrossLingmaiIndicationResponse.Builder indication = ArenaInfoProto.CrossLingmaiIndicationResponse.newBuilder();
|
||||||
MessageUtil.sendIndicationMessage(sess, 1, MessageTypeProto.MessageType.CrossLingmaiIndicationResponse_VALUE, indication.build(), true);
|
MessageUtil.sendIndicationMessage(sess, 1, MessageTypeProto.MessageType.CrossLingmaiIndicationResponse_VALUE, indication.build(), true);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -70,7 +70,8 @@ public class CrossLingmaiLogic {
|
||||||
if (config != null) {
|
if (config != null) {
|
||||||
int occupyTime = (int) map.getValue().getGetAwardTimeOrOccupyTime();
|
int occupyTime = (int) map.getValue().getGetAwardTimeOrOccupyTime();
|
||||||
//分钟
|
//分钟
|
||||||
int minute = (nowTime - occupyTime) / 60 >= 10 ? 10 : (nowTime - occupyTime) / 60;
|
//int minute = (nowTime - occupyTime) / 60 >= 10 ? 10 : (nowTime - occupyTime) / 60;
|
||||||
|
int minute = (nowTime - occupyTime) / 60;
|
||||||
//秒
|
//秒
|
||||||
int second = (nowTime - occupyTime) % 60 >= 60 ? 60 : (nowTime - occupyTime) % 60;
|
int second = (nowTime - occupyTime) % 60 >= 60 ? 60 : (nowTime - occupyTime) % 60;
|
||||||
//difVal =1 ;
|
//difVal =1 ;
|
||||||
|
|
Loading…
Reference in New Issue