青龙秘宝购买后增加等级改为走配置
parent
76b9fcf6bc
commit
e62a76df02
|
@ -619,10 +619,14 @@ public class BuyGoodsNewLogic {
|
||||||
if(type == GiftGoodsType.SUN_LONG){
|
if(type == GiftGoodsType.SUN_LONG){
|
||||||
PlayerManager playerManager = user.getPlayerInfoManager();
|
PlayerManager playerManager = user.getPlayerInfoManager();
|
||||||
playerManager.setHadBuyTreasure(1);
|
playerManager.setHadBuyTreasure(1);
|
||||||
playerManager.setTreasureLevel(playerManager.getTreasureLevel()+15);
|
int addLevel = SSpecialConfig.getIntegerValue(SSpecialConfig.Sunlong_Add_Level);
|
||||||
PlayerInfoProto.TreasureLevelUpIndication indication = PlayerInfoProto.TreasureLevelUpIndication.newBuilder()
|
//赠送等级大于0再添加青龙秘宝等级
|
||||||
.setHadBuy(user.getPlayerInfoManager().getHadBuyTreasure()).setLevel(user.getPlayerInfoManager().getTreasureLevel()).build();
|
if(addLevel > 0){
|
||||||
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(user.getId()),1,MessageTypeProto.MessageType.TREASURE_LEVELUP_INDICATION_VALUE,indication,true);
|
playerManager.setTreasureLevel(playerManager.getTreasureLevel()+15);
|
||||||
|
PlayerInfoProto.TreasureLevelUpIndication indication = PlayerInfoProto.TreasureLevelUpIndication.newBuilder()
|
||||||
|
.setHadBuy(user.getPlayerInfoManager().getHadBuyTreasure()).setLevel(user.getPlayerInfoManager().getTreasureLevel()).build();
|
||||||
|
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(user.getId()),1,MessageTypeProto.MessageType.TREASURE_LEVELUP_INDICATION_VALUE,indication,true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(type==GiftGoodsType.ENDLESS_TREASURE){
|
if(type==GiftGoodsType.ENDLESS_TREASURE){
|
||||||
user.getMapManager().setTreasureIsBuy(1);
|
user.getMapManager().setTreasureIsBuy(1);
|
||||||
|
|
|
@ -90,6 +90,7 @@ public class SSpecialConfig implements BaseConfig {
|
||||||
public static final String Gem_Lottery10 = "Gem_Lottery10";//宝石十连所需道具
|
public static final String Gem_Lottery10 = "Gem_Lottery10";//宝石十连所需道具
|
||||||
public static final String Gem_Senior_Lottery = "Gem_Senior_Lottery";//高级宝石单抽所需道具
|
public static final String Gem_Senior_Lottery = "Gem_Senior_Lottery";//高级宝石单抽所需道具
|
||||||
public static final String Gem_Senior_Lottery10 = "Gem_Senior_Lottery10";//高级宝石十连所需道具
|
public static final String Gem_Senior_Lottery10 = "Gem_Senior_Lottery10";//高级宝石十连所需道具
|
||||||
|
public static final String Sunlong_Add_Level = "Sunlong_Add_Level";//购买孙龙(青龙战令)增加的等级
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() throws Exception {
|
public void init() throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue