使用道具最后扣除
parent
19dd002643
commit
984f0f7bae
|
@ -267,15 +267,15 @@ public class ItemLogic {
|
||||||
}
|
}
|
||||||
int[][] costItemArr = StringUtil.parseFiledInt2(cost.toString());
|
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);
|
Map<Integer, Integer> mapRe = ItemUtil.getMapRe(itemId, itemMap, cardMap, equipMap, randomMap, itemObj);
|
||||||
if (!mapRe.containsKey(itemId)) {
|
if (!mapRe.containsKey(itemId)) {
|
||||||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE);
|
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
|
//drop
|
||||||
int[][] dropItems = new int[1][];
|
int[][] dropItems = new int[1][];
|
||||||
|
|
Loading…
Reference in New Issue