cp礼物目标值100%处理

This commit is contained in:
tianfeng 2026-06-04 18:46:55 +08:00
parent 2c1e9bdd58
commit 3a63b2067e
5 changed files with 5 additions and 9 deletions

View File

@ -520,7 +520,7 @@ public class GiveGiftsListener implements MessageListener {
} else if (event.checkCpGift()){
// CP礼物
acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId());
targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10")).min(new BigDecimal("0.9"))).setScale(0, RoundingMode.DOWN);
targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10")).min(new BigDecimal("1"))).setScale(0, RoundingMode.DOWN);
acceptAmount = giftValue.getGiftValue().multiply(acceptAssistRatio).setScale(0, RoundingMode.DOWN);
} else if (event.checkActivityGift()){
@ -816,13 +816,9 @@ public class GiveGiftsListener implements MessageListener {
return gameLuckyGiftCommon.getLuckyGiftTargetRatio(event.getSysOrigin().name());
}
if (event.checkCpGift()) {
BigDecimal multiply = getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10"));
BigDecimal min = multiply.min(new BigDecimal("0.7"));
return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10")).min(new BigDecimal("0.7"));
}
if (event.checkActivityGift()) {
BigDecimal multiply = getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10"));
BigDecimal min = multiply.min(new BigDecimal("0.9"));
return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10")).min(new BigDecimal("0.9"));
}

View File

@ -717,7 +717,7 @@ public class GiftCountStrategy implements GiftStrategy {
}
if (isCpGift(giftValue)) {
BigDecimal ratio = new BigDecimal("0.9");
BigDecimal ratio = new BigDecimal("1");
return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue();
}

View File

@ -118,7 +118,7 @@ public class GiftRocketListener implements GiftStrategy {
}
if (isCpGift(giftValue)) {
return new BigDecimal("0.9");
return new BigDecimal("1");
}
if (isActivityGift(giftValue)) {

View File

@ -170,7 +170,7 @@ public class RankCountStrategy implements GiftStrategy {
}
if (isCpGift(giftValue)) {
return new BigDecimal("0.9");
return new BigDecimal("1");
}
if (isActivityGift(giftValue)) {

View File

@ -530,7 +530,7 @@ public class UserRegionGatewayImpl implements UserRegionGateway {
*/
@Override
public BigDecimal getAssistCpGiftGoldRatio(String regionId) {
BigDecimal defaultRatio = BigDecimal.valueOf(0.09);
BigDecimal defaultRatio = BigDecimal.valueOf(0.1);
if (StringUtils.isBlank(regionId)) {
return defaultRatio;
}