无尽修改

lvxinran 2019-09-28 07:02:27 +08:00
parent e88fb2a1ec
commit 711ae66483
2 changed files with 15 additions and 3 deletions

View File

@ -222,7 +222,6 @@ public class MapLogic {
StoreLogic.initOnsStoereWithTime(user,SEndlessMapConfig.sEndlessMapConfigMap.get(endlessMapId).getMapStoreId(),openTimeOfFuntionCacheByType.getStartTime(),openTimeOfFuntionCacheByType.getEndTime());
mapManager.updateEndlessSeason(endlessSeason);
mapManager.updateEndlessMapId(0);
mapManager.updateEndlessLocation(0);
mapManager.endlessWalkCellSave(new HashSet<>());
mapManager.endlessMapInfoSave(new HashMap<>());
}else{
@ -345,7 +344,7 @@ public class MapLogic {
break;
}
Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
if(teamId==401){
if(teamId==401&&user.getMapManager().getEndlessMapInfo().getSeason()==endlessSeason){
Map<String, Integer> endlessHeroInfo = user.getMapManager().getEndlessMapInfo().getEndlessHeroInfo();
if(endlessHeroInfo!=null&&endlessHeroInfo.size()>0){
if(initType!=2){
@ -481,6 +480,12 @@ public class MapLogic {
int xy = CellUtil.xy2Pos(challengeMapConfig.getPosition()[0], challengeMapConfig.getPosition()[1]);
int type = sChallengeConfig.getType();
if(type==4){
if(mapManager.getEndlessMapInfo().getSeason()!=endlessSeason) {
for(Map.Entry<String,Integer> entry:mapManager.getEndlessMapInfo().getEndlessHeroInfo().entrySet()){
mapManager.updateEndlessHeroHp(entry.getKey(),10000);
}
mapManager.updateEndlessLocation(0);
}
if(mapManager.getEndlessMapInfo().getCurCell()!=0){
xy = mapManager.getEndlessMapInfo().getCurCell();
}

View File

@ -29,6 +29,7 @@ import com.ljsd.jieling.netty.cocdex.Tea;
import com.ljsd.jieling.network.server.ProtocolsManager;
import com.ljsd.jieling.network.session.ISession;
import com.ljsd.jieling.protocols.CommonProto;
import com.ljsd.jieling.protocols.MapInfoProto;
import com.ljsd.jieling.protocols.MessageTypeProto;
import com.ljsd.jieling.protocols.PlayerInfoProto;
import com.ljsd.jieling.thread.task.RPCGmServerTask;
@ -167,10 +168,16 @@ public class GlobalDataManaager {
break;
case Endless:
MapLogic.getInstance().updateEndlessSeason(timeControllerOfFunction.getTimes());
serverConfigTmp.setWorldLevel(calWorldLevel());
int level = calWorldLevel();
serverConfigTmp.setWorldLevel(level);
SEndlessDifficulty.setDifficult();
MongoUtil.getLjsdMongoTemplate().save(serverConfigTmp);
MapLogic.getInstance().setEndlessMapId(getEndleeMapIdByLevel());
Map<Integer, ISession> onlineUserMap = OnlineUserManager.sessionMap;
MapInfoProto.EndlessMapChange info = MapInfoProto.EndlessMapChange.newBuilder().setMapId(MapLogic.getEndlessMapId()).setWorldLevel(level).build();
for(Map.Entry<Integer, ISession> entry:onlineUserMap.entrySet()){
MessageUtil.sendIndicationMessage(entry.getValue(),1, MessageTypeProto.MessageType.ENDLESS_MAP_CHANGE_INDICATION_VALUE,info,true);
}
break;
default:
break;