变身卡消耗bug
parent
cb2581e5fc
commit
6ee2ba5d88
|
@ -95,7 +95,8 @@ public class TransformationUpGradeHandler extends BaseHandler<HeroInfoProto.Tran
|
|||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
}
|
||||
if(costMap.values().size() < num){
|
||||
int sum = costMap.values().stream().mapToInt(Integer::intValue).sum();
|
||||
if(sum != num){
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
if (!ItemUtil.itemCost(user, costMap, BIReason.TRANSFORMATION_CARD_STAR_COST, 1)) {
|
||||
|
|
Loading…
Reference in New Issue