cp礼物目标值100%处理
This commit is contained in:
parent
2c1e9bdd58
commit
3a63b2067e
@ -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"));
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ public class GiftRocketListener implements GiftStrategy {
|
||||
}
|
||||
|
||||
if (isCpGift(giftValue)) {
|
||||
return new BigDecimal("0.9");
|
||||
return new BigDecimal("1");
|
||||
}
|
||||
|
||||
if (isActivityGift(giftValue)) {
|
||||
|
||||
@ -170,7 +170,7 @@ public class RankCountStrategy implements GiftStrategy {
|
||||
}
|
||||
|
||||
if (isCpGift(giftValue)) {
|
||||
return new BigDecimal("0.9");
|
||||
return new BigDecimal("1");
|
||||
}
|
||||
|
||||
if (isActivityGift(giftValue)) {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user