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);
|
targetAmount = giftValue.getGiftValue().multiply(luckyGiftRatio).setScale(0, RoundingMode.DOWN);
|
||||||
acceptAmount = targetAmount;
|
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礼物
|
// CP礼物
|
||||||
acceptAssistRatio = getAssistCpGiftGoldRatio(acceptRegion.getId());
|
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("0.9"))).setScale(0, RoundingMode.DOWN);
|
||||||
@ -815,9 +824,9 @@ public class GiveGiftsListener implements MessageListener {
|
|||||||
// 幸运礼物比例
|
// 幸运礼物比例
|
||||||
return gameLuckyGiftCommon.getLuckyGiftTargetRatio(event.getSysOrigin().name());
|
return gameLuckyGiftCommon.getLuckyGiftTargetRatio(event.getSysOrigin().name());
|
||||||
}
|
}
|
||||||
if (event.checkCpGift()) {
|
/*if (event.checkCpGift()) {
|
||||||
return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10")).min(new BigDecimal("0.7"));
|
return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10")).min(new BigDecimal("1"));
|
||||||
}
|
}*/
|
||||||
if (event.checkActivityGift()) {
|
if (event.checkActivityGift()) {
|
||||||
return getAssistCpGiftGoldRatio("").multiply(new BigDecimal("10")).min(new BigDecimal("0.9"));
|
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();
|
return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCpGift(giftValue)) {
|
/*if (isCpGift(giftValue)) {
|
||||||
BigDecimal ratio = new BigDecimal("1");
|
BigDecimal ratio = new BigDecimal("1");
|
||||||
return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue();
|
return acceptAmount.multiply(ratio).setScale(0, RoundingMode.DOWN).longValue();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (isActivityGift(giftValue)) {
|
if (isActivityGift(giftValue)) {
|
||||||
BigDecimal ratio = new BigDecimal("0.9");
|
BigDecimal ratio = new BigDecimal("0.9");
|
||||||
|
|||||||
@ -117,9 +117,9 @@ public class GiftRocketListener implements GiftStrategy {
|
|||||||
return new BigDecimal("0.1");
|
return new BigDecimal("0.1");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCpGift(giftValue)) {
|
/*if (isCpGift(giftValue)) {
|
||||||
return new BigDecimal("1");
|
return new BigDecimal("1");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (isActivityGift(giftValue)) {
|
if (isActivityGift(giftValue)) {
|
||||||
return new BigDecimal("0.9");
|
return new BigDecimal("0.9");
|
||||||
|
|||||||
@ -169,9 +169,9 @@ public class RankCountStrategy implements GiftStrategy {
|
|||||||
return new BigDecimal("0.1");
|
return new BigDecimal("0.1");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCpGift(giftValue)) {
|
/* if (isCpGift(giftValue)) {
|
||||||
return new BigDecimal("1");
|
return new BigDecimal("1");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (isActivityGift(giftValue)) {
|
if (isActivityGift(giftValue)) {
|
||||||
return new BigDecimal("0.9");
|
return new BigDecimal("0.9");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user