无尽设置跳过战斗、科技树修改
parent
0d93202a6c
commit
1215fdafdc
|
@ -26,6 +26,8 @@ public class EndlessMapInfo {
|
||||||
|
|
||||||
private Map<Integer, Cell> mapInfo = new HashMap<>();
|
private Map<Integer, Cell> mapInfo = new HashMap<>();
|
||||||
|
|
||||||
|
private int skipFight;
|
||||||
|
|
||||||
private int season;
|
private int season;
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,4 +128,12 @@ public class EndlessMapInfo {
|
||||||
public void setSeason(int season) {
|
public void setSeason(int season) {
|
||||||
this.season = season;
|
this.season = season;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getSkipFight() {
|
||||||
|
return skipFight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSkipFight(int skipFight) {
|
||||||
|
this.skipFight = skipFight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3128,7 +3128,7 @@ public class MapLogic {
|
||||||
//
|
//
|
||||||
// user.getTeamPosManager().updateTeamPosByTeamId(401,team);
|
// user.getTeamPosManager().updateTeamPosByTeamId(401,team);
|
||||||
// }
|
// }
|
||||||
|
response.setSkipFight(endlessMapInfo.getSkipFight());
|
||||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3387,4 +3387,14 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置无尽副本是否跳过战斗
|
||||||
|
* @param session
|
||||||
|
* @param type
|
||||||
|
* @param messageType
|
||||||
|
*/
|
||||||
|
public void setEndlessSkipType(ISession session, int type, MessageTypeProto.MessageType messageType) throws Exception {
|
||||||
|
UserManager.getUser(session.getUid()).getMapManager().updateEndlessSkipFight(type);
|
||||||
|
MessageUtil.sendMessage(session,1,messageType.getNumber(),null,true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -780,6 +780,10 @@ public class MapManager extends MongoBase {
|
||||||
endlessMapInfo.setSeason(season);
|
endlessMapInfo.setSeason(season);
|
||||||
updateString("endlessMapInfo.season",season);
|
updateString("endlessMapInfo.season",season);
|
||||||
}
|
}
|
||||||
|
public void updateEndlessSkipFight(int type){
|
||||||
|
endlessMapInfo.setSkipFight(type);
|
||||||
|
updateString("endlessMapInfo.skipFight",type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.ljsd.jieling.handler.map.mapHandler;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.handler.BaseHandler;
|
||||||
|
import com.ljsd.jieling.handler.map.MapLogic;
|
||||||
|
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||||
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
|
import com.ljsd.jieling.protocols.MapInfoProto;
|
||||||
|
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class EndlessSetSkipFightHandler extends BaseHandler<MapInfoProto.EndlessSetSkipRequest> {
|
||||||
|
@Override
|
||||||
|
public MessageTypeProto.MessageType getMessageCode() {
|
||||||
|
return MessageTypeProto.MessageType.ENDLESS_SET_SKIPFIGHT_REQUEST;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void processWithProto(ISession iSession, MapInfoProto.EndlessSetSkipRequest proto) throws Exception {
|
||||||
|
MapLogic.getInstance().setEndlessSkipType(iSession,proto.getType(), MessageTypeProto.MessageType.ENDLESS_SET_SKIPFIGHT_RESPONSE);
|
||||||
|
}
|
||||||
|
}
|
|
@ -135,7 +135,7 @@ public class BloodLogic {
|
||||||
.build();
|
.build();
|
||||||
response.addInfos(info);
|
response.addInfos(info);
|
||||||
}
|
}
|
||||||
int myRank= RedisUtil.getInstence().getZSetreverseRank(RedisKey.BLOODY_RANK,"",Integer.toString(session.getUid())).intValue();
|
int myRank= RedisUtil.getInstence().getZSetreverseRank(RedisKey.BLOODY_RANK,"1",Integer.toString(session.getUid())).intValue();
|
||||||
response.setMyRank(myRank);
|
response.setMyRank(myRank);
|
||||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,9 @@ public class WorkShopLogic {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int limits = sWorkShopTechnology.getLimits();
|
int limits = sWorkShopTechnology.getLimits();
|
||||||
int workShopLevel = workShopController.getWorkShopLevel();
|
// int workShopLevel = workShopController.getWorkShopLevel();
|
||||||
if(workShopLevel<limits){
|
int playerLevel = user.getPlayerInfoManager().getLevel();
|
||||||
|
if(playerLevel<limits){
|
||||||
MessageUtil.sendErrorResponse(iSession,0,msgId,"level not");
|
MessageUtil.sendErrorResponse(iSession,0,msgId,"level not");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue