cp礼物按照普通礼物处理
This commit is contained in:
parent
3a63b2067e
commit
b9e29e5dc8
@ -517,13 +517,22 @@ public class GiveGiftsListener implements MessageListener {
|
||||
targetAmount = giftValue.getGiftValue().multiply(luckyGiftRatio).setScale(0, RoundingMode.DOWN);
|
||||
acceptAmount = targetAmount;
|
||||
|
||||
} else if (event.checkCpGift()){
|
||||
// CP礼物
|
||||
acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId());
|
||||
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()){
|
||||
/**
|
||||
*
|
||||
* cp礼物按照普通礼物处理
|
||||
* else if (event.checkCpGift()){
|
||||
* // CP礼物
|
||||
* acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId());
|
||||
* 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()){
|
||||
// CP礼物
|
||||
acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId());
|
||||
targetAmount = giftValue.getGiftValue().multiply(acceptAssistRatio.multiply(new BigDecimal("10")).min(new BigDecimal("0.9"))).setScale(0, RoundingMode.DOWN);
|
||||
@ -815,9 +824,9 @@ public class GiveGiftsListener implements MessageListener {
|
||||
// 幸运礼物比例
|
||||
return gameLuckyGiftCommon.getLuckyGiftTargetRatio(event.getSysOrigin().name());
|
||||
}
|
||||
if (event.checkCpGift()) {
|
||||
return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10")).min(new BigDecimal("0.7"));
|
||||
}
|
||||
/*if (event.checkCpGift()) {
|
||||
return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10")).min(new BigDecimal("1"));
|
||||
}*/
|
||||
if (event.checkActivityGift()) {
|
||||
return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10")).min(new BigDecimal("0.9"));
|
||||
}
|
||||
|
||||
@ -716,10 +716,10 @@ public class GiftCountStrategy implements GiftStrategy {
|
||||
return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue();
|
||||
}
|
||||
|
||||
if (isCpGift(giftValue)) {
|
||||
/*if (isCpGift(giftValue)) {
|
||||
BigDecimal ratio = new BigDecimal("1");
|
||||
return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue();
|
||||
}
|
||||
}*/
|
||||
|
||||
if (isActivityGift(giftValue)) {
|
||||
BigDecimal ratio = new BigDecimal("0.9");
|
||||
|
||||
@ -117,9 +117,9 @@ public class GiftRocketListener implements GiftStrategy {
|
||||
return new BigDecimal("0.1");
|
||||
}
|
||||
|
||||
if (isCpGift(giftValue)) {
|
||||
/*if (isCpGift(giftValue)) {
|
||||
return new BigDecimal("1");
|
||||
}
|
||||
}*/
|
||||
|
||||
if (isActivityGift(giftValue)) {
|
||||
return new BigDecimal("0.9");
|
||||
|
||||
@ -169,9 +169,9 @@ public class RankCountStrategy implements GiftStrategy {
|
||||
return new BigDecimal("0.1");
|
||||
}
|
||||
|
||||
if (isCpGift(giftValue)) {
|
||||
/* if (isCpGift(giftValue)) {
|
||||
return new BigDecimal("1");
|
||||
}
|
||||
}*/
|
||||
|
||||
if (isActivityGift(giftValue)) {
|
||||
return new BigDecimal("0.9");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user