diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/config/Custom/AllowedPlayerRaces.ini b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/config/Custom/AllowedPlayerRaces.ini index 879637df4a..1389e33465 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/config/Custom/AllowedPlayerRaces.ini +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/config/Custom/AllowedPlayerRaces.ini @@ -11,4 +11,5 @@ AllowOrc = True AllowDwarf = True AllowKamael = True AllowDeathKnight = True -AllowSylph = True \ No newline at end of file +AllowSylph = True +AllowVanguard = True \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/Config.java index 8dc3c6eaba..f09388d321 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/Config.java @@ -1245,6 +1245,7 @@ public class Config public static boolean ALLOW_KAMAEL; public static boolean ALLOW_DEATH_KNIGHT; public static boolean ALLOW_SYLPH; + public static boolean ALLOW_VANGUARD; public static boolean AUTO_POTIONS_ENABLED; public static boolean AUTO_POTIONS_IN_OLYMPIAD; public static int AUTO_POTION_MIN_LEVEL; @@ -2725,6 +2726,7 @@ public class Config ALLOW_KAMAEL = allowedPlayerRacesConfig.getBoolean("AllowKamael", true); ALLOW_DEATH_KNIGHT = allowedPlayerRacesConfig.getBoolean("AllowDeathKnight", true); ALLOW_SYLPH = allowedPlayerRacesConfig.getBoolean("AllowSylph", true); + ALLOW_VANGUARD = allowedPlayerRacesConfig.getBoolean("AllowVanguard", true); // Load AutoPotions config file (if exists) final PropertiesParser autoPotionsConfig = new PropertiesParser(CUSTOM_AUTO_POTIONS_CONFIG_FILE); diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java index bda1bffdab..bf67ad4a82 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/CharacterCreate.java @@ -248,6 +248,12 @@ public class CharacterCreate implements IClientIncomingPacket return; } + if (!Config.ALLOW_VANGUARD && CategoryData.getInstance().isInCategory(CategoryType.VANGUARD_ALL_CLASS, _classId)) + { + client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED)); + return; + } + newChar = Player.create(template, client.getAccountName(), _name, new PlayerAppearance(_face, _hairColor, _hairStyle, _sex != 0)); }