神魔bug修改

back_recharge
yuanshuai 2022-03-31 16:35:51 +08:00
parent e403b6a884
commit 38de0cae30
1 changed files with 2 additions and 0 deletions

View File

@ -1169,8 +1169,10 @@ public class HeroLogic {
public void saveTeamPos(ISession iSession, int teamId, List<CommonProto.TeamHeroInfo> heroIds) throws Exception {
User user = UserManager.getUser(iSession.getUid());
HeroManager heroManager = user.getHeroManager();
///避免玩家上阵神 魔职业英雄
for (CommonProto.TeamHeroInfo teamHeroInfo : heroIds) {
Hero hero= heroManager.getHero(teamHeroInfo.getHeroId());
if (hero==null)continue;
if (hero.getPropertyId()>4){
LOGGER.error("英雄{}未选择职业",hero.getTemplateId());
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);