取消秘盒抽取次数
parent
dafe5073cc
commit
43103c2138
|
@ -331,29 +331,22 @@ public class ActivityLogic {
|
|||
flushSecretBoxOfSeasonChange(secretBoxManager);
|
||||
}
|
||||
int randCount = sDifferDemonsBoxSetting.getSecondaryCost();
|
||||
int limitPrivigele = sDifferDemonsBoxSetting.getLimitPrivigele();
|
||||
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||
|
||||
if(!playerInfoManager.check(limitPrivigele,randCount)){
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.SECRETBOX_RANDOM_RESPONSE_VALUE,"今日抽取已达上限");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* boolean allowedFree = false;
|
||||
boolean allowedFree = false;
|
||||
if(randCount == 1){
|
||||
allowedFree=user.getPlayerInfoManager().check(VipPrivilegeType.FREE_SECRET_RANDOM,1);
|
||||
}*/
|
||||
// if(!allowedFree){
|
||||
}
|
||||
if(!allowedFree){
|
||||
int[][] mainCost = sDifferDemonsBoxSetting.getMainCost();
|
||||
boolean enough = ItemUtil.itemCost(user, mainCost);
|
||||
if(!enough){
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.SECRETBOX_RANDOM_RESPONSE_VALUE,"道具不足");
|
||||
return;
|
||||
}
|
||||
/* }else{
|
||||
}else{
|
||||
user.getPlayerInfoManager().updateVipPrivilage(VipPrivilegeType.FREE_SECRET_RANDOM,1);
|
||||
}*/
|
||||
}
|
||||
|
||||
int count = secretBoxManager.getCount();
|
||||
int[][] randDrop = new int[randCount][];
|
||||
|
@ -362,7 +355,6 @@ public class ActivityLogic {
|
|||
int[] dropInfos = getSecretBoxRewardByPool(secretBoxRandomPool);
|
||||
randDrop[i] = dropInfos;
|
||||
}
|
||||
playerInfoManager.updateVipPrivilage(limitPrivigele,randCount);
|
||||
secretBoxManager.setCount(secretBoxManager.getCount()+randCount);
|
||||
CommonProto.Drop.Builder drop = ItemUtil.dropPer(user, randDrop,BIReason.TAKE_SECRET_REWARD);
|
||||
int[] extraItem = sDifferDemonsBoxSetting.getExtraItem();
|
||||
|
|
Loading…
Reference in New Issue