命石抽奖该为只消耗一种道具
parent
2103dd4bf0
commit
4375c9f3cb
|
@ -339,32 +339,32 @@ public class EquipLogic {
|
|||
}
|
||||
|
||||
// 消耗道具数量判断
|
||||
int[][] cost;
|
||||
int[] cost;
|
||||
if (libraryId == 1){
|
||||
if (drawNum == 1){
|
||||
cost = SSpecialConfig.getTwiceArrayValue(SSpecialConfig.Gem_Lottery);
|
||||
cost = SSpecialConfig.getIntegerArrayValue(SSpecialConfig.Gem_Lottery);
|
||||
}else {
|
||||
cost = SSpecialConfig.getTwiceArrayValue(SSpecialConfig.Gem_Lottery10);
|
||||
cost = SSpecialConfig.getIntegerArrayValue(SSpecialConfig.Gem_Lottery10);
|
||||
}
|
||||
}else {
|
||||
if (drawNum == 1){
|
||||
cost = SSpecialConfig.getTwiceArrayValue(SSpecialConfig.Gem_Senior_Lottery);
|
||||
cost = SSpecialConfig.getIntegerArrayValue(SSpecialConfig.Gem_Senior_Lottery);
|
||||
}else {
|
||||
cost = SSpecialConfig.getTwiceArrayValue(SSpecialConfig.Gem_Senior_Lottery10);
|
||||
cost = SSpecialConfig.getIntegerArrayValue(SSpecialConfig.Gem_Senior_Lottery10);
|
||||
}
|
||||
}
|
||||
|
||||
// 一级道具消耗
|
||||
boolean cost1 = ItemUtil.itemCost(user, new int[][]{cost[0]}, BIReason.GEM_NEW_LOTTERY_COST, 0);
|
||||
if (cost1){
|
||||
return;
|
||||
boolean cost1 = ItemUtil.itemCost(user, new int[][]{{cost[0]}}, BIReason.GEM_NEW_LOTTERY_COST, 0);
|
||||
if (!cost1){
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
|
||||
// 二级道具消耗
|
||||
boolean cost2 = ItemUtil.itemCost(user, new int[][]{cost[1]}, BIReason.GEM_NEW_LOTTERY_COST, 0);
|
||||
if (!cost2){
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
// boolean cost2 = ItemUtil.itemCost(user, new int[][]{cost[1]}, BIReason.GEM_NEW_LOTTERY_COST, 0);
|
||||
// if (!cost2){
|
||||
// throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue