diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/GiveGiftsListener.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/GiveGiftsListener.java index 94e81160..c9647ff9 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/GiveGiftsListener.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/GiveGiftsListener.java @@ -525,12 +525,18 @@ public class GiveGiftsListener implements MessageListener { targetAmount = giftValue.getGiftValue().multiply(luckyGiftRatio).setScale(0, RoundingMode.DOWN); acceptAmount = targetAmount; - } else if (event.checkCpGift() || event.checkActivityGift()){ + } else if (event.checkCpGift()){ // CP礼物 acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId()); 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); + } else if (event.checkActivityGift()){ + // CP礼物 + acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId()); + targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10")).min(new BigDecimal("0.9"))).setScale(0, RoundingMode.DOWN); + acceptAmount = giftValue.getGiftValue().multiply(acceptAssistRatio).setScale(0, RoundingMode.DOWN); + } else if (event.checkMagicGift()) { // 魔法礼物 acceptAssistRatio = new BigDecimal("0.1"); @@ -817,11 +823,17 @@ public class GiveGiftsListener implements MessageListener { // 幸运礼物比例 return gameLuckyGiftCommon.getLuckyGiftTargetRatio(event.getSysOrigin().name()); } - if (event.checkCpGift() || event.checkActivityGift()) { + 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")); + } + if (event.checkMagicGift()) { return new BigDecimal("0.1"); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java index 884fb89b..1c2ff602 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java @@ -716,11 +716,16 @@ public class GiftCountStrategy implements GiftStrategy { return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue(); } - if (isActivityGift(giftValue) || isCpGift(giftValue)) { + if (isCpGift(giftValue)) { BigDecimal ratio = new BigDecimal("0.7"); return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue(); } + if (isActivityGift(giftValue)) { + BigDecimal ratio = new BigDecimal("0.9"); + return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue(); + } + return acceptAmount.longValue(); } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftRocketListener.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftRocketListener.java index 23996508..7ea648cc 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftRocketListener.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftRocketListener.java @@ -117,10 +117,14 @@ public class GiftRocketListener implements GiftStrategy { return new BigDecimal("0.1"); } - if (isActivityGift(giftValue) || isCpGift(giftValue)) { + if (isCpGift(giftValue)) { return new BigDecimal("0.7"); } + if (isActivityGift(giftValue)) { + return new BigDecimal("0.9"); + } + return BigDecimal.ONE; } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/RankCountStrategy.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/RankCountStrategy.java index 6c7d437e..8b4a8aa4 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/RankCountStrategy.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/RankCountStrategy.java @@ -169,10 +169,14 @@ public class RankCountStrategy implements GiftStrategy { return new BigDecimal("0.1"); } - if (isActivityGift(giftValue) || isCpGift(giftValue)) { + if (isCpGift(giftValue)) { return new BigDecimal("0.7"); } + if (isActivityGift(giftValue)) { + return new BigDecimal("0.9"); + } + return BigDecimal.ONE; }