From de65113360b1ed0f006e93826216c8e516cbd6da Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 31 Dec 2016 20:29:25 +0000 Subject: [PATCH] Config to disable community board heal. --- L2J_Mobius_Underground/dist/game/config/Custom.ini | 4 ++++ .../game/data/scripts/handlers/communityboard/HomeBoard.java | 2 +- L2J_Mobius_Underground/java/com/l2jmobius/Config.java | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/L2J_Mobius_Underground/dist/game/config/Custom.ini b/L2J_Mobius_Underground/dist/game/config/Custom.ini index 22103964e3..a45552821d 100644 --- a/L2J_Mobius_Underground/dist/game/config/Custom.ini +++ b/L2J_Mobius_Underground/dist/game/config/Custom.ini @@ -411,6 +411,10 @@ CommunityEnableTeleports = True # Default: True CommunityEnableBuffs = True +# Enable Heal. +# Default: True +CommunityEnableHeal = True + # Price for Teleports. # Default: 0 (free) CommunityTeleportPrice = 0 diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index c3d6d73f7c..47b655ed05 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -209,7 +209,7 @@ public final class HomeBoard implements IParseBoardHandler } CommunityBoardHandler.separateAndSend(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html"), activeChar); } - else if ((Config.CUSTOM_CB_ENABLED && command.startsWith("_bbsheal"))) + else if ((Config.CUSTOM_CB_ENABLED && Config.COMMUNITYBOARD_ENABLE_HEAL && command.startsWith("_bbsheal"))) { final String page = command.replace("_bbsheal;", ""); if (activeChar.getInventory().getInventoryItemCount(Config.COMMUNITYBOARD_CURRENCY, -1) < (Config.COMMUNITYBOARD_BUFF_PRICE)) diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/Config.java b/L2J_Mobius_Underground/java/com/l2jmobius/Config.java index a3e666fb05..ef8b8a838b 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/Config.java @@ -656,6 +656,7 @@ public final class Config public static boolean COMMUNITYBOARD_ENABLE_MULTISELLS; public static boolean COMMUNITYBOARD_ENABLE_TELEPORTS; public static boolean COMMUNITYBOARD_ENABLE_BUFFS; + public static boolean COMMUNITYBOARD_ENABLE_HEAL; public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; @@ -2109,6 +2110,7 @@ public final class Config COMMUNITYBOARD_ENABLE_MULTISELLS = CustomSettings.getBoolean("CommunityEnableMultisells", true); COMMUNITYBOARD_ENABLE_TELEPORTS = CustomSettings.getBoolean("CommunityEnableTeleports", true); COMMUNITYBOARD_ENABLE_BUFFS = CustomSettings.getBoolean("CommunityEnableBuffs", true); + COMMUNITYBOARD_ENABLE_HEAL = CustomSettings.getBoolean("CommunityEnableHeal", true); COMMUNITYBOARD_TELEPORT_PRICE = CustomSettings.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CustomSettings.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CustomSettings.getInt("CommunityHealPrice", 0);