使用道具最后扣除

lvxinran 2021-01-30 13:23:34 +08:00
parent 19dd002643
commit 984f0f7bae
1 changed files with 4 additions and 4 deletions

View File

@ -267,15 +267,15 @@ public class ItemLogic {
}
int[][] costItemArr = StringUtil.parseFiledInt2(cost.toString());
boolean result = ItemUtil.itemCost(user, costItemArr, BIReason.USER_ITEM, 0);
if (!result) {
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
}
Map<Integer, Integer> mapRe = ItemUtil.getMapRe(itemId, itemMap, cardMap, equipMap, randomMap, itemObj);
if (!mapRe.containsKey(itemId)) {
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE);
}
boolean result = ItemUtil.itemCost(user, costItemArr, BIReason.USER_ITEM, 0);
if (!result) {
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
}
//drop
int[][] dropItems = new int[1][];