法相修改
parent
174202bf61
commit
49ac978e36
|
@ -27,6 +27,7 @@ import rpc.protocols.PlayerInfoProto;
|
||||||
import util.StringUtil;
|
import util.StringUtil;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class EquipLogic {
|
public class EquipLogic {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(EquipLogic.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(EquipLogic.class);
|
||||||
|
@ -95,7 +96,8 @@ public class EquipLogic {
|
||||||
if (faxiangConfig.getProfession() != 0 && faxiangConfig.getProfession() != scHero.getProfession()){
|
if (faxiangConfig.getProfession() != 0 && faxiangConfig.getProfession() != scHero.getProfession()){
|
||||||
throw new ErrorCodeException(ErrorCode.HERO_EQUIP_ERR,"英雄职业不符合");
|
throw new ErrorCodeException(ErrorCode.HERO_EQUIP_ERR,"英雄职业不符合");
|
||||||
}
|
}
|
||||||
if (faxiangConfig.getJob() != 0 && faxiangConfig.getJob() != scHero.getJob()){
|
List<Integer> jobs = Arrays.stream(faxiangConfig.getJob()).boxed().collect(Collectors.toList());
|
||||||
|
if (!jobs.contains(0) && !jobs.contains(scHero.getJob())){
|
||||||
throw new ErrorCodeException(ErrorCode.HERO_EQUIP_ERR,"英雄细分职业不符合");
|
throw new ErrorCodeException(ErrorCode.HERO_EQUIP_ERR,"英雄细分职业不符合");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class SFaxiangConfig implements BaseConfig {
|
||||||
|
|
||||||
private int profession;
|
private int profession;
|
||||||
|
|
||||||
private int job;
|
private int[] job;
|
||||||
|
|
||||||
private int type;
|
private int type;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ public class SFaxiangConfig implements BaseConfig {
|
||||||
return profession;
|
return profession;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getJob() {
|
public int[] getJob() {
|
||||||
return job;
|
return job;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue