From 965594c906ff05f100cd821b2a1204dd5f47235c Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 26 May 2021 22:38:10 +0000 Subject: [PATCH] Custom AllowedPlayerRaces configuration for Sylph. Contributed by darkillust. --- .../dist/game/config/Rates.ini | 4 ++-- .../dist/game/config/Custom/AllowedPlayerRaces.ini | 1 + L2J_Mobius_Essence_5.0_Sylph/dist/game/config/Rates.ini | 4 ++-- .../java/org/l2jmobius/Config.java | 2 ++ .../network/clientpackets/CharacterCreate.java | 9 +++++++++ 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/Rates.ini b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/Rates.ini index ff370e2ee1..1a4d3cae27 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/Rates.ini +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/Rates.ini @@ -216,8 +216,8 @@ BlessingChance = 15.0 # --------------------------------------------------------------------------- # LCoin drops from mobs. -# Default: false -LCoinDropEnable = false +# Default: False +LCoinDropEnable = False # LCoin drop chance from normal mobs. # Default: 15.0 diff --git a/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/Custom/AllowedPlayerRaces.ini b/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/Custom/AllowedPlayerRaces.ini index 535a68d693..8ac60f0b74 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/Custom/AllowedPlayerRaces.ini +++ b/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/Custom/AllowedPlayerRaces.ini @@ -11,3 +11,4 @@ AllowOrc = True AllowDwarf = True AllowKamael = True AllowErtheia = True +AllowSylph = True diff --git a/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/Rates.ini b/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/Rates.ini index ff370e2ee1..1a4d3cae27 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/Rates.ini +++ b/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/Rates.ini @@ -216,8 +216,8 @@ BlessingChance = 15.0 # --------------------------------------------------------------------------- # LCoin drops from mobs. -# Default: false -LCoinDropEnable = false +# Default: False +LCoinDropEnable = False # LCoin drop chance from normal mobs. # Default: 15.0 diff --git a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/Config.java index 1cadc82004..c7be6f0598 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/Config.java @@ -1178,6 +1178,7 @@ public class Config public static boolean ALLOW_DWARF; public static boolean ALLOW_KAMAEL; public static boolean ALLOW_ERTHEIA; + public static boolean ALLOW_SYLPH; public static boolean AUTO_POTIONS_ENABLED; public static boolean AUTO_POTIONS_IN_OLYMPIAD; public static int AUTO_POTION_MIN_LEVEL; @@ -2500,6 +2501,7 @@ public class Config ALLOW_DWARF = AllowedPlayerRaces.getBoolean("AllowDwarf", true); ALLOW_KAMAEL = AllowedPlayerRaces.getBoolean("AllowKamael", true); ALLOW_ERTHEIA = AllowedPlayerRaces.getBoolean("AllowErtheia", true); + ALLOW_SYLPH = AllowedPlayerRaces.getBoolean("AllowSylph", true); // Load AutoPotions config file (if exists) final PropertiesParser AutoPotions = new PropertiesParser(CUSTOM_AUTO_POTIONS_CONFIG_FILE); diff --git a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java index 5685d768de..d31d68589b 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java +++ b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java @@ -236,6 +236,15 @@ public class CharacterCreate implements IClientIncomingPacket } break; } + case SYLPH: + { + if (!Config.ALLOW_SYLPH) + { + client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED)); + return; + } + break; + } } newChar = PlayerInstance.create(template, client.getAccountName(), _name, new PlayerAppearance(_face, _hairColor, _hairStyle, _sex != 0)); }