back_recharge
zhangshanxue 2019-09-09 11:28:52 +08:00
commit 8dc4700f13
3 changed files with 15 additions and 10 deletions

View File

@ -162,7 +162,6 @@ public abstract class Creature extends SceneActor{
int curPos = getPos(); int curPos = getPos();
LOGGER.info("the id={},preMoveTimestamp={},the time ={},move={},the oldXy={},the curXy={}",getId(),new Date(preMoveTimestamp),new Date(timestamp),moveDistance,CellUtil.pos2XY(oldXY),CellUtil.pos2XY(curPos)); LOGGER.info("the id={},preMoveTimestamp={},the time ={},move={},the oldXy={},the curXy={}",getId(),new Date(preMoveTimestamp),new Date(timestamp),moveDistance,CellUtil.pos2XY(oldXY),CellUtil.pos2XY(curPos));
setStateType(StateType.MOVEABLE);
preMoveTimestamp = timestamp; preMoveTimestamp = timestamp;
return curPos; return curPos;
} }

View File

@ -132,6 +132,7 @@ public abstract class SceneActor{
} }
} }
//清楚挖抗连续事件 //清楚挖抗连续事件
setStateType(StateType.MOVEABLE);
MessageBoxUtils.onGameEvent(AnalysisEventType.DIGGER,scene,new AnalysisSourceData(value.getTarget(),value.getCaster(),-1)); MessageBoxUtils.onGameEvent(AnalysisEventType.DIGGER,scene,new AnalysisSourceData(value.getTarget(),value.getCaster(),-1));
scene.processEventUpdate(EventType.BUFFER_REMOVE,value.getId()); scene.processEventUpdate(EventType.BUFFER_REMOVE,value.getId());
} }
@ -160,7 +161,7 @@ public abstract class SceneActor{
scene.processEventUpdate(EventType.SCENEACTORE_REMOVE,this.getId()); scene.processEventUpdate(EventType.SCENEACTORE_REMOVE,this.getId());
return; return;
} }
addOrUpdateBuffer(new EffectBuffer(scene.getBufferId(),4,now,now+5000,this.getId(),0,0)); addOrUpdateBuffer(new EffectBuffer(scene.getBufferId(),BufferType.REBIRTH.getType(),now,now+5000,this.getId(),0,0));
// 定位到出生点位置 // 定位到出生点位置
this.setPos(SceneManager.selectForPlayerRebirth(scene)); this.setPos(SceneManager.selectForPlayerRebirth(scene));
scene.processEventUpdate(EventType.SCENEACTORE_UPDATE,id); scene.processEventUpdate(EventType.SCENEACTORE_UPDATE,id);

View File

@ -128,15 +128,20 @@ public class RoomMatchRequestHandler extends BaseHandler{
int[][] openPeriod = setting.getOpenPeriod(); int[][] openPeriod = setting.getOpenPeriod();
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
int minute = calendar.get(Calendar.MINUTE); int minute = calendar.get(Calendar.MINUTE);
boolean enter = true; int hour = calendar.get(Calendar.HOUR_OF_DAY);
boolean enter = false;
for(int i = 0;i<openPeriod.length;i++){ for(int i = 0;i<openPeriod.length;i++){
if(TimeUtils.getHourOfDay()<openPeriod[i][0]/10000&&minute<openPeriod[i][0]%10000/1000){ if(hour>=openPeriod[i][0]/10000){
enter =false; if(hour == openPeriod[i][0]/10000 && minute<openPeriod[i][1]%10000/100){
continue; continue;
} }
if(TimeUtils.getHourOfDay()>=openPeriod[i][0]/10000&&minute>=openPeriod[i][0]%10000/1000){ if(hour<=openPeriod[i][1]/10000){
enter = false; if(hour == openPeriod[i][1]/10000 && minute>openPeriod[i][1]%10000/100){
continue; continue;
}
enter =true;
break;
}
} }
} }
return enter; return enter;