摘星阁装备强化
parent
e032f25e43
commit
cf6b898585
|
|
@ -617,13 +617,13 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
Map<Integer, Integer> equipIntensify = user.getEquipManager().getEquipIntensifyMap();
|
||||
Map<Integer, SEquipStrengthen> equipStrong = SEquipStrengthen.lvMap;
|
||||
for (Integer value : equipIntensify.values()) {
|
||||
List<int[][]> intensifyList = equipStrong.values().stream().filter(v -> v.getid() < value).map(v -> v.getCost()).collect(Collectors.toList());
|
||||
List<int[][]> intensifyList = equipStrong.values().stream().filter(v -> v.getid() < value).map(v -> v.getOldcost()).collect(Collectors.toList());
|
||||
cost.addAll(intensifyList);
|
||||
}
|
||||
// 突破消耗的道具
|
||||
int equipHomeRankUp = user.getEquipManager().getEquipHomeRankUp();
|
||||
Map<Integer, SEquipRankUp> rankUp = SEquipRankUp.lvMap;
|
||||
List<int[][]> rankUpList = rankUp.values().stream().filter(v -> v.getid() < equipHomeRankUp).map(v -> v.getCost()).collect(Collectors.toList());
|
||||
List<int[][]> rankUpList = rankUp.values().stream().filter(v -> v.getid() < equipHomeRankUp).map(v -> v.getOldCost()).collect(Collectors.toList());
|
||||
cost.addAll(rankUpList);
|
||||
|
||||
ItemUtil.drop(user, cost, BIReason.ZHAIXINGGE_BAKCUP_ITEM);
|
||||
|
|
|
|||
|
|
@ -6482,7 +6482,7 @@ public class HeroLogic {
|
|||
int lv = hero.getEquipAdvanceLv();
|
||||
// 验证配置表
|
||||
SEquipRankUp rankUp = rankUpMap.get(lv);
|
||||
if (rankUp == null || rankUp.getNewCost() == null){
|
||||
if (rankUp == null || rankUp.getCost() == null){
|
||||
throw new ErrorCodeException(ErrorCode.LEVE_MAX,"已达到最高突破等级");
|
||||
}
|
||||
Map<Integer, HeroEquipStrong> heroStrongMap = hero.getEquipStrongMap();
|
||||
|
|
@ -6497,7 +6497,7 @@ public class HeroLogic {
|
|||
}
|
||||
}
|
||||
// 道具消耗
|
||||
boolean cost = ItemUtil.itemCost(user, rankUp.getNewCost(), BIReason.ARCHITECTURE_RANK_UP_LEVEL, 0);
|
||||
boolean cost = ItemUtil.itemCost(user, rankUp.getCost(), BIReason.ARCHITECTURE_RANK_UP_LEVEL, 0);
|
||||
if (!cost){
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
|
|
@ -6511,7 +6511,7 @@ public class HeroLogic {
|
|||
HeroEquipStrong heroEquipStrong = hero.getEquipStrongMap().getOrDefault(type, new HeroEquipStrong(type));
|
||||
// 校验配置表
|
||||
SEquipStrengthen strongThen = strongMap.get(heroEquipStrong.getStrongLv());
|
||||
if (strongThen == null || strongThen.getNewCost() == null){
|
||||
if (strongThen == null || strongThen.getCost() == null){
|
||||
throw new ErrorCodeException(ErrorCode.LEVE_MAX,"强化等级不存在:"+strongThen.toString());
|
||||
}
|
||||
// 校验建筑等级
|
||||
|
|
@ -6529,7 +6529,7 @@ public class HeroLogic {
|
|||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE,"突破等级不足,位置:"+type+",当前突破等级:"+equipAdvanceLv);
|
||||
}
|
||||
// 校验并消耗
|
||||
boolean cost = ItemUtil.itemCost(user, strongThen.getNewCost(), BIReason.HOME_EQUIP_INTENSIFY, 0);
|
||||
boolean cost = ItemUtil.itemCost(user, strongThen.getCost(), BIReason.HOME_EQUIP_INTENSIFY, 0);
|
||||
if (!cost){
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,8 @@ public class SEquipRankUp implements BaseConfig {
|
|||
|
||||
private int[] rate;
|
||||
|
||||
private int[][] newCost;
|
||||
|
||||
private int[][] cost;
|
||||
private int[][] cost;
|
||||
private int[][] oldCost;
|
||||
|
||||
private int limit;
|
||||
|
||||
|
|
@ -46,8 +45,8 @@ public class SEquipRankUp implements BaseConfig {
|
|||
return rate;
|
||||
}
|
||||
|
||||
public int[][] getNewCost() {
|
||||
return newCost;
|
||||
public int[][] getOldCost() {
|
||||
return oldCost;
|
||||
}
|
||||
|
||||
public int[][] getCost() {
|
||||
|
|
|
|||
|
|
@ -15,11 +15,11 @@ public class SEquipStrengthen implements BaseConfig {
|
|||
|
||||
private int rate;
|
||||
|
||||
private int[][] newCost;
|
||||
private int[][] cost;
|
||||
|
||||
private int[][] cost;
|
||||
private int[][] oldcost;
|
||||
|
||||
private int[] limit;
|
||||
private int[] limit;
|
||||
|
||||
private int limit2;
|
||||
|
||||
|
|
@ -48,10 +48,6 @@ public class SEquipStrengthen implements BaseConfig {
|
|||
return rate;
|
||||
}
|
||||
|
||||
public int[][] getNewCost() {
|
||||
return newCost;
|
||||
}
|
||||
|
||||
public int[][] getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
|
@ -63,4 +59,8 @@ public class SEquipStrengthen implements BaseConfig {
|
|||
public int getLimit2() {
|
||||
return limit2;
|
||||
}
|
||||
|
||||
public int[][] getOldcost() {
|
||||
return oldcost;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue