公会一键删除,怪物组为空,获取编队为空,地图id为空处理

lvxinran 2019-12-07 21:35:48 +08:00
parent dbc049a621
commit f755892340
4 changed files with 24 additions and 6 deletions

View File

@ -1224,6 +1224,7 @@ public class MapLogic {
groupId = newGroupId;
}
}
LOGGER.info("EventId为{},groupId为{}",bigEventId,groupId);
int destoryXY = mapManager.getTriggerXY();
CommonProto.FightTeamInfo fightTeamInfo = BehaviorUtil.getFightTeamInfo(user, mapManager.getTeamId(), true);
Map<Integer, List<CommonProto.FightUnitInfo>> monsterByGroup = MonsterUtil.getMonsterByGroup(groupId);
@ -1429,6 +1430,7 @@ public class MapLogic {
}
FightInfoProto.FightStartResponse.Builder fightStartResponse = FightInfoProto.FightStartResponse.newBuilder();
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId());
LOGGER.info("EventId为{},groupId为{}",bigEventId,groupId);
BehaviorUtil.getFightInfo(user, groupId, fightStartResponse, pointId, sChallengeConfig.getMostTime(), true);
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightStartResponse.build(), true);
}
@ -1534,8 +1536,10 @@ public class MapLogic {
fightEndResponse.addAllRemainHpList(remainHp);
fightEndResponse.setLastXY(mapManager.getLastXY());
mapManager.setCurXY(mapManager.getLastXY());
if (SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType() == 2) {
fightEndResponse.setLastTowerTime((int) (mapManager.getCurrTowerTime() / 1000));
if(mapManager.getCurMapId()!=0){
if (SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType() == 2) {
fightEndResponse.setLastTowerTime((int) (mapManager.getCurrTowerTime() / 1000));
}
}
if (sOptionConfig != null) {

View File

@ -453,7 +453,9 @@ public class GuildLogic {
case 2: //全部拒绝
Family.RefuseJoinFamily refuse = Family.RefuseJoinFamily.newBuilder().setName(guildInfo.getName()).build();
for(Map.Entry<Integer, GuildApply> entry:applyGuild.entrySet()){
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(applyId),1, MessageTypeProto.MessageType.FAMILY_REFUSE_JOIN_INDICATION_VALUE,refuse,true);
if(OnlineUserManager.checkUidOnline(applyId)){
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(applyId),1, MessageTypeProto.MessageType.FAMILY_REFUSE_JOIN_INDICATION_VALUE,refuse,true);
}
GuilidManager.removeOneApplyGuildInfos(entry.getValue().getGuildId(),entry.getValue().getId());
}
break;

View File

@ -474,7 +474,9 @@ public class PlayerLogic {
}
public void getOneTeamInfo(ISession session, int id,int teamId,MessageTypeProto.MessageType messageType) throws Exception {
if(id==0){
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
SArenaRobotConfig sArenaRobotConfig = SArenaRobotConfig.getsArenaRobotConfigById(id);
if(sArenaRobotConfig!=null){
getRobotTeamInfo(session,sArenaRobotConfig,messageType);

View File

@ -1,10 +1,14 @@
package com.ljsd.jieling.util;
import com.ljsd.jieling.config.clazzStaticCfg.MapStaticConfig;
import com.ljsd.jieling.exception.ErrorCode;
import com.ljsd.jieling.exception.ErrorCodeException;
import com.ljsd.jieling.protocols.CommonProto;
import config.SMonsterConfig;
import config.SMonsterGroup;
import manager.STableManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.HashMap;
@ -15,10 +19,16 @@ import java.util.concurrent.CopyOnWriteArrayList;
public class MonsterUtil {
public static Map<Integer, List<CommonProto.FightUnitInfo>> getMonsterByGroup(int groupId){
private static final Logger LOGGER = LoggerFactory.getLogger(MonsterUtil.class);
public static Map<Integer, List<CommonProto.FightUnitInfo>> getMonsterByGroup(int groupId) {
SMonsterGroup sMonsterGroup = SMonsterGroup.getsMonsterGroupMap().get(groupId);
int[][] groupIds = sMonsterGroup.getContents();
Map<Integer, List<CommonProto.FightUnitInfo>> map = new ConcurrentHashMap<>();
if(sMonsterGroup==null){
LOGGER.info("{}怪物组为空",groupId);
return map;
}
int[][] groupIds = sMonsterGroup.getContents();
Map<Integer, CommonProto.FightUnitInfo> monsterMap = STableManager.getFigureConfig(MapStaticConfig.class).getMonsterMap();
for (int i = 0; i < groupIds.length; i++) {
int[] monsterIds = groupIds[i];