【家园功能1.1.1】

1、建筑解锁修改
back_recharge
duhui 2021-12-29 17:08:18 +08:00
parent 07dfc01d30
commit dc71d70ad2
2 changed files with 6 additions and 8 deletions

View File

@ -61,11 +61,7 @@ public class ArchitectureUnLockHandler implements IEventHandler {
continue;
}
// 解锁条件验证
int id = levelMap.values().stream().filter(v -> v.getPoolID() == land.getId()).mapToInt(SHomeLandLevel::getId).min().orElse(0);
if (id == 0){
LOGGER.error("建筑解锁该类型无建筑poolId:{}",land.getId());
continue;
}
int id = levelMap.values().stream().filter(v -> v.getPoolID() == land.getId()).mapToInt(SHomeLandLevel::getId).min().orElse(land.getId());
switch (land.getUnlockLevel()[0]) {
case 1:
// 玩家等级解锁
@ -93,7 +89,9 @@ public class ArchitectureUnLockHandler implements IEventHandler {
break;
default:
// 其他条件暂不处理,有需求再加
continue;
ArchitectureInfo info1 = new ArchitectureInfo(id, nowInt, 0);
user.getPlayerInfoManager().putArchitectureInfo(land.getId(),info1);
break;
}
// 浮生殿解锁触发任务
@ -102,7 +100,7 @@ public class ArchitectureUnLockHandler implements IEventHandler {
}
// 摘星阁解锁,初始化装备强化信息
if (land.getId() == 6 && user.getEquipManager().getEquipIntensifyMap().isEmpty()){
if (land.getId() == 6){
// 强化
Map<Integer, SEquipStrengthen> config = STableManager.getConfig(SEquipStrengthen.class);
int strongId = config.values().stream().min(Comparator.comparing(SEquipStrengthen::getLevel)).map(SEquipStrengthen::getid).get();

View File

@ -400,7 +400,7 @@ public class HomeLogic {
}
SHomeLandLevel landLevel = levelMap.get(info.getId());
if (landLevel == null || landLevel.getlevel() < newStrengthen.getLimit()[1]){
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE,"限制条件不满足,位置:"+type+",新等级:"+newId);
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE,"建筑等级不足,位置:"+type+",新等级:"+newId);
}
// 校验突破等级
int homeRankUp = user.getEquipManager().getEquipHomeRankUp();