From 50318680c3983061f691ebfea307b6632f989490 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 7 Nov 2021 00:08:26 +0000 Subject: [PATCH] Created a configuration file for game assistants. --- .../dist/game/config/Custom/PcCafe.ini | 42 --------- .../dist/game/config/GameAssistant.ini | 58 ++++++++++++ .../java/org/l2jmobius/Config.java | 88 ++++++++++--------- .../network/clientpackets/ExOpenHtml.java | 10 ++- .../dist/game/config/Custom/PcCafe.ini | 42 --------- .../dist/game/config/GameAssistant.ini | 58 ++++++++++++ .../java/org/l2jmobius/Config.java | 88 ++++++++++--------- .../network/clientpackets/ExOpenHtml.java | 10 ++- .../dist/game/config/GameAssistant.ini | 9 +- .../java/org/l2jmobius/Config.java | 70 ++++++++------- .../network/clientpackets/ExOpenHtml.java | 38 ++++++-- .../dist/game/config/GameAssistant.ini | 9 +- .../java/org/l2jmobius/Config.java | 70 ++++++++------- .../network/clientpackets/ExOpenHtml.java | 33 ++++++- .../dist/game/config/GameAssistant.ini | 9 +- .../java/org/l2jmobius/Config.java | 70 ++++++++------- .../network/clientpackets/ExOpenHtml.java | 8 +- .../dist/game/config/GameAssistant.ini | 9 +- .../java/org/l2jmobius/Config.java | 70 ++++++++------- .../network/clientpackets/ExOpenHtml.java | 8 +- 20 files changed, 477 insertions(+), 322 deletions(-) delete mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Custom/PcCafe.ini create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/GameAssistant.ini delete mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/config/Custom/PcCafe.ini create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/config/GameAssistant.ini rename L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/Custom/PcCafe.ini => L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/GameAssistant.ini (78%) rename L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/config/Custom/PcCafe.ini => L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/GameAssistant.ini (78%) rename L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/PcCafe.ini => L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/GameAssistant.ini (78%) rename L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/Custom/PcCafe.ini => L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/config/GameAssistant.ini (78%) diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Custom/PcCafe.ini b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Custom/PcCafe.ini deleted file mode 100644 index 6dbccdc44a..0000000000 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/Custom/PcCafe.ini +++ /dev/null @@ -1,42 +0,0 @@ -# --------------------------------------------------------------------------- -# PC Cafe (PC Bang) System -# --------------------------------------------------------------------------- -# PC CAFE POINTS ID = -100 - -# PC Cafe Enabled. -PcCafeEnabled = False - -# Allow only players with a Premium account. -PcCafeOnlyPremium = False - -# Max points that player may have. -# Limited by int limit. -MaxPcCafePoints = 200000 - -# PC Bang point rate. -# Acquisition formula equals (exp * 0.0001 * AcquisitionPointsRate) -# e.g. with 1.0 it's 10000 exp = 1 PC Bang point -# 2.0 - 10000 exp = 2 PC Bang points -# 0.5 - 5000 exp = 1 PC Bang point -AcquisitionPointsRate = 1.0 - -# Use random points rewarding. -# If enabled points will be random from points/2 to points. -AcquisitionPointsRandom = False - -# Creates a chance to aquire double points. -DoublingAcquisitionPoints = True - -# Double points chance. -# Used when DoublingAcquisitionPoints is enabled. -# Default 1 (%) -DoublingAcquisitionPointsChance = 1 - -# Reward low exp kills -# Acquire points if player gains exp and aquire formula equals 0. -RewardLowExpKills = True - -# Chance for low exp kills -# Used when RewardLowExpKills is enabled. -# Default 50 (%) -RewardLowExpKillsChance = 50 diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/GameAssistant.ini b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/GameAssistant.ini new file mode 100644 index 0000000000..17627de1d8 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/config/GameAssistant.ini @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +# PC Cafe (PC Bang) +# --------------------------------------------------------------------------- +# Must add to l2.ini [Localize] section UsePCBangPoint=true +# PC CAFE POINTS ID = -100 + +# PC Cafe Enabled. +PcCafeEnabled = False + +# Allow only players with a Premium account. +PcCafeOnlyPremium = False + +# Max points that player may have. +# Limited by int limit. +MaxPcCafePoints = 200000 + +# PC Bang point rate. +# Acquisition formula equals (exp * 0.0001 * AcquisitionPointsRate) +# e.g. with 1.0 it's 10000 exp = 1 PC Bang point +# 2.0 - 10000 exp = 2 PC Bang points +# 0.5 - 5000 exp = 1 PC Bang point +AcquisitionPointsRate = 1.0 + +# Use random points rewarding. +# If enabled points will be random from points/2 to points. +AcquisitionPointsRandom = False + +# Creates a chance to aquire double points. +DoublingAcquisitionPoints = True + +# Double points chance. +# Used when DoublingAcquisitionPoints is enabled. +# Default 1 (%) +DoublingAcquisitionPointsChance = 1 + +# Reward low exp kills +# Acquire points if player gains exp and aquire formula equals 0. +RewardLowExpKills = True + +# Chance for low exp kills +# Used when RewardLowExpKills is enabled. +# Default 50 (%) +RewardLowExpKillsChance = 50 + + +# --------------------------------------------------------------------------- +# Game Assistant (Dimensional Merchant) +# --------------------------------------------------------------------------- +# Enable Game Assistant functions. +GameAssistantEnabled = True + + +# --------------------------------------------------------------------------- +# Einhasad Store +# --------------------------------------------------------------------------- +# Must add to l2.ini [Localize] section UseEinhasad=true +# Enable Einhasad Store functions. +EinhasadStoreEnabled = False diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java index fb5e74524d..42ad35dc67 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java @@ -96,6 +96,7 @@ public class Config private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GAME_ASSISTANT_CONFIG_FILE = "./config/GameAssistant.ini"; private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; @@ -133,7 +134,6 @@ public class Config private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; private static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; @@ -850,6 +850,17 @@ public class Config public static int TRAINING_CAMP_MAX_LEVEL; public static double TRAINING_CAMP_EXP_MULTIPLIER; public static double TRAINING_CAMP_SP_MULTIPLIER; + public static boolean PC_CAFE_ENABLED; + public static boolean PC_CAFE_ONLY_PREMIUM; + public static int PC_CAFE_MAX_POINTS; + public static boolean PC_CAFE_ENABLE_DOUBLE_POINTS; + public static int PC_CAFE_DOUBLE_POINTS_CHANCE; + public static double PC_CAFE_POINT_RATE; + public static boolean PC_CAFE_RANDOM_POINT; + public static boolean PC_CAFE_REWARD_LOW_EXP_KILLS; + public static int PC_CAFE_LOW_EXP_KILLS_CHANCE; + public static boolean GAME_ASSISTANT_ENABLED; + public static boolean EINHASAD_STORE_ENABLED; public static boolean SHOW_LICENCE; public static boolean SHOW_PI_AGREEMENT; public static boolean ACCEPT_NEW_GAMESERVER; @@ -1320,15 +1331,6 @@ public class Config public static boolean PREMIUM_HENNA_SLOT_ENABLED_FOR_ALL; public static boolean PREMIUM_HENNA_SLOT_ALL_DYES; public static boolean PREMIUM_ONLY_FISHING; - public static boolean PC_CAFE_ENABLED; - public static boolean PC_CAFE_ONLY_PREMIUM; - public static int PC_CAFE_MAX_POINTS; - public static boolean PC_CAFE_ENABLE_DOUBLE_POINTS; - public static int PC_CAFE_DOUBLE_POINTS_CHANCE; - public static double PC_CAFE_POINT_RATE; - public static boolean PC_CAFE_RANDOM_POINT; - public static boolean PC_CAFE_REWARD_LOW_EXP_KILLS; - public static int PC_CAFE_LOW_EXP_KILLS_CHANCE; public static boolean SELLBUFF_ENABLED; public static int SELLBUFF_MP_MULTIPLER; public static int SELLBUFF_PAYMENT_ID; @@ -2019,6 +2021,40 @@ public class Config TRAINING_CAMP_EXP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampExpMultiplier", 1.0); TRAINING_CAMP_SP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampSpMultiplier", 1.0); + // Load GameAssistant config file (if exists) + final PropertiesParser GameAssistant = new PropertiesParser(GAME_ASSISTANT_CONFIG_FILE); + PC_CAFE_ENABLED = GameAssistant.getBoolean("PcCafeEnabled", false); + PC_CAFE_ONLY_PREMIUM = GameAssistant.getBoolean("PcCafeOnlyPremium", false); + PC_CAFE_MAX_POINTS = GameAssistant.getInt("MaxPcCafePoints", 200000); + if (PC_CAFE_MAX_POINTS < 0) + { + PC_CAFE_MAX_POINTS = 0; + } + PC_CAFE_ENABLE_DOUBLE_POINTS = GameAssistant.getBoolean("DoublingAcquisitionPoints", false); + PC_CAFE_DOUBLE_POINTS_CHANCE = GameAssistant.getInt("DoublingAcquisitionPointsChance", 1); + if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) + { + PC_CAFE_DOUBLE_POINTS_CHANCE = 1; + } + PC_CAFE_POINT_RATE = GameAssistant.getDouble("AcquisitionPointsRate", 1.0); + PC_CAFE_RANDOM_POINT = GameAssistant.getBoolean("AcquisitionPointsRandom", false); + if (PC_CAFE_POINT_RATE < 0) + { + PC_CAFE_POINT_RATE = 1; + } + PC_CAFE_REWARD_LOW_EXP_KILLS = GameAssistant.getBoolean("RewardLowExpKills", true); + PC_CAFE_LOW_EXP_KILLS_CHANCE = GameAssistant.getInt("RewardLowExpKillsChance", 50); + if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; + } + if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; + } + GAME_ASSISTANT_ENABLED = GameAssistant.getBoolean("GameAssistantEnabled", false); + EINHASAD_STORE_ENABLED = GameAssistant.getBoolean("EinhasadStoreEnabled", false); + // Load General config file (if exists) final PropertiesParser General = new PropertiesParser(GENERAL_CONFIG_FILE); DEFAULT_ACCESS_LEVEL = General.getInt("DefaultAccessLevel", 0); @@ -3389,38 +3425,6 @@ public class Config final PropertiesParser PasswordChange = new PropertiesParser(CUSTOM_PASSWORD_CHANGE_CONFIG_FILE); ALLOW_CHANGE_PASSWORD = PasswordChange.getBoolean("AllowChangePassword", false); - // Load PcCafe config file (if exists) - final PropertiesParser PcCafe = new PropertiesParser(CUSTOM_PC_CAFE_CONFIG_FILE); - PC_CAFE_ENABLED = PcCafe.getBoolean("PcCafeEnabled", false); - PC_CAFE_ONLY_PREMIUM = PcCafe.getBoolean("PcCafeOnlyPremium", false); - PC_CAFE_MAX_POINTS = PcCafe.getInt("MaxPcCafePoints", 200000); - if (PC_CAFE_MAX_POINTS < 0) - { - PC_CAFE_MAX_POINTS = 0; - } - PC_CAFE_ENABLE_DOUBLE_POINTS = PcCafe.getBoolean("DoublingAcquisitionPoints", false); - PC_CAFE_DOUBLE_POINTS_CHANCE = PcCafe.getInt("DoublingAcquisitionPointsChance", 1); - if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) - { - PC_CAFE_DOUBLE_POINTS_CHANCE = 1; - } - PC_CAFE_POINT_RATE = PcCafe.getDouble("AcquisitionPointsRate", 1.0); - PC_CAFE_RANDOM_POINT = PcCafe.getBoolean("AcquisitionPointsRandom", false); - if (PC_CAFE_POINT_RATE < 0) - { - PC_CAFE_POINT_RATE = 1; - } - PC_CAFE_REWARD_LOW_EXP_KILLS = PcCafe.getBoolean("RewardLowExpKills", true); - PC_CAFE_LOW_EXP_KILLS_CHANCE = PcCafe.getInt("RewardLowExpKillsChance", 50); - if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; - } - if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; - } - // Load PremiumSystem config file (if exists) final PropertiesParser PremiumSystem = new PropertiesParser(CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE); PREMIUM_SYSTEM_ENABLED = PremiumSystem.getBoolean("EnablePremiumSystem", false); diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java index 0b6d1cf639..c603377f40 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java @@ -61,12 +61,18 @@ public class ExOpenHtml implements IClientIncomingPacket } case 5: { - client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/GameAssistant/32478.html"))); + if (Config.GAME_ASSISTANT_ENABLED) + { + client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/GameAssistant/32478.html"))); + } break; } case 7: { - client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/EinhasadStore/34487.html"))); + if (Config.EINHASAD_STORE_ENABLED) + { + client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/EinhasadStore/34487.html"))); + } break; } default: diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/config/Custom/PcCafe.ini b/L2J_Mobius_10.0_MasterClass/dist/game/config/Custom/PcCafe.ini deleted file mode 100644 index 6dbccdc44a..0000000000 --- a/L2J_Mobius_10.0_MasterClass/dist/game/config/Custom/PcCafe.ini +++ /dev/null @@ -1,42 +0,0 @@ -# --------------------------------------------------------------------------- -# PC Cafe (PC Bang) System -# --------------------------------------------------------------------------- -# PC CAFE POINTS ID = -100 - -# PC Cafe Enabled. -PcCafeEnabled = False - -# Allow only players with a Premium account. -PcCafeOnlyPremium = False - -# Max points that player may have. -# Limited by int limit. -MaxPcCafePoints = 200000 - -# PC Bang point rate. -# Acquisition formula equals (exp * 0.0001 * AcquisitionPointsRate) -# e.g. with 1.0 it's 10000 exp = 1 PC Bang point -# 2.0 - 10000 exp = 2 PC Bang points -# 0.5 - 5000 exp = 1 PC Bang point -AcquisitionPointsRate = 1.0 - -# Use random points rewarding. -# If enabled points will be random from points/2 to points. -AcquisitionPointsRandom = False - -# Creates a chance to aquire double points. -DoublingAcquisitionPoints = True - -# Double points chance. -# Used when DoublingAcquisitionPoints is enabled. -# Default 1 (%) -DoublingAcquisitionPointsChance = 1 - -# Reward low exp kills -# Acquire points if player gains exp and aquire formula equals 0. -RewardLowExpKills = True - -# Chance for low exp kills -# Used when RewardLowExpKills is enabled. -# Default 50 (%) -RewardLowExpKillsChance = 50 diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/config/GameAssistant.ini b/L2J_Mobius_10.0_MasterClass/dist/game/config/GameAssistant.ini new file mode 100644 index 0000000000..17627de1d8 --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/config/GameAssistant.ini @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +# PC Cafe (PC Bang) +# --------------------------------------------------------------------------- +# Must add to l2.ini [Localize] section UsePCBangPoint=true +# PC CAFE POINTS ID = -100 + +# PC Cafe Enabled. +PcCafeEnabled = False + +# Allow only players with a Premium account. +PcCafeOnlyPremium = False + +# Max points that player may have. +# Limited by int limit. +MaxPcCafePoints = 200000 + +# PC Bang point rate. +# Acquisition formula equals (exp * 0.0001 * AcquisitionPointsRate) +# e.g. with 1.0 it's 10000 exp = 1 PC Bang point +# 2.0 - 10000 exp = 2 PC Bang points +# 0.5 - 5000 exp = 1 PC Bang point +AcquisitionPointsRate = 1.0 + +# Use random points rewarding. +# If enabled points will be random from points/2 to points. +AcquisitionPointsRandom = False + +# Creates a chance to aquire double points. +DoublingAcquisitionPoints = True + +# Double points chance. +# Used when DoublingAcquisitionPoints is enabled. +# Default 1 (%) +DoublingAcquisitionPointsChance = 1 + +# Reward low exp kills +# Acquire points if player gains exp and aquire formula equals 0. +RewardLowExpKills = True + +# Chance for low exp kills +# Used when RewardLowExpKills is enabled. +# Default 50 (%) +RewardLowExpKillsChance = 50 + + +# --------------------------------------------------------------------------- +# Game Assistant (Dimensional Merchant) +# --------------------------------------------------------------------------- +# Enable Game Assistant functions. +GameAssistantEnabled = True + + +# --------------------------------------------------------------------------- +# Einhasad Store +# --------------------------------------------------------------------------- +# Must add to l2.ini [Localize] section UseEinhasad=true +# Enable Einhasad Store functions. +EinhasadStoreEnabled = False diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/Config.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/Config.java index e0b2d8425c..9799ffbf03 100644 --- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/Config.java @@ -96,6 +96,7 @@ public class Config private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GAME_ASSISTANT_CONFIG_FILE = "./config/GameAssistant.ini"; private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; @@ -133,7 +134,6 @@ public class Config private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; private static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; @@ -850,6 +850,17 @@ public class Config public static int TRAINING_CAMP_MAX_LEVEL; public static double TRAINING_CAMP_EXP_MULTIPLIER; public static double TRAINING_CAMP_SP_MULTIPLIER; + public static boolean PC_CAFE_ENABLED; + public static boolean PC_CAFE_ONLY_PREMIUM; + public static int PC_CAFE_MAX_POINTS; + public static boolean PC_CAFE_ENABLE_DOUBLE_POINTS; + public static int PC_CAFE_DOUBLE_POINTS_CHANCE; + public static double PC_CAFE_POINT_RATE; + public static boolean PC_CAFE_RANDOM_POINT; + public static boolean PC_CAFE_REWARD_LOW_EXP_KILLS; + public static int PC_CAFE_LOW_EXP_KILLS_CHANCE; + public static boolean GAME_ASSISTANT_ENABLED; + public static boolean EINHASAD_STORE_ENABLED; public static boolean SHOW_LICENCE; public static boolean SHOW_PI_AGREEMENT; public static boolean ACCEPT_NEW_GAMESERVER; @@ -1320,15 +1331,6 @@ public class Config public static boolean PREMIUM_HENNA_SLOT_ENABLED_FOR_ALL; public static boolean PREMIUM_HENNA_SLOT_ALL_DYES; public static boolean PREMIUM_ONLY_FISHING; - public static boolean PC_CAFE_ENABLED; - public static boolean PC_CAFE_ONLY_PREMIUM; - public static int PC_CAFE_MAX_POINTS; - public static boolean PC_CAFE_ENABLE_DOUBLE_POINTS; - public static int PC_CAFE_DOUBLE_POINTS_CHANCE; - public static double PC_CAFE_POINT_RATE; - public static boolean PC_CAFE_RANDOM_POINT; - public static boolean PC_CAFE_REWARD_LOW_EXP_KILLS; - public static int PC_CAFE_LOW_EXP_KILLS_CHANCE; public static boolean SELLBUFF_ENABLED; public static int SELLBUFF_MP_MULTIPLER; public static int SELLBUFF_PAYMENT_ID; @@ -2019,6 +2021,40 @@ public class Config TRAINING_CAMP_EXP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampExpMultiplier", 1.0); TRAINING_CAMP_SP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampSpMultiplier", 1.0); + // Load GameAssistant config file (if exists) + final PropertiesParser GameAssistant = new PropertiesParser(GAME_ASSISTANT_CONFIG_FILE); + PC_CAFE_ENABLED = GameAssistant.getBoolean("PcCafeEnabled", false); + PC_CAFE_ONLY_PREMIUM = GameAssistant.getBoolean("PcCafeOnlyPremium", false); + PC_CAFE_MAX_POINTS = GameAssistant.getInt("MaxPcCafePoints", 200000); + if (PC_CAFE_MAX_POINTS < 0) + { + PC_CAFE_MAX_POINTS = 0; + } + PC_CAFE_ENABLE_DOUBLE_POINTS = GameAssistant.getBoolean("DoublingAcquisitionPoints", false); + PC_CAFE_DOUBLE_POINTS_CHANCE = GameAssistant.getInt("DoublingAcquisitionPointsChance", 1); + if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) + { + PC_CAFE_DOUBLE_POINTS_CHANCE = 1; + } + PC_CAFE_POINT_RATE = GameAssistant.getDouble("AcquisitionPointsRate", 1.0); + PC_CAFE_RANDOM_POINT = GameAssistant.getBoolean("AcquisitionPointsRandom", false); + if (PC_CAFE_POINT_RATE < 0) + { + PC_CAFE_POINT_RATE = 1; + } + PC_CAFE_REWARD_LOW_EXP_KILLS = GameAssistant.getBoolean("RewardLowExpKills", true); + PC_CAFE_LOW_EXP_KILLS_CHANCE = GameAssistant.getInt("RewardLowExpKillsChance", 50); + if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; + } + if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; + } + GAME_ASSISTANT_ENABLED = GameAssistant.getBoolean("GameAssistantEnabled", false); + EINHASAD_STORE_ENABLED = GameAssistant.getBoolean("EinhasadStoreEnabled", false); + // Load General config file (if exists) final PropertiesParser General = new PropertiesParser(GENERAL_CONFIG_FILE); DEFAULT_ACCESS_LEVEL = General.getInt("DefaultAccessLevel", 0); @@ -3389,38 +3425,6 @@ public class Config final PropertiesParser PasswordChange = new PropertiesParser(CUSTOM_PASSWORD_CHANGE_CONFIG_FILE); ALLOW_CHANGE_PASSWORD = PasswordChange.getBoolean("AllowChangePassword", false); - // Load PcCafe config file (if exists) - final PropertiesParser PcCafe = new PropertiesParser(CUSTOM_PC_CAFE_CONFIG_FILE); - PC_CAFE_ENABLED = PcCafe.getBoolean("PcCafeEnabled", false); - PC_CAFE_ONLY_PREMIUM = PcCafe.getBoolean("PcCafeOnlyPremium", false); - PC_CAFE_MAX_POINTS = PcCafe.getInt("MaxPcCafePoints", 200000); - if (PC_CAFE_MAX_POINTS < 0) - { - PC_CAFE_MAX_POINTS = 0; - } - PC_CAFE_ENABLE_DOUBLE_POINTS = PcCafe.getBoolean("DoublingAcquisitionPoints", false); - PC_CAFE_DOUBLE_POINTS_CHANCE = PcCafe.getInt("DoublingAcquisitionPointsChance", 1); - if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) - { - PC_CAFE_DOUBLE_POINTS_CHANCE = 1; - } - PC_CAFE_POINT_RATE = PcCafe.getDouble("AcquisitionPointsRate", 1.0); - PC_CAFE_RANDOM_POINT = PcCafe.getBoolean("AcquisitionPointsRandom", false); - if (PC_CAFE_POINT_RATE < 0) - { - PC_CAFE_POINT_RATE = 1; - } - PC_CAFE_REWARD_LOW_EXP_KILLS = PcCafe.getBoolean("RewardLowExpKills", true); - PC_CAFE_LOW_EXP_KILLS_CHANCE = PcCafe.getInt("RewardLowExpKillsChance", 50); - if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; - } - if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; - } - // Load PremiumSystem config file (if exists) final PropertiesParser PremiumSystem = new PropertiesParser(CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE); PREMIUM_SYSTEM_ENABLED = PremiumSystem.getBoolean("EnablePremiumSystem", false); diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java index 0b6d1cf639..c603377f40 100644 --- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java +++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java @@ -61,12 +61,18 @@ public class ExOpenHtml implements IClientIncomingPacket } case 5: { - client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/GameAssistant/32478.html"))); + if (Config.GAME_ASSISTANT_ENABLED) + { + client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/GameAssistant/32478.html"))); + } break; } case 7: { - client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/EinhasadStore/34487.html"))); + if (Config.EINHASAD_STORE_ENABLED) + { + client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/EinhasadStore/34487.html"))); + } break; } default: diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/Custom/PcCafe.ini b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/GameAssistant.ini similarity index 78% rename from L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/Custom/PcCafe.ini rename to L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/GameAssistant.ini index 446f64c1fd..60a790a70b 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/Custom/PcCafe.ini +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/GameAssistant.ini @@ -1,5 +1,5 @@ # --------------------------------------------------------------------------- -# PC Cafe (PC Bang) System +# PC Cafe (PC Bang) # --------------------------------------------------------------------------- # PC CAFE POINTS ID = -100 @@ -43,3 +43,10 @@ RewardLowExpKills = True # Used when RewardLowExpKills is enabled. # Default 50 (%) RewardLowExpKillsChance = 50 + + +# --------------------------------------------------------------------------- +# Game Assistant (Dimensional Merchant) +# --------------------------------------------------------------------------- +# Enable Game Assistant functions. +GameAssistantEnabled = True diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java index d936fd948d..3a568e6b87 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java @@ -95,6 +95,7 @@ public class Config private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GAME_ASSISTANT_CONFIG_FILE = "./config/GameAssistant.ini"; private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; @@ -132,7 +133,6 @@ public class Config private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; private static final String CUSTOM_VIP_CONFIG_FILE = "./config/Custom/VipSystem.ini"; private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; @@ -860,6 +860,7 @@ public class Config public static int TRAINING_CAMP_MAX_LEVEL; public static double TRAINING_CAMP_EXP_MULTIPLIER; public static double TRAINING_CAMP_SP_MULTIPLIER; + public static boolean GAME_ASSISTANT_ENABLED; public static boolean SHOW_LICENCE; public static boolean SHOW_PI_AGREEMENT; public static boolean ACCEPT_NEW_GAMESERVER; @@ -1935,6 +1936,40 @@ public class Config TRAINING_CAMP_EXP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampExpMultiplier", 1.0); TRAINING_CAMP_SP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampSpMultiplier", 1.0); + // Load GameAssistant config file (if exists) + final PropertiesParser GameAssistant = new PropertiesParser(GAME_ASSISTANT_CONFIG_FILE); + PC_CAFE_ENABLED = GameAssistant.getBoolean("PcCafeEnabled", false); + PC_CAFE_ONLY_PREMIUM = GameAssistant.getBoolean("PcCafeOnlyPremium", false); + PC_CAFE_ONLY_VIP = GameAssistant.getBoolean("PcCafeOnlyVip", false); + PC_CAFE_MAX_POINTS = GameAssistant.getInt("MaxPcCafePoints", 200000); + if (PC_CAFE_MAX_POINTS < 0) + { + PC_CAFE_MAX_POINTS = 0; + } + PC_CAFE_ENABLE_DOUBLE_POINTS = GameAssistant.getBoolean("DoublingAcquisitionPoints", false); + PC_CAFE_DOUBLE_POINTS_CHANCE = GameAssistant.getInt("DoublingAcquisitionPointsChance", 1); + if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) + { + PC_CAFE_DOUBLE_POINTS_CHANCE = 1; + } + PC_CAFE_POINT_RATE = GameAssistant.getDouble("AcquisitionPointsRate", 1.0); + PC_CAFE_RANDOM_POINT = GameAssistant.getBoolean("AcquisitionPointsRandom", false); + if (PC_CAFE_POINT_RATE < 0) + { + PC_CAFE_POINT_RATE = 1; + } + PC_CAFE_REWARD_LOW_EXP_KILLS = GameAssistant.getBoolean("RewardLowExpKills", true); + PC_CAFE_LOW_EXP_KILLS_CHANCE = GameAssistant.getInt("RewardLowExpKillsChance", 50); + if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; + } + if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; + } + GAME_ASSISTANT_ENABLED = GameAssistant.getBoolean("GameAssistantEnabled", false); + // Load General config file (if exists) final PropertiesParser General = new PropertiesParser(GENERAL_CONFIG_FILE); DEFAULT_ACCESS_LEVEL = General.getInt("DefaultAccessLevel", 0); @@ -3254,39 +3289,6 @@ public class Config final PropertiesParser PasswordChange = new PropertiesParser(CUSTOM_PASSWORD_CHANGE_CONFIG_FILE); ALLOW_CHANGE_PASSWORD = PasswordChange.getBoolean("AllowChangePassword", false); - // Load PcCafe config file (if exists) - final PropertiesParser PcCafe = new PropertiesParser(CUSTOM_PC_CAFE_CONFIG_FILE); - PC_CAFE_ENABLED = PcCafe.getBoolean("PcCafeEnabled", false); - PC_CAFE_ONLY_PREMIUM = PcCafe.getBoolean("PcCafeOnlyPremium", false); - PC_CAFE_ONLY_VIP = PcCafe.getBoolean("PcCafeOnlyVip", false); - PC_CAFE_MAX_POINTS = PcCafe.getInt("MaxPcCafePoints", 200000); - if (PC_CAFE_MAX_POINTS < 0) - { - PC_CAFE_MAX_POINTS = 0; - } - PC_CAFE_ENABLE_DOUBLE_POINTS = PcCafe.getBoolean("DoublingAcquisitionPoints", false); - PC_CAFE_DOUBLE_POINTS_CHANCE = PcCafe.getInt("DoublingAcquisitionPointsChance", 1); - if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) - { - PC_CAFE_DOUBLE_POINTS_CHANCE = 1; - } - PC_CAFE_POINT_RATE = PcCafe.getDouble("AcquisitionPointsRate", 1.0); - PC_CAFE_RANDOM_POINT = PcCafe.getBoolean("AcquisitionPointsRandom", false); - if (PC_CAFE_POINT_RATE < 0) - { - PC_CAFE_POINT_RATE = 1; - } - PC_CAFE_REWARD_LOW_EXP_KILLS = PcCafe.getBoolean("RewardLowExpKills", true); - PC_CAFE_LOW_EXP_KILLS_CHANCE = PcCafe.getInt("RewardLowExpKillsChance", 50); - if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; - } - if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; - } - final PropertiesParser vipSystem = new PropertiesParser(CUSTOM_VIP_CONFIG_FILE); VIP_SYSTEM_ENABLED = vipSystem.getBoolean("VipEnabled", false); if (VIP_SYSTEM_ENABLED) diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java index 8d93ad9144..b5bc70aebd 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java @@ -16,6 +16,7 @@ */ package org.l2jmobius.gameserver.network.clientpackets; +import org.l2jmobius.Config; import org.l2jmobius.commons.network.PacketReader; import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; @@ -27,10 +28,12 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; */ public class ExOpenHtml implements IClientIncomingPacket { + private int _type; + @Override public boolean read(GameClient client, PacketReader packet) { - packet.readC(); // html scope? + _type = packet.readC(); return true; } @@ -43,10 +46,33 @@ public class ExOpenHtml implements IClientIncomingPacket return; } - // FIXME: - // client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/DimensionalMerchant/32478.html"))); - final NpcHtmlMessage html = new NpcHtmlMessage(); - html.setHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/DimensionalMerchant/32478.html")); - player.sendPacket(html); + switch (_type) + { + case 1: + { + if (Config.PC_CAFE_ENABLED) + { + final NpcHtmlMessage html = new NpcHtmlMessage(); + html.setFile(player, "data/html/pccafe.htm"); + player.sendPacket(html); + } + break; + } + case 5: + { + if (Config.GAME_ASSISTANT_ENABLED) + { + final NpcHtmlMessage html = new NpcHtmlMessage(); + html.setHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/DimensionalMerchant/32478.html")); + player.sendPacket(html); + } + break; + } + default: + { + LOGGER.warning("Unknown ExOpenHtml type (" + _type + ")"); + break; + } + } } } diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/config/Custom/PcCafe.ini b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/GameAssistant.ini similarity index 78% rename from L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/config/Custom/PcCafe.ini rename to L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/GameAssistant.ini index 446f64c1fd..60a790a70b 100644 --- a/L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/config/Custom/PcCafe.ini +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/GameAssistant.ini @@ -1,5 +1,5 @@ # --------------------------------------------------------------------------- -# PC Cafe (PC Bang) System +# PC Cafe (PC Bang) # --------------------------------------------------------------------------- # PC CAFE POINTS ID = -100 @@ -43,3 +43,10 @@ RewardLowExpKills = True # Used when RewardLowExpKills is enabled. # Default 50 (%) RewardLowExpKillsChance = 50 + + +# --------------------------------------------------------------------------- +# Game Assistant (Dimensional Merchant) +# --------------------------------------------------------------------------- +# Enable Game Assistant functions. +GameAssistantEnabled = True diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/Config.java index ec449310bc..c7547b956e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/Config.java @@ -95,6 +95,7 @@ public class Config private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GAME_ASSISTANT_CONFIG_FILE = "./config/GameAssistant.ini"; private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; @@ -134,7 +135,6 @@ public class Config private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; private static final String CUSTOM_VIP_CONFIG_FILE = "./config/Custom/VipSystem.ini"; private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; @@ -871,6 +871,7 @@ public class Config public static int TRAINING_CAMP_MAX_LEVEL; public static double TRAINING_CAMP_EXP_MULTIPLIER; public static double TRAINING_CAMP_SP_MULTIPLIER; + public static boolean GAME_ASSISTANT_ENABLED; public static boolean SHOW_LICENCE; public static boolean SHOW_PI_AGREEMENT; public static boolean ACCEPT_NEW_GAMESERVER; @@ -1970,6 +1971,40 @@ public class Config TRAINING_CAMP_EXP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampExpMultiplier", 1.0); TRAINING_CAMP_SP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampSpMultiplier", 1.0); + // Load GameAssistant config file (if exists) + final PropertiesParser GameAssistant = new PropertiesParser(GAME_ASSISTANT_CONFIG_FILE); + PC_CAFE_ENABLED = GameAssistant.getBoolean("PcCafeEnabled", false); + PC_CAFE_ONLY_PREMIUM = GameAssistant.getBoolean("PcCafeOnlyPremium", false); + PC_CAFE_ONLY_VIP = GameAssistant.getBoolean("PcCafeOnlyVip", false); + PC_CAFE_MAX_POINTS = GameAssistant.getInt("MaxPcCafePoints", 200000); + if (PC_CAFE_MAX_POINTS < 0) + { + PC_CAFE_MAX_POINTS = 0; + } + PC_CAFE_ENABLE_DOUBLE_POINTS = GameAssistant.getBoolean("DoublingAcquisitionPoints", false); + PC_CAFE_DOUBLE_POINTS_CHANCE = GameAssistant.getInt("DoublingAcquisitionPointsChance", 1); + if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) + { + PC_CAFE_DOUBLE_POINTS_CHANCE = 1; + } + PC_CAFE_POINT_RATE = GameAssistant.getDouble("AcquisitionPointsRate", 1.0); + PC_CAFE_RANDOM_POINT = GameAssistant.getBoolean("AcquisitionPointsRandom", false); + if (PC_CAFE_POINT_RATE < 0) + { + PC_CAFE_POINT_RATE = 1; + } + PC_CAFE_REWARD_LOW_EXP_KILLS = GameAssistant.getBoolean("RewardLowExpKills", true); + PC_CAFE_LOW_EXP_KILLS_CHANCE = GameAssistant.getInt("RewardLowExpKillsChance", 50); + if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; + } + if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; + } + GAME_ASSISTANT_ENABLED = GameAssistant.getBoolean("GameAssistantEnabled", false); + // Load General config file (if exists) final PropertiesParser General = new PropertiesParser(GENERAL_CONFIG_FILE); DEFAULT_ACCESS_LEVEL = General.getInt("DefaultAccessLevel", 0); @@ -3303,39 +3338,6 @@ public class Config final PropertiesParser PasswordChange = new PropertiesParser(CUSTOM_PASSWORD_CHANGE_CONFIG_FILE); ALLOW_CHANGE_PASSWORD = PasswordChange.getBoolean("AllowChangePassword", false); - // Load PcCafe config file (if exists) - final PropertiesParser PcCafe = new PropertiesParser(CUSTOM_PC_CAFE_CONFIG_FILE); - PC_CAFE_ENABLED = PcCafe.getBoolean("PcCafeEnabled", false); - PC_CAFE_ONLY_PREMIUM = PcCafe.getBoolean("PcCafeOnlyPremium", false); - PC_CAFE_ONLY_VIP = PcCafe.getBoolean("PcCafeOnlyVip", false); - PC_CAFE_MAX_POINTS = PcCafe.getInt("MaxPcCafePoints", 200000); - if (PC_CAFE_MAX_POINTS < 0) - { - PC_CAFE_MAX_POINTS = 0; - } - PC_CAFE_ENABLE_DOUBLE_POINTS = PcCafe.getBoolean("DoublingAcquisitionPoints", false); - PC_CAFE_DOUBLE_POINTS_CHANCE = PcCafe.getInt("DoublingAcquisitionPointsChance", 1); - if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) - { - PC_CAFE_DOUBLE_POINTS_CHANCE = 1; - } - PC_CAFE_POINT_RATE = PcCafe.getDouble("AcquisitionPointsRate", 1.0); - PC_CAFE_RANDOM_POINT = PcCafe.getBoolean("AcquisitionPointsRandom", false); - if (PC_CAFE_POINT_RATE < 0) - { - PC_CAFE_POINT_RATE = 1; - } - PC_CAFE_REWARD_LOW_EXP_KILLS = PcCafe.getBoolean("RewardLowExpKills", true); - PC_CAFE_LOW_EXP_KILLS_CHANCE = PcCafe.getInt("RewardLowExpKillsChance", 50); - if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; - } - if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; - } - final PropertiesParser vipSystem = new PropertiesParser(CUSTOM_VIP_CONFIG_FILE); VIP_SYSTEM_ENABLED = vipSystem.getBoolean("VipEnabled", false); if (VIP_SYSTEM_ENABLED) diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java index 09863516ec..a342c5207e 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java @@ -16,21 +16,25 @@ */ package org.l2jmobius.gameserver.network.clientpackets; +import org.l2jmobius.Config; import org.l2jmobius.commons.network.PacketReader; import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.network.GameClient; import org.l2jmobius.gameserver.network.serverpackets.ExPremiumManagerShowHtml; +import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; /** * @author Mobius */ public class ExOpenHtml implements IClientIncomingPacket { + private int _type; + @Override public boolean read(GameClient client, PacketReader packet) { - packet.readC(); // html scope? + _type = packet.readC(); return true; } @@ -43,6 +47,31 @@ public class ExOpenHtml implements IClientIncomingPacket return; } - client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/GameAssistant/32478.html"))); + switch (_type) + { + case 1: + { + if (Config.PC_CAFE_ENABLED) + { + final NpcHtmlMessage html = new NpcHtmlMessage(); + html.setFile(player, "data/html/pccafe.htm"); + player.sendPacket(html); + } + break; + } + case 5: + { + if (Config.GAME_ASSISTANT_ENABLED) + { + client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/GameAssistant/32478.html"))); + } + break; + } + default: + { + LOGGER.warning("Unknown ExOpenHtml type (" + _type + ")"); + break; + } + } } } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/PcCafe.ini b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/GameAssistant.ini similarity index 78% rename from L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/PcCafe.ini rename to L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/GameAssistant.ini index 446f64c1fd..60a790a70b 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/PcCafe.ini +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/config/GameAssistant.ini @@ -1,5 +1,5 @@ # --------------------------------------------------------------------------- -# PC Cafe (PC Bang) System +# PC Cafe (PC Bang) # --------------------------------------------------------------------------- # PC CAFE POINTS ID = -100 @@ -43,3 +43,10 @@ RewardLowExpKills = True # Used when RewardLowExpKills is enabled. # Default 50 (%) RewardLowExpKillsChance = 50 + + +# --------------------------------------------------------------------------- +# Game Assistant (Dimensional Merchant) +# --------------------------------------------------------------------------- +# Enable Game Assistant functions. +GameAssistantEnabled = True diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/Config.java index e5cd6e328a..77d24a3cf7 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/Config.java @@ -95,6 +95,7 @@ public class Config private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GAME_ASSISTANT_CONFIG_FILE = "./config/GameAssistant.ini"; private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; @@ -134,7 +135,6 @@ public class Config private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; private static final String CUSTOM_VIP_CONFIG_FILE = "./config/Custom/VipSystem.ini"; private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; @@ -871,6 +871,7 @@ public class Config public static int TRAINING_CAMP_MAX_LEVEL; public static double TRAINING_CAMP_EXP_MULTIPLIER; public static double TRAINING_CAMP_SP_MULTIPLIER; + public static boolean GAME_ASSISTANT_ENABLED; public static boolean SHOW_LICENCE; public static boolean SHOW_PI_AGREEMENT; public static boolean ACCEPT_NEW_GAMESERVER; @@ -1973,6 +1974,40 @@ public class Config TRAINING_CAMP_EXP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampExpMultiplier", 1.0); TRAINING_CAMP_SP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampSpMultiplier", 1.0); + // Load GameAssistant config file (if exists) + final PropertiesParser GameAssistant = new PropertiesParser(GAME_ASSISTANT_CONFIG_FILE); + PC_CAFE_ENABLED = GameAssistant.getBoolean("PcCafeEnabled", false); + PC_CAFE_ONLY_PREMIUM = GameAssistant.getBoolean("PcCafeOnlyPremium", false); + PC_CAFE_ONLY_VIP = GameAssistant.getBoolean("PcCafeOnlyVip", false); + PC_CAFE_MAX_POINTS = GameAssistant.getInt("MaxPcCafePoints", 200000); + if (PC_CAFE_MAX_POINTS < 0) + { + PC_CAFE_MAX_POINTS = 0; + } + PC_CAFE_ENABLE_DOUBLE_POINTS = GameAssistant.getBoolean("DoublingAcquisitionPoints", false); + PC_CAFE_DOUBLE_POINTS_CHANCE = GameAssistant.getInt("DoublingAcquisitionPointsChance", 1); + if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) + { + PC_CAFE_DOUBLE_POINTS_CHANCE = 1; + } + PC_CAFE_POINT_RATE = GameAssistant.getDouble("AcquisitionPointsRate", 1.0); + PC_CAFE_RANDOM_POINT = GameAssistant.getBoolean("AcquisitionPointsRandom", false); + if (PC_CAFE_POINT_RATE < 0) + { + PC_CAFE_POINT_RATE = 1; + } + PC_CAFE_REWARD_LOW_EXP_KILLS = GameAssistant.getBoolean("RewardLowExpKills", true); + PC_CAFE_LOW_EXP_KILLS_CHANCE = GameAssistant.getInt("RewardLowExpKillsChance", 50); + if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; + } + if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; + } + GAME_ASSISTANT_ENABLED = GameAssistant.getBoolean("GameAssistantEnabled", false); + // Load General config file (if exists) final PropertiesParser General = new PropertiesParser(GENERAL_CONFIG_FILE); DEFAULT_ACCESS_LEVEL = General.getInt("DefaultAccessLevel", 0); @@ -3309,39 +3344,6 @@ public class Config final PropertiesParser PasswordChange = new PropertiesParser(CUSTOM_PASSWORD_CHANGE_CONFIG_FILE); ALLOW_CHANGE_PASSWORD = PasswordChange.getBoolean("AllowChangePassword", false); - // Load PcCafe config file (if exists) - final PropertiesParser PcCafe = new PropertiesParser(CUSTOM_PC_CAFE_CONFIG_FILE); - PC_CAFE_ENABLED = PcCafe.getBoolean("PcCafeEnabled", false); - PC_CAFE_ONLY_PREMIUM = PcCafe.getBoolean("PcCafeOnlyPremium", false); - PC_CAFE_ONLY_VIP = PcCafe.getBoolean("PcCafeOnlyVip", false); - PC_CAFE_MAX_POINTS = PcCafe.getInt("MaxPcCafePoints", 200000); - if (PC_CAFE_MAX_POINTS < 0) - { - PC_CAFE_MAX_POINTS = 0; - } - PC_CAFE_ENABLE_DOUBLE_POINTS = PcCafe.getBoolean("DoublingAcquisitionPoints", false); - PC_CAFE_DOUBLE_POINTS_CHANCE = PcCafe.getInt("DoublingAcquisitionPointsChance", 1); - if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) - { - PC_CAFE_DOUBLE_POINTS_CHANCE = 1; - } - PC_CAFE_POINT_RATE = PcCafe.getDouble("AcquisitionPointsRate", 1.0); - PC_CAFE_RANDOM_POINT = PcCafe.getBoolean("AcquisitionPointsRandom", false); - if (PC_CAFE_POINT_RATE < 0) - { - PC_CAFE_POINT_RATE = 1; - } - PC_CAFE_REWARD_LOW_EXP_KILLS = PcCafe.getBoolean("RewardLowExpKills", true); - PC_CAFE_LOW_EXP_KILLS_CHANCE = PcCafe.getInt("RewardLowExpKillsChance", 50); - if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; - } - if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; - } - final PropertiesParser vipSystem = new PropertiesParser(CUSTOM_VIP_CONFIG_FILE); VIP_SYSTEM_ENABLED = vipSystem.getBoolean("VipEnabled", false); if (VIP_SYSTEM_ENABLED) diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java index a73a4d2e95..e43678d782 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java @@ -61,12 +61,18 @@ public class ExOpenHtml implements IClientIncomingPacket } case 5: { - client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/GameAssistant/32478.html"))); + if (Config.GAME_ASSISTANT_ENABLED) + { + client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/GameAssistant/32478.html"))); + } break; } // case 7: // { + // if (Config.EINHASAD_STORE_ENABLED) + // { // client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/EinhasadStore/34487.html"))); + // } // break; // } default: diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/Custom/PcCafe.ini b/L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/config/GameAssistant.ini similarity index 78% rename from L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/Custom/PcCafe.ini rename to L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/config/GameAssistant.ini index 446f64c1fd..60a790a70b 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/config/Custom/PcCafe.ini +++ b/L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/config/GameAssistant.ini @@ -1,5 +1,5 @@ # --------------------------------------------------------------------------- -# PC Cafe (PC Bang) System +# PC Cafe (PC Bang) # --------------------------------------------------------------------------- # PC CAFE POINTS ID = -100 @@ -43,3 +43,10 @@ RewardLowExpKills = True # Used when RewardLowExpKills is enabled. # Default 50 (%) RewardLowExpKillsChance = 50 + + +# --------------------------------------------------------------------------- +# Game Assistant (Dimensional Merchant) +# --------------------------------------------------------------------------- +# Enable Game Assistant functions. +GameAssistantEnabled = True diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/Config.java index e5cd6e328a..77d24a3cf7 100644 --- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/Config.java @@ -95,6 +95,7 @@ public class Config private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GAME_ASSISTANT_CONFIG_FILE = "./config/GameAssistant.ini"; private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; @@ -134,7 +135,6 @@ public class Config private static final String CUSTOM_NPC_STAT_MULTIPLIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; private static final String CUSTOM_VIP_CONFIG_FILE = "./config/Custom/VipSystem.ini"; private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; @@ -871,6 +871,7 @@ public class Config public static int TRAINING_CAMP_MAX_LEVEL; public static double TRAINING_CAMP_EXP_MULTIPLIER; public static double TRAINING_CAMP_SP_MULTIPLIER; + public static boolean GAME_ASSISTANT_ENABLED; public static boolean SHOW_LICENCE; public static boolean SHOW_PI_AGREEMENT; public static boolean ACCEPT_NEW_GAMESERVER; @@ -1973,6 +1974,40 @@ public class Config TRAINING_CAMP_EXP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampExpMultiplier", 1.0); TRAINING_CAMP_SP_MULTIPLIER = trainingCampSettings.getDouble("TrainingCampSpMultiplier", 1.0); + // Load GameAssistant config file (if exists) + final PropertiesParser GameAssistant = new PropertiesParser(GAME_ASSISTANT_CONFIG_FILE); + PC_CAFE_ENABLED = GameAssistant.getBoolean("PcCafeEnabled", false); + PC_CAFE_ONLY_PREMIUM = GameAssistant.getBoolean("PcCafeOnlyPremium", false); + PC_CAFE_ONLY_VIP = GameAssistant.getBoolean("PcCafeOnlyVip", false); + PC_CAFE_MAX_POINTS = GameAssistant.getInt("MaxPcCafePoints", 200000); + if (PC_CAFE_MAX_POINTS < 0) + { + PC_CAFE_MAX_POINTS = 0; + } + PC_CAFE_ENABLE_DOUBLE_POINTS = GameAssistant.getBoolean("DoublingAcquisitionPoints", false); + PC_CAFE_DOUBLE_POINTS_CHANCE = GameAssistant.getInt("DoublingAcquisitionPointsChance", 1); + if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) + { + PC_CAFE_DOUBLE_POINTS_CHANCE = 1; + } + PC_CAFE_POINT_RATE = GameAssistant.getDouble("AcquisitionPointsRate", 1.0); + PC_CAFE_RANDOM_POINT = GameAssistant.getBoolean("AcquisitionPointsRandom", false); + if (PC_CAFE_POINT_RATE < 0) + { + PC_CAFE_POINT_RATE = 1; + } + PC_CAFE_REWARD_LOW_EXP_KILLS = GameAssistant.getBoolean("RewardLowExpKills", true); + PC_CAFE_LOW_EXP_KILLS_CHANCE = GameAssistant.getInt("RewardLowExpKillsChance", 50); + if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; + } + if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) + { + PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; + } + GAME_ASSISTANT_ENABLED = GameAssistant.getBoolean("GameAssistantEnabled", false); + // Load General config file (if exists) final PropertiesParser General = new PropertiesParser(GENERAL_CONFIG_FILE); DEFAULT_ACCESS_LEVEL = General.getInt("DefaultAccessLevel", 0); @@ -3309,39 +3344,6 @@ public class Config final PropertiesParser PasswordChange = new PropertiesParser(CUSTOM_PASSWORD_CHANGE_CONFIG_FILE); ALLOW_CHANGE_PASSWORD = PasswordChange.getBoolean("AllowChangePassword", false); - // Load PcCafe config file (if exists) - final PropertiesParser PcCafe = new PropertiesParser(CUSTOM_PC_CAFE_CONFIG_FILE); - PC_CAFE_ENABLED = PcCafe.getBoolean("PcCafeEnabled", false); - PC_CAFE_ONLY_PREMIUM = PcCafe.getBoolean("PcCafeOnlyPremium", false); - PC_CAFE_ONLY_VIP = PcCafe.getBoolean("PcCafeOnlyVip", false); - PC_CAFE_MAX_POINTS = PcCafe.getInt("MaxPcCafePoints", 200000); - if (PC_CAFE_MAX_POINTS < 0) - { - PC_CAFE_MAX_POINTS = 0; - } - PC_CAFE_ENABLE_DOUBLE_POINTS = PcCafe.getBoolean("DoublingAcquisitionPoints", false); - PC_CAFE_DOUBLE_POINTS_CHANCE = PcCafe.getInt("DoublingAcquisitionPointsChance", 1); - if ((PC_CAFE_DOUBLE_POINTS_CHANCE < 0) || (PC_CAFE_DOUBLE_POINTS_CHANCE > 100)) - { - PC_CAFE_DOUBLE_POINTS_CHANCE = 1; - } - PC_CAFE_POINT_RATE = PcCafe.getDouble("AcquisitionPointsRate", 1.0); - PC_CAFE_RANDOM_POINT = PcCafe.getBoolean("AcquisitionPointsRandom", false); - if (PC_CAFE_POINT_RATE < 0) - { - PC_CAFE_POINT_RATE = 1; - } - PC_CAFE_REWARD_LOW_EXP_KILLS = PcCafe.getBoolean("RewardLowExpKills", true); - PC_CAFE_LOW_EXP_KILLS_CHANCE = PcCafe.getInt("RewardLowExpKillsChance", 50); - if (PC_CAFE_LOW_EXP_KILLS_CHANCE < 0) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 0; - } - if (PC_CAFE_LOW_EXP_KILLS_CHANCE > 100) - { - PC_CAFE_LOW_EXP_KILLS_CHANCE = 100; - } - final PropertiesParser vipSystem = new PropertiesParser(CUSTOM_VIP_CONFIG_FILE); VIP_SYSTEM_ENABLED = vipSystem.getBoolean("VipEnabled", false); if (VIP_SYSTEM_ENABLED) diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java index a73a4d2e95..e43678d782 100644 --- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java +++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/ExOpenHtml.java @@ -61,12 +61,18 @@ public class ExOpenHtml implements IClientIncomingPacket } case 5: { - client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/GameAssistant/32478.html"))); + if (Config.GAME_ASSISTANT_ENABLED) + { + client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/GameAssistant/32478.html"))); + } break; } // case 7: // { + // if (Config.EINHASAD_STORE_ENABLED) + // { // client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/EinhasadStore/34487.html"))); + // } // break; // } default: