From e62a76df025e22b88ee3159c5e10712e829948d8 Mon Sep 17 00:00:00 2001 From: "DESKTOP-C3M45P4\\dengdan" Date: Wed, 11 Jun 2025 15:05:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=92=E9=BE=99=E7=A7=98=E5=AE=9D=E8=B4=AD?= =?UTF-8?q?=E4=B9=B0=E5=90=8E=E5=A2=9E=E5=8A=A0=E7=AD=89=E7=BA=A7=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E8=B5=B0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ljsd/jieling/logic/store/BuyGoodsNewLogic.java | 12 ++++++++---- .../src/main/java/config/SSpecialConfig.java | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java index 98104b6e1..dd84d2df8 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java @@ -619,10 +619,14 @@ public class BuyGoodsNewLogic { if(type == GiftGoodsType.SUN_LONG){ PlayerManager playerManager = user.getPlayerInfoManager(); playerManager.setHadBuyTreasure(1); - 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); + 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); diff --git a/tablemanager/src/main/java/config/SSpecialConfig.java b/tablemanager/src/main/java/config/SSpecialConfig.java index 6a9398bf2..86d37758d 100644 --- a/tablemanager/src/main/java/config/SSpecialConfig.java +++ b/tablemanager/src/main/java/config/SSpecialConfig.java @@ -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 {