命石快速合成bug修改

back_recharge
yuanshuai 2021-12-23 15:14:43 +08:00 committed by duhui
parent 61b3a6113e
commit b870b9afa2
1 changed files with 6 additions and 4 deletions

View File

@ -78,7 +78,7 @@ public class LifeStoneUpRequestHandler extends BaseHandler<HeroInfoProto.LifeSto
} else if (type == 4) {
SGemConfig gemConfig = STableManager.getConfig(SGemConfig.class).get(proto.getCurGemId());
TreeMap<Integer, SGemConfig> gemConfigMap = SGemConfig.gemConfigMapByType.get(gemConfig.getType());
boolean isBag=proto.getGridIndex()<=0;
boolean isBag=proto.getGridIndex()<=0;//此字段判断是否在背包里进行快速合成
if (LifeStoneQuickUp(itemManager, gemConfigMap, costItemMap, gemConfig.getLevel(),isBag)) {
int[] curUpCost = gemConfig.getUpgradeCost();
long allGoldCost = curUpCost[1];
@ -86,15 +86,17 @@ public class LifeStoneUpRequestHandler extends BaseHandler<HeroInfoProto.LifeSto
allGoldCost+=costItemMap.get(curUpCost[0]);
}
costItemMap.put(curUpCost[0], allGoldCost);
if (proto.getGridIndex() > 0) {
equipLifeStoneId = gemConfig.getNextGem();
} else {
if (isBag) {
addItemMap.put(gemConfig.getNextGem(), 1L);
if (costItemMap.containsKey(proto.getCurGemId())){
long costNum=costItemMap.get(proto.getCurGemId())+1;
costItemMap.put(proto.getCurGemId(),costNum);
}else{
costItemMap.put(proto.getCurGemId(),1L);
}
} else {
equipLifeStoneId = gemConfig.getNextGem();
}
} else {
LOGGER.error("快速合成:命石合成材料不足");