Addition of Vanguard at Allowed Player Races configuration.

This commit is contained in:
MobiusDevelopment
2022-09-25 12:23:00 +00:00
parent 715a62acb1
commit d3e65bc5ed
3 changed files with 10 additions and 1 deletions

View File

@@ -11,4 +11,5 @@ AllowOrc = True
AllowDwarf = True AllowDwarf = True
AllowKamael = True AllowKamael = True
AllowDeathKnight = True AllowDeathKnight = True
AllowSylph = True AllowSylph = True
AllowVanguard = True

View File

@@ -1245,6 +1245,7 @@ public class Config
public static boolean ALLOW_KAMAEL; public static boolean ALLOW_KAMAEL;
public static boolean ALLOW_DEATH_KNIGHT; public static boolean ALLOW_DEATH_KNIGHT;
public static boolean ALLOW_SYLPH; public static boolean ALLOW_SYLPH;
public static boolean ALLOW_VANGUARD;
public static boolean AUTO_POTIONS_ENABLED; public static boolean AUTO_POTIONS_ENABLED;
public static boolean AUTO_POTIONS_IN_OLYMPIAD; public static boolean AUTO_POTIONS_IN_OLYMPIAD;
public static int AUTO_POTION_MIN_LEVEL; public static int AUTO_POTION_MIN_LEVEL;
@@ -2725,6 +2726,7 @@ public class Config
ALLOW_KAMAEL = allowedPlayerRacesConfig.getBoolean("AllowKamael", true); ALLOW_KAMAEL = allowedPlayerRacesConfig.getBoolean("AllowKamael", true);
ALLOW_DEATH_KNIGHT = allowedPlayerRacesConfig.getBoolean("AllowDeathKnight", true); ALLOW_DEATH_KNIGHT = allowedPlayerRacesConfig.getBoolean("AllowDeathKnight", true);
ALLOW_SYLPH = allowedPlayerRacesConfig.getBoolean("AllowSylph", true); ALLOW_SYLPH = allowedPlayerRacesConfig.getBoolean("AllowSylph", true);
ALLOW_VANGUARD = allowedPlayerRacesConfig.getBoolean("AllowVanguard", true);
// Load AutoPotions config file (if exists) // Load AutoPotions config file (if exists)
final PropertiesParser autoPotionsConfig = new PropertiesParser(CUSTOM_AUTO_POTIONS_CONFIG_FILE); final PropertiesParser autoPotionsConfig = new PropertiesParser(CUSTOM_AUTO_POTIONS_CONFIG_FILE);

View File

@@ -248,6 +248,12 @@ public class CharacterCreate implements IClientIncomingPacket
return; 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)); newChar = Player.create(template, client.getAccountName(), _name, new PlayerAppearance(_face, _hairColor, _hairStyle, _sex != 0));
} }