魅力值计算70%
This commit is contained in:
parent
5676085e91
commit
25cb51e8df
@ -251,6 +251,14 @@ public class GiveAwayGiftBatchEvent implements Serializable {
|
|||||||
return Objects.nonNull(giftConfig) && Objects.equals(giftConfig.getGiftTab(), "CHRISTMAS");
|
return Objects.nonNull(giftConfig) && Objects.equals(giftConfig.getGiftTab(), "CHRISTMAS");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是活动礼物.
|
||||||
|
*/
|
||||||
|
public boolean checkActivityGift() {
|
||||||
|
return Objects.nonNull(giftConfig) && Objects.equals(giftConfig.getGiftTab(), "ACTIVITY");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是专属礼物.
|
* 是否是专属礼物.
|
||||||
|
|||||||
@ -524,10 +524,10 @@ public class GiveGiftsListener implements MessageListener {
|
|||||||
targetAmount = giftValue.getGiftValue().multiply(luckyGiftRatio).setScale(0, RoundingMode.DOWN);
|
targetAmount = giftValue.getGiftValue().multiply(luckyGiftRatio).setScale(0, RoundingMode.DOWN);
|
||||||
acceptAmount = targetAmount;
|
acceptAmount = targetAmount;
|
||||||
|
|
||||||
} else if (event.checkCpGift() || event.checkChristmasGift()){
|
} else if (event.checkCpGift()){
|
||||||
// CP礼物
|
// CP礼物
|
||||||
acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId());
|
acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId());
|
||||||
targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10").max(new BigDecimal("0.7")))).setScale(0, RoundingMode.DOWN);
|
targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10").min(new BigDecimal("0.7")))).setScale(0, RoundingMode.DOWN);
|
||||||
acceptAmount = giftValue.getGiftValue().multiply(acceptAssistRatio).setScale(0, RoundingMode.DOWN);
|
acceptAmount = giftValue.getGiftValue().multiply(acceptAssistRatio).setScale(0, RoundingMode.DOWN);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -811,8 +811,8 @@ public class GiveGiftsListener implements MessageListener {
|
|||||||
// 幸运礼物比例
|
// 幸运礼物比例
|
||||||
return gameLuckyGiftCommon.getLuckyGiftTargetRatio(event.getSysOrigin().name());
|
return gameLuckyGiftCommon.getLuckyGiftTargetRatio(event.getSysOrigin().name());
|
||||||
}
|
}
|
||||||
if (event.checkCpGift()) {
|
if (event.checkCpGift() || event.checkActivityGift()) {
|
||||||
return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10").max(new BigDecimal("0.7")));
|
return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10").min(new BigDecimal("0.7")));
|
||||||
}
|
}
|
||||||
|
|
||||||
return BigDecimal.valueOf(1L);
|
return BigDecimal.valueOf(1L);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user