diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/fight/CombatLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/fight/CombatLogic.java index a48d9fe04..f662e898d 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/fight/CombatLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/fight/CombatLogic.java @@ -50,6 +50,10 @@ public class CombatLogic { if(hasAdventure){ offLineTime = (int)((System.currentTimeMillis() -playerInfoManager.getOffLineTime())/1000); } + if(offLineTime == 0){ + MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.GET_ADVENTURE_INFO_RESPONSE_VALUE,null,true); + return; + } FightInfoProto.GetAdventureStateInfoResponse response = FightInfoProto.GetAdventureStateInfoResponse.newBuilder().addAllAdventureStateInfoList(result).setDrop(dropBuilder.build()).setOutTime(offLineTime). build(); MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.GET_ADVENTURE_INFO_RESPONSE_VALUE,response,true); @@ -141,7 +145,7 @@ public class CombatLogic { Map adventureStateInfoMap = adventureManager.getAdventureStateInfoMap(); int now = (int)(System.currentTimeMillis()/1000); int adventureRefresh = SGameSetting.getGameSetting().getAdventureRefresh(); - int offLineTime = (int)(user.getPlayerInfoManager().getOffLineTime()); + int offLineTime = (int)(user.getPlayerInfoManager().getOffLineTime()/1000); for(AdventureStateInfo adventureStateInfoTmp:adventureStateInfoMap.values()){ int positionTmp = adventureStateInfoTmp.getPosition(); if(position!=0 && positionTmp!=position){