特权修复
parent
caee7ba2a1
commit
286d9a3f34
|
@ -314,15 +314,14 @@ public class HeroLogic {
|
|||
//检测是否有折扣
|
||||
if (sLotterySetting.getDiscountTimes() != 0) {
|
||||
List<SPrivilegeTypeConfig> missingType = SPrivilegeTypeConfig.privilegeByType.get(sLotterySetting.getDiscountTimes());
|
||||
Arrays.stream(costItems).forEach(n -> {
|
||||
for (SPrivilegeTypeConfig config : missingType) {
|
||||
if (user.getPlayerInfoManager().containPrivilageId(config.getId())) {
|
||||
int privigeValue = PlayerLogic.getInstance().getMaxCountByPrivilegeType(user, config.getType());
|
||||
n[1] = (int) (n[1] / 10000d * (10000 + privigeValue));
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
for (int[] n : costItems) {
|
||||
for (SPrivilegeTypeConfig config : missingType) {
|
||||
if (user.getPlayerInfoManager().containPrivilageId(config.getId())) {
|
||||
int privigeValue = PlayerLogic.getInstance().getMaxCountByPrivilegeType(user, config.getPrivilegeType());
|
||||
n[1] = (int) (n[1] / 10000d * (10000 + privigeValue));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
enoughCost = ItemUtil.itemCost(user, costItems, BIReason.RANDOM_HERO_CONSUME, type);
|
||||
|
|
Loading…
Reference in New Issue