探索时间戳进位

back_recharge
xuexinpeng 2021-12-31 17:33:31 +08:00
parent 3b14b27161
commit f6ac2a88bd
2 changed files with 17 additions and 1 deletions

View File

@ -1148,9 +1148,25 @@ public class TimeUtils {
calendar.set(Calendar.MINUTE, minute); calendar.set(Calendar.MINUTE, minute);
calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.SECOND, 0);
return calendar.getTimeInMillis(); return calendar.getTimeInMillis();
} }
/**
*
* @return
*/
public static int getAppointTime() {
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(now());
int minute = calendar.get(Calendar.MINUTE);
if(calendar.get(Calendar.SECOND)>0){
calendar.set(Calendar.MINUTE, minute+1);
}
calendar.set(Calendar.SECOND, 0);
return (int)(calendar.getTimeInMillis()/1000);
}
/** /**
* @param time 00:00:00 * @param time 00:00:00

View File

@ -87,7 +87,7 @@ public class ExplorerMapSendHandler extends BaseHandler<PlayerInfoProto.Explorer
} }
ExplorerInfo explorerInfo = new ExplorerInfo(); ExplorerInfo explorerInfo = new ExplorerInfo();
explorerInfo.setMapId(mapId); explorerInfo.setMapId(mapId);
explorerInfo.setSendEndTime(TimeUtils.nowInt() + time); explorerInfo.setSendEndTime(TimeUtils.getAppointTime() + time);
explorerInfo.setSendTime(time); explorerInfo.setSendTime(time);
//怪物的初始血量 //怪物的初始血量
int mapMonsterForce = exploreConfig.getMonsterForce(); int mapMonsterForce = exploreConfig.getMonsterForce();