Merge branch 'master_dev' into master_otnew
commit
fefa3f6332
|
|
@ -12,11 +12,8 @@ public enum FightType {
|
|||
MonterFight(8), // 兽潮
|
||||
TOPFight(9), // 巅峰赛
|
||||
GuildBossFight(10), // 工会boss
|
||||
|
||||
|
||||
CarBossFight(11), // 车迟斗法挑战boss
|
||||
CarPersonFight(12), // 车迟斗法抢夺
|
||||
|
||||
EXPEDITION(13), // 远征
|
||||
GuildChallenge(14), //公会副本
|
||||
NewGeneral(15),//新将
|
||||
|
|
|
|||
|
|
@ -1604,11 +1604,6 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 校验主线战斗
|
||||
* @param user
|
||||
* @param fightId
|
||||
* @param teamId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public boolean checkMainFight(User user, int fightId, int teamId) throws Exception {
|
||||
MainLevelManager mainLevelManager = user.getMainLevelManager();
|
||||
|
|
@ -1810,7 +1805,7 @@ public class MapLogic {
|
|||
for (Map.Entry<Integer, Item> equipEntry : user.getItemManager().getItemMap().entrySet()) {
|
||||
if (SItem.getsItemMap().get(equipEntry.getKey()).getItemType() == 3) {
|
||||
if (equipConfig.get(equipEntry.getKey()).getStar() >= ints[1]) {
|
||||
num+=equipEntry.getValue().getItemNum();
|
||||
num+= (int) equipEntry.getValue().getItemNum();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2272,7 +2267,7 @@ public class MapLogic {
|
|||
if (mapManager.getCurMapId() == 0) {
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
if (heroInfo.size() < 1 || !heroInfo.containsKey(heroId)) {
|
||||
if (heroInfo.isEmpty() || !heroInfo.containsKey(heroId)) {
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
int[] healing = STrialSetting.sTrialSetting.getHealingId();
|
||||
|
|
@ -2311,9 +2306,6 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 获取无尽副本英雄信息
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
public void getEndlessHero(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
|
|
@ -2328,7 +2320,7 @@ public class MapLogic {
|
|||
MapInfoProto.GetEndlessHeroResponse.Builder response = MapInfoProto.GetEndlessHeroResponse.newBuilder();
|
||||
//已开启地图处理
|
||||
Map<Integer, SEndlessMapConfig> sEndlessMapConfigMap = SEndlessMapConfig.sEndlessMapConfigMap;
|
||||
if (endlessMapInfo.getOpenMap() == null || endlessMapInfo.getOpenMap().size() < 1) {
|
||||
if (endlessMapInfo.getOpenMap() == null || endlessMapInfo.getOpenMap().isEmpty()) {
|
||||
Set<Integer> openMap = new HashSet<>();
|
||||
for (Map.Entry<Integer, SEndlessMapConfig> entry : sEndlessMapConfigMap.entrySet()) {
|
||||
openMap.add(entry.getKey());
|
||||
|
|
@ -2383,9 +2375,6 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 无尽副本复位
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
public void resetEndlessHero(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
|
|
@ -2411,11 +2400,6 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 无尽副本设置标记
|
||||
*
|
||||
* @param session
|
||||
* @param cellId
|
||||
* @param content
|
||||
* @param messageType
|
||||
*/
|
||||
public void setEndlessSign(ISession session, int type, int mapId, int cellId, String content, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
|
|
@ -2449,10 +2433,6 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 刷新获取行动力
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
* @throws Exception
|
||||
*/
|
||||
public void refreshEndlessExecution(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
|
|
@ -2462,9 +2442,6 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 获取出图统计数据
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
public void endlessOutMapConsume(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
|
|
@ -2479,9 +2456,6 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 无尽副本复活消耗行动力
|
||||
*
|
||||
* @param user
|
||||
* @throws Exception
|
||||
*/
|
||||
public void reviveConsumeExecution(User user) throws Exception {
|
||||
MapManager mapManager = user.getMapManager();
|
||||
|
|
@ -2507,19 +2481,13 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 清理无尽副本道具
|
||||
*
|
||||
* @param uid
|
||||
* @throws Exception
|
||||
*/
|
||||
public void clearEndLessDrop(int uid) throws Exception {
|
||||
public void clearEndLessDrop(int uid) {
|
||||
ItemLogic.getInstance().functionEndClearItem(uid, FunctionIdEnum.Endless.getFunctionType(), BIReason.ENDLESS_REASON_CHANGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 无尽副本小地图信息
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
public void endlessMinMapInfo(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
MapManager mapManager = UserManager.getUser(session.getUid()).getMapManager();
|
||||
|
|
@ -2527,15 +2495,15 @@ public class MapLogic {
|
|||
MapInfoProto.EndlessMinMapResponse.Builder response = MapInfoProto.EndlessMinMapResponse.newBuilder();
|
||||
Map<Integer, SCMap> scMap = SCMap.sCMap.get(mapManager.getEndlessMapInfo().getCurMapId());
|
||||
for (Map.Entry<Integer, SCMap> entry : scMap.entrySet()) {
|
||||
for (int i = 0; i < endlessMinMapPoint.length; i++) {
|
||||
if (entry.getValue().getEvent() == endlessMinMapPoint[i][0]) {
|
||||
for (int[] ints : endlessMinMapPoint) {
|
||||
if (entry.getValue().getEvent() == ints[0]) {
|
||||
int[][] groups = entry.getValue().getGroups();
|
||||
for (int j = 0; j < groups.length; j++) {
|
||||
for (int[] group : groups) {
|
||||
CommonProto.EndlessPoint.Builder point = CommonProto.EndlessPoint.newBuilder();
|
||||
int x = groups[j][0];
|
||||
int y = groups[j][1];
|
||||
int x = group[0];
|
||||
int y = group[1];
|
||||
int xy = CellUtil.xy2Pos(x, y);
|
||||
point.setLocation(xy).setMonsterId(endlessMinMapPoint[i][1]);
|
||||
point.setLocation(xy).setMonsterId(ints[1]);
|
||||
response.addPoints(point);
|
||||
LOGGER.info("小地图怪物坐标点{}", xy);
|
||||
}
|
||||
|
|
@ -2596,8 +2564,6 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 无尽副本赛季更换,用户信息清除
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void resetEndlessInfo() throws Exception {
|
||||
Map<Integer, ISession> onlineUserMap = OnlineUserManager.sessionMap;
|
||||
|
|
@ -2640,44 +2606,12 @@ 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);
|
||||
}
|
||||
|
||||
public void getDifficult() throws Exception {
|
||||
SEndlessDifficulty baseDiff = STableManager.getConfig(SEndlessDifficulty.class).get(1);
|
||||
|
||||
// if (serverConfigTmp.getWorldLevel() == 0) {
|
||||
// for (int i = 0; i < baseDiff.getMonsterId().length; i++) {
|
||||
// difficultyMonster.put(baseDiff.getMonsterId()[i], baseDiff.getMonsterId()[i]);
|
||||
// }
|
||||
// for (int i = 0; i < baseDiff.getRewardId().length; i++) {
|
||||
// difficultyReward.put(baseDiff.getRewardId()[i], baseDiff.getRewardId()[i]);
|
||||
// }
|
||||
// } else {
|
||||
// for (Map.Entry<Integer, SEndlessDifficulty> entry : STableManager.getConfig(SEndlessDifficulty.class).entrySet()) {
|
||||
// if (serverConfigTmp.getWorldLevel() <= entry.getValue().getWorldLevel()[0] || serverConfigTmp.getWorldLevel() > entry.getValue().getWorldLevel()[1]) {
|
||||
// continue;
|
||||
// }
|
||||
// for (int i = 0; i < baseDiff.getMonsterId().length; i++) {
|
||||
// difficultyMonster.put(baseDiff.getMonsterId()[i], entry.getValue().getMonsterId()[i]);
|
||||
// }
|
||||
// for (int i = 0; i < baseDiff.getRewardId().length; i++) {
|
||||
// difficultyReward.put(baseDiff.getRewardId()[i], entry.getValue().getRewardId()[i]);
|
||||
// }
|
||||
//
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
public void dailyChallenge(ISession session, int type, int id, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
PlayerInfoProto.DailyChallengeResponse.Builder builder = PlayerInfoProto.DailyChallengeResponse.newBuilder();
|
||||
|
|
@ -2783,11 +2717,6 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 试炼副本保存阵容
|
||||
*
|
||||
* @param session
|
||||
* @param heroes
|
||||
* @param messageType
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveTrailTeam(ISession session, List<MapInfoProto.TrialSaveHero> heroes, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
|
|
@ -2848,10 +2777,6 @@ public class MapLogic {
|
|||
|
||||
/**
|
||||
* 获取宝箱
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
* @throws Exception
|
||||
*/
|
||||
public void trialGetBox(ISession session, int type, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
|
|
@ -3111,7 +3036,7 @@ public class MapLogic {
|
|||
|
||||
}
|
||||
|
||||
public void flushEndlessTreasure(User user) throws Exception {
|
||||
public void flushEndlessTreasure(User user) {
|
||||
if (user.getMapManager().getEndlessTreasureReward().getCreateTime() < TimeUtils.nowInt()) {
|
||||
user.getMapManager().resetEndlessTreasure();
|
||||
Item item = user.getItemManager().getItem(102);//升级积分清除
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class QuickStartMonsterFighter extends BaseHandler<FightInfoProto.QuickSt
|
|||
throw new ErrorCodeException(ErrorCode.CFG_NULL);
|
||||
}
|
||||
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||
if (teamPosHeroInfos == null || teamPosHeroInfos.size() == 0) {
|
||||
if (teamPosHeroInfos == null || teamPosHeroInfos.isEmpty()) {
|
||||
LOGGER.info("startLevelDifficultyFight==> uid={},fightId={},teamId={}", uid, fightId, teamId);
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("阵容有误"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,25 +19,18 @@ import com.ljsd.jieling.logic.fight.eventhandler.*;
|
|||
*/
|
||||
public enum GameFightType {
|
||||
StoryFight(FightType.StoryFight,new MainLineOrInnerDemonFightHandler(), RedisKey.LEVE_DIFFICULTY_FIGHT),
|
||||
|
||||
MapFastFight(FightType.MapExploreFight,new DefaultWithoutHandFightHandler(),null),
|
||||
|
||||
MapEndFight(FightType.MapExploreFight,new DefaultOfRedisCacheFightHandler(),RedisKey.FIGHT),
|
||||
EndSuddlenlyFight(FightType.MapExploreFight,new DefaultOfRedisCacheFightHandler(),RedisKey.SUDDLENLY_FIGHT),
|
||||
EndMonsterAttackFight(FightType.MapExploreFight,new MainLineOrInnerDemonFightHandler(),RedisKey.CHALLENGE_MONSTER_ATTACK),
|
||||
|
||||
EndMonsterAttackFight(FightType.MonterFight,new MainLineOrInnerDemonFightHandler(),RedisKey.CHALLENGE_MONSTER_ATTACK),
|
||||
MonterFight(FightType.MonterFight,new MainLineOrInnerDemonFightHandler(),null),
|
||||
ArenaPersonFight(FightType.ArenaFight,new PVPFightHandler(),null),
|
||||
ArenaRobotFight(FightType.ArenaFight,new PVPFightHandler(),null),
|
||||
Expediton(FightType.EXPEDITION,new PVPFightHandler(),null),
|
||||
|
||||
TOPArenaPersonFight(FightType.TOPFight,new PVPFightHandler(),null),
|
||||
TOPArenaRobotFight(FightType.TOPFight,new PVPFightHandler(),null),
|
||||
TOPArena2RobotFight(FightType.TOPFight,new PVPFightHandler(),null),
|
||||
|
||||
MonterFight(FightType.MonterFight,new DefaultWithoutHandFightHandler(),null),
|
||||
|
||||
GuildFight(FightType.GuildFight,new PVPFightHandler(),null),
|
||||
|
||||
GuildBossFight(FightType.GuildBossFight,new DefaultOfRedisCacheFightHandler(),RedisKey.GUILD_MONSTER_FIGHT),
|
||||
DailyChallenge(FightType.StoryFight,new DefaultWithoutHandFightHandler(),null),
|
||||
DeathPathChallenge(FightType.CarBossFight,new DefaultWithoutHandFightHandler(),null),
|
||||
|
|
|
|||
Loading…
Reference in New Issue