主线关卡限制条件增加
parent
8a77b7c2d5
commit
ea545c50ac
|
@ -114,6 +114,7 @@ public class MapLogic {
|
|||
public AbstractMap getMap(int mapTypeId) throws Exception {
|
||||
return MapEnum.getToAbstractMap(mapTypeId);
|
||||
}
|
||||
|
||||
public AbstractMap getMap(User user) throws Exception {
|
||||
int curMapType = user.getMapManager().getCurMapType();
|
||||
if (curMapType == 0) {
|
||||
|
@ -363,7 +364,6 @@ public class MapLogic {
|
|||
// }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param teamId
|
||||
* @param uid
|
||||
* @param user
|
||||
|
@ -732,6 +732,7 @@ public class MapLogic {
|
|||
LOGGER.info("the uid+{},the lastXy={}", uid, lastXY);
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapUpdateResponse.build(), true);
|
||||
}
|
||||
|
||||
private Set<Integer> getOpenCells(int mapId, List<Integer> cells) {
|
||||
int square = 3;//范围是3
|
||||
Set<Integer> openCells = new HashSet<>();
|
||||
|
@ -1275,9 +1276,9 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 快速战斗
|
||||
*
|
||||
// * @param session
|
||||
// * @param messageType
|
||||
* <p>
|
||||
* // * @param session
|
||||
* // * @param messageType
|
||||
*/
|
||||
// public void fastFight(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
// int uid = session.getUid();
|
||||
|
@ -1709,8 +1710,6 @@ public class MapLogic {
|
|||
// }
|
||||
// MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightEndResponse.build(), true);
|
||||
// }
|
||||
|
||||
|
||||
public void initMapMission(MapManager mapManager) {
|
||||
int mapId = mapManager.getCurMapId();
|
||||
if (mapManager.getCopyMissionProgresById(mapId) != null) {
|
||||
|
@ -2060,7 +2059,6 @@ public class MapLogic {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有关卡信息
|
||||
*
|
||||
|
@ -2079,8 +2077,6 @@ public class MapLogic {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新关卡战斗
|
||||
*/
|
||||
|
@ -2094,8 +2090,7 @@ public class MapLogic {
|
|||
if (mineFightId != fightId) {
|
||||
LOGGER.info("startMainLevelFight==> uid={},fightId={}, levelDifficulty is not allow ", uid, fightId);
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
else if (mainLevelManager.getState()!=1){
|
||||
} else if (mainLevelManager.getState() != 1) {
|
||||
// 动态匹配最新的表数据
|
||||
if (sMainLevelConfig != null && sMainLevelConfig.getNextLevel() != -1 && user.getPlayerInfoManager().getLevel() >= sMainLevelConfig.getLevelLimit()) {
|
||||
mainLevelManager.setState(1);
|
||||
|
@ -2138,6 +2133,8 @@ public class MapLogic {
|
|||
* 3:鸿蒙阵等级(6-15后)
|
||||
* 4:指定星级(运算星级)装备数量(初始可用)
|
||||
* 5:英雄总好感度等级(5-10后)
|
||||
* 7:达到指定英雄等级及数量
|
||||
*
|
||||
* @param user
|
||||
* @param openRule
|
||||
* @return
|
||||
|
@ -2152,20 +2149,20 @@ public class MapLogic {
|
|||
}
|
||||
switch (type) {
|
||||
case 1: {
|
||||
if (ints[1]> HardStageLogic.getHardStageStarsSum(user)) {
|
||||
if (HardStageLogic.getHardStageStarsSum(user) < ints[1]) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
if (ints[1]> user.getMapManager().getLastMonsterAttack()-1) {
|
||||
if (user.getMapManager().getLastMonsterAttack() - 1 < ints[1]) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
HongMengAddAttribute hongMengAddAttribute = user.getHeroManager().getResonanceAddition().get(HongMengAttributeEnum.LEVEL);
|
||||
if (hongMengAddAttribute==null||ints[1]> hongMengAddAttribute.value) {
|
||||
if (hongMengAddAttribute == null || hongMengAddAttribute.value < ints[1]) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
@ -2178,13 +2175,25 @@ public class MapLogic {
|
|||
num++;
|
||||
}
|
||||
}
|
||||
if (ints[2]>num) {
|
||||
if (num < ints[2]) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 5: {
|
||||
if (ints[1]> user.getHeroManager().GetAllLikableLv()) {
|
||||
if (user.getHeroManager().GetAllLikableLv() < ints[1]) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 7: {
|
||||
int num = 0;
|
||||
for (Map.Entry<String, Hero> stringHeroEntry : user.getHeroManager().getHeroMap().entrySet()) {
|
||||
if (stringHeroEntry.getValue().getOriginalLevel()>= ints[1]) {
|
||||
num++;
|
||||
}
|
||||
}
|
||||
if (num < ints[2]) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
@ -2291,7 +2300,6 @@ public class MapLogic {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 兽潮开始战斗
|
||||
*
|
||||
|
@ -2415,8 +2423,6 @@ public class MapLogic {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void gmCrossFight(int uid, int arrayMapId) throws Exception {
|
||||
User user = UserManager.getUser(uid);
|
||||
if (user == null || user.getMapManager() == null) {
|
||||
|
@ -2455,7 +2461,6 @@ public class MapLogic {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public void clearNormalMonster(User user) throws Exception {
|
||||
LOGGER.info("删除当前地图小怪!!");
|
||||
Map<Integer, MapPointConfig> configMap = MapPointConfig.scMapEventMap;
|
||||
|
@ -2475,8 +2480,10 @@ public class MapLogic {
|
|||
int[] x = Arrays.stream(destoryCell.toArray(new Integer[destoryCell.size()])).mapToInt(Integer::valueOf).toArray();
|
||||
BehaviorUtil.destoryPoints(user, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* 爬塔使用Buff
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
|
@ -2603,6 +2610,7 @@ public class MapLogic {
|
|||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), FbStarRewardResponse.build(), true);
|
||||
|
||||
}
|
||||
|
||||
public void recordDifficultMap(ISession session, int fbId, int difficultyId, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
MapManager mapManager = UserManager.getUser(session.getUid()).getMapManager();
|
||||
|
||||
|
@ -2615,6 +2623,7 @@ public class MapLogic {
|
|||
}
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), null, true);
|
||||
}
|
||||
|
||||
//GM调用
|
||||
public void setTower(int uid, int towerNumber) throws Exception {
|
||||
UserManager.getUser(uid).getMapManager().setTrialFloor(towerNumber);
|
||||
|
@ -2622,6 +2631,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 领取试炼小怪奖励
|
||||
*
|
||||
* @param session
|
||||
* @param
|
||||
* @param messageType
|
||||
|
@ -2648,6 +2658,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 使用回春散
|
||||
*
|
||||
* @param session
|
||||
* @param heroId
|
||||
* @param messageType
|
||||
|
@ -2701,6 +2712,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 获取无尽副本英雄信息
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
|
@ -2772,6 +2784,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 无尽副本复位
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
|
@ -2799,6 +2812,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 无尽副本设置标记
|
||||
*
|
||||
* @param session
|
||||
* @param cellId
|
||||
* @param content
|
||||
|
@ -2836,6 +2850,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 刷新获取行动力
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
* @throws Exception
|
||||
|
@ -2848,6 +2863,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 获取出图统计数据
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
|
@ -2864,6 +2880,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 无尽副本复活消耗行动力
|
||||
*
|
||||
* @param user
|
||||
* @throws Exception
|
||||
*/
|
||||
|
@ -2891,6 +2908,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 清理无尽副本道具
|
||||
*
|
||||
* @param uid
|
||||
* @throws Exception
|
||||
*/
|
||||
|
@ -2900,6 +2918,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 无尽副本小地图信息
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
|
@ -2974,8 +2993,10 @@ public class MapLogic {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 无尽副本赛季更换,用户信息清除
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void resetEndlessInfo() throws Exception {
|
||||
|
@ -2987,8 +3008,10 @@ public class MapLogic {
|
|||
clearEndLessDrop(entry.getValue().getUid());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 无尽副本赛季更换,用户信息清除
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void resetTrialInfo() throws Exception {
|
||||
|
@ -3007,6 +3030,7 @@ public class MapLogic {
|
|||
// resetMapInfo(user,false);
|
||||
}
|
||||
}
|
||||
|
||||
public void trialClear(ISession session) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
MapManager mapManager = user.getMapManager();
|
||||
|
@ -3066,6 +3090,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 设置无尽副本是否跳过战斗
|
||||
*
|
||||
* @param session
|
||||
* @param type
|
||||
* @param messageType
|
||||
|
@ -3161,7 +3186,6 @@ public class MapLogic {
|
|||
}
|
||||
|
||||
|
||||
|
||||
PVEFightEvent pveFightEvent = new PVEFightEvent(user.getId(), TeamEnum.FORMATION_NORMAL.getTeamId(), 1000, "", GameFightType.DailyChallenge, sDailyChallengeConfig.getMonsterId(), 3);
|
||||
FightResult fightResult = FightDispatcher.dispatcher(pveFightEvent);
|
||||
CommonProto.FightData fightData = CommonProto.FightData.newBuilder()
|
||||
|
@ -3209,6 +3233,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 试炼副本保存阵容
|
||||
*
|
||||
* @param session
|
||||
* @param heroes
|
||||
* @param messageType
|
||||
|
@ -3272,6 +3297,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 获取宝箱
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
* @throws Exception
|
||||
|
@ -3298,6 +3324,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 内部调用,根据不同层数进行获取宝箱
|
||||
*
|
||||
* @param boxPosition
|
||||
* @param boxReward
|
||||
* @param user
|
||||
|
@ -3394,6 +3421,7 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 小游戏更新操作
|
||||
*
|
||||
* @param session
|
||||
* @param index
|
||||
* @param messageType
|
||||
|
@ -3445,6 +3473,7 @@ public class MapLogic {
|
|||
groupId = levelDifficult.getMonsterId()[position];
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public int getDifficultReward(int rewardId, int level, int mapId) {
|
||||
Map<Integer, Map<Integer, Integer>> mapDifficult = SEndlessDifficulty.mapDifficult;
|
||||
Map<Integer, Integer> levelMap = mapDifficult.get(mapId);
|
||||
|
@ -3468,6 +3497,7 @@ public class MapLogic {
|
|||
|
||||
return rewardId;
|
||||
}
|
||||
|
||||
public void getAllEndlessTreasureInfo(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
|
@ -3481,6 +3511,7 @@ public class MapLogic {
|
|||
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), response.build(), true);
|
||||
}
|
||||
|
||||
public MapInfoProto.EndlessTreasureInfoResponse.Builder getEndlessResponseBuilder(EndlessTreasureReward worldTreasureReward) {
|
||||
MapInfoProto.EndlessTreasureInfoResponse.Builder response = MapInfoProto.EndlessTreasureInfoResponse.newBuilder();
|
||||
// if(worldTreasureReward.getFirstStartTime()!=0&&worldTreasureReward.getFirstStartTime()<=TimeUtils.nowInt()&&worldTreasureReward.getCreateTime()>TimeUtils.now()/1000){
|
||||
|
|
Loading…
Reference in New Issue