青龙秘宝购买后增加等级改为走配置

master_yuenan
DESKTOP-C3M45P4\dengdan 2025-06-11 15:05:56 +08:00
parent 76b9fcf6bc
commit e62a76df02
2 changed files with 9 additions and 4 deletions

View File

@ -619,11 +619,15 @@ public class BuyGoodsNewLogic {
if(type == GiftGoodsType.SUN_LONG){
PlayerManager playerManager = user.getPlayerInfoManager();
playerManager.setHadBuyTreasure(1);
int addLevel = SSpecialConfig.getIntegerValue(SSpecialConfig.Sunlong_Add_Level);
//赠送等级大于0再添加青龙秘宝等级
if(addLevel > 0){
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){
user.getMapManager().setTreasureIsBuy(1);
}

View File

@ -90,6 +90,7 @@ public class SSpecialConfig implements BaseConfig {
public static final String Gem_Lottery10 = "Gem_Lottery10";//宝石十连所需道具
public static final String Gem_Senior_Lottery = "Gem_Senior_Lottery";//高级宝石单抽所需道具
public static final String Gem_Senior_Lottery10 = "Gem_Senior_Lottery10";//高级宝石十连所需道具
public static final String Sunlong_Add_Level = "Sunlong_Add_Level";//购买孙龙(青龙战令)增加的等级
@Override
public void init() throws Exception {