探索时间戳进位
parent
3b14b27161
commit
f6ac2a88bd
|
@ -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
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue