转盘修复问题
parent
6bf86f81b0
commit
c1fddebb22
|
|
@ -25,10 +25,7 @@ import rpc.protocols.CommonProto;
|
|||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Description: 随机转盘奖励
|
||||
|
|
@ -61,7 +58,11 @@ public class GetLuckWheelRandHandler extends BaseHandler<PlayerInfoProto.GetLuck
|
|||
|
||||
int[][] costmap = proto.getRepeated() ? sDialRewardSetting.getMultipleCostItem() : sDialRewardSetting.getCostItem();
|
||||
int[][] realCost = LuckWheelActivity.getCost(luckWheelMission.getRefreshTime(), costmap);
|
||||
boolean enough = ItemUtil.itemCost(user, realCost, reson, 0);
|
||||
HashMap<Integer, Integer> costMap = new HashMap<>();
|
||||
for (int[] ints : realCost) {
|
||||
costMap.put(ints[0], ints[1]+costMap.getOrDefault(ints[0], 0));
|
||||
}
|
||||
boolean enough = ItemUtil.checkCost(user, costMap);
|
||||
if (!enough) {
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
|
|
@ -126,6 +127,8 @@ public class GetLuckWheelRandHandler extends BaseHandler<PlayerInfoProto.GetLuck
|
|||
ChatLogic.getInstance().sendSysChatMessage(message, sysType, "0", 0, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
ItemUtil.itemCost(user, realCost, reson, 0);
|
||||
|
||||
int dropReson = getRewardBIReason(activityId);
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, drops, dropReson);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue